Class DxfFace
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
A 3DFACE of a DXF file, as AutoCAD's Face: three or four corners in the world, each edge drawn or hidden.
public sealed class DxfFace : DxfEntity
- Inheritance
-
DxfFace
- Inherited Members
Remarks
The corners are groups 10 to 13 (with 20 to 23 and 30 to 33), in the world; a face of three corners repeats its third as its fourth, as AutoCAD's GetVertexAt(short) gives it. Edge 0 runs from corner 0 to corner 1, edge 3 from corner 3 back to corner 0; a hidden edge is a flag of group 70, 1 for edge 0 up to 8 for edge 3. The face (0, 0, 0), (10, 0, 1), (10, 8, 0), (0, 8, 2) with 70 of 5 hides its edges 0 and 2.
new DxfFace(a, b, c, true, true, true, true) makes a triangle in code, to be added to a drawing of any version.
Constructors
- DxfFace()
Initializes a face whose four corners are at the origin, as AutoCAD's
new Face(), on layer 0 in no file; give it its corners with SetVertexAt(short, GeoPoint3).
- DxfFace(GeoPoint3, GeoPoint3, GeoPoint3, GeoPoint3, bool, bool, bool, bool)
Initializes a face of four corners, as AutoCAD's
new Face(pointer1, pointer2, pointer3, pointer4, value1, value2, value3, value4), on layer 0 in no file until it is added to one.
- DxfFace(GeoPoint3, GeoPoint3, GeoPoint3, bool, bool, bool, bool)
Initializes a face of three corners, as AutoCAD's
new Face(pointer1, pointer2, pointer3, value1, value2, value3, value4): the third corner written again as the fourth.
Methods
- GetVertexAt(short)
Gets a corner of the face in the world (groups 10 + index, 20 + index, 30 + index), as AutoCAD's
GetVertexAt: the third where the record gives no fourth.
- IsEdgeVisibleAt(short)
Gets whether an edge of the face is drawn, as AutoCAD's
IsEdgeVisibleAt: not hidden by its flag of group 70.
- MakeEdgeInvisibleAt(short)
Hides an edge of the face, as AutoCAD's
MakeEdgeInvisibleAt: its flag of group 70 set.
- MakeEdgeVisibleAt(short)
Draws an edge of the face, as AutoCAD's
MakeEdgeVisibleAt: its flag of group 70 taken off.
- SetVertexAt(short, GeoPoint3)
Moves a corner of the face, given in the world, as AutoCAD's
SetVertexAt.
- ToGeoPolygon2()
Gets the face as a polygon of the plane: the polygon of ToGeoPolygon3() where every corner of it is at a height of nought, as DxfReader takes a shape in world coordinates to lie on the floor, and refused otherwise, the reader reading a 3DFACE in space whatever PlanAs2D says. The face above is the GeoPolygon2 (0, 0), (10, 0), (10, 8), (0, 8).
- ToGeoPolygon2(Tolerance)
Gets the face as a polygon of the plane, as ToGeoPolygon2() does, its corners read within a tolerance, whose planar part says whether four corners are in one plane.
- ToGeoPolygon3()
Gets the face as the library's polygon, of the corners GetGeometry() reads: the boundary of its GeoFace3 where it has four corners in one plane within the planar tolerance, and the polygon of its GeoTriangle3 where it has three, a corner the same as the one before it to the bit left out. The face (0, 0, 0), (10, 0, 0), (10, 8, 0), (0, 8, 0) is that GeoPolygon3; with a corner raised by 1 its corners are not in one plane, the reader cuts it into two triangles, and it is refused, as the bow tie (0, 0, 0), (10, 10, 0), (10, 0, 0), (0, 10, 0) is, whose edges cross.