Method Add
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
Add(GeoPoint2, string)
Adds a point.
public DxfWriter Add(GeoPoint2 point, string layer = null)
Parameters
Returns
- DxfWriter
This writer, for adding the next shape.
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoLine2, string)
Adds a segment.
public DxfWriter Add(GeoLine2 line, string layer = null)
Parameters
Returns
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoPolyline2, string)
Adds a chain as an open lightweight polyline.
public DxfWriter Add(GeoPolyline2 polyline, string layer = null)
Parameters
polylineGeoPolyline2layerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoPolygon2, string)
Adds a polygon as a closed lightweight polyline.
public DxfWriter Add(GeoPolygon2 polygon, string layer = null)
Parameters
polygonGeoPolygon2layerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoRectangle2, string)
Adds a rectangle as a closed lightweight polyline of its four corners.
public DxfWriter Add(GeoRectangle2 rectangle, string layer = null)
Parameters
rectangleGeoRectangle2layerstring
Returns
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoTriangle2, string)
Adds a triangle as a closed lightweight polyline of its three corners.
public DxfWriter Add(GeoTriangle2 triangle, string layer = null)
Parameters
triangleGeoTriangle2layerstring
Returns
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoPolylineArc2, string)
Adds a chain with arcs as an open lightweight polyline, each arc edge carrying its bulge.
public DxfWriter Add(GeoPolylineArc2 chain, string layer = null)
Parameters
chainGeoPolylineArc2layerstring
Returns
Remarks
The bulge is the tangent of a quarter of the angle the edge sweeps, positive counter-clockwise: the same number Bulge gives, so a semicircle is 1 and the quarter of a circle 0.4142.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentException
Thrown when a coordinate or a bulge is not a finite number.
Add(GeoPolygonArc2, string)
Adds a loop with arcs as a closed lightweight polyline, each arc edge carrying its bulge.
public DxfWriter Add(GeoPolygonArc2 loop, string layer = null)
Parameters
loopGeoPolygonArc2layerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentException
Thrown when a coordinate or a bulge is not a finite number.
Add(GeoFace2, string)
Adds a face as a closed lightweight polyline for its boundary and one for each hole, all on the layer given and none filled.
public DxfWriter Add(GeoFace2 face, string layer = null)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when the face is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoCircle2, string)
Adds a circle.
public DxfWriter Add(GeoCircle2 circle, string layer = null)
Parameters
circleGeoCircle2layerstring
Returns
Exceptions
- ArgumentException
Thrown when a coordinate or the radius is not a finite number.
Add(GeoArc2, string)
Adds an arc, written counter-clockwise from its start angle to its end angle; a clockwise one from its end to its start, so that it covers the same points.
public DxfWriter Add(GeoArc2 arc, string layer = null)
Parameters
Returns
Remarks
An arc that turns a whole circle is written as a CIRCLE, since an ARC whose ends are one angle is nothing to AutoCAD.
Exceptions
- ArgumentException
Thrown when a coordinate, the radius or an angle is not a finite number.
Add(GeoEllipse2, string)
Adds an ellipse, whole, as an ELLIPSE with its centre, the end of its major axis, and the ratio of its minor radius to its major.
public DxfWriter Add(GeoEllipse2 ellipse, string layer = null)
Parameters
ellipseGeoEllipse2layerstring
Returns
Exceptions
- ArgumentException
Thrown when a coordinate or a radius is not a finite number.
Add(GeoRay2, string)
Adds a ray, which AutoCAD draws without end from its origin.
public DxfWriter Add(GeoRay2 ray, string layer = null)
Parameters
Returns
Exceptions
- ArgumentException
Thrown when a coordinate or a direction is not a finite number, or the ray has no direction, as a
defaultone has.
Add(GeoXLine2, string)
Adds a line without ends in the plane, which AutoCAD draws as an XLINE running both ways from its origin.
public DxfWriter Add(GeoXLine2 xline, string layer = null)
Parameters
Returns
Exceptions
- ArgumentException
Thrown when a coordinate or a direction is not a finite number, or the line has no direction, as a
defaultone has.
Add(GeoSpline2, string)
Adds a spline as the SPLINE it is, at height nought: its degree, its knots, its weights where it is rational and its control points, as the spline holds them.
public DxfWriter Add(GeoSpline2 spline, string layer = null)
Parameters
splineGeoSpline2The spline.
layerstringThe layer; layer 0 when none is given.
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
Nothing is refitted or rescaled, so a reader gets the very curve back, every number to the bit: the cubic with the control points (0, 0), (100, 150), (200, 150), (300, 0) is a SPLINE of degree 3 with its 8 knots 0, 0, 0, 0, 1, 1, 1, 1 and its 4 control points, and the circle of radius 100 that FromCircle(GeoCircle2) builds is its 12 knots, 9 weights and 9 control points. No fit points are written: the control points are the curve.
The flags say what the SPLINE is: 1, closed, only where its first and last control points are the same point exactly, as the clamped spline then ends where it starts (it is never flagged periodic; the circle of FromCircle(GeoCircle2) ends on its start exactly and is flagged closed, where ends only within the tolerance of each other are not); 4, rational, where a weight is other than one, and only then are the weights written; 8, planar, always, with the extrusion (0, 0, 1). The knot, control point and fit tolerances are written as 1E-10.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
Add(GeoPoint3, string)
Adds a point in space.
public DxfWriter Add(GeoPoint3 point, string layer = null)
Parameters
Returns
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoLine3, string)
Adds a segment in space.
public DxfWriter Add(GeoLine3 line, string layer = null)
Parameters
Returns
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoPolyline3, string)
Adds a chain in space as an open 3D polyline.
public DxfWriter Add(GeoPolyline3 polyline, string layer = null)
Parameters
polylineGeoPolyline3layerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoPolygon3, string)
Adds a polygon in space as a closed 3D polyline.
public DxfWriter Add(GeoPolygon3 polygon, string layer = null)
Parameters
polygonGeoPolygon3layerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoRay3, string)
Adds a ray in space, which AutoCAD draws without end from its origin.
public DxfWriter Add(GeoRay3 ray, string layer = null)
Parameters
Returns
Exceptions
- ArgumentException
Thrown when a coordinate or a direction is not a finite number, or the ray has no direction, as a
defaultone has.
Add(GeoXLine3, string)
Adds a line without ends in space, which AutoCAD draws as an XLINE running both ways from its origin.
public DxfWriter Add(GeoXLine3 xline, string layer = null)
Parameters
Returns
Exceptions
- ArgumentException
Thrown when a coordinate or a direction is not a finite number, or the line has no direction, as a
defaultone has.
Add(GeoSpline3, string)
Adds a spline in space as the SPLINE it is: its degree, its knots, its weights where it is rational and its control points in world coordinates, as the spline holds them.
public DxfWriter Add(GeoSpline3 spline, string layer = null)
Parameters
splineGeoSpline3The spline.
layerstringThe layer; layer 0 when none is given.
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
As Add(GeoSpline2, string) writes one in the plane, every number to the bit, but for the planar flag: it is set, with the plane's normal turned up in its largest component as the extrusion, where the control points lie in one plane to the rounding of their coordinates, as the spline's own queries judge it, and left off, with no extrusion, where they do not. A circle of radius 25 on the normal (1, 1, 0) is planar with the extrusion (0.7071, 0.7071, 0); the cubic with the control points (0, 0, 0), (100, 0, 0), (100, 100, 0), (100, 100, 100) is not.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
Add(GeoEllipse3, string)
Adds an ellipse in space, whole, as an ELLIPSE with its normal as the extrusion and its major axis in world coordinates.
public DxfWriter Add(GeoEllipse3 ellipse, string layer = null)
Parameters
ellipseGeoEllipse3layerstring
Returns
Exceptions
- ArgumentException
Thrown when a coordinate, a direction or a radius is not a finite number.
Add(GeoTriangle3, string)
Adds a triangle as a 3DFACE, every edge visible.
public DxfWriter Add(GeoTriangle3 triangle, string layer = null)
Parameters
triangleGeoTriangle3layerstring
Returns
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoFace3, string)
Adds a face as a 3DFACE for each triangle of its surface, holes left open and the edges between its triangles invisible.
public DxfWriter Add(GeoFace3 face, string layer = null)
Parameters
Returns
Remarks
The triangles are cut at the global tolerance. Add(GeoFace3, Tolerance, string) states it.
Exceptions
- ArgumentNullException
Thrown when the face is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoFace3, Tolerance, string)
Adds a face as a 3DFACE for each triangle of its surface, cut within a tolerance, the edges between its triangles invisible.
public DxfWriter Add(GeoFace3 face, Tolerance tolerance, string layer = null)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when the face is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoSolid3, string)
Adds a body as a 3DFACE for each triangle of the surface where its material ends, openings cut in and the edges between the triangles of one side invisible. A box 100 by 100 by 20 with a hole 20 by 20 through it is 64 triangles.
public DxfWriter Add(GeoSolid3 solid, string layer = null)
Parameters
Returns
Remarks
The triangles are cut at the global tolerance. Add(GeoSolid3, Tolerance, string) states it.
Exceptions
- ArgumentNullException
Thrown when the body is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoSolid3, Tolerance, string)
Adds a body as a 3DFACE for each triangle of its surface, cut within a tolerance, the edges between the triangles of one side invisible.
public DxfWriter Add(GeoSolid3 solid, Tolerance tolerance, string layer = null)
Parameters
Returns
Remarks
The openings are cut in as TriangulateSurface(Tolerance) cuts them, within the rounding of the coordinates where the point tolerance is below it.
Exceptions
- ArgumentNullException
Thrown when the body is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoSphere3, double, string)
Adds a ball as a 3DFACE for each triangle of its surface, cut no further than a tolerance from the sphere, every edge visible.
public DxfWriter Add(GeoSphere3 sphere, double chordTolerance, string layer = null)
Parameters
sphereGeoSphere3The ball.
chordTolerancedoubleThe largest gap allowed between a triangle and the sphere, in millimetres.
layerstringThe layer; layer 0 when none is given.
Returns
Remarks
The triangles are TriangulateSurface(double), each a face of its own as in the body ToSolid(double): a ball of radius 50 within 0.1 is 3 380 3DFACEs.
Exceptions
- ArgumentOutOfRangeException
Thrown when the chord tolerance is not a finite number above nought, or would need more than 1 048 576 triangles.
- ArgumentException
Thrown when the ball is not valid, as a
defaultone is, or a coordinate is not a finite number.
Add(IEnumerable<GeoTriangle3>, string)
Adds triangles, each as a 3DFACE with every edge visible.
public DxfWriter Add(IEnumerable<GeoTriangle3> triangles, string layer = null)
Parameters
trianglesIEnumerable<GeoTriangle3>layerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the triangles are null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoMesh3, string)
Adds a mesh of a flat shape: a face of three or four corners that turns right at none of them as one 3DFACE, so that the cells of a grid stay cells, and any other face as its triangles with the edges between them invisible.
public DxfWriter Add(GeoMesh3 mesh, string layer = null)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when the mesh is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoAabb3, string)
Adds a box as six 3DFACEs of four corners, written from its corners with no tolerance, so a box as flat as 100 by 100 by 0.002, or by nothing, is written and not refused.
public DxfWriter Add(GeoAabb3 box, string layer = null)
Parameters
Returns
Exceptions
- InvalidOperationException
Thrown when the box is empty, as ToObb() says.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoObb3, string)
Adds an oriented box as six 3DFACEs of four corners, written from its corners with no tolerance, so a box as flat as 100 by 100 by 0.002, or by nothing, is written and not refused.
public DxfWriter Add(GeoObb3 box, string layer = null)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when the box is null.
- ArgumentException
Thrown when a coordinate is not a finite number.
Add(GeoArc3, double, string)
Adds an arc in space as an open 3D polyline of chords no further from the arc than a tolerance.
public DxfWriter Add(GeoArc3 arc, double chordTolerance, string layer = null)
Parameters
arcGeoArc3The arc.
chordTolerancedoubleThe largest gap allowed between a chord and the arc, in millimetres.
layerstringThe layer; layer 0 when none is given.
Returns
Exceptions
- ArgumentOutOfRangeException
Thrown when the chord tolerance is not a finite number above nought, or the arc would take more than 1 048 576 chords at it.
- ArgumentException
Thrown when a coordinate or the radius is not a finite number.
Add(GeoCircle3, double, string)
Adds a circle in space as a closed 3D polyline of chords no further from the circle than a tolerance.
public DxfWriter Add(GeoCircle3 circle, double chordTolerance, string layer = null)
Parameters
circleGeoCircle3chordTolerancedoublelayerstring
Returns
Exceptions
- ArgumentOutOfRangeException
Thrown when the chord tolerance is not a finite number above nought, or the circle would take more than 1 048 576 chords at it.
- ArgumentException
Thrown when a coordinate or the radius is not a finite number.
Add(GeoPolylineArc3, double, string)
Adds a chain with arcs in space as an open 3D polyline, its straight edges kept and each arc cut into chords no further from it than a tolerance.
public DxfWriter Add(GeoPolylineArc3 chain, double chordTolerance, string layer = null)
Parameters
chainGeoPolylineArc3chordTolerancedoublelayerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentOutOfRangeException
Thrown when the chord tolerance is not a finite number above nought, or the chain would take more than 1 048 576 chords at it in all.
- ArgumentException
Thrown when a coordinate, a bulge or a direction is not a finite number.
Add(GeoPolygonArc3, double, string)
Adds a loop with arcs in space as a closed 3D polyline, its straight edges kept and each arc cut into chords no further from it than a tolerance.
public DxfWriter Add(GeoPolygonArc3 loop, double chordTolerance, string layer = null)
Parameters
loopGeoPolygonArc3chordTolerancedoublelayerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentOutOfRangeException
Thrown when the chord tolerance is not a finite number above nought, or the loop would take more than 1 048 576 chords at it in all.
- ArgumentException
Thrown when a coordinate, a bulge or a direction is not a finite number.
Add(GeoArc3, string)
Adds an arc in space as the ARC it is, in the coordinate system of its own plane, with no chords.
public DxfWriter Add(GeoArc3 arc, string layer = null)
Parameters
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
The normal of the arc, turned if need be to point up in its largest component (ties go to z, then y, then x), is the extrusion of the ARC; the centre is written in the coordinates of the plane it stands on and the angles are degrees counter-clockwise about the extrusion, from the x axis of the plane. That x axis is the one AutoCAD works out itself from the extrusion by the arbitrary axis algorithm: the world y crossed with the normal where both x and y of the normal are less than 1/64 from nought, and the world z crossed with it otherwise. A quarter of the circle of radius 10 about (0, 0, 5), from (10, 0, 5) to (0, 10, 5), is an ARC with centre (0, 0, 5) and angles 0 and 90, and the same quarter on the normal (0, 0, -1) is written the same way, since an arc counter-clockwise about down is clockwise about up. An arc lying on the floor is written exactly as Add(GeoArc2, string) writes it: the extrusion (0, 0, 1) is what a CIRCLE or ARC has when its groups are left out, and they are.
An arc that turns clockwise about the extrusion is written from its end to its start, as Add(GeoArc2, string) does, since DXF arcs run counter-clockwise only. An arc of a whole turn is written as a CIRCLE. The result is the arc itself: over 20 000 random arcs (radii 0.5 to 500, centres up to 1 000 from the origin, any normal, both ways round) its start, middle and end, worked back from the groups written, are within 8.3E-13 of its radius, or 1.4E-15 of its radius plus its centre's distance from the origin, which is the rounding of the coordinates themselves. Add(GeoArc3, double, string) gives chords instead.
Exceptions
- ArgumentException
Thrown when a coordinate or an angle is not a finite number, or the normal has no length.
- ArgumentOutOfRangeException
Thrown when the radius is not a finite number above nought.
Add(GeoCircle3, string)
Adds a circle in space as the CIRCLE it is, in the coordinate system of its own plane, with no chords.
public DxfWriter Add(GeoCircle3 circle, string layer = null)
Parameters
circleGeoCircle3The circle.
layerstringThe layer; layer 0 when none is given.
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
The normal of the circle, turned up as Add(GeoArc3, string) turns an arc's, is the extrusion and the centre is written in the coordinates of the plane by the arbitrary axis algorithm described there; a circle on the floor is written exactly as a GeoCircle2 is. A circle of radius 25 about (10, 20, 30) on the normal (1, 1, 0) is a CIRCLE with extrusion (0.7071, 0.7071, 0) and centre (7.0711, 30, 21.2132), where Add(GeoCircle3, double, string) at 0.1 gives 36 chords.
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number or the normal has no length.
- ArgumentOutOfRangeException
Thrown when the radius is not a finite number above nought.
Add(GeoPolylineArc3, string)
Adds a chain with arcs in space as it is: one lightweight polyline in its plane where it lies in one, and a LINE or an ARC for each edge where it does not. The plane is judged at the global tolerance; Add(GeoPolylineArc3, Tolerance, string) states it.
public DxfWriter Add(GeoPolylineArc3 chain, string layer = null)
Parameters
chainGeoPolylineArc3layerstring
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentException
Thrown when a coordinate, a bulge or a direction is not a finite number.
Add(GeoPolylineArc3, Tolerance, string)
Adds a chain with arcs in space as it is: one lightweight polyline in its plane where it lies in one, and a LINE or an ARC for each edge where it does not.
public DxfWriter Add(GeoPolylineArc3 chain, Tolerance tolerance, string layer = null)
Parameters
chainGeoPolylineArc3The chain.
toleranceToleranceThe tolerance that judges whether the chain lies in one plane, as TryGetPlane(out GeoPlane3, Tolerance) does.
layerstringThe layer; layer 0 when none is given.
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
A chain that lies in one plane within the planar tolerance is a single LWPOLYLINE whose coordinates are those of the plane (extrusion, elevation, x and y) and whose bulges are those of the chain, negated where the arc turns about the opposite side of the extrusion. The extrusion is the normal of the plane turned, where it has to be, to point up in its largest component, so a chain on the floor is written with the extrusion (0, 0, 1), plain x and y and its height as the elevation, whichever way its arcs turn. A vertex off the plane by less than the tolerance is written on it, and so is an arc that stands off it by less: its bulge is written times the cosine between its normal and the extrusion, so an arc bowing square to the plane (bulge 1.8E-5 about (0, 1, 0) on a chord of 100 along x in the plane z = 0, which bows 0.0009 up) is written straight.
A chain that bends out of one plane, such as a reinforcing bar with bends in two, is a LINE for each straight edge and an ARC, in the coordinate system of its own plane as Add(GeoArc3, string) writes it, for each arc edge, in the order of the chain. An arc edge too shallow to place a circle for is read by its chord and is a LINE. A chain with no arc whose vertices all lie on one line lies in no one plane, so it too is a LINE for each edge.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentException
Thrown when a coordinate, a bulge or a direction is not a finite number.
Add(GeoPolygonArc3, string)
Adds a loop with arcs in space as one closed lightweight polyline in its plane, each arc edge carrying its bulge.
public DxfWriter Add(GeoPolygonArc3 loop, string layer = null)
Parameters
loopGeoPolygonArc3The loop.
layerstringThe layer; layer 0 when none is given.
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
A loop lies in one plane by construction, so it is always one LWPOLYLINE, written as Add(GeoPolylineArc3, Tolerance, string) writes a chain that lies in one. A slot 80 long and 20 wide (straight sides of 60) with a half circle at each end, lying in a plane tilted 30 degrees about the x axis, is four vertices and two bulges of 1, where chords at 0.01 are 74 segments.
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentException
Thrown when a coordinate, a bulge or a direction is not a finite number.
Add(DxfText, string)
Adds a text: a TEXT of one line, or an MTEXT where it is multiline, in the plane of its normal.
public DxfWriter Add(DxfText text, string layer = null)
Parameters
textDxfTextThe text, read by DxfReader or made in code.
layerstringThe layer; layer 0 when none is given.
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
A TEXT is written aligned left on its baseline, its position in the system of its normal's plane, with its height, its rotation in degrees and its width factor, in the text style Standard. An MTEXT is written at its position in world coordinates, attached at its top left, with its height, its width where it has one and the direction it reads along in world coordinates, its words in pieces of 250 characters, a line feed written as a new paragraph (\P) and a backslash and a brace as the codes that keep them. A letter beyond ASCII is written as its escape, \U+00E9 for an e acute, and a control character in AutoCAD's caret form, a tab as ^I, with a caret written ^ and a space, as AutoCAD reads them.
DxfReader reads it back as the same text: its words, its height, its width factor and width and its
normal to the bit, and its position too where the normal is (0, 0, 1) or (0, 0, -1) or the text an MTEXT; a TEXT on a
tilted normal comes back to the rounding of its plane's system, and the rotation to the last place or two, going
through degrees or a direction. A %%c, %%d, %%p, %%% or %%nnn in the words comes back as the character it stands for,
and so does the text \U+0041 in them, and the alignment and the attachment a text had in the file it was read
from are not kept: it is written where it stands.
Exceptions
- ArgumentNullException
Thrown when the text is null.
Add(DxfShape)
Adds an entity DxfReader read: its shape, written by the overload of Add for it, on its layer, and in its colour, true colour, linetype and lineweight and with its thickness, each written only where the entity has one.
public DxfWriter Add(DxfShape entity)
Parameters
entityDxfShapeThe entity.
Returns
- DxfWriter
This writer, for adding the next shape.
Remarks
A drawing read and written again keeps its shapes and the look of each: a LINE on the layer steel in colour 1, DASHED, 0.35 wide and 50 thick is read back as the same segment, to the bit, with the same five. A linetype the writer's table does not have is added to it by name, with no pattern, so that AutoCAD opens the file and draws the line solid until the drawing is given the linetype's pattern. The thickness is written on the entities that have one in DXF, the LINE, POINT, CIRCLE, ARC, LWPOLYLINE and TEXT, and on no other. A text is written as a TEXT or an MTEXT, as Add(DxfText, string) writes it. The entity is given a handle of its own, and its Groups are not written: only what the shape and the five say is.
A face of three or four corners with no hole, as a 3DFACE reads, is written as one 3DFACE of its corners again, in their order, with the edges the file hid hidden again where the 3DFACE was read whole; any other face, and a body, a polyface mesh among them, is written as its triangles at the global tolerance, as Add(GeoFace3, string) and Add(GeoSolid3, string) write them. A GeoSphere3 needs a chord tolerance, and has no overload without one.
What is not kept: a circle or an arc in space on an extrusion that points down, as AutoCAD writes a mirrored one, is written about its normal turned up, as Add(GeoArc3, string) writes every arc, so a mirrored arc comes back running the other way, from its end to its start, over the same points; read with PlanAs2D it is a GeoArc2 either way. A linetype is written as the table spells it, so BYBLOCK comes back ByBlock and CONTINUOUS Continuous. The handle is new, the groups are not written, and a mesh comes back as the 3DFACEs of its triangles.
Exceptions
- ArgumentNullException
Thrown when the entity is null.
- ArgumentException
Thrown when there is no overload of Add for the type of its shape, which it names.