#[non_exhaustive]pub enum EntityKind {
Show 20 variants
Point {
position: Point3,
},
Line {
start: Point3,
end: Point3,
},
Polyline {
vertices: Vec<Vertex>,
closed: bool,
normal: Vec3,
},
Circle {
center: Point3,
radius: f64,
normal: Vec3,
},
Arc {
center: Point3,
radius: f64,
start_angle: f64,
end_angle: f64,
normal: Vec3,
},
Ellipse {
center: Point3,
major_axis: Vec3,
ratio: f64,
start_param: f64,
end_param: f64,
normal: Vec3,
},
Spline {
degree: u32,
knots: Vec<f64>,
control_points: Vec<Point3>,
weights: Vec<f64>,
fit_points: Vec<Point3>,
closed: bool,
},
Text {
position: Point3,
end_point: Option<Point3>,
height: f64,
rotation: f64,
width_factor: f64,
oblique: f64,
value: String,
style: Option<String>,
halign: HAlign,
valign: VAlign,
normal: Vec3,
},
MText {
position: Point3,
height: f64,
width: f64,
rotation: f64,
value: String,
plain: String,
style: Option<String>,
attachment: Attachment,
line_spacing: f64,
normal: Vec3,
},
Insert {
block: String,
position: Point3,
scale: Vec3,
rotation: f64,
normal: Vec3,
columns: u32,
rows: u32,
column_spacing: f64,
row_spacing: f64,
},
Hatch {
loops: Vec<HatchLoop>,
solid: bool,
pattern: Option<String>,
pattern_scale: f64,
pattern_angle: f64,
normal: Vec3,
},
Dimension {
dimension_type: DimensionType,
points: Vec<Point3>,
text_position: Option<Point3>,
measurement: Option<f64>,
text: Option<String>,
block: Option<String>,
style: Option<String>,
},
Face {
points: Vec<Point3>,
filled: bool,
},
Polygon {
exterior: Vec<Point3>,
interiors: Vec<Vec<Point3>>,
},
Leader {
vertices: Vec<Point3>,
arrowhead: bool,
},
Image {
path: Option<String>,
position: Point3,
u_vector: Vec3,
v_vector: Vec3,
size_px: Option<[u32; 2]>,
},
Viewport {
center: Point3,
width: f64,
height: f64,
view_center: Point3,
view_height: f64,
},
Mesh {
vertices: Vec<Point3>,
faces: Vec<Vec<u32>>,
},
Group {
group_kind: GroupKind,
name: Option<String>,
origin: Option<Point3>,
children: Vec<Entity>,
},
Unknown {
type_name: String,
},
}Expand description
Geometry and type-specific data of an Entity.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Point
A point.
Line
A straight segment.
Polyline
Connected segments, optionally with arc segments (bulge) and widths. Covers DWG LWPOLYLINE/POLYLINE and DGN line string / shape.
Fields
Circle
A full circle.
Arc
A circular arc from start_angle counter-clockwise to end_angle.
Fields
Ellipse
An ellipse or elliptical arc.
Fields
Spline
A B-spline / NURBS curve.
Fields
Text
Single-line text.
Fields
MText
Multi-line, formatted text. DGN text nodes map to this when they only hold text.
Fields
attachment: AttachmentAttachment point.
Insert
A placed block (DWG INSERT, DGN shared cell instance).
Attribute values live in Entity::attributes.
Fields
Hatch
A filled or patterned area.
Fields
Dimension
A dimension annotation.
Fields
dimension_type: DimensionTypeKind of dimension.
Face
A planar 3- or 4-sided face (DWG SOLID/TRACE/3DFACE).
Fields
Polygon
A planar surface with optional holes, in world coordinates (WCS) and drawing units. Each ring is explicitly closed by repeating its first point as its last point.
Fields
Leader
A leader line.
Fields
Image
A raster image reference (DWG IMAGE, DGN raster attachment).
Fields
Viewport
A paper-space viewport.
Fields
Mesh
A polygon mesh or polyface.
Fields
Group
Entities that belong together: DGN complex chains/shapes, cells, text nodes, groups. Children are in the same coordinate space as the group.
Fields
Unknown
A record the reader recognized but does not model; see props / raw.