Model.elementqualitydragtriaelem#

Model.elementqualitydragtriaelem(elem_id, px, py, pz, merge_tria=1, end=1)#

This function, within the interactive cleanup tool, moves a tria element towards a specified point. This function only functions between an Model.elementqualitysetup() function and an Model.elementqualityshutdown() function. Current element quality criteria for optimization must be set before using this function. The function may be applied at any time without resetting the current quality criteria.

Parameters:
  • elem_id (int) – The tria element ID.

  • px (double) – Coordinate x of a point that defines the drag direction.

  • py (double) – Coordinate y of a point that defines the drag direction.

  • pz (double) – Coordinate z of a point that defines the drag direction.

  • merge_tria (int) –

    0 - Do not merge trias when they are close together.

    1 - Merge trias when they come close together.

  • end (int) –

    0 - This is an intermediate movement and there are additional movements following this one.

    1 - This is the last call of this function.

Example#

Drag tria element 3 towards ( 5.7 , 3.78 , 991.0 ) use quality criteria from a file#
import hm
import hm.entities as ent

model = hm.Model()

model.readqualitycriteria(file_name="c:/criteria/mycriteria.txt")

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

model.elementqualitydragtriaelem(elem_id=3, px=5.7, py=3.78, pz=9991.0, merge_tria=0,end=1)

model.elementqualityshutdown(dontsaveflag=1)