Model.lineextendtopoint#
- Model.lineextendtopoint(line, point, capture_radius, derivative, direction)#
Extends the specified line to a point.
- Parameters:
line (Entity) – The line entity to extend.
point (Entity) – The point entity to which the line is extended.
capture_radius (double) – If the point at the end of the extension is within the
capture_radiusof the point, then force the end point to have the same coordinates as the point.derivative (int) –
1 - Extend the tangent to the line
2 - Extend following the curvature of the line
direction (int) –
-1 - Extend the beginning of the line
1 - Extend the end of the line
Example#
Extend the line with ID 1 to the point with ID 2 with a capture radius of 1.0 . The extend line should be tangent tolineand extended from the end of the line .#import hm import hm.entities as ent model = hm.Model model.lineextendtopoint( line=ent.Line(model, 1), point=ent.Point(model, 2), capture_radius=1.0, derivative=1, direction=1, )