Model.imprint_geom#
- Model.imprint_geom(collection_target, collection_source, options)#
Imprints, connects source points, nodes, lines and surfaces onto target FE surfaces. This function does not support surfaces that are not FE. Points and lines could be any type. In the case that input is an FE entity, the function optionally remeshes the input entities.
- Parameters:
collection_target (Collection) – The collection containing the entities to use as the target (destination) for the imprint. Valid entities are surfaces.
collection_source (Collection) – The collection containing the entities to use as the source for the imprint. Valid entities are points, nodes, lines, surfaces.
options (hwString) –
List of input options, passed as a space separated string enclosed in quotes. Valid options are:
angle
The angle used to define feature edges on the mesh. If not defined, 25.0 is used.
max_distance
The function will exit with an error if the distance between source and destination exceeds this value. If not specified, this is ignored.
mesh_size
Automatically detected from input mesh if not provided.
mesh_type
Automatically detected from input mesh if not provided. Valid values are:
0 - tria
1 - quad
2 - mixed
3 - R-tria
4 - quad only
projection
0 - Normal to destination (default if not provided).
1 - Along tangent.
2 - Along vector direction, if defined 3 doubles should be defined in projection_vector.
projection_vector
The 3 doubles defining the vector direction. Should be defined if projection is set to 2.
remain
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.
4 - Create patch between source entities and the imprinted copy to destination.
remesh_mode
-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
Must be defined if remesh_mode is 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. .
to_dest_component
-1 - Create elements in source component.
0 - Create elements in current component (default if not provided).
1 - Create elements in destination component.
do_not_remesh_rebuild_extn
0 - Remesh / rebuild extension (default is not provided).
1 - Do not remesh / rebuild extension.
do_not_add_fixed_points_edges
0 - Add fixed points / edges on nodes imprint (default if not provided).
1 - Do not add fixed points / edges on nodes imprint.
anchor_nodes_mark
The ID of the mark containing the anchor nodes used for imprint. If not provided no anchor nodes are used for imprint.
Example#
Imprint surfaces with IDs 20 and 21 onto surface with ID 45, using a normal projection, a feature angle of 30, keeping the source, and remeshing the destination using 2 layers#import hm import hm.entities as ent model = hm.Model() target_surface_collection = hm.Collection(model, ent.Surface, [20, 21]) source_surface_collection = hm.Collection(model, ent.Surface, [45]) model.imprint_geom( collection_target=target_surface_collection, collection_source=source_surface_collection, options="remain 1 remesh_mode 2 remesh_layers 2 angle 30.0", )