AutoOpenLine3D Module
When Euclid is opened this module will be auto-opened. It only contains extension members for type Line3D.
Type extensions
| Type extension |
Description
|
|
|
Full Usage:
this.ClosestParameters
Parameters:
Line3D
-
The second line.
Returns: float * float
A tuple of two floats, the first is the parameter on lnA, the second on lnB.
|
Finds the parameters of closest points between two finite 3D Lines, also works on parallel and overlapping lines. For parallel and overlapping lines the parameters returned are in the center of their overlap. If the lines intersect the returned parameters are for the intersection point. For skew lines, returns the parameters at the closest approach. Lines shorter than 1e-6 are considered too short. Lines with an angle less than 0.25 degrees are considered parallel. For more control over tolerances, use getClosestParameters.
Extended Type:
|
|
|
|
Finds the closest points between two finite 3D Lines, also works on parallel and overlapping lines. For parallel and overlapping lines the points returned are in the center of their overlap. If the lines intersect the returned points are exactly the same. For skew lines, returns the two closest points on each line. Lines shorter than 1e-6 are considered too short. Lines with an angle less than 0.25 degrees are considered parallel. For more control over tolerances, use getClosestPoints.
Extended Type:
|
|
|
|
|
|
|
Full Usage:
this.Extend
Parameters:
float
distAtEnd : float
Returns: Line3D
Modifiers: inline |
|
|
|
|
|
Full Usage:
this.ExtendRel
Parameters:
float
relAtEnd : float
Returns: Line3D
Modifiers: inline |
|
|
|
|
|
Full Usage:
this.IsCoincidentAndOpposingToFast
Parameters:
Line3D
squaredParallelogramAreaTolerance : float
maxDotProduct : float
Returns: bool
Modifiers: inline |
A fast version of IsCoincidentAndOpposingTo that uses cross-product magnitude to determine parallelism. Checks if two 3D lines are coincident on opposing rays within given tolerances. Lines are coincident if they are parallel (cross product magnitude squared less than squaredParallelogramAreaTolerance) and opposing if the dot-product is negative (smaller than maxDotProduct) and the vector between their start points is also parallel to the lines. The cross product magnitude corresponds to the area of the parallelogram spanned by the two direction vectors. Lines are opposing if dot product is negative. maxDotProduct must be NEGATIVE! just below zero, -1e-6 by default ! The maxDotProduct helps to make sure FALSE is returned on very short or zero length lines.
Extended Type:
|
Full Usage:
this.IsCoincidentAndOrientedToFast
Parameters:
Line3D
squaredParallelogramAreaTolerance : float
minDotProduct : float
Returns: bool
Modifiers: inline |
A fast version of IsCoincidentAndOrientedTo that uses cross-product magnitude to determine parallelism. Checks if two 3D lines are coincident on the same ray within given tolerances. Lines are coincident if they are parallel (cross product magnitude squared less than squaredParallelogramAreaTolerance) and oriented in the same direction if the dot-product is positive (bigger than minDotProduct) and the vector between their start points is also parallel to the lines. The cross product magnitude corresponds to the area of the parallelogram spanned by the two direction vectors. Lines are oriented if dot product is positive. minDotProduct must be POSITIVE! just above zero. 1e-6 by default. The minDotProduct argument helps to make sure FALSE is returned on very short or zero length lines.
Extended Type:
|
Full Usage:
this.IsCoincidentTo
Parameters:
Line3D
distanceTolerance : float
minTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D lines are coincident within the distance tolerance. 1e-6 by default. This means that lines are parallel within the angle tolerance. and the distance of second start to the first line is less than the distance tolerance. Also returns false on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12). The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module.
Extended Type:
|
Full Usage:
this.IsCoincidentToFast
Parameters:
Line3D
squaredParallelogramAreaTolerance : float
Returns: bool
Modifiers: inline |
A fast version of IsCoincidentTo that uses cross-product magnitude to determine parallelism. Checks if two 3D lines are coincident within a given tolerance for their cross product magnitude. Lines are coincident if they are parallel (cross product magnitude squared less than squaredParallelogramAreaTolerance) and the vector between their start points is also parallel to the lines. The cross product magnitude corresponds to the area of the parallelogram spanned by the two direction vectors. ATTENTION this method returns TRUE on zero length or very small lines. It returns FALSE on almost coincident lines that are very long. Pick a bigger squaredParallelogramAreaTolerance for longer lines.
Extended Type:
|
Full Usage:
this.IsHorizontal
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D line is horizontal. The absolute deviation tolerance along Z axis is 1e-9 (axisAlignmentTolerance). Fails on lines shorter than 1e-6.
Extended Type:
|
Full Usage:
this.IsNormalTo
Parameters:
Line3D
maxTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D lines are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12). Alias for ln.IsPerpendicularTo.
Extended Type:
|
Full Usage:
this.IsNormalTo
Parameters:
Vec
maxTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is perpendicular to a 3D vector. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines or vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12). Alias for ln.IsPerpendicularTo.
Extended Type:
|
Full Usage:
this.IsNormalTo
Parameters:
UnitVec
maxTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is perpendicular to a 3D unit-vector. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12). Alias for ln.IsPerpendicularTo.
Extended Type:
|
Full Usage:
this.IsParallelAndOpposingToFast
Parameters:
Line3D
squaredParallelogramAreaTolerance : float
maxDotProduct : float
Returns: bool
Modifiers: inline |
A fast version of IsParallelAndOpposingTo that uses cross-product magnitude to determine parallelism. Checks if two 3D lines are parallel within a given tolerance for their cross product magnitude and opposing by having a negative dot-product. Lines are parallel if cross product magnitude squared is less than given squaredParallelogramAreaTolerance. The cross product magnitude corresponds to the area of the parallelogram spanned by the two direction vectors. Lines are opposing if dot product is negative. maxDotProduct must be NEGATIVE! just below zero, -1e-6 by default ! The maxDotProduct helps to make sure FALSE is returned on very short or zero length lines.
Extended Type:
|
Full Usage:
this.IsParallelAndOrientedTo
Parameters:
Line3D
minTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D lines are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelAndOrientedTo
Parameters:
Vec
minTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is parallel to a 3D vector. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines or vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelAndOrientedTo
Parameters:
UnitVec
minTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is parallel to a 3D unit-vector. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelAndOrientedToFast
Parameters:
Line3D
squaredParallelogramAreaTolerance : float
minDotProduct : float
Returns: bool
Modifiers: inline |
A fast version of IsParallelAndOrientedTo that uses cross-product magnitude to determine parallelism. Checks if two 3D lines are parallel within a given tolerance for their cross product magnitude and oriented in the same direction by having a positive dot-product. Lines are parallel if cross product magnitude squared is less than given squaredParallelogramAreaTolerance. The cross product magnitude corresponds to the area of the parallelogram spanned by the two direction vectors. Lines are oriented if dot product is positive. minDotProduct must be POSITIVE! just above zero. 1e-6 by default. The minDotProduct argument helps to make sure FALSE is returned on very short or zero length lines.
Extended Type:
|
Full Usage:
this.IsParallelTo
Parameters:
Line3D
minTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D lines are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelTo
Parameters:
Vec
minTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is parallel to a 3D vector. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines or vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelTo
Parameters:
UnitVec
minTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is parallel to a 3D unit-vector. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelToFast
Parameters:
Line3D
squaredParallelogramAreaTolerance : float
Returns: bool
Modifiers: inline |
A fast version of IsParallelTo that uses cross-product magnitude to determine parallelism. Checks if two 3D lines are parallel within a given tolerance for their cross product magnitude. Lines are parallel if cross product magnitude squared is less than squaredParallelogramAreaTolerance. The cross product magnitude corresponds to the area of the parallelogram spanned by the two direction vectors. ATTENTION this method returns TRUE on zero length or very small lines. It returns FALSE on almost parallel lines that are very long. Pick a bigger squaredParallelogramAreaTolerance for longer lines.
Extended Type:
|
Full Usage:
this.IsPerpendicularTo
Parameters:
Line3D
maxTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D lines are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsPerpendicularTo
Parameters:
Vec
maxTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is perpendicular to a 3D vector. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines or vectors shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsPerpendicularTo
Parameters:
UnitVec
maxTangent : float<MeasureProduct<tangent, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if a 3D lines is perpendicular to a 3D unit-vector. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsTiny
Parameters:
float
Returns: bool
Modifiers: inline |
Returns TRUE if 3D line is shorter than tolerance. Or contains a NaN value
Extended Type:
|
Full Usage:
this.IsTinySq
Parameters:
float
Returns: bool
Modifiers: inline |
Returns TRUE if 3D line is shorter than the squared tolerance. Or contains a NaN value
Extended Type:
|
Full Usage:
this.IsVertical
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D line is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9 (axisAlignmentTolerance). Fails on lines shorter than 1e-6. Same as ln.IsZAligned
Extended Type:
|
Full Usage:
this.IsXAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D line is parallel to the world X axis. Ignoring orientation. The absolute deviation tolerance along Y and Z axis is 1e-9 (axisAlignmentTolerance). Fails on lines shorter than 1e-6.
Extended Type:
|
Full Usage:
this.IsYAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D line is parallel to the world Y axis. Ignoring orientation. The absolute deviation tolerance along X and Z axis is 1e-9 (axisAlignmentTolerance). Fails on lines shorter than 1e-6.
Extended Type:
|
Full Usage:
this.IsZAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D line is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9 (axisAlignmentTolerance). Fails on lines shorter than 1e-6. Same as ln.IsVertical
Extended Type:
|
Full Usage:
this.IsZeroLength
Parameters:
unit
Returns: bool
Modifiers: inline |
Check if the 3D line has exactly the same starting and ending point.
Extended Type:
|
Full Usage:
this.LengthFromParam
Parameters:
float
Returns: float
Modifiers: inline |
Returns the length of the line segment from the given parameter till the line End. This length is negative if the parameter is bigger than 1.0.
Extended Type:
|
Full Usage:
this.LengthTillParam
Parameters:
float
Returns: float
Modifiers: inline |
Returns the length of the line segment from the start point to the given parameter. This length is negative if the parameter is negative.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
this.RayClosestParameters
Parameters:
Line3D
-
The second line (treated as infinite ray).
Returns: (float * float) option
Some tuple of two floats (parameter on this, parameter on lnB) if rays are not parallel and not too short, otherwise None.
|
Finds the closest approach parameters of two infinite rays (Line3D treated as rays). Lines shorter than 1e-6 are considered too short. Lines with an angle less than 0.25 degrees are considered parallel. For more control over tolerances, use getRayClosestParam.
Extended Type:
|
|
|
|
Finds the closest approach points of two infinite rays (Line3D treated as rays). Lines shorter than 1e-6 are considered too short. Lines with an angle less than 0.25 degrees are considered parallel. For more control over tolerances, use getRayClosestParam.
Extended Type:
|
|
|
|
|
|
|
|
|
Full Usage:
this.Shrink
Parameters:
float
distAtEnd : float
Returns: Line3D
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Multiplies (or applies) a RigidMatrix to a 3D line .
Extended Type:
|
|
|
|
Checks if two 3D lines are parallel. Ignoring orientation. Calculates the Cross Product of the two line vectors. (= the area of the parallelogram) And checks if it is smaller than 1e-9 (NOTE: for very long lines a higher tolerance might be needed)
Extended Type:
|
|
Checks if two 3D lines are parallel and orientated the same way. Calculates the Cross Product of the two line vectors. (= the area of the parallelogram) And checks if it is smaller than 1e-9 Then calculates the dot product and checks if it is positive. (NOTE: for very long lines a higher tolerance might be needed)
Extended Type:
|
|
|
|
|
|
Finds the parameters of closest points between two finite 3D Lines, also works on parallel and overlapping lines. For parallel and overlapping lines the parameters returned are in the center of their overlap. If the lines intersect the returned parameters are for the intersection point. For skew lines, returns the parameters at the closest approach.
Extended Type:
|
|
|
|
Finds the closest points between two finite 3D Lines, also works on parallel and overlapping lines. For parallel and overlapping lines the points returned are in the center of their overlap. If the lines intersect the returned points are exactly the same. For skew lines, returns the two closest points on each line.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Divides a 3D line into segments of given length. Includes start and end point. If the line length is smaller than the given distance just the start and end point is returned. Adds end point only if there is a remainder bigger than 0.1% of the segment length.
Extended Type:
|
|
Divides a 3D line into segments of given length. Excludes start and end point. If the line length is smaller than the given distance an empty array is returned. Adds last div point before end only if there is a remainder bigger than 0.1% of the segment length.
Extended Type:
|
|
Divides a 3D line into as few as segments as possible respecting the maximum segment length. Returned Array includes start and endpoint of line. The input maxSegmentLength is multiplied by factor 0.999999 of to avoid numerical errors. That means in an edge case there are fewer segments returned, not more.
Extended Type:
|
|
Divides a 3D line into as many as segments as possible respecting the minimum segment length. Returned Array includes start and endpoint of line. The input minSegmentLength is multiplied by factor 1.000001 of to avoid numerical errors. That means in an edge case there are more segments returned, not fewer.
Extended Type:
|
|
A fast test to check if two finite 3D lines truly intersect (or come very close in the skew case). Uses the default tolerance for parallel lines (0.25 degrees) and maximum skew distance (1e-6). Returns false on zero length lines or if lines are parallel, apart, or don't intersect within their finite segments. Use the XLine3D module for more specialized intersection calculations with custom tolerances.
Extended Type:
|
|
Tests if two finite 3D lines intersect, touch, or overlap. Also returns TRUE if parallel lines are touching or overlapping each other. Also returns TRUE if zero length lines are at the same location. This method uses an angle of 0.25 degrees to classify lines as parallel. In which case it also checks if they overlap or touch. Uses a skew distance of 1e-6 to classify lines as intersecting. Use the XLine3D module for more specialized intersection calculations.
Extended Type:
|
|
A fast test to check if two infinite rays (3D lines extended infinitely) intersect (or come very close in the skew case). Uses a maximum skew distance of 1e-6. Use the XLine3D module for more specialized intersection calculations with custom tolerances.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Line3D.intersectCone (ray, coneRadius, coneBaseZ, coneTipZ)
Parameters:
Line3D
-
The Line3D to intersect. It is considered as infinite ray.
coneRadius : float
-
The radius of the cone at the base. Parallel to the XY plane.
coneBaseZ : float
-
The Z coordinate of the cone base.
coneTipZ : float
-
The Z coordinate of the cone tip.
Returns: Option<float * float>
The two parameters on the ray where the intersections occur.
If there is only one touching point both parameters are the same.
If there is no intersection None is returned.
|
Intersects a ray with an infinite double cone that has its axis on the Z-axis.
Extended Type:
|
|
|
|
|
|
Checks if two 3D lines are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12). Same as Line3D.isPerpendicularTo
Extended Type:
|
|
A faster Check if two 3D lines are perpendicular to each other. The angle tolerance is 89.75 to 90.25 degrees. This function does not do a check for very short lines. But will return false on zero-length lines. Same as Line3D.isPerpendicularTo'
Extended Type:
|
|
Checks if two 3D lines are Not parallel. Ignoring orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
|
|
|
Checks if two 3D lines are parallel and orientated the same way. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
|
Checks if two 3D lines are parallel. Ignoring orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
|
|
|
Checks if two 3D lines are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minimum Tangent value. See Euclid.Tangent module. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12). Same as Line3D.isNormalTo
Extended Type:
|
|
|
|
|
Full Usage:
Line3D.isTinySq tol l
Parameters:
float
l : Line3D
Returns: bool
Modifiers: inline |
|
|
Checks if the two finite 3D lines are touching each other at any of end points within the given tolerance. This will also return TRUE if the lines are touching on both points. Use getEndsTouching to get more detailed information about which ends are touching.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Offsets a 3D line by two given distances. The fist distance (distHorizontal) is applied in in X-Y plane. The second distance (distNormal) is applied perpendicular to the line (made by the two 3D points) and perpendicular to the horizontal offset direction. This is in World.Z direction if both points are at the same Z level. If points are closer than 1e-6 units the World.Xaxis is used as first direction and World Z-axis as second direction.
Extended Type:
|
|
Offset line parallel to XY-Plane to left side in line direction. Z values are not changed. Fails on vertical lines or lines shorter than UtilEuclid.zeroLengthTolerance (1e-12). If amount is 0.0 no offset is computed and the input line is returned.
Extended Type:
|
|
|
|
|
|
Project a 3D line onto another line considered infinite in both directions. Returns the start and end parameters of the projected line on the target line. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
|
|
Full Usage:
Line3D.rayClosestParameters lnA lnB
Parameters:
Line3D
-
The first line (treated as infinite ray).
lnB : Line3D
-
The second line (treated as infinite ray).
Returns: (float * float) option
Some tuple of two floats (parameter on lnA, parameter on lnB) if rays are not parallel and not too short, otherwise None.
|
Finds the closest approach parameters of two infinite rays (Line3D treated as rays).
Extended Type:
|
|
|
Full Usage:
Line3D.rayClosestPoints lnA lnB
Parameters:
Line3D
-
The first line (treated as infinite ray).
lnB : Line3D
-
The second line (treated as infinite ray).
Returns: (Pnt * Pnt) option
Some tuple of two points (closest point on lnA, closest point on lnB) if rays are not parallel and not too short, otherwise None.
|
|
|
|
Full Usage:
Line3D.rotate q ln
Parameters:
Quaternion
ln : Line3D
Returns: Line3D
Modifiers: inline |
Multiplies (or applies) a Quaternion to a 3D line. The resulting line has the same length as the input.
Extended Type:
|
Full Usage:
Line3D.rotate2D r ln
Parameters:
Rotation2D
ln : Line3D
Returns: Line3D
Modifiers: inline |
|
Full Usage:
Line3D.rotate2dOn cen r ln
Parameters:
Pnt
r : Rotation2D
ln : Line3D
Returns: Line3D
Modifiers: inline |
Rotation a 3D line round given Center point an a local Z-axis.
Extended Type:
|
Full Usage:
Line3D.rotateWithCenter cen q ln
Parameters:
Pnt
q : Quaternion
ln : Line3D
Returns: Line3D
Modifiers: inline |
Multiplies (or applies) a Quaternion to a 3D line around a given center point. The resulting line has the same length as the input.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Divides a 3D line into given amount of segments. Includes a gap between the segments. But not at the start or end. Returns an array of 3D lines. Returns an empty array if the length of the line is less than gap-size x segment-count-minus-1.
Extended Type:
|
|
Divides a 3D line into as few as segments as possible respecting the maximum segment length and the gap. Includes a gap between the segments. But not at the start or end. Returns an array ofe3D lines The input maxSegmentLength is multiplied by factor 0.999999 of to avoid numerical errors. That means in an edge case there are fewer segments returned, not more.
Extended Type:
|
|
Divides a 3D line into as many as segments as possible respecting the minimum segment length and the gap. Includes a gap between the segments. But not at the start or end. Returns an array ofe3D lines The input minSegmentLength is multiplied by factor 1.000001 of to avoid numerical errors. That means in an edge case there are more segments returned, not fewer.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Line3D.transformRigid m ln
Parameters:
RigidMatrix
ln : Line3D
Returns: Line3D
Modifiers: inline |
Multiplies (or applies) a RigidMatrix to a 3D line .
Extended Type:
|
|
|
Full Usage:
Line3D.tryGetOverlap lnA lnB
Parameters: Returns: (float * float) option
An option of a tuple of two floats.
Returns the tuple containing the start and end parameter of the overlap on lnA if the lines are parallel and overlapping.
Returns None if the lines are not parallel, not overlapping, or just touching at ends, or too short.
|
Checks if lines are parallel, coincident and overlapping. If the first parameter in the overlap is smaller than the second the lines are oriented in the same direction. If the first parameter is greater than the second the lines are oriented in the opposite direction.
Extended Type:
|
Full Usage:
Line3D.tryIntersect lnA lnB
Parameters: Returns: Pnt option
A Pnt on line A if the lines intersect or are very close (skew distance less than 1e-6),
None if apart, lines too short, or if parallel lines are touching or overlapping.
|
A fast intersection of two finite 3D lines. Returns the intersection point or the midpoint of closest approach for skew lines within tolerance. Does not use a default tolerance for parallel or coincident lines. Use the XLine3D module for more specialized intersection calculations.
Extended Type:
|
|
Intersects two finite 3D Lines. Also returns a point if parallel lines are touching or overlapping each other. Also returns a point if zero length lines are at the same location within 1e-6 distance. This method uses an angle of 0.25 degrees to classify Lines as parallel. In which case it also checks if they overlap or touch. For skew lines that are very close (less than 1e-6), returns the midpoint between closest points. Use the XLine3D module for more specialized intersection calculations.
Extended Type:
|
|
Tries to get intersection point of two rays (rays are 3D lines extended infinitely). If the lines are parallel or coincident, or if they are skew with distance > 1e-6, None is returned. For skew lines within tolerance, returns the midpoint between the two closest points.
Extended Type:
|
|
Tries to project a 3D line onto another line considered finite. Returns Some Line3D if there is an overlap. Returns None if there is no overlap. Keeps the orientation of the line to project. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
|
Tries to project a 3D line onto another line considered finite. Returns None if there is no overlap. Returns Some (startParam, endParam) if there is an overlap. The parameters are between 0.0 and 1.0 on the target line. The first parameter is from the start of the line to project. The second parameter is from the end of the line to project. So if the first parameter is bigger than the second, the lines are oriented in opposite direction. Fails on lines shorter than UtilEuclid.zeroLengthTolerance (1e-12).
Extended Type:
|
|
|
|
|
|
|
|
|
|
Euclid