Model.scalemark#
- Model.scalemark(collection, scale_x, scale_y, scale_z, origin)#
Scales a selection of entities by multiplying the coordinates.
- Parameters:
collection (Collection) – The collection containing the entities to translate.
scale_x (double) – The multiplication factor for the x-coordinate.
scale_y (double) – The multiplication factor for the y-coordinate.
scale_z (double) – The multiplication factor for the z-coordinate.
origin (Entity) – The node ID defining the origin of the scaling. If set to 0, the global origin is used.
Example#
Scale the component named “ top “ uniformly 10 times about node with ID 3#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the component component_collection = hm.Collection(model, ent.Component, "name=top") model.scalemark( collection=component_collection, scale_x=10.0, scale_y=10.0, scale_z=10.0, origin=ent.Node(model, 3), )