Method TryExtendTo
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
TryExtendTo(GeoLine3, GeoPoint3, LineEnd, out GeoLine3)
Extends one end of a segment to the foot of the perpendicular from a point, using the default tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoPoint3 point, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
pointGeoPoint3The point the end is brought level with.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the foot lies at or beyond the end; false if reaching it would shorten the segment.
TryExtendTo(GeoLine3, GeoPoint3, LineEnd, out GeoLine3, Tolerance)
Extends one end of a segment to the foot of the perpendicular from a point, within a tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoPoint3 point, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
pointGeoPoint3The point the end is brought level with.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the foot lies at or beyond the end; false if reaching it would shorten the segment.
TryExtendTo(GeoLine3, GeoLine3, LineEnd, out GeoLine3)
Extends one end of a segment until it meets another segment, using the default tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoLine3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoLine3The boundary segment, which is not extended itself.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the extension meets the boundary; otherwise, false.
TryExtendTo(GeoLine3, GeoLine3, LineEnd, out GeoLine3, Tolerance)
Extends one end of a segment until it meets another segment, within a tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoLine3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoLine3The boundary segment, which is not extended itself.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the extension meets the boundary; otherwise, false.
Remarks
The extension must pass within the point tolerance of the boundary. To bring an end level with an
axis it passes at a distance, as Tekla's Intersection.LineToLine is used for, take the
bridge from GetShortestLineTo(GeoLine3, GeoLine3, LineExtension, Tolerance)
with Both and extend to its start point.
TryExtendTo(GeoLine3, GeoPlane3, LineEnd, out GeoLine3)
Extends one end of a segment until it pierces a plane, using the default tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoPlane3 plane, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
planeGeoPlane3The plane.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the plane lies at or beyond the end; false if it is behind or parallel.
TryExtendTo(GeoLine3, GeoPlane3, LineEnd, out GeoLine3, Tolerance)
Extends one end of a segment until it pierces a plane, within a tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoPlane3 plane, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
planeGeoPlane3The plane.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the plane lies at or beyond the end; false if it is behind or parallel.
TryExtendTo(GeoLine3, GeoPolygon3, LineEnd, out GeoLine3)
Extends one end of a segment until it meets a polygon, using the default tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoPolygon3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoPolygon3The polygon.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the extension meets the polygon; otherwise, false.
TryExtendTo(GeoLine3, GeoPolygon3, LineEnd, out GeoLine3, Tolerance)
Extends one end of a segment until it meets a polygon, within a tolerance: where it pierces the surface, or at an edge when the segment lies in the plane of the polygon.
public static bool TryExtendTo(GeoLine3 line, GeoPolygon3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoPolygon3The polygon.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the extension meets the polygon; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
TryExtendTo(GeoLine3, GeoFace3, LineEnd, out GeoLine3)
Extends one end of a segment until it meets a face, using the default tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoFace3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoFace3The face.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the extension meets the face; otherwise, false.
TryExtendTo(GeoLine3, GeoFace3, LineEnd, out GeoLine3, Tolerance)
Extends one end of a segment until it meets a face, within a tolerance: where it pierces the material, so a line through a hole passes on, or at an edge of the boundary or of a hole when the segment lies in the plane of the face.
public static bool TryExtendTo(GeoLine3 line, GeoFace3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoFace3The face.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the extension meets the face; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the face is null.
TryExtendTo(GeoLine3, GeoSolid3, LineEnd, out GeoLine3)
Extends one end of a segment until it meets the surface of a solid, using the default tolerance.
public static bool TryExtendTo(GeoLine3 line, GeoSolid3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoSolid3The solid.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the extension meets the surface; otherwise, false.
TryExtendTo(GeoLine3, GeoSolid3, LineEnd, out GeoLine3, Tolerance)
Extends one end of a segment until it meets the surface of a solid, within a tolerance. An end outside runs in to the face it first reaches; an end inside runs out to where the line leaves.
public static bool TryExtendTo(GeoLine3 line, GeoSolid3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoSolid3The solid.
endLineEndThe end that moves.
resultGeoLine3The extended segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the extension meets the surface; otherwise, false.
Remarks
Only the faces of the body itself count. The openings carried by the solid are not read, so a line running into a hole stops at the body's outer face, not at the wall of the hole.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
TryExtendTo(GeoArc3, GeoPoint3, LineEnd, out GeoArc3)
Lengthens an arc at one end until it reaches a point on its circle.
public static bool TryExtendTo(GeoArc3 arc, GeoPoint3 point, LineEnd end, out GeoArc3 result)
Parameters
Returns
TryExtendTo(GeoArc3, GeoPoint3, LineEnd, out GeoArc3, Tolerance)
Lengthens an arc at one end until it reaches a point on its circle, within a tolerance.
public static bool TryExtendTo(GeoArc3 arc, GeoPoint3 point, LineEnd end, out GeoArc3 result, Tolerance tolerance)
Parameters
arcGeoArc3The arc.
pointGeoPoint3The point to reach; it has to lie on the arc's own circle.
endLineEndWhich end to move.
resultGeoArc3The arc reaching the point, or the arc unchanged.
toleranceToleranceThe tolerance.
Returns
- bool
true when the arc was lengthened to the point; otherwise, false.
Remarks
Only a lengthening counts: a point the arc already covers is not reached by extending it, and TryTrimTo(GeoArc3, GeoPoint3, LineEnd, out GeoArc3) is the other direction. A point off the circle is refused rather than being drawn in to the nearest place on it.