Model.vectorupdate_xproduct#
- Model.vectorupdate_xproduct(collection, basenode, vector_a, vector_b, magnitude, baseflag, directionflag)#
Updates a vector entity created from the cross product of two other vectors.
- Parameters:
collection (Collection) – The collection containing the vector entities to be updated.
basenode (Entity) – The object describing the node where the base of the result is located after it is updated.
vector_a (Entity) – The object describing the first vector entity.
vector_b (Entity) – The object describing the second vector entity.
magnitude (double) – The magnitude of the vector.
baseflag (int) –
A flag to update the base node of the vector.
Valid values are:
0 - False
1 - True
directionflag (int) –
A flag to update the direction and magnitude of the vector.
Valid values are:
0 - False
1 - True
Example#
Update the vector with ID 1 from the cross product of the vectors with IDs 3 , 4 . The ID of the base node is 1 and the magnitude of the vector is 2.0#import hm import hm.entities as ent model = hm.Model() # The collection that contains the vector to update vector_collection = hm.Collection(model, ent.Vector, [1]) model.vectorupdate_xproduct( collection=vector_collection, basenode=ent.Node(model, 2), vector_a=ent.Vector(model, 3), vector_b=ent.Vector(model, 4), magnitude=2.0, baseflag=1, directionflag=1, )