Model.imprint_nodelist#
- Model.imprint_nodelist(list_source, collection_target, options)#
Imprints, connects and optionally remeshes source segments defined by a node list onto target 2D elements.
- Parameters:
list_source (EntityList) – A list containing the source node entities defining the segments to imprint.
collection_target (Collection) – The collection containing the target entities to imprint onto. Valid entities are components and elements.
options (hwString) –
Additional strings defining extended parameters/options. Options are defined in
"name value(s)"format. Valid options are:projection_vector xyz
The 3 doubles defining the vector direction. If not defined, normal projection is used.
remain value
1 - Source remains, source node coordinates are kept (default if not provided).
2 - Destination remains, node coordinates projected to destination are used.
3 - Both remain, source entities are projected and a copy is imprinted to destination.
max_distance value
The function will exit with an error if the distance between source and destination exceeds this value. If not specified, this is ignored.
to_dest_component value
0 - Do not organize imprinted elements to destination component (default if not provided).
1 - Organize imprinted elements to destination component.
angle value
The angle used to define feature edges on the mesh. If not defined, 25.0 is used.
remesh_mode value
-1 - No remesh. Element connectivity is maintained by recovery of the imprinting element edges.
0 - Do not remesh destination. Destination mesh is stitched to maintain element connectivity.
1 - Remesh all input destination elements.
2 - Remesh destination elements defined by remesh_layers.
remesh_layers value
Must be defined if remesh_mode is set to 2.
0 - Remesh only the elements attached to the border of the imprinted element image.
> 0 - Remesh additional layers in addition to the elements attached to the imprinted element image.
mesh_type value
Automatically detected from input mesh if not provided.
0 - tria
1 - quad
2 - mixed
3 - R-tria
4 - quad only
mesh_size value
Automatically detected from input mesh if not provided.
create_joint_elems value
Only valid when remain is set to 3.
0 - Do not generate patch elements between source segments and destination elements (default if not provided).
1 - Generate patch elements between source segments and destination elements.
close_node_list value
0 - Do not generate a segment between the last node and the first node to close the list as a loop (default if not provided).
1 - Generate a segment between the last node and the first node to close the list as a loop.
Example#
Imprint the segments defined by a list of nodes with IDs 1-4 onto the elements in component “destination”#import hm import hm.entities as ent model = hm.Model() node_list = [ ent.Node(model, 1), ent.Node(model, 2), ent.Node(model, 3), ent.Node(model, 4), ] component_collection = hm.Collection(model, ent.Component, "name=destination") model.imprint_nodelist( list_source=node_list, collection_target=component_collection, options="remain 1 to_dest_component 0 remesh_mode 2 remesh_layers 2 angle 30.000000", )