Table of Contents

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

line GeoLine3

The segment.

point GeoPoint3

The point the end is brought level with.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

point GeoPoint3

The point the end is brought level with.

end LineEnd

The end that moves.

result GeoLine3

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

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoLine3

The boundary segment, which is not extended itself.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoLine3

The boundary segment, which is not extended itself.

end LineEnd

The end that moves.

result GeoLine3

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

tolerance Tolerance

The 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

line GeoLine3

The segment.

plane GeoPlane3

The plane.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

plane GeoPlane3

The plane.

end LineEnd

The end that moves.

result GeoLine3

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

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoPolygon3

The polygon.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoPolygon3

The polygon.

end LineEnd

The end that moves.

result GeoLine3

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

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoFace3

The face.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoFace3

The face.

end LineEnd

The end that moves.

result GeoLine3

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

tolerance Tolerance

The 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

line GeoLine3

The segment.

boundary GeoSolid3

The solid.

end LineEnd

The end that moves.

result GeoLine3

The 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

line GeoLine3

The segment.

boundary GeoSolid3

The solid.

end LineEnd

The end that moves.

result GeoLine3

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

tolerance Tolerance

The 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

arc GeoArc3
point GeoPoint3
end LineEnd
result GeoArc3

Returns

bool

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

arc GeoArc3

The arc.

point GeoPoint3

The point to reach; it has to lie on the arc's own circle.

end LineEnd

Which end to move.

result GeoArc3

The arc reaching the point, or the arc unchanged.

tolerance Tolerance

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