Skip to content

PerpendicularCalculus

Canonical path: NemAll_Python_Geometry.PerpendicularCalculus

Class for perpendicular calculation

Methods:

  • Calculate

    dummy, is only needed for the creation of the documentation by MkDocs

  • GetTangent

    Get the tangent of the geometry

  • IsInsideElement

    Check, whether the perpendicular point is inside the element

  • IsSuccessful

    Get the result of the calculation

  • IsSupportedGeometry

    Check, whether geometry is supported

  • __init__

    dummy, is only needed for the creation of the documentation by MkDocs

Calculate overloaded

Calculate(
    geoObject_object: object,
    inputPnt: Point3D,
    eps: float,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on IGeometry object.

Parameters:

  • geoObject_object (object) –

    IGeometry on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    path: Path2D,
    inputPnt: Point3D,
    eps: float,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on a path of multiple objects.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • path (Path2D) –

    Path on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    path: Path2D,
    inputPnt: Point3D,
    eps: float,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D]

Calculates perpendicular point on a path of multiple objects.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • path (Path2D) –

    Path on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point)

Calculate(
    line2d: Line2D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Line2D object.

Parameters:

  • line2d (Line2D) –

    Line2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    line2d: Line2D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D]

Calculates perpendicular point on Line2D object.

Parameters:

  • line2d (Line2D) –

    Line2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point)

Calculate(axis: Axis2D, inputPnt: Point3D) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Axis2D object.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • axis (Axis2D) –

    Axis2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    line3d: Line3D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D]

Calculates perpendicular point on Line3D object.

Parameters:

  • line3d (Line3D) –

    Line3D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point)

Calculate(
    line3d: Line3D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Line3D object.

Parameters:

  • line3d (Line3D) –

    Line3D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    polyline3d: Polyline3D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Polyline3D object.

Parameters:

  • polyline3d (Polyline3D) –

    Polyline3D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    polygon3d: Polygon3D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Polygon3D object.

Parameters:

  • polygon3d (Polygon3D) –

    Polygon3D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    polyhedron3d: Polyhedron3D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Polyhedron3D object.

Parameters:

  • polyhedron3d (Polyhedron3D) –

    Polyhedron3D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(axis: Axis3D, inputPnt: Point3D) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Axis3D object.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • axis (Axis3D) –

    Axis3D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    arc: Arc2D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Arc2D object.

Parameters:

  • arc (Arc2D) –

    Arc2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    polyline: Polyline2D,
    inputPnt: Point3D,
    subelement: int,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Polyline2D object.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • polyline (Polyline2D) –

    Polyline2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • subelement (int) –

    Line segment for calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    spline: Spline2D, inputPnt: Point3D, eps: float
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Spline2D object.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • spline (Spline2D) –

    Spline2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • eps (float) –

    Tolerance for the perpendicular point calculation

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    clothoid2D: Clothoid2D,
    inputPnt: Point3D,
    eps: float,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Clothoid2D object.

Parameters:

  • clothoid2D (Clothoid2D) –

    Clothoid2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    polygon2D: Polygon2D, inputPnt: Point3D
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Polygon2D object.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • polygon2D (Polygon2D) –

    Polygon2D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(vector2D: Vector2D, bPerpendicularLeft: bool) -> Vector2D

Calculate perpendicular to given 2D vector

Parameters:

  • vector2D (Vector2D) –

    2D Vector on which to calculate perpendicular point

  • bPerpendicularLeft (bool) –

    orientation of perpendicular vector, if true then to the left, if false then to the right

Returns:

  • Vector2D

    Tangent of the perpendicular

Calculate(
    arc: Arc3D,
    inputPnt: Point3D,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D, Vector2D]

Calculates perpendicular point on Arc3D object.

Parameters:

  • arc (Arc3D) –

    Arc3D on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D, Vector2D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point, Tangent of the perpendicular)

Calculate(
    geoObject_object: object,
    inputPnt: Point3D,
    eps: float,
    insideTolerance: float = 1.7976931348623157e308,
) -> tuple[bool, Point3D]

Calculates perpendicular point on IGeometry object.

Parameters:

  • geoObject_object (object) –

    IGeometry on which to calculate perpendicular point

  • inputPnt (Point3D) –

    Projection point

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

Returns:

  • tuple[bool, Point3D]

    tuple(True if perpendicular point calculation was successful, Perpendicular point)

GetTangent

GetTangent() -> Vector2D

Get the tangent of the geometry

Returns:

IsInsideElement staticmethod

IsInsideElement(
    geoElement_object: object, perPnt: Point3D, insideTolerance: float
) -> bool

Check, whether the perpendicular point is inside the element

Parameters:

  • geoElement_object (object) –

    Geometry element

  • perPnt (Point3D) –

    Perpendicular point

  • insideTolerance (float) –

    Allowed deviance to the end point outside the element

Returns:

  • bool

    Perpendicular point is inside the element: true/false

IsSuccessful

IsSuccessful() -> bool

Get the result of the calculation

Returns:

  • bool

    true if calculation successful, else false

IsSupportedGeometry staticmethod

IsSupportedGeometry(geoObject_object: object) -> bool

Check, whether geometry is supported

Parameters:

  • geoObject_object (object) –

    Geometry element

Returns:

  • bool

    is supported

__init__ overloaded

__init__(
    path: Path2D, eps: float, insideTolerance: float = 1.7976931348623157e308
)

Constructor.

Parameters:

  • path (Path2D) –

    Path of concatenated IGeometry objects

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

__init__(line: Line2D, insideTolerance: float = 1.7976931348623157e+308)

Constructor.

Parameters:

  • line (Line2D) –

    Line which will be held in a 2D path

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

__init__(
    polyline: Polyline2D, insideTolerance: float = 1.7976931348623157e308
)

Constructor.

Parameters:

  • polyline (Polyline2D) –

    Polyline which will be held in a 2D path

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

__init__(arc: Arc2D, insideTolerance: float = 1.7976931348623157e+308)

Constructor.

Parameters:

  • arc (Arc2D) –

    Arc which will be held in a 2D path

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

__init__(
    clothoid: Clothoid2D,
    eps: float,
    insideTolerance: float = 1.7976931348623157e308,
)

Constructor.

Parameters:

  • clothoid (Clothoid2D) –

    Clothoid which will be held in a 2D path

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison

__init__(spline: Spline2D, eps: float)

Constructor.

This calculation only delivers perpendicular point which are on the element

Parameters:

  • spline (Spline2D) –

    Spline which will be held in a 2D path

  • eps (float) –

    Tolerance for the perpendicular point calculation

__init__(polygon2D: Polygon2D)

Constructor.

Parameters:

  • polygon2D (Polygon2D) –

    Polygon which will be held in a 2D path

__init__(element: PerpendicularCalculus)

Copy constructor

Parameters:

__init__(
    geoObject: object,
    eps: float,
    insideTolerance: float = 1.7976931348623157e308,
)

Constructor.

Parameters:

  • geoObject (object) –

    Geometry which will be held in a 2D path

  • eps (float) –

    Tolerance for the perpendicular point calculation

  • insideTolerance (float, default: 1.7976931348623157e+308 ) –

    Tolerance for the IsInsideElement(..) comparison