Model.tangentbetweennodeandline#

Model.tangentbetweennodeandline(node_entity, line_entity, checkpoints, lineselected)#

Creates a tangent line between a node and a line.

Parameters:
  • node_entity (Entity) – The object describing the node entity to which the tangent line is to be created.

  • line_entity (Entity) – The object describing the line entity which the tangent line is to be created.

  • checkpoints (int) – The number of points to check in each line segment for tangency.

  • lineselected (int) – The tangent line selected, if more than one exists.

Example#

Create a tangent between the node with ID 1 and the line with ID 10#
import hm
import hm.entities as ent

model = hm.Model()

model.tangentbetweennodeandline(
    node_entity=ent.Node(model, 1),
    line_entity=ent.Line(model, 10),
    checkpoints=10,
    lineselected=0,
)

Note

If more than one tangent line is found, you must select the necessary tangent line. The ID of this line (based on the order in which the tangents were found) is then used in the argument lineselected.