Model.rotatemark#
- Model.rotatemark(collection, plane_normal, plane_base, angle)#
Rotates a selection of entities about a plane.
- Parameters:
collection (Collection) – The collection containing the entities to rotate.
plane_normal (hwTriple) – The hwTriple object defining the 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.
angle (double) – The angle to rotate in degrees.
Example#
Rotate the elements with IDs 56 and 57 about the z axis ( 30.0 degrees ) with an origin of ( 3.0,4.0,0.0 )#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the elements to rotate element_collection = hm.Collection(model, ent.Element, [56, 57]) model.rotatemark( collection=element_collection, plane_normal=[0.0, 0.0, 1.0], plane_base=[3.0, 4.0, 0.0], angle=30.0, )