Model.linesplitatmultiplelines#

Model.linesplitatmultiplelines(target_collection, trim_collection, cross_trim=0)#

Splits the target group of free lines by a selected group of cut lines or edges. It can work with a single cut line and multiple cut lines.

Parameters:
  • target_collection (Collection) – The collection containing the target free line entities to be cut.

  • trim_collection (Collection) – The collection containing the edge (line) entities as cut lines.

  • cross_trim (int) –

    Specifies which lines will be cut. Valid values are:

    0 - Free lines in target_collection are trimmed by lines in trim_collection (default)

    1 - The trim_collection is ignored: all lines in target_collection are cut by one another

Example#

Trim the lines with IDs 3595 , 3596 , and 3597 with the lines IDs 3425 , 3426 , 3427 , and 3428#
import hm
import hm.entities as ent

model = hm.Model()

model.linesplitatmultiplelines(
    target_collection=hm.Collection(model, ent.Line, [3595, 3596, 3597]),
    trim_collection=hm.Collection(model, ent.Line, [3425, 3426, 3427, 3428]),
)