Method TryTrimTo
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
TryTrimTo(GeoLine3, GeoPoint3, LineEnd, out GeoLine3)
Trims one end of a segment back to the foot of the perpendicular from a point, using the default tolerance.
public static bool TryTrimTo(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 trimmed segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the foot lies within the segment, short of the other end; otherwise, false.
TryTrimTo(GeoLine3, GeoPoint3, LineEnd, out GeoLine3, Tolerance)
Trims one end of a segment back to the foot of the perpendicular from a point, within a tolerance.
public static bool TryTrimTo(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 trimmed segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the foot lies within the segment, short of the other end; otherwise, false.
TryTrimTo(GeoLine3, GeoLine3, LineEnd, out GeoLine3)
Trims one end of a segment back to where another segment crosses it, using the default tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoLine3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoLine3The boundary segment.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the boundary crosses the segment; otherwise, false.
TryTrimTo(GeoLine3, GeoLine3, LineEnd, out GeoLine3, Tolerance)
Trims one end of a segment back to where another segment crosses it, within a tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoLine3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoLine3The boundary segment.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the boundary crosses the segment; otherwise, false.
TryTrimTo(GeoLine3, GeoPlane3, LineEnd, out GeoLine3)
Trims one end of a segment back to where it pierces a plane, using the default tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoPlane3 plane, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
planeGeoPlane3The plane.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the plane crosses the segment short of the other end; otherwise, false.
TryTrimTo(GeoLine3, GeoPlane3, LineEnd, out GeoLine3, Tolerance)
Trims one end of a segment back to where it pierces a plane, within a tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoPlane3 plane, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
planeGeoPlane3The plane.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the plane crosses the segment short of the other end; otherwise, false.
TryTrimTo(GeoLine3, GeoPolygon3, LineEnd, out GeoLine3)
Trims one end of a segment back to the nearest place it meets a polygon, using the default tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoPolygon3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoPolygon3The polygon.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the polygon meets the segment short of the other end; otherwise, false.
TryTrimTo(GeoLine3, GeoPolygon3, LineEnd, out GeoLine3, Tolerance)
Trims one end of a segment back to the nearest place it meets a polygon, within a tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoPolygon3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoPolygon3The polygon.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the polygon meets the segment short of the other end; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
TryTrimTo(GeoLine3, GeoFace3, LineEnd, out GeoLine3)
Trims one end of a segment back to the nearest place it meets a face, using the default tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoFace3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoFace3The face.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the face meets the segment short of the other end; otherwise, false.
TryTrimTo(GeoLine3, GeoFace3, LineEnd, out GeoLine3, Tolerance)
Trims one end of a segment back to the nearest place it meets a face, within a tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoFace3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoFace3The face.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the face meets the segment short of the other end; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the face is null.
TryTrimTo(GeoLine3, GeoSolid3, LineEnd, out GeoLine3)
Trims one end of a segment back to the nearest place it meets the surface of a solid, using the default tolerance.
public static bool TryTrimTo(GeoLine3 line, GeoSolid3 boundary, LineEnd end, out GeoLine3 result)
Parameters
lineGeoLine3The segment.
boundaryGeoSolid3The solid.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
Returns
- bool
true if the surface meets the segment short of the other end; otherwise, false.
TryTrimTo(GeoLine3, GeoSolid3, LineEnd, out GeoLine3, Tolerance)
Trims one end of a segment back to the nearest place it meets the surface of a solid, within a tolerance. A segment running out of a body is cut where it leaves it.
public static bool TryTrimTo(GeoLine3 line, GeoSolid3 boundary, LineEnd end, out GeoLine3 result, Tolerance tolerance)
Parameters
lineGeoLine3The segment.
boundaryGeoSolid3The solid.
endLineEndThe end that moves.
resultGeoLine3The trimmed segment, or the segment unchanged when the method returns false.
toleranceToleranceThe tolerance.
Returns
- bool
true if the surface meets the segment short of the other end; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
TryTrimTo(GeoArc3, GeoPoint3, LineEnd, out GeoArc3)
Shortens an arc at one end back to a point on it.
public static bool TryTrimTo(GeoArc3 arc, GeoPoint3 point, LineEnd end, out GeoArc3 result)
Parameters
Returns
TryTrimTo(GeoArc3, GeoPoint3, LineEnd, out GeoArc3, Tolerance)
Shortens an arc at one end back to a point on it, within a tolerance.
public static bool TryTrimTo(GeoArc3 arc, GeoPoint3 point, LineEnd end, out GeoArc3 result, Tolerance tolerance)
Parameters
arcGeoArc3The arc.
pointGeoPoint3The point to stop at; it has to lie on the arc itself.
endLineEndWhich end to move.
resultGeoArc3The shortened arc, or the arc unchanged.
toleranceToleranceThe tolerance.
Returns
- bool
true when the arc was shortened to the point; otherwise, false.
TryTrimTo(GeoPolyline3, GeoPoint3, LineEnd, out GeoPolyline3)
Shortens a chain at one end back to a point on it.
public static bool TryTrimTo(GeoPolyline3 chain, GeoPoint3 point, LineEnd end, out GeoPolyline3 result)
Parameters
chainGeoPolyline3pointGeoPoint3endLineEndresultGeoPolyline3
Returns
TryTrimTo(GeoPolyline3, GeoPoint3, LineEnd, out GeoPolyline3, Tolerance)
Shortens a chain at one end back to a point on it, within a tolerance.
public static bool TryTrimTo(GeoPolyline3 chain, GeoPoint3 point, LineEnd end, out GeoPolyline3 result, Tolerance tolerance)
Parameters
chainGeoPolyline3The chain.
pointGeoPoint3The point to stop at; it has to lie on the chain.
endLineEndWhich end to give up.
resultGeoPolyline3The shortened chain, or the chain unchanged.
toleranceToleranceThe tolerance.
Returns
- bool
true when the chain was shortened; otherwise, false.
Remarks
This is the cut the splitting family makes, with the end named rather than the piece: the piece kept is the one holding the other end, so every leg and bend between them survives.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
TryTrimTo(GeoPolylineArc3, GeoPoint3, LineEnd, out GeoPolylineArc3)
Shortens a curved chain at one end back to a point on it.
public static bool TryTrimTo(GeoPolylineArc3 chain, GeoPoint3 point, LineEnd end, out GeoPolylineArc3 result)
Parameters
chainGeoPolylineArc3pointGeoPoint3endLineEndresultGeoPolylineArc3
Returns
TryTrimTo(GeoPolylineArc3, GeoPoint3, LineEnd, out GeoPolylineArc3, Tolerance)
Shortens a curved chain at one end back to a point on it, within a tolerance.
public static bool TryTrimTo(GeoPolylineArc3 chain, GeoPoint3 point, LineEnd end, out GeoPolylineArc3 result, Tolerance tolerance)
Parameters
chainGeoPolylineArc3The chain.
pointGeoPoint3The point to stop at; it has to lie on the chain.
endLineEndWhich end to give up.
resultGeoPolylineArc3The shortened chain, or the chain unchanged.
toleranceToleranceThe tolerance.
Returns
- bool
true when the chain was shortened; otherwise, false.
Remarks
The cut keeps the arcs: a bend the cut falls inside comes back as two arcs of the same radius, and only the piece holding the other end is kept.
Exceptions
- ArgumentNullException
Thrown when the chain is null.