Model.morphmaptoextendedvecoffset#
- Model.morphmaptoextendedvecoffset(collection_nodes, collection_handles, collection_map, use_symmetry, use_constraints, project, vector, mode, offset)#
Maps nodes to, or offset from, a collection of extended surfaces or elements using the temporary shape created by
Model.morphmaptshp()andModel.morphmaptshpedge()as a guide. Selected handles can optionally follow behind the morphing operation.Nodes can be projected on to the target extended surfaces or elements along a vector, normal to the surfaces or elements, or normal to the shell elements attached to the nodes.
- Parameters:
collection_nodes (Collection) – The collection containing the node entities.
collection_handles (Collection) – The collection containing the following handle entities.
collection_map (Collection) – The collection containing the entities to map to. Valid entities are surfaces and elements
use_symmetry (int) – 0 - Do not use symmetry links (only option).
use_constraints (int) –
0 - Do not use constraints
1 - Use constraints
project (int) –
0 or 10 - Project along vector defined by vector_id
1 or 11 - Project normal to target surfaces or elements
2 or 12 - Project normal to attached shell elements
If
offsetis non-zero, the offset will be measured from the closest point on the equation for values of 0, 1 and 2. The offset will be measured along the projection vector or normal for values of 10, 11, and 12.vector (hwTriple) – The hwTriple object defining the vector components. User can also supply a Python list of three doubles.
mode (int) –
0 - If
Model.morphmaprecalc()has been used to calculate new influences1 - To recalculate new influences inside this function
offset (double) –
The distance to offset nodes from the target.
The offset will be measured from the closest point on the surfaces or elements for values of
projectof 0, 1, and 2.The offset will be measured along the projection vector normal for values of
projectof 10, 11, and 12.
Example#
Map all nodes to extended elementswith IDs 1-100 with an offset of 1.2 when not usingModel.morphmaprecalc()#import hm import hm.entities as ent model = hm.Model() model.morphmaptoextendedvecoffset( collection_nodes=hm.Collection(model, ent.Node), collection_handles=hm.CollectionByInteractiveSelection(model, ent.Handle), collection_map=hm.Collection(model, ent.Element, list(range(1,101))), use_symmetry=0, use_constraints=1, project=2, vector=[1.0, 0.0, 0.0], mode=1, offset=1.2, )