Model.solid_prepare_entitylst#
- Model.solid_prepare_entitylst(entity_type, reserved)#
Setups internal entity arrays that are used by the solid mapping algorithm. It must be used within a
Model.solidmap_prepare_usrdataptr()data input block. A data input block begins withModel.solidmap_prepare_usrdataptr()and ends with either a call toModel.solidmap_end()or the start of another data input sub-block.- Parameters:
entity_type (EntityFullType) –
The type of entity contained on the first collection. Valid entitites are lines, surfaces or elements.
For SOURCE data input blocks, elements are required to be specified either directly using this function or indirectly by auto-completing the selection based on the input geometry.
For DEST data input blocks, if the elements bit is specified for the
Model.solidmap_prepare_usrdataptr()function but no elements are specified using this function, the selection is auto-completed based on the input geometry.reserved (unsigned int) – Reserved for future use. Must be set to 0.
Example#
For a solidmap using the following inputs: Source geometry - lines with IDs 73 and 51; Destination geometry - lines with IDs 32 and 41; Along geometry - lines with IDs 74 and 75, surfaces with IDs 100 and 95, nodes with IDs 80 and 101-105; Element size - 10.0#import hm import hm.entities as ent model = hm.Model() model.solidmap_begin(ordered=1) model.solidmap_prepare_usrdataptr(type="SOURCE", options=10) source_line_collection = hm.Collection(model, ent.Line, [73, 51]) model.solid_prepare_entitylst(entity_type=ent.Line, reserved=0) model.solidmap_prepare_usrdataptr(type="DEST", options=2) dest_line_collection = hm.Collection(model, ent.Line, [32, 41]) model.solid_prepare_entitylst(entity_type=ent.Line, reserved=0) model.solidmap_prepare_usrdataptr(type="ALONG", options=7) along_line_collection = hm.Collection(model, ent.Line, [74, 75]) model.solid_prepare_entitylst(entity_type=ent.Line, reserved=0) surfaces_collection = hm.Collection(model, ent.Surface, [100, 95]) model.solid_prepare_entitylst(entity_type=ent.Surface, reserved=0) node_list = [ ent.Node(model, 80), ent.Node(model, 101), ent.Node(model, 102), ent.Node(model, 103), ent.Node(model, 104), ent.Node(model, 105), ] model.solid_prepare_nodeline(start=0) model.solidmap_end(options=0, density_or_size=10.0, bias_style=0, biasing=0, elemDest=0)