Model.elementquality_move_node#
- Model.elementquality_move_node(nodeId, movelength, x, y, z)#
Moves a node from its current position to a new position to improve element quality. The function supports three different use cases: move a node to a specific position, translate the node in a specified direction, or translate it along its normal vector.
- Parameters:
nodeId (int) – The ID of the node.
movelength (double) – The distance to translate the node. The value can be positive or negative.
x (double) – The x-component of the directional vector or the x-coordinate of the new position.
y (double) – The y-component of the directional vector or the y-coordinate of the new position.
z (double) – The z-component of the directional vector or the z-coordinate of the new position.
Examples#
Move node with ID 15 to a new position with coordinates x = 25.5 , y = 65.9 , z = 15.9#import hm import hm.entities as ent model = hm.Model() model.elementquality_move_node(nodeId=15, x=25.5, y=65.9, z=15.9)
Translate node ID 15 by 6.5 units in the positive direction defined by vector ( 0 , 1 , 1 )#import hm import hm.entities as ent model = hm.Model() model.elementquality_move_node(nodeId=15, movelength=6.5, x=0, y=1, z=1)
Translate node ID 15 by 6.5 units in the normal direction#import hm import hm.entities as ent model = hm.Model() model.elementquality_move_node(nodeId=15, movelength=6.5)