Skip to content

Comparison

Canonical path: NemAll_Python_Geometry.Comparison

Utility class with methods for comparing two with each other

AllPointsAreOneAxis staticmethod

AllPointsAreOneAxis(polyline: Polyline2D, tolerance: float) -> bool

Check if all points of polyline are on one straight line

Parameters:

  • polyline (Polyline2D) –

    Polyline

  • tolerance (float) –

    Tolerance

Returns:

  • bool

    Result of the check

Congruent overloaded

Congruent(l1p1: Point2D, l1p2: Point2D, l2p1: Point2D, l2p2: Point2D) -> bool

compare 2D points of two 2D lines if are congruent

Parameters:

  • l1p1 (Point2D) –

    the 1. point of the 1. line

  • l1p2 (Point2D) –

    the 2. point of the 1. line

  • l2p1 (Point2D) –

    the 1. point of the 2. line

  • l2p2 (Point2D) –

    the 2. point of the 2. line

Returns:

  • bool

    true if lines are congruent, otherwise false.

Congruent(l1: Line2D, l2: Line2D) -> bool

compare 2D lines if are congruent

Parameters:

Returns:

  • bool

    true if lines are congruent, otherwise false.

DeterminePosition overloaded

DeterminePosition(
    geoObject: object, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to an object.

Parameters:

  • geoObject (object) –

    IGeometry

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    line: Line2D, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 2D line.

Parameters:

  • line (Line2D) –

    2D line

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    axis: Axis2D, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 2D axis.

Parameters:

  • axis (Axis2D) –

    2D axis

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

DeterminePosition(
    polyline: Polyline2D, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 2D polyline. Returns position of point to the closest line of poly line

Parameters:

  • polyline (Polyline2D) –

    2D polyline

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    arc: Arc2D, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 2D arc.

Parameters:

  • arc (Arc2D) –

    2D arc

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    arc: Arc3D, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 3D arc.

Parameters:

  • arc (Arc3D) –

    3D arc

  • point (Point3D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    clothoid: Clothoid2D, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 2D clothoid.

Parameters:

  • clothoid (Clothoid2D) –

    2D clothoid

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    spline: Spline2D, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 2D spline.

Parameters:

  • spline (Spline2D) –

    2D spline

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    polygon: Polygon2D, point: Point2D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a polygon 2D.

Parameters:

  • polygon (Polygon2D) –

    Polygon2D

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eInside(inside the polygon), eOutside, eOnElement (on one of the edges), eEqualToEndPoint or Unknown

DeterminePosition(polygon: Polygon2D, line: Line2D) -> eComparisionResult

Determine the relative position of a line to a polygon 2D.

Parameters:

Returns:

  • eComparisionResult

    eInside(inside the polygon), eOutside, eNotParallel(the line crosses the polygon), eOnElement (on one of the edges), or Unknown

DeterminePosition(
    line: Line3D, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 3D line

Parameters:

  • line (Line3D) –

    3D line

  • point (Point3D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(
    polyline: Polyline3D, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 3D polyline

Parameters:

  • polyline (Polyline3D) –

    3D polyline

  • point (Point3D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow

DeterminePosition(phed: Polyhedron3D, point: Point3D) -> eComparisionResult

Determine the relative position of a point to a Polyhedron

Parameters:

Returns:

DeterminePosition(
    spline: Spline3D, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a Spline3D

Parameters:

  • spline (Spline3D) –

    Spline3D

  • point (Point3D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eOutside

DeterminePosition(
    spline: BSpline3D, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a BSpline3D

Parameters:

  • spline (BSpline3D) –

    BSpline3D

  • point (Point3D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eOutside

DeterminePosition(
    path: Path3D, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a Path3D

Parameters:

  • path (Path3D) –

    Path3D

  • point (Point3D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eOutside

DeterminePosition(
    b: BRep3D, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 3D BRep

Parameters:

  • b (BRep3D) –

    BRep3D

  • point (Point3D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • eComparisionResult

    eOnElement(identical to a vertes of the BRep), eInside (inside the BRep)

DeterminePosition(
    polygon1: Polygon2D, polygon2: Polygon2D
) -> eComparisionResult

Determine the relative position of the second polygon to the first polygon

Parameters:

Returns:

DeterminePosition(line: Line2D, minMax: MinMax2D) -> eComparisionResult

Determine the relative position of minMax to line

Parameters:

Returns:

DeterminePosition(lines: Line2DList, minMax: MinMax2D) -> eComparisionResult

Determine the relative position of the minMax to lines

Parameters:

Returns:

DeterminePosition(
    igeo: object, point: Point3D, tolerance: float
) -> eComparisionResult

Determine the relative position of a point to a 3D geometry

Parameters:

  • igeo (object) –

    3D geometry

  • point (Point3D) –

    Point3D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

DeterminePositionEx staticmethod

DeterminePositionEx(
    polyline: Polyline2D, point: Point2D, tolerance: float
) -> tuple[eComparisionResult, VecSizeTList]

Determine the relative position of a point to a 2D polyline.

Parameters:

  • polyline (Polyline2D) –

    2D polyline

  • point (Point2D) –

    Point

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • tuple[eComparisionResult, VecSizeTList]

    tuple(eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow, number of the segment of polyline in which was the point found (-1 - is not on polyline, 0 - first segm., ...))

Equal overloaded

Equal(el1: float, el2: float) -> bool

Compare two floating point numbers without tolerance

Parameters:

  • el1 (float) –

    first number

  • el2 (float) –

    second number

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Point2D, el2: Point2D) -> bool

Compare two 2D points without tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Point3D, el2: Point3D) -> bool

Compare two 3D points without tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Vector2D, el2: Vector2D) -> bool

Compare two 2D vectors without tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Vector3D, el2: Vector3D) -> bool

Compare two 3D vectors without tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: float, el2: float, tol: float) -> bool

Compare two floating point numbers with tolerance

Parameters:

  • el1 (float) –

    first number

  • el2 (float) –

    second number

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Point2D, el2: Point2D, tol: float) -> bool

Compare two 2D points with tolerance

Parameters:

  • el1 (Point2D) –

    first point

  • el2 (Point2D) –

    second point

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Point3D, el2: Point3D, tol: float) -> bool

Compare two 3D points with tolerance

Parameters:

  • el1 (Point3D) –

    first point

  • el2 (Point3D) –

    second point

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Vector2D, el2: Vector2D, tol: float) -> bool

Compare two 2D vectors with tolerance

Parameters:

  • el1 (Vector2D) –

    first vector

  • el2 (Vector2D) –

    second vector

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Vector3D, el2: Vector3D, tol: float) -> bool

Compare two 3D vectors with tolerance

Parameters:

  • el1 (Vector3D) –

    first vector

  • el2 (Vector3D) –

    second vector

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Line2D, el2: Line2D, tol: float) -> bool

Compare two 2D lines with tolerance

Parameters:

  • el1 (Line2D) –

    first line

  • el2 (Line2D) –

    second line

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Line3D, el2: Line3D, tol: float) -> bool

Compare two 3D lines with tolerance

Parameters:

  • el1 (Line3D) –

    first line

  • el2 (Line3D) –

    second line

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Spline2D, el2: Spline2D, tol: float) -> bool

Compare two 2D splines with tolerance

Parameters:

  • el1 (Spline2D) –

    first spline

  • el2 (Spline2D) –

    second spline

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Clothoid2D, el2: Clothoid2D, tol: float) -> bool

Compare two 2D clothoids with tolerance

Parameters:

  • el1 (Clothoid2D) –

    first clothoid

  • el2 (Clothoid2D) –

    second clothoid

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Arc2D, el2: Arc2D, tol: float) -> bool

Compare two 2D arcs with tolerance

Parameters:

  • el1 (Arc2D) –

    first arc

  • el2 (Arc2D) –

    second arc

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Arc3D, el2: Arc3D, tol: float) -> bool

Compare two 3D arcs with tolerance

Parameters:

  • el1 (Arc3D) –

    first arc

  • el2 (Arc3D) –

    second arc

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: BSpline3D, el2: BSpline3D, tol: float) -> bool

Compare two 3D base splines with tolerance

Parameters:

  • el1 (BSpline3D) –

    first b-spline

  • el2 (BSpline3D) –

    second b-spline

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Spline3D, el2: Spline3D, tol: float) -> bool

Compare two 3D splines with tolerance

Parameters:

  • el1 (Spline3D) –

    first spline

  • el2 (Spline3D) –

    second spline

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: Polyline3D, el2: Polyline3D, tol: float) -> bool

Compare two 3D polylines with tolerance

Parameters:

  • el1 (Polyline3D) –

    first polyline

  • el2 (Polyline3D) –

    second polyline

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(el1: BSpline2D, el2: BSpline2D, tol: float) -> bool

Compare two 2D base splines with tolerance

Parameters:

  • el1 (BSpline2D) –

    first b-spline

  • el2 (BSpline2D) –

    second b-spline

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(path1: Path3D, path2: Path3D, tol: float) -> bool

Compare two 3D paths with tolerance

Parameters:

  • path1 (Path3D) –

    first path

  • path2 (Path3D) –

    second path

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal, otherwise false.

Equal(igeo1: object, igeo2: object, tol: float) -> bool

Compare 2 geometries with given tolerance

Parameters:

  • igeo1_object

    first geometry

  • igeo2_object

    second geometry

  • tol (float) –

    value used to calculate allowed delta

Returns:

  • bool

    true when equal

EqualCoordsRel overloaded

EqualCoordsRel(el1: Point2D, el2: Point2D) -> bool

compare 2 2D points using iqrkor

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

EqualCoordsRel(el1: Point3D, el2: Point3D) -> bool

compare 2 3D points using iqrkor

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

EqualDistance overloaded

EqualDistance(el1: Point2D, el2: Point2D, tol: float) -> bool

compare 2 2D points using their distance with given tolerance

Parameters:

  • el1 (Point2D) –
    1. point
  • el2 (Point2D) –
    1. point
  • tol (float) –

    tolerance

Returns:

  • bool

    true when equal, otherwise false.

EqualDistance(el1: Point3D, el2: Point3D, tol: float) -> bool

compare 2 2D points using their distance with given tolerance

Parameters:

  • el1 (Point3D) –
    1. point
  • el2 (Point3D) –
    1. point
  • tol (float) –

    tolerance

Returns:

  • bool

    true when equal, otherwise false.

EqualRel overloaded

EqualRel(el1: float, el2: float) -> bool

compare 2 doubles using built-in relative tolerance

Parameters:

  • el1 (float) –
    1. element
  • el2 (float) –
    1. element

Returns:

  • bool

    true when equal, otherwise false.

EqualRel(el1: float, el2: float, tol: float) -> bool

compare 2 doubles using given relative tolerance

Parameters:

  • el1 (float) –
    1. element
  • el2 (float) –
    1. element
  • tol (float) –

    relative tolerance

Returns:

  • bool

    true when equal, otherwise false.

EqualRel(el1: Point2D, el2: Point2D) -> bool

compare 2 2D points using built-in relative tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

EqualRel(el1: Point3D, el2: Point3D) -> bool

compare 2 3D points using built-in relative tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

EqualRel(el1: Vector2D, el2: Vector2D) -> bool

compare 2 2D vectors using built-in relative tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

EqualRel(el1: Vector3D, el2: Vector3D) -> bool

compare 2 3D vectors using built-in relative tolerance

Parameters:

Returns:

  • bool

    true when equal, otherwise false.

GetSegmentNumber overloaded

GetSegmentNumber(geoObject: object, segment: Line2D, tolerance: float) -> int

Determine the segment position of a point to a 2D geometry object

Parameters:

  • geoObject (object) –

    IGeometry

  • segment (Line2D) –

    Line2D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(geoObject: object, point: Point3D, tolerance: float) -> int

Determine the segment position of a point to a geometry object

Parameters:

  • geoObject (object) –

    IGeometry

  • point (Point3D) –

    Point3D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(geoObject: object, point: Point2D, tolerance: float) -> int

Determine the segment position of a point to a 2D geometry object

Parameters:

  • geoObject (object) –

    IGeometry

  • point (Point2D) –

    Point2D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(line: Line2D, point: Point2D, tolerance: float) -> int

Determine the segment position of a point to a Line2D

Parameters:

  • line (Line2D) –

    Line2D

  • point (Point2D) –

    Point2D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(line: Line3D, point: Point3D, tolerance: float) -> int

Determine the segment position of a point to a Line3D

Parameters:

  • line (Line3D) –

    Line3D

  • point (Point3D) –

    Point3D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(
    polyPoints: PolyPoints2D, point: Point2D, tolerance: float
) -> int

Determine the segment position of a point to a PolyPoints

Parameters:

  • polyPoints (PolyPoints2D) –

    PolyPoints

  • point (Point2D) –

    Point2D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(polygon: Polygon2D, point: Point2D, tolerance: float) -> int

Determine the segment position of a point to a Polygon2D

Parameters:

  • polygon (Polygon2D) –

    Polygon2D

  • point (Point2D) –

    Point2D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(
    polyPoints: PolyPoints3D, point: Point3D, tolerance: float
) -> int

Determine the segment position of a point to a PolyPoints

Parameters:

  • polyPoints (PolyPoints3D) –

    PolyPoints

  • point (Point3D) –

    Point3D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(spline: Spline2D, point: Point2D, tolerance: float) -> int

Determine the segment position of a point to a Spline2d

Parameters:

  • spline (Spline2D) –

    spline geo

  • point (Point2D) –

    point on spline

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(line: Line2D, segment: Line2D, tolerance: float) -> int

Determine the segment position of a point to a Line2D

Parameters:

  • line (Line2D) –

    Line2D

  • segment (Line2D) –

    Line2D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(line: Line3D, segment: Line3D, tolerance: float) -> int

Determine the segment position of a point to a Line3D

Parameters:

  • line (Line3D) –

    Line3D

  • segment (Line3D) –

    Line3D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(
    polyPoints: PolyPoints2D, segment: Line2D, tolerance: float
) -> int

Determine the segment position of a point to a PolyPoints

Parameters:

  • polyPoints (PolyPoints2D) –

    PolyPoints

  • segment (Line2D) –

    Line2D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(
    polyPoints: PolyPoints3D, segment: Line3D, tolerance: float
) -> int

Determine the segment position of a point to a PolyPoints

Parameters:

  • polyPoints (PolyPoints3D) –

    PolyPoints

  • segment (Line3D) –

    Line3D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

GetSegmentNumber(geoObject: object, segment: Line3D, tolerance: float) -> int

Determine the segment position of a point to a geometry object

Parameters:

  • geoObject (object) –

    IGeometry

  • segment (Line3D) –

    Line3D

  • tolerance (float) –

    tolerance (if distance < tolerance, point on object)

Returns:

  • int

    segment number 0 is first element

HitsElement staticmethod

HitsElement(result: eComparisionResult) -> bool

Check if comparison result hits element in some way

Parameters:

Returns:

  • bool

    true, if the result indicates that the element is hit, otherwise false e.g. left, right, etc.

IsInside overloaded

IsInside(polygon: Polygon2D, line: Line2D) -> bool

Determine if the line is inside the polygon

Parameters:

Returns:

  • bool

    true, if the line is inside the polygon

IsInside(line: Line2D, lineToCheck: Line2D) -> bool

Args: line lineToCheck

IsParallel overloaded

IsParallel(el1: Line2D, el2: Line2D) -> tuple[eComparisionResult, float]

test 2 2D lines for parallel

Parameters:

Returns:

IsParallel(lines: Line2DList) -> eComparisionResult

Check of parallelism for vector of 2D lines

Return eAntiParallel if at least one line is antiparallel and all rest are parallel Return eNotParallel if at least one line is not parallel In all rest cases return eParallel

Parameters:

Returns:

IsParallel(el1: Line3D, el2: Line3D) -> tuple[eComparisionResult, float]

test 2 3D lines for parallel

Parameters:

Returns:

IsParallel(el1: object, el2: object) -> tuple[eComparisionResult, float]

test 2 Geometry object for parallel

Parameters:

  • el1 (object) –
    1. element
  • el2 (object) –
    1. element

Returns:

Overlapped overloaded

Overlapped(el1: Polyline2D, el2: Polyline2D) -> bool

compare of 2 Polyline 2D

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(
    el1: Polyline3D, el2: Polyline3D, partiallyToo: bool = False
) -> bool

compare of 2 Polyline 3D

Parameters:

  • el1 (Polyline3D) –

    Polyline3D

  • el2 (Polyline3D) –

    Polyline3D

  • partiallyToo (bool, default: False ) –

    First and last segment of polyline have not be identical but is enough that lies on the second polyline segments

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(pp1: PolyPoints2D, pp2: PolyPoints2D) -> bool

compare of PolyPoints

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(pp1: PolyPoints3D, pp2: PolyPoints3D) -> bool

compare of PolyPoints

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(line1: Line2D, line2: Line2D) -> bool

compare of 2 2D lines

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(line1: Line3D, line2: Line3D, partiallyToo: bool = False) -> bool

compare of 2 3D lines

Parameters:

  • line1 (Line3D) –

    Line3D

  • line2 (Line3D) –

    Line3D

  • partiallyToo (bool, default: False ) –

    Lines have not be identical but is enough that one lies on the second

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(arc1: Arc2D, arc2: Arc2D) -> bool

compare of 2 2D arcs

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(arc1: Arc3D, arc2: Arc3D) -> bool

compare of 2 3D arcs

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(phed1: Polyhedron3D, phed2: Polyhedron3D) -> bool

compare of 2 3D Polyhedra

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(el1: Spline2D, el2: Spline2D) -> bool

compare of 2 Spline 2D

Parameters:

Returns:

  • bool

    true when overlapped, otherwise false

Overlapped(geo1: object, geo2: object) -> bool

compare of 2 Geometries

Parameters:

  • geo1 (object) –

    IGeometry

  • geo2 (object) –

    IGeometry

Returns:

  • bool

    true when overlapped, otherwise false

signum staticmethod

signum(a: float, tol: float) -> float

sgn function

Parameters:

  • a (float) –

    Number of which to compute sign

  • tol (float) –

    tolerance

Returns:

  • float

    0, 1, -1

Placeholder