Model.linemarkbypath#
- Model.linemarkbypath(line_entity1, line_entity2, collection, flag)#
Creates a line path from the starting line to the ending line.
- Parameters:
line_entity1 (Entity) – The object describing the first line entity.
line_entity2 (Entity) – The object describing the second line entity.
collection (Collection) – The collection to be populated.
flag (int) –
0 - If both
line_entity1andline_entity2lie are free edges, the path will follow free edges where possible. Otherwise, the shortest path is returned.1 - Always return the shortest path.
Example#
Determine the path between lines with IDs 100 and 110 use the shortest path#import hm import hm.entities as ent model = hm.Model() collection_populate = hm.Collection(model, ent.Line, populate=False) model.linemarkbypath( line_entity1=ent.Line(model, 100), line_entity2=ent.Line(model, 110), collection=collection_populate, flag=1, )