Model.morphreflectshapemark#
- Model.morphreflectshapemark(s_collection, sym_collection, a_collection, mode, tol, con)#
Reflects each shape on
s_collectionand reflect them according to each symmetry onsym_collectionand affect only the nodes ona_collection. The shapes may be applied to the mesh, created as new shapes, added to existing shapes, or may replace existing shapes.- Parameters:
s_collection (Collection) – The collection containing the input shape entities.
sym_collection (Collection) – The collection containing the symmetry entities.
a_collection (Collection) – The collection containing the target node entities.
mode (int) –
0 - Apply each shape to the mesh
1 - Apply each shape and add the perturbations to the original shape
2 - Apply each shape and overwrite the original shape
3 - Apply each shape and create a new shape or shapes
4 - Create a new shape or shapes but do not apply them to the mesh
tol (double) – The “envelope” or distance around the translated shape inside which nodes are affected.
con (int) –
0 - Do not use constraints
1 - Use constraints
Examples#
Reflect the shape with ID 1 using the symmetry with ID 1 and apply it to the mesh#import hm import hm.entities as ent model = hm.Model() model.morphreflectshapemark( s_collection=hm.Collection(model, ent.Shape, [1]), sym_collection=hm.Collection(model, ent.Symmetry, [1]), a_collection=hm.Collection(model, ent.Node), mode=0, tol=3.0, con=1, )
Reflect all shapes using all symmetries and create new shapes, but only on selected nodes#import hm import hm.entities as ent model = hm.Model() model.morphreflectshapemark( s_collection=hm.Collection(model, ent.Shape), sym_collection=hm.Collection(model, ent.Symmetry), a_collection=hm.Collection( model, ent.Node, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] ), mode=4, tol=3.0, con=1, )