Model.translatemarkwithsystem#
- Model.translatemarkwithsystem(collection, vector, distance, system_entity, origin)#
Translates a selection of entities along a vector of the specified system.
- Parameters:
collection (Collection) – The collection containing the entities to be translated.
vector (hwTriple) – The hwTriple object defining the vector components. User can also supply a Python list of three doubles.
distance (double) – The distance to translate.
system_entity (Entity) – The object describing the
Systementity which the vector is relative to.origin (Entity) – If zero, the vector is based at the origin of the system. Otherwise, it specifies a
NodeID whose coordinates define the base point of the vector.
Example#
Translate node with ID 1 , 5.0 units along the y - axis of system 13 with node with ID 2 being the origin#import hm import hm.entities as ent model = hm.Model() # Creating collection containing node with ID 1 input_collection = hm.Collection(model, ent.Node, [1]) model.translatemarkwithsystem( collection=input_collection, vector=[0.0, 1.0, 0.0], distance=5.0, system_entity=ent.System(model,13), origin=ent.Node(model,2), )