Model.morphhandleprojectplane#
- Model.morphhandleprojectplane(h_collection, p_collection, plane_normal, plane_base, nproj, proj, sym, con)#
Moves each of the selected handles on to the defined plane along a direction defined by the projection type. Applying symmetry links and constraints is optional. All domains influenced by the selected handles will be morphed accordingly.
If
nproj=2, the elements on the collection will be used to determine the projection direction for the handles. If no elements are on the collection then all shell elements will be used to determine the projection directions.Handles linked through symmetry to those selected will be moved in a way that mirrors the selected handles which may or may not move them to the specified plane.
Constraints may move the perturbed handles off of the specified plane after the handles are moved to the plane.
- Parameters:
h_collection (Collection) – The collection containing the handle entities to move.
p_collection (Collection) – The collection containing the normal element entities.
plane_normal (hwTriple) – The hwTriple object defining plane normal components. User can also supply a Python list of three doubles.
plane_base (hwTriple) – The hwTriple object defining the base point components of the plane. User can also supply a Python list of three doubles.
nproj (int) –
0 - Project along vector
proj1 - Project normal to line
2 - Project normal to elements in
p_collectionproj (hwTriple) – The hwTriple object defining the components of the temporary projeciton vector. User can also supply a Python list of three doubles.
sym (int) –
0 - Ignore symmetry links
1 - Apply symmetry links
con (int) –
0 - Ignore constraints
1 - Apply constraints after perturbing handles
Examples#
Project handles to a plane along a vector#import hm import hm.entities as ent model = hm.Model() model.morphhandleprojectplane( h_collection=hm.Collection(model, ent.Handle), p_collection=hm.CollectionByInteractiveSelection(model, ent.Element), plane_normal=[1.0, 0.0, 0.0], plane_normal_base=[1.0, 0.0, 0.0], nproj=0, proj=[1.0, 0.0, 0.0], sym=1, con=1, )
Project handles to a plane normal to the plane#import hm import hm.entities as ent model = hm.Model() model.morphhandleprojectplane( h_collection=hm.Collection(model, ent.Handle), p_collection=hm.CollectionByInteractiveSelection(model, ent.Element), plane_normal=[1.0, 0.0, 0.0], plane_normal_base=[1.0, 0.0, 0.0], nproj=1, proj=[1.0, 0.0, 0.0], sym=1, con=1, )
Project handles to a plane normal to the elements#import hm import hm.entities as ent model = hm.Model() model.morphhandleprojectplane( h_collection=hm.Collection(model, ent.Handle), p_collection=hm.Collection(model, ent.Element, [1, 2, 3, 4, 5, 6]), plane_normal=[1.0, 0.0, 0.0], plane_normal_base=[1.0, 0.0, 0.0], nproj=2, proj=[1.0, 0.0, 0.0], sym=1, con=1, )