Model.elementqualitycollapseedge#

Model.elementqualitycollapseedge(element, edge_index, optimize=False)#

Collapses an edge between two elements. 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 and may be applied at any time without resetting the current quality criteria.

Parameters:
  • element (Entity) – The object describing the element entity.

  • edge_index (int) – The id of the line entity that refers to the edge to collapse.

  • optimize (bool) – Option to optimize the node after the collapse operation is performed (default False).

Example#

Collapse an element of ID 20 and edge index of 2 with optimization#
import hm
import hm.entities as ent

model = hm.Model()

collection = hm.Collection(model, hm.FilterByEnumeration(ent.Element, ids=hm.hwUIntList([])))
model.elementqualitysetup_new(collection=collection)

model.elementqualitycollapseedge(element=ent.Element(model,20), edge_index=2, optimize=True)

model.elementqualityshutdown(dontsaveflag=0)