Model.set_preserved_edges#

Model.set_preserved_edges(hmlinescollection, new_stat)#

Marks edge geometry to be preserved during batch meshing, or clears the “preserved” flag from preserved edges.

Parameters:
  • hmlinescollection (Collection) – The collection containing the line entities to flag. Setting to empty collection indicates all lines.

  • new_stat (int) –

    0 - The preservation flag is cleared from the lines.

    1 - The lines are marked as preserved.

Example#

Preserve the lines with IDs 1,2,3 .#
import hm
import hm.entities as ent

model = hm.Model()

model.set_preserved_edges(
    hmlinescollection=hm.Collection(model, ent.Line, [1, 2, 3]), new_stat=1
)