Model.solidmap_prepare_usrdataptr#
- Model.solidmap_prepare_usrdataptr(type, options)#
Setups the source, destination and along inputs to be used by the solid mapping algorithm. It must be used within a
Model.solidmap_begin()andModel.solidmap_end()function block. A single solidmap mesh is a result of the block of functions.In a solidmap function block, all of the functions before
Model.solidmap_end()are for preparing input data.Model.solidmap_end()is the function that actually performs the solid mapping.A data input sub-block starts with this function and ends with either a call to
Model.solidmap_end()or the start of another data input sub-block. The three sub-block types do not all need to be present in a solidmap function block. Not all entity types included in options need to be input. For example:Means in solidmap, lines and elements are used as the source. However, one could just input lines. The required elements would be calculated from these lines inside of the solidmapper. This is the auto-completion feature of solidmap.
- Parameters:
type (hwString) –
One of the three types of the input data sub block. Valid values are:
SOURCE - Data input next will be for defining the source.
DEST - Data input next will be for defining the destination.
ALONG - Data input next will be for defining the along.
options (unsigned int) – For SOURCE data input blocks, elements (Bit3) are required to be specified even if Bit3 is 0. Internally, solidmap sets this bit to 1 for SOURCE data input blocks regardless of the user setting. For the
optionvalues please see (Model.solidmap_solids_begin()ormodel.solidmap_solids_begin2()).
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)