Model.linemarkremovepinholes#

Model.linemarkremovepinholes(collection, exclude_point)#

Removes 2D holes in the geometry. The holes are supposed to have only one boundary line.

The function removes these holes by filling it with surface. When possible, the new surface is created without any boundary, thus the surrounding surface just extends to fill the hole. Otherwise, the boundary of the new surface is suppressed so that it becomes a single surface together with its surrounding surface.

Parameters:
  • collection (Collection) – The collection containing the iinput line entities defining the hole perimeters.

  • exclude_point (int) –

    0 - Create a point at the center of the hole.

    1 - Do not create a point at the center of the hole.

Example#

Remove the holes that are bounded by lines with IDs 20 and 21 , create a vertex point at their center#
import hm
import hm.entities as ent

model = hm.Model()

model.linemarkremovepinholes(
    collection=hm.Collection(model, ent.Line, [20, 21]), exclude_point=0
)