Table of Contents

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

line GeoLine3

The segment.

point GeoPoint3

The point the end is brought level with.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

point GeoPoint3

The point the end is brought level with.

end LineEnd

The end that moves.

result GeoLine3

The trimmed segment, or the segment unchanged when the method returns false.

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoLine3

The boundary segment.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoLine3

The boundary segment.

end LineEnd

The end that moves.

result GeoLine3

The trimmed segment, or the segment unchanged when the method returns false.

tolerance Tolerance

The 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

line GeoLine3

The segment.

plane GeoPlane3

The plane.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

plane GeoPlane3

The plane.

end LineEnd

The end that moves.

result GeoLine3

The trimmed segment, or the segment unchanged when the method returns false.

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoPolygon3

The polygon.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoPolygon3

The polygon.

end LineEnd

The end that moves.

result GeoLine3

The trimmed segment, or the segment unchanged when the method returns false.

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoFace3

The face.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoFace3

The face.

end LineEnd

The end that moves.

result GeoLine3

The trimmed segment, or the segment unchanged when the method returns false.

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoSolid3

The solid.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoSolid3

The solid.

end LineEnd

The end that moves.

result GeoLine3

The trimmed segment, or the segment unchanged when the method returns false.

tolerance Tolerance

The 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

arc GeoArc3
point GeoPoint3
end LineEnd
result GeoArc3

Returns

bool

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

arc GeoArc3

The arc.

point GeoPoint3

The point to stop at; it has to lie on the arc itself.

end LineEnd

Which end to move.

result GeoArc3

The shortened arc, or the arc unchanged.

tolerance Tolerance

The 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

chain GeoPolyline3
point GeoPoint3
end LineEnd
result GeoPolyline3

Returns

bool

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

chain GeoPolyline3

The chain.

point GeoPoint3

The point to stop at; it has to lie on the chain.

end LineEnd

Which end to give up.

result GeoPolyline3

The shortened chain, or the chain unchanged.

tolerance Tolerance

The 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

chain GeoPolylineArc3
point GeoPoint3
end LineEnd
result GeoPolylineArc3

Returns

bool

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

chain GeoPolylineArc3

The chain.

point GeoPoint3

The point to stop at; it has to lie on the chain.

end LineEnd

Which end to give up.

result GeoPolylineArc3

The shortened chain, or the chain unchanged.

tolerance Tolerance

The 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.