Model.solid_prepare_nodeline#

Model.solid_prepare_nodeline(start)#

Setups an internal node array that is used by the solid mapping algorithm. It must be used within a Model.solidmap_prepare_usrdataptr() data input block. A data input block begins with Model.solidmap_prepare_usrdataptr() and ends with either a call to Model.solidmap_end() or the start of another data input sub-block.

Parameters:

start (int) – A flag that indicates how to handle the nodes on the previous node collection. A value of 0 indicates to start a new internal node array. Otherwise, the list is appended to the previous internal node array.

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)