Transform Coord
Class full path: NemAll_Python_Geometry.TransformCoord
This class offers functions to transform a world point into the local coordinate system (PointLocal) defined by a geometry object or a vector of objects. Functions named PointGlobal will take a local point and project its coordinates into world coordinates.
In other words: A local point holds the shortest distance from a real world point to an object in its y value. Its x value is calculated as the offset from the objects start point to the perpendicular point of the real world point.
Functions
PointGlobal
overload
PointGlobal(path, localPoint, eps)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path2D
|
Path of 2D geometry objects |
required |
localPoint
|
Point2D
|
Local point with offset as x and distance as y |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the path, |
bool
|
true if the calculation was successful |
PointGlobal(geoObject, offset, eps)
staticmethod
Transform the local offset to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject
|
object
|
First IGeometry object |
required |
offset
|
float
|
Distance from start point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(path, offset, eps)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path2D
|
Path of 2D IGeometry objects |
required |
offset
|
float
|
Distance from start point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(path, offset, eps)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path3D
|
Path of 2D IGeometry objects |
required |
offset
|
float
|
Distance from start point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(line, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
Line 2D |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the 2D line |
PointGlobal(line, localPoint)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
Line 2D |
required |
localPoint
|
Point2D
|
Local point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the 2D line |
PointGlobal(line, offset)
staticmethod
Transform the local coordinates to world coordinates.
If the object is a 3D line, the correct result would be a 3D circle around the line. In this case this function returns the intersection point between the circle and a plane. Where the plane is defined by the xy axis and the same z value as the circles center point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
Line 3D |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the 3D Line |
PointGlobal(polygon, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon3D
|
3D Polygon |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(polyline, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
2D Polyline |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(polyline, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline3D
|
3D Polyline |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(polygon, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon2D
|
2D Polygon |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(arc, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc2D
|
2D Arc |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(arc, localPoint)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc2D
|
2D Arc |
required |
localPoint
|
Point2D
|
Local point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(arc, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc3D
|
3D Arc |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(arc, localPoint)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc3D
|
3D Arc |
required |
localPoint
|
Point2D
|
Local point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry |
PointGlobal(clothoid, offset, eps)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D Clothoid |
required |
offset
|
float
|
Distance from start point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(clothoid, localPoint, eps)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D Clothoid |
required |
localPoint
|
Point2D
|
Local point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(spline, offset, eps)
staticmethod
Transform the local coordinates to world coordinates.
Due to restrictions in the old functions (splin7, splin2) local points with a x value smaller than 0 are treated as x=0. If the x value of the local point is bigger than the splines length, the length of the spline is uses as x value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline2D
|
2D Spline |
required |
offset
|
float
|
Distance from start point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(spline, localPoint, eps)
staticmethod
Transform the local coordinates to world coordinates.
Due to restrictions in the old functions (splin7, splin2) local points with a x value smaller than 0 are treated as x=0. If the x value of the local point is bigger than the splines length, the length of the spline is uses as x value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline2D
|
2D Spline |
required |
localPoint
|
Point2D
|
Local Point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(spline, offset, eps)
staticmethod
Transform the local coordinates to world coordinates.
Due to restrictions in the old functions (splin7, splin2) local points with a x value smaller than 0 are treated as x=0. If the x value of the local point is bigger than the splines length, the length of the spline is uses as x value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline3D
|
3D Spline |
required |
offset
|
float
|
Distance from start point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(spline, localPoint, eps)
staticmethod
Transform the local coordinates to world coordinates.
Due to restrictions in the old functions (splin7, splin2) local points with a x value smaller than 0 are treated as x=0. If the x value of the local point is bigger than the splines length, the length of the spline is uses as x value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline3D
|
3D Spline |
required |
localPoint
|
Point2D
|
Local Point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(spline, offset)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
BSpline3D
|
3D Spline |
required |
offset
|
float
|
Distance from start point |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobal(geoObject, localPoint, eps)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject
|
object
|
Geometry object |
required |
localPoint
|
Point2D
|
Local point with offset as x and distance as y |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Global point on the geometry, |
bool
|
true if the calculation was successful |
PointGlobalEx(clothoid, offset, eps)
staticmethod
Transform the local coordinates to world coordinates.
This method compute global point by offset related to axis of clothoid (clothoid with parallel=0). This method is faster and computing global point with higher precision.
Use PointGlobalEx with PointLocalEx cooperation only.
sa PointLocalEx, TransformClothoidLocalOffset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D Clothoid |
required |
offset
|
float
|
Distance from start point on axis curve |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Global point on the geometry by offset on axis curve, |
|
Tangent at the Transformed point on the object, |
|
Curvature at Transformed point on the object, |
|
true if the calculation was successful |
PointLocal
overload
PointLocal(path, inputPnt, eps)
staticmethod
Transform the local coordinates to world coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path2D
|
2D Path |
required |
inputPnt
|
Point3D
|
Projection point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the path, |
bool
|
true if the calculation was successful |
PointLocal(line, inputPnt)
staticmethod
Calculate the local coordinates on a 2D line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
2D Line |
required |
inputPnt
|
Point3D
|
3D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D line |
PointLocal(line, inputPnt)
staticmethod
Calculate the local coordinates on a 2D line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
2D Line |
required |
inputPnt
|
Point2D
|
2D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D line |
PointLocal(placement, inputPnt)
staticmethod
Calculate the local coordinates on a 2D axis placement
Parameters:
Name | Type | Description | Default |
---|---|---|---|
placement
|
AxisPlacement2D
|
2D axis placement |
required |
inputPnt
|
Point3D
|
2D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on 2D axis placement |
PointLocal(placement, inputPnt)
staticmethod
Calculate the local coordinates on a 2D axis placement
Parameters:
Name | Type | Description | Default |
---|---|---|---|
placement
|
AxisPlacement2D
|
2D axis placement |
required |
inputPnt
|
Point2D
|
2D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on 2D axis placement |
PointLocal(line, inputPnt)
staticmethod
Calculate the local coordinates on a 3D line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line3D
|
3D Line |
required |
inputPnt
|
Point3D
|
Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 3D line |
PointLocal(polyhedron, inputPnt)
staticmethod
Calculate the local coordinates on a 3D polyhedron
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyhedron
|
Polyhedron3D
|
3D Polyhedron |
required |
inputPnt
|
Point3D
|
Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 3D polyhedron |
PointLocal(polyline, inputPnt)
staticmethod
Calculate the local coordinates on a 3D polyline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline3D
|
3D Polyline |
required |
inputPnt
|
Point3D
|
Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 3D polyline |
PointLocal(polyline, inputPnt)
staticmethod
Calculate the local coordinates on a 2D polyline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
2D Polyline |
required |
inputPnt
|
Point3D
|
Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the polyline |
PointLocal(polyline, inputPnt)
staticmethod
Calculate the local coordinates on a 2D polyline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polyline
|
Polyline2D
|
2D Polyline |
required |
inputPnt
|
Point2D
|
Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the polyline |
PointLocal(polygon, inputPnt)
staticmethod
Calculate the local coordinates on a 2D polygon
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon2D
|
2D Polygon |
required |
inputPnt
|
Point3D
|
Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the polygon |
PointLocal(arc, inputPnt)
staticmethod
Calculate the local coordinates on a 2D arc
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc2D
|
2D Arc |
required |
inputPnt
|
Point3D
|
3D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D arc |
PointLocal(arc, inputPnt)
staticmethod
Calculate the local coordinates on a 2D arc
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc2D
|
2D Arc |
required |
inputPnt
|
Point2D
|
2D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D arc |
PointLocal(arc, inputPnt)
staticmethod
Calculate the local coordinates on a 3D arc
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc3D
|
3D Arc |
required |
inputPnt
|
Point3D
|
3D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 3D arc |
PointLocal(arc, inputPnt)
staticmethod
Calculate the local coordinates on a 3D arc
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arc
|
Arc3D
|
3D Arc |
required |
inputPnt
|
Point2D
|
3D Projection point |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 3D arc |
PointLocal(clothoid, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 2D clothoid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D Clothoid |
required |
inputPnt
|
Point2D
|
Projection point as Point2D |
required |
eps
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D clothoid, |
bool
|
true if the calculation was successful |
PointLocal(clothoid, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 2D clothoid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D Clothoid |
required |
inputPnt
|
Point3D
|
Projection point as Point3D |
required |
eps
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D clothoid, |
bool
|
true if the calculation was successful |
PointLocal(spline, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 2D spline
The old functions (splin7, splin2) can't process points which have no perpendicular point on the spline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline2D
|
2D Spline |
required |
inputPnt
|
Point2D
|
Projection point as Point2D |
required |
eps
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D spline, |
bool
|
true if the calculation was successful |
PointLocal(spline, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 2D spline
The old functions (splin7, splin2) can't process points which have no perpendicular point on the spline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline2D
|
2D Spline |
required |
inputPnt
|
Point3D
|
Projection point as Point3D |
required |
eps
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 2D spline, |
bool
|
true if the calculation was successful |
PointLocal(spline, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 3D spline
The old functions (splin7, splin2) can't process points which have no perpendicular point on the spline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline3D
|
3D Spline |
required |
inputPnt
|
Point2D
|
Projection point as Point2D |
required |
eps
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 3D spline, |
bool
|
true if the calculation was successful |
PointLocal(spline, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 3D spline
The old functions (splin7, splin2) can't process points which have no perpendicular point on the spline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spline
|
Spline3D
|
3D Spline |
required |
inputPnt
|
Point3D
|
Projection point as Point3D |
required |
eps
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the 3D spline, |
bool
|
true if the calculation was successful |
PointLocal(geoObject, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 2D geometry object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
geoObject
|
object
|
First IGeometry object |
required |
inputPnt
|
Point3D
|
Projection point |
required |
eps
|
float
|
Tolerance for clothoids and splines |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Local point on the geometry, |
bool
|
true if the calculation was successful |
PointLocalEx(clothoid, inputPnt, eps)
staticmethod
Calculate the local coordinates on a 2D clothoid
PointLocalEx compute local point related to axis of clothoid (clothoid with parallel=0). This method is faster and computing X coordinate with higher precision.
Use PointGlobalEx with PointLocalEx cooperation only.
PointGlobalEx, TransformClothoidLocalOffset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D Clothoid |
required |
inputPnt
|
Point2D
|
Projection point as Point2D |
required |
eps
|
float
|
Tolerance |
required |
Returns:
Type | Description |
---|---|
Point2D
|
Axis local point on the 2D clothoid, |
bool
|
true if the calculation was successful |
TransformClothoidLocalOffset(clothoid, offset, toAxis)
staticmethod
Transform local offset between clothoid axis curve and parallel curve
This function provides transformation between offset related to axis or parallel(real) curve. This function is useful when you have offset on parallel curve and want to get length of axis curve. If clothoid parameter Parallel is zero, then axis and parallel offsets are equal.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clothoid
|
Clothoid2D
|
2D Clothoid |
required |
offset
|
float
|
Source offset |
required |
toAxis
|
bool
|
If true, then offset is offset on parallel curve and result will be offset on axis curve. |
required |
Returns:
Type | Description |
---|---|
float
|
Offset on axis or parallel curve, dependent on toAxis. |
Examples:
calculate real length of clothoid