Method GetOffsetCurvesGivenPlaneNormal
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
GetOffsetCurvesGivenPlaneNormal(GeoVector3, double)
Gets the spline at a distance from this one in the plane of a normal, as AutoCAD's
GetOffsetCurvesGivenPlaneNormal: each point moved square to the spline's direction there within the plane, to
the right of that direction seen from the tip of the normal where the distance is above nought, and a cubic fitted to
the points so moved. The spline is cut at its corners, knots standing as many times as its degree where its direction
turns (the knots of a circle's spline, where it runs on smoothly, are none), and each smooth
piece fitted on its own: through points of the true offset, four to a span of the knots at first and twice as many
in a span, up to 512, until the fit keeps within the point tolerance (1E-3) of the true offset both ways halfway
between each two points, leaving and reaching the piece's ends in the spline's own directions there. The pieces are
joined as a polyline's offsets are: run on along their ends to where those meet past a corner they part at, cut
back to where they cross at one they overlap at, so that the L of degree 2 from (0, 0) to (10, 0) to (10, 10) offset
by 1 has its corner at (11, -1). A spline with no corner gives a cubic over its own domain; one with corners, a cubic
over the length along it from the spline's start. A span that does not keep within the tolerance at 512 points is
given as fitted, and where the spline bends tighter than the distance the offset folds back on itself and is given as
it folds.
public override IReadOnlyList<DxfCurve> GetOffsetCurvesGivenPlaneNormal(GeoVector3 planeNormal, double offsetDist)
Parameters
planeNormalGeoVector3The normal of the plane, square to the spline.
offsetDistdoubleThe distance.
Returns
- IReadOnlyList<DxfCurve>
The one spline, of the same look, in no file; a copy for a distance of nought.
Exceptions
- ArgumentOutOfRangeException
Thrown when the distance is not finite.
- ArgumentException
Thrown when the normal has no length, or the spline does not lie in a plane square to it.
- InvalidOperationException
Thrown when the spline has no data that make a spline.