Model.lineextendtosurf#

Model.lineextendtosurf(line, surface, capture_radius, derivative, direction)#

Extends the specified line to a surface.

Parameters:
  • line (Entity) – The line entity to extend.

  • surface (Entity) – The surface entity to which the line is extended.

  • capture_radius (double) – If the point at the end of the extension is within the capture_radius of the surface, then force the end point to be on the surface.

  • 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 surface with ID 2 with a capture radius of 1.0 . The extend line should be tangent to line and extended from the end of the line .#
import hm
import hm.entities as ent

model = hm.Model

model.lineextendtosurf(
    line=ent.Line(model, 1),
    surface=ent.Surface(model, 2),
    capture_radius=1.0,
    derivative=1,
    direction=1,
)