Model.multi_trim_by_offset_edges#

Model.multi_trim_by_offset_edges(surfaces, lines, offset_distance=0, offset_count=1)#

Offsets the selected edges and trims the input surfaces using the offset edges. You have the option to offset the original edges with the same distance multiple times.

Parameters:
  • surfaces (Collection) – The collection containing the input surface entities.

  • lines (Collection) – The collection containing the input line entities to be used for offsetting and trimming the input surfaces.

  • offset_distance (double) – The offset distance.

  • offset_count (int) – The number of offsets to be performed. The value should be greater than 0.

Example#

Trim surface with ID 2 by offset edges with IDs 10, 12, 14, 15 by distance 5.0, for 4 times#
import hm
import hm.entities as ent

model = hm.Model()

model.multi_trim_by_offset_edges(
    surfaces=hm.Collection(model, ent.Surface, [2]),
    lines=hm.Collection(model, ent.Line, [10, 12, 14, 15]),
    offset_distance=5.0,
    offset_count=4,
)