Model.elementqualityplacenodenew#

Model.elementqualityplacenodenew(node_id, x, y, z, normal_flag=0, boundary_flag=0, midnodes_flag=1)#

Moves the specified node to a target point. This function only functions between an Model.elementqualitysetup() function and an Model.elementqualityshutdown() function.

Parameters:
  • node_id (int) – The node ID to move.

  • x (double) – The x-coordinate of the target point.

  • y (double) – The y-coordinate of the target point.

  • z (double) – The z-coordinate of the target point.

  • normal_flag (int) –

    0 - Allow movement along the surface.

    1 - Allow movement normal to the surface.

  • boundary_flag (int) –

    0 - Allow movement within the boundary.

    1 - Allow movement out of the boundary.

  • midnodes_flag (int) –

    0 - Do not consider neighboring mid-nodes during optimization.

    1 - Consider neighboring mid-nodes during optimization.

Example#

Place the node with ID 102 , use a target point of 10.0 , 5.0 , 0.0 , allow normal movement within the boundary#
import hm
import hm.entities as ent

model = hm.Model()

elems = model.CreateCollectionByDisplayed(ent.Element)
model.elementqualitysetup(elementcollection=elems)

model.elementqualityplacenodenew(node_id=102, x=10.0, y=5.0, z=0.0, normal_flag=1, boundary_flag=0, midnodes_flag=0)

model.elementqualityshutdown(dontsaveflag=1)