Model.hm_linegetordernodes#
- Model.hm_linegetordernodes(lines, tolerance=-1)#
Returns a list of lists for all input free edges. The first element of each list is the ID of the free edge and subsequent elements of that list are the IDs of the associated nodes.
- Parameters:
lines (Collection) – The collection containing the line entities. Only free lines are considered.
tolerance (double) – The tolerance to compare association of nodes with respect to an orphan line. In the absence of this argument, best associated nodes will be returned.
- Returns:
hwReturnStatus- Status objectHmQueryResultList- Result list object containingHmQueryResultobjects with the following output data:
Example#
Find nodes for all free lines use a tolerance of 0.5#import hm import hm.entities as ent model = hm.Model() lines = hm.Collection(model, ent.Line, populate=True) _,resultlist = model.hm_linegetordernodes(lines=lines,tolerance=0.5) for result in resultlist: print("line", result.line) print("node", result.nodes)