Table of Contents

Method ToAcadSpline

Namespace
GeometryHelper.CadConvert
Assembly
GeometryHelper.CadConvert.dll

ToAcadSpline(GeoSpline3)

Converts a GeometryHelper spline in space to an AutoCAD Spline.

public static Spline ToAcadSpline(this GeoSpline3 geoSpline)

Parameters

geoSpline GeoSpline3

The GeometryHelper spline to convert.

Returns

Spline

The converted AutoCAD Autodesk.AutoCAD.DatabaseServices.Spline, of the spline's degree, control points, knots and, where it is rational, weights, not periodic.

Remarks

The numbers go over as they are, nothing refitted, so the circle of radius 100 that FromCircle(GeoCircle3) builds is a rational Spline of degree 2 with its 9 control points, 9 weights and 12 knots. It is told it is closed only where its first and last control points are the same point exactly, as that circle's are; ends only near each other do not make it closed. The control point and knot tolerances are 1E-10, as a DXF file of DxfWriter has them.

Exceptions

ArgumentNullException

Thrown when geoSpline is null.

ToAcadSpline(IEnumerable<GeoSpline3>)

Converts a sequence of GeometryHelper splines in space to a list of AutoCAD Splines.

public static List<Spline> ToAcadSpline(this IEnumerable<GeoSpline3> splines)

Parameters

splines IEnumerable<GeoSpline3>

The sequence of GeometryHelper splines to convert.

Returns

List<Spline>

A list of converted AutoCAD Autodesk.AutoCAD.DatabaseServices.Spline.

ToAcadSpline(GeoSpline2)

Converts a GeometryHelper spline in the plane to an AutoCAD Spline in the XY plane.

public static Spline ToAcadSpline(this GeoSpline2 geoSpline)

Parameters

geoSpline GeoSpline2

The GeometryHelper spline to convert.

Returns

Spline

The converted AutoCAD Autodesk.AutoCAD.DatabaseServices.Spline, every control point at z = 0, as ToAcadSpline(GeoSpline3) writes one in space.

Exceptions

ArgumentNullException

Thrown when geoSpline is null.

ToAcadSpline(IEnumerable<GeoSpline2>)

Converts a sequence of GeometryHelper splines in the plane to a list of AutoCAD Splines.

public static List<Spline> ToAcadSpline(this IEnumerable<GeoSpline2> splines)

Parameters

splines IEnumerable<GeoSpline2>

The sequence of GeometryHelper splines to convert.

Returns

List<Spline>

A list of converted AutoCAD Autodesk.AutoCAD.DatabaseServices.Spline.