Model.linecombinemark#
- Model.linecombinemark(collection, tolerance, break_angle, smooth)#
Combines multiple free lines into one or more continuous segments.
- Parameters:
collection (Collection) – The collection containing the input free line entities to combine them into one or more continuous segments.
tolerance (double) –
The tolerance to use when determining if two adjacent lines should be combined. If the distance between the adjacent end points of the lines is greater than this value, those lines are not combined.
If more than two end points are within this distance, the affected lines are not combined at that location.
break_angle (double) – The break angle to use when determining if two adjacent lines should be combined. If the angle between the adjacent lines is greater than this value, those lines are not combined.
smooth (int) – A flag that determines whether the lines should be combined with a straight line segment (0) or a smooth line segment (1) if the end points of the lines are not coincident.
Example#
Combine all free lines as straight line segments , use a tolerance of 0.01 and a break angle of 30.0#import hm import hm.entities as ent model = hm.Model() model.linecombinemark( collection=hm.Collection(model, ent.Line), tolerance=0.01, break_angle=30.0, smooth=0, )