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.

FieldTypeMeaning
PositionVectorThe location, in the hatch's own coordinate system. Groups 10, 20.
Weightstd::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.

FieldTypeMeaning
PositionVectorThe 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.

FieldTypeMeaning
StartVectorThe start point, in the hatch's own coordinate system. Groups 10, 20.
EndVectorThe end point, in the hatch's own coordinate system. Groups 11, 21.

struct ArcARC

A circular arc edge of a hatch boundary.

FieldTypeMeaning
CenterVectorThe center, in the hatch's own coordinate system. Groups 10, 20.
RadiusdoubleThe radius, in drawing units. Group 40.
StartdoubleThe start angle, in degrees. Group 50.
EnddoubleThe end angle, in degrees. Group 51.
Counterint1 when the arc runs counterclockwise. Group 73.

struct EllipseELLIPSE

An elliptic arc edge of a hatch boundary.

FieldTypeMeaning
CenterVectorThe center, in the hatch's own coordinate system. Groups 10, 20.
MajorVectorThe end of the major axis, relative to the center. Groups 11, 21.
RatiodoubleThe length of the minor axis over that of the major axis. Group 40.
StartdoubleThe start angle, in degrees. Group 50.
EnddoubleThe end angle, in degrees. Group 51.
Counterint1 when the arc runs counterclockwise. Group 73.

struct SplineSPLINE

A spline edge of a hatch boundary.

FieldType and defaultMeaning
Degreeint{3}The degree of the spline, 3 for a new one. Group 94.
Rationalint1 when the spline is rational. Group 73.
Periodicint1 when the spline is periodic. Group 74.
Knotsstd::vector<double>The knot values; group 95 counts them. Group 40.
Polesstd::vector<Node>The control points, with their weights when the spline is rational; group 96 counts them.
Fitsstd::vector<Place>The points the spline passes through; group 97 counts them. From R2010.
StartVectorThe tangent at the start, when the spline has fit points. Groups 12, 22, from R2010.
EndVectorThe 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>>;