Entities
entities/ hatch/ edge
#include "dxfio/entities/hatch/edge.hpp"In DxfIO::Entities::Edges
struct Node
A vertex of a polyline boundary, or a control point of a spline edge, with its bulge or weight.
| Field | Type | Meaning |
|---|---|---|
Position | Vector | The location, in the hatch's own coordinate system. Groups 10, 20. |
Weight | std::optional<double> | The bulge of the segment to the next vertex, or the weight of the control point, when it has one. Group 42. |
struct Place
A point of a hatch: a seed point, or a fit point of a spline edge.
| Field | Type | Meaning |
|---|---|---|
Position | Vector | The location, in the hatch's own coordinate system. Groups 10, 20 for a seed point, 11, 21 for a fit point. |
struct LineLINE
A straight edge of a hatch boundary.
| Field | Type | Meaning |
|---|---|---|
Start | Vector | The start point, in the hatch's own coordinate system. Groups 10, 20. |
End | Vector | The end point, in the hatch's own coordinate system. Groups 11, 21. |
struct ArcARC
A circular arc edge of a hatch boundary.
| Field | Type | Meaning |
|---|---|---|
Center | Vector | The center, in the hatch's own coordinate system. Groups 10, 20. |
Radius | double | The radius, in drawing units. Group 40. |
Start | double | The start angle, in degrees. Group 50. |
End | double | The end angle, in degrees. Group 51. |
Counter | int | 1 when the arc runs counterclockwise. Group 73. |
struct EllipseELLIPSE
An elliptic arc edge of a hatch boundary.
| Field | Type | Meaning |
|---|---|---|
Center | Vector | The center, in the hatch's own coordinate system. Groups 10, 20. |
Major | Vector | The end of the major axis, relative to the center. Groups 11, 21. |
Ratio | double | The length of the minor axis over that of the major axis. Group 40. |
Start | double | The start angle, in degrees. Group 50. |
End | double | The end angle, in degrees. Group 51. |
Counter | int | 1 when the arc runs counterclockwise. Group 73. |
struct SplineSPLINE
A spline edge of a hatch boundary.
| Field | Type and default | Meaning |
|---|---|---|
Degree | int{3} | The degree of the spline, 3 for a new one. Group 94. |
Rational | int | 1 when the spline is rational. Group 73. |
Periodic | int | 1 when the spline is periodic. Group 74. |
Knots | std::vector<double> | The knot values; group 95 counts them. Group 40. |
Poles | std::vector<Node> | The control points, with their weights when the spline is rational; group 96 counts them. |
Fits | std::vector<Place> | The points the spline passes through; group 97 counts them. From R2010. |
Start | Vector | The tangent at the start, when the spline has fit points. Groups 12, 22, from R2010. |
End | Vector | The tangent at the end, when the spline has fit points. Groups 13, 23, from R2010. |
using Edge
An edge of a hatch boundary, its kind given by group 72: 1 line, 2 circular arc, 3 elliptic arc, 4 spline. A spline is kept on the heap, so an edge stays the size of an elliptic arc.
using Edge = std::variant<Line, Arc, Ellipse, Boxed<Spline>>;