Comparison
Class full path: NemAll_Python_Geometry.Comparison
Class for comparison between two objects
Functions
AllPointsAreOneAxis(polyline, tolerance)
staticmethod
Check if all points of polyline are on one straight line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
Polyline |
required |
tolerance
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
Result of the check |
Congruent
overload
Congruent(l1p1, l1p2, l2p1, l2p2)
staticmethod
compare 2D points of two 2D lines if are congruent
Parameters:
Name | Type | Description | Default |
---|---|---|---|
l1p1
|
Point2D
|
the 1. point of the 1. line |
required |
l1p2
|
Point2D
|
the 2. point of the 1. line |
required |
l2p1
|
Point2D
|
the 1. point of the 2. line |
required |
l2p2
|
Point2D
|
the 2. point of the 2. line |
required |
Returns:
Type | Description |
---|---|
bool
|
true if lines are congruent, otherwise false. |
Congruent(l1, l2)
staticmethod
compare 2D lines if are congruent
Parameters:
Name | Type | Description | Default |
---|---|---|---|
l1
|
Line2D
|
the 1. line |
required |
l2
|
Line2D
|
the 2. line |
required |
Returns:
Type | Description |
---|---|
bool
|
true if lines are congruent, otherwise false. |
DeterminePosition
overload
DeterminePosition(geoObject_object, point, tolerance)
staticmethod
Determine the relative position of a point to an object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject_object
|
object
|
IGeometry |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(line, point, tolerance)
staticmethod
Determine the relative position of a point to a 2D line.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
2D line |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(axis, point, tolerance)
staticmethod
Determine the relative position of a point to a 2D axis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axis
|
Axis2D
|
2D axis |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement, eAbove, eBelow |
DeterminePosition(polyline, point, tolerance)
staticmethod
Determine the relative position of a point to a 2D polyline. Returns position of point to the closest line of poly line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
2D polyline |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(polyline, point, tolerance, segment)
staticmethod
Determine the relative position of a point to a 2D polyline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
2D polyline |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
segment
|
VecSizeTList
|
number of the segment of polyline in which was the point found (-1 - is not on polyline, 0 - first segm., ...) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(arc, point, tolerance)
staticmethod
Determine the relative position of a point to a 2D arc.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc2D
|
2D arc |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(arc, point, tolerance)
staticmethod
Determine the relative position of a point to a 3D arc.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc3D
|
3D arc |
required |
point
|
Point3D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(clothoid, point, tolerance)
staticmethod
Determine the relative position of a point to a 2D clothoid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D clothoid |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(spline, point, tolerance)
staticmethod
Determine the relative position of a point to a 2D spline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline2D
|
2D spline |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(polygon, point, tolerance)
staticmethod
Determine the relative position of a point to a polygon 2D.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon2D
|
Polygon2D |
required |
point
|
Point2D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eInside(inside the polygon), eOutside, eOnElement (on one of the edges), eEqualToEndPoint or Unknown |
DeterminePosition(polygon, line)
staticmethod
Determine the relative position of a line to a polygon 2D.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon2D
|
Polygon2D |
required |
line
|
Line2D
|
Line |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eInside(inside the polygon), eOutside, eNotParallel(the line crosses the polygon), eOnElement (on one of the edges), or Unknown |
DeterminePosition(line, point, tolerance)
staticmethod
Determine the relative position of a point to a 3D line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
3D line |
required |
point
|
Point3D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(polyline, point, tolerance)
staticmethod
Determine the relative position of a point to a 3D polyline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline3D
|
3D polyline |
required |
point
|
Point3D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eLeft, eRight, eAbove, eBelow |
DeterminePosition(phed, point)
staticmethod
Determine the relative position of a point to a Polyhedron
Parameters:
Name | Type | Description | Default |
---|---|---|---|
phed
|
Polyhedron3D
|
Polyhedron |
required |
point
|
Point3D
|
Point |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eInside,eOutside |
DeterminePosition(spline, point, tolerance)
staticmethod
Determine the relative position of a point to a Spline3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline3D
|
Spline3D |
required |
point
|
Point3D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eOutside |
DeterminePosition(spline, point, tolerance)
staticmethod
Determine the relative position of a point to a BSpline3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
BSpline3D
|
BSpline3D |
required |
point
|
Point3D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eOutside |
DeterminePosition(path, point, tolerance)
staticmethod
Determine the relative position of a point to a Path3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path3D
|
Path3D |
required |
point
|
Point3D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(between start and end points), eEqualToStartPoint, eEqualToEndPoint, eOutside |
DeterminePosition(b, point, tolerance)
staticmethod
Determine the relative position of a point to a 3D BRep
Parameters:
Name | Type | Description | Default |
---|---|---|---|
b
|
BRep3D
|
BRep3D |
required |
point
|
Point3D
|
Point |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOnElement(identical to a vertes of the BRep), eInside (inside the BRep) |
DeterminePosition(polygon1, polygon2)
staticmethod
Determine the relative position of the second polygon to the first polygon
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon1
|
Polygon2D
|
the first polygon |
required |
polygon2
|
Polygon2D
|
the second polygon |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eInside,eOutside,eCrossing |
DeterminePosition(line, minMax)
staticmethod
Determine the relative position of minMax to line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
line |
required |
minMax
|
MinMax2D
|
minmax |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOutside,eCrossing,eUnknown |
DeterminePosition(lines, minMax)
staticmethod
Determine the relative position of the minMax to lines
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lines
|
Line2DList
|
lines |
required |
minMax
|
MinMax2D
|
minmax |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eOutside,eCrossing,eUnknown |
DeterminePosition(igeo_object, point, tolerance)
staticmethod
Determine the relative position of a point to a 3D geometry
Parameters:
Name | Type | Description | Default |
---|---|---|---|
igeo_object
|
object
|
3D geometry |
required |
point
|
Point3D
|
Point3D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eInside,eOutside |
Equal
overload
Equal(el1, el2)
staticmethod
Compare 2 doubles
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
float
|
|
required |
el2
|
float
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2)
staticmethod
compare 2 2D points
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point2D
|
|
required |
el2
|
Point2D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2)
staticmethod
compare 2 3D points
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point3D
|
|
required |
el2
|
Point3D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2)
staticmethod
compare 2 2D vectors
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Vector2D
|
|
required |
el2
|
Vector2D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2)
staticmethod
compare 2 3D vectors
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Vector3D
|
|
required |
el2
|
Vector3D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 doubles with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
float
|
|
required |
el2
|
float
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 2D points with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point2D
|
|
required |
el2
|
Point2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 3D points with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point3D
|
|
required |
el2
|
Point3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 2D vectors with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Vector2D
|
|
required |
el2
|
Vector2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 3D vectors with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Vector3D
|
|
required |
el2
|
Vector3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 line 2D with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Line2D
|
|
required |
el2
|
Line2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 line 3D with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Line3D
|
|
required |
el2
|
Line3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 splines with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Spline2D
|
|
required |
el2
|
Spline2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 clothoides with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Clothoid2D
|
|
required |
el2
|
Clothoid2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 arcs with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Arc2D
|
|
required |
el2
|
Arc2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
compare 2 3D arcs with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Arc3D
|
|
required |
el2
|
Arc3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
Equal(el1, el2, tol)
staticmethod
Compare 2 BSplines with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
BSpline3D
|
|
required |
el2
|
BSpline3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal |
Equal(el1, el2, tol)
staticmethod
Compare 2 Splines with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Spline3D
|
|
required |
el2
|
Spline3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal |
Equal(el1, el2, tol)
staticmethod
Compare 2 Polylines with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Polyline3D
|
|
required |
el2
|
Polyline3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal |
Equal(el1, el2, tol)
staticmethod
Compare 2 BSplines with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
BSpline2D
|
|
required |
el2
|
BSpline2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal |
Equal(path1, path2, tol)
staticmethod
Compare 2 Paths with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path1
|
Path3D
|
|
required |
path2
|
Path3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal |
Equal(igeo1_object, igeo2_object, tol)
staticmethod
Compare 2 geometries with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
igeo1_object
|
object
|
|
required |
igeo2_object
|
object
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal |
EqualCoordsRel
overload
EqualCoordsRel(el1, el2)
staticmethod
compare 2 2D points using iqrkor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point2D
|
|
required |
el2
|
Point2D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualCoordsRel(el1, el2)
staticmethod
compare 2 3D points using iqrkor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point3D
|
|
required |
el2
|
Point3D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualDistance
overload
EqualDistance(el1, el2, tol)
staticmethod
compare 2 2D points using their distance with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point2D
|
|
required |
el2
|
Point2D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualDistance(el1, el2, tol)
staticmethod
compare 2 2D points using their distance with given tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point3D
|
|
required |
el2
|
Point3D
|
|
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualRel
overload
EqualRel(el1, el2)
staticmethod
compare 2 doubles using built-in relative tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
float
|
|
required |
el2
|
float
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualRel(el1, el2, tol)
staticmethod
compare 2 doubles using given relative tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
float
|
|
required |
el2
|
float
|
|
required |
tol
|
float
|
relative tolerance |
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualRel(el1, el2)
staticmethod
compare 2 2D points using built-in relative tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point2D
|
|
required |
el2
|
Point2D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualRel(el1, el2)
staticmethod
compare 2 3D points using built-in relative tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Point3D
|
|
required |
el2
|
Point3D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualRel(el1, el2)
staticmethod
compare 2 2D vectors using built-in relative tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Vector2D
|
|
required |
el2
|
Vector2D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
EqualRel(el1, el2)
staticmethod
compare 2 3D vectors using built-in relative tolerance
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Vector3D
|
|
required |
el2
|
Vector3D
|
|
required |
Returns:
Type | Description |
---|---|
bool
|
true when equal, otherwise false. |
GetSegmentNumber
overload
GetSegmentNumber(geoObject_object, segment, tolerance)
staticmethod
Determine the segment position of a point to a 2D geometry object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject_object
|
object
|
IGeometry |
required |
segment
|
Line2D
|
Line2D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(geoObject_object, point, tolerance)
staticmethod
Determine the segment position of a point to a geometry object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject_object
|
object
|
IGeometry |
required |
point
|
Point3D
|
Point3D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(geoObject_object, point, tolerance)
staticmethod
Determine the segment position of a point to a 2D geometry object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject_object
|
object
|
IGeometry |
required |
point
|
Point2D
|
Point2D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(line, point, tolerance)
staticmethod
Determine the segment position of a point to a Line2D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
Line2D |
required |
point
|
Point2D
|
Point2D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(line, point, tolerance)
staticmethod
Determine the segment position of a point to a Line3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
Line3D |
required |
point
|
Point3D
|
Point3D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(polyPoints, point, tolerance)
staticmethod
Determine the segment position of a point to a PolyPoints
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyPoints
|
PolyPoints2D
|
PolyPoints |
required |
point
|
Point2D
|
Point2D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(polygon, point, tolerance)
staticmethod
Determine the segment position of a point to a Polygon2D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon2D
|
Polygon2D |
required |
point
|
Point2D
|
Point2D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(polyPoints, point, tolerance)
staticmethod
Determine the segment position of a point to a PolyPoints
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyPoints
|
PolyPoints3D
|
PolyPoints |
required |
point
|
Point3D
|
Point3D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(spline, point, tolerance)
staticmethod
Determine the segment position of a point to a Spline2d
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline2D
|
spline geo |
required |
point
|
Point2D
|
point on spline |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(line, segment, tolerance)
staticmethod
Determine the segment position of a point to a Line2D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
Line2D |
required |
segment
|
Line2D
|
Line2D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(line, segment, tolerance)
staticmethod
Determine the segment position of a point to a Line3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
Line3D |
required |
segment
|
Line3D
|
Line3D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(polyPoints, segment, tolerance)
staticmethod
Determine the segment position of a point to a PolyPoints
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyPoints
|
PolyPoints2D
|
PolyPoints |
required |
segment
|
Line2D
|
Line2D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(polyPoints, segment, tolerance)
staticmethod
Determine the segment position of a point to a PolyPoints
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyPoints
|
PolyPoints3D
|
PolyPoints |
required |
segment
|
Line3D
|
Line3D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
GetSegmentNumber(geoObject_object, segment, tolerance)
staticmethod
Determine the segment position of a point to a geometry object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject_object
|
object
|
IGeometry |
required |
segment
|
Line3D
|
Line3D |
required |
tolerance
|
float
|
tolerance (if distance < tolerance, point on object) |
required |
Returns:
Type | Description |
---|---|
int
|
segment number 0 is first element |
HitsElement(result)
staticmethod
Check if comparison result hits element in some way
Parameters:
Name | Type | Description | Default |
---|---|---|---|
result
|
eComparisionResult
|
the comparison result to check |
required |
Returns:
Type | Description |
---|---|
bool
|
true, if the result indicates that the element is hit, otherwise false e.g. left, right, etc. |
IsInside
overload
IsInside(polygon, line)
staticmethod
Determine if the line is inside the polygon
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon2D
|
Polygon |
required |
line
|
Line2D
|
Line |
required |
Returns:
Type | Description |
---|---|
bool
|
true, if the line is inside the polygon |
IsInside(line, lineToCheck)
staticmethod
IsParallel
overload
IsParallel(el1, el2)
staticmethod
test 2 2D lines for parallel
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Line2D
|
|
required |
el2
|
Line2D
|
|
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
tuple(eParallel, eAntiParallel, eNotParallel, |
float
|
result distance) |
IsParallel(lines)
staticmethod
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:
Name | Type | Description | Default |
---|---|---|---|
lines
|
Line2DList
|
|
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
eParallel, eAntiParallel, eNotParallel |
IsParallel(el1, el2)
staticmethod
test 2 3D lines for parallel
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Line3D
|
|
required |
el2
|
Line3D
|
|
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
tuple(eParallel, eAntiParallel, eNotParallel, |
float
|
result distance) |
IsParallel(el1_object, el2_object)
staticmethod
test 2 Geometry object for parallel
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1_object
|
object
|
|
required |
el2_object
|
object
|
|
required |
Returns:
Type | Description |
---|---|
eComparisionResult
|
tuple(eParallel, eAntiParallel, eNotParallel, |
float
|
result distance) |
Overlapped
overload
Overlapped(el1, el2)
staticmethod
compare of 2 Polyline 2D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Polyline2D
|
Polyline2D |
required |
el2
|
Polyline2D
|
Polyline2D |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(el1, el2, partiallyToo=False)
staticmethod
compare of 2 Polyline 3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Polyline3D
|
Polyline3D |
required |
el2
|
Polyline3D
|
Polyline3D |
required |
partiallyToo
|
bool
|
First and last segment of polyline have not be identical but is enough that lies on the second polyline segments |
False
|
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(pp1, pp2)
staticmethod
compare of PolyPoints
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pp1
|
PolyPoints2D
|
PolyPoints |
required |
pp2
|
PolyPoints2D
|
PolyPoints |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(pp1, pp2)
staticmethod
compare of PolyPoints
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pp1
|
PolyPoints3D
|
PolyPoints |
required |
pp2
|
PolyPoints3D
|
PolyPoints |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(line1, line2)
staticmethod
compare of 2 2D lines
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line1
|
Line2D
|
Line2D |
required |
line2
|
Line2D
|
Line2D |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(line1, line2, partiallyToo=False)
staticmethod
compare of 2 3D lines
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line1
|
Line3D
|
Line3D |
required |
line2
|
Line3D
|
Line3D |
required |
partiallyToo
|
bool
|
Lines have not be identical but is enough that one lies on the second |
False
|
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(arc1, arc2)
staticmethod
compare of 2 2D arcs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc1
|
Arc2D
|
Arc2D |
required |
arc2
|
Arc2D
|
Arc2D |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(arc1, arc2)
staticmethod
compare of 2 3D arcs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc1
|
Arc3D
|
Arc3D |
required |
arc2
|
Arc3D
|
Arc3D |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(phed1, phed2)
staticmethod
compare of 2 3D Polyhedra
Parameters:
Name | Type | Description | Default |
---|---|---|---|
phed1
|
Polyhedron3D
|
Polyhedron3D |
required |
phed2
|
Polyhedron3D
|
Polyhedron3D |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(el1, el2)
staticmethod
compare of 2 Spline 2D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
el1
|
Spline2D
|
Spline2D |
required |
el2
|
Spline2D
|
Spline2D |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
Overlapped(geo1_object, geo2_object)
staticmethod
compare of 2 Geometries
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geo1_object
|
object
|
IGeometry |
required |
geo2_object
|
object
|
IGeometry |
required |
Returns:
Type | Description |
---|---|
bool
|
true when overlapped, otherwise false |
signum(a, tol)
staticmethod
sgn function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
Number of which to compute sign |
required |
tol
|
float
|
tolerance |
required |
Returns:
Type | Description |
---|---|
float
|
0, 1, -1 |