Model.lineextendtonode#
- Model.lineextendtonode(line, node, capture_radius, derivative, direction)#
Extends the specified line to a node.
- Parameters:
line (Entity) – The line entity to extend.
node (Entity) – The node 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 node, then force the end point to have the same coordinates as the node.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 node 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.lineextendtonode( line=ent.Line(model, 1), node=ent.Node(model, 2), capture_radius=1.0, derivative=1, direction=1, )