pub enum SolidOp {
Show 20 variants
Shape {
brep: Vec<u8>,
},
Sweep {
profile: Profile,
kind: SweepKind,
op: BooleanOp,
},
SweepFace {
face: FaceProbe,
kind: SweepKind,
op: BooleanOp,
},
SweepFaceOf {
shape: Vec<u8>,
transform: Option<Box<[[f64; 4]; 4]>>,
point: [f64; 3],
kind: SweepKind,
op: BooleanOp,
},
LoftThrough {
sections: Vec<LoftSection>,
ruled: bool,
closed: bool,
op: BooleanOp,
},
Loft {
sections: Vec<Profile>,
ruled: bool,
closed: bool,
op: BooleanOp,
},
Pipe {
profile: Profile,
spine: Profile,
frame: PipeFrame,
corner: PipeCorner,
sections: Vec<Profile>,
op: BooleanOp,
},
PipeThrough {
profile: LoftSection,
path: PipePath,
frame: PipeFrame,
corner: PipeCorner,
sections: Vec<LoftSection>,
op: BooleanOp,
},
Primitive {
kind: PrimitiveKind,
placement: Placement,
op: BooleanOp,
},
Fillet {
radius: f64,
edges: EdgeSelection,
follow_tangent: bool,
},
Chamfer {
spec: ChamferSpec,
flip: bool,
edges: EdgeSelection,
follow_tangent: bool,
},
Draft {
angle_deg: f64,
neutral_point: [f64; 3],
neutral_normal: [f64; 3],
pull_dir: Option<[f64; 3]>,
faces: Vec<[f64; 3]>,
face_names: Vec<TopoName>,
},
Refine,
OffsetFaces {
faces: Vec<[f64; 3]>,
face_names: Vec<TopoName>,
distance: f64,
},
MoveFaces {
faces: Vec<[f64; 3]>,
face_names: Vec<TopoName>,
transform: [[f64; 4]; 4],
},
RemoveFaces {
faces: Vec<[f64; 3]>,
face_names: Vec<TopoName>,
},
Thickness {
value: f64,
open_faces: Vec<[f64; 3]>,
open_face_names: Vec<TopoName>,
inward: bool,
join: ThicknessJoin,
both_sides: bool,
},
Transform {
transforms: Vec<[[f64; 4]; 4]>,
originals: Vec<usize>,
},
Boolean {
tool_brep: Vec<u8>,
kind: BoolKind,
tool_transform: Option<[[f64; 4]; 4]>,
},
Surface(SurfaceOp),
}Expand description
One step in a body’s build history. Shape-producing steps (Sweep,
Loft, Pipe, Primitive) carry a BooleanOp; the remaining steps
modify or combine the running solid directly.
A package builds these, so a variant keeps its fields for as long as
the contract’s minor version holds: a new option comes as a new
variant, or as a new struct that derives Default.
Variants§
Shape
Start the chain from a snapshot of another solid, in the native
format SolidBuildResult::brep_blob carries. Only ever the first op.
Sweep
SweepFace
Extrude a flat face of the running solid: its outer and inner
boundaries are the profile and its outward normal the sketch
normal. kind is an Extrude.
SweepFaceOf
Extrude a flat face of another shape (native-format shape, moved by
transform into this body’s frame): the face of it at point, a
face another body lends this one.
Fields
LoftThrough
Skin through two or more sections (in order), each a profile, a flat face of the running solid (its boundary) or a point, which only the first or last may be.
Loft
Skin through two or more section profiles (in order).
Pipe
Sweep a profile along an open or closed spine wire from another
sketch, the section turning as frame says and turning its corners
as corner says. With sections, the section changes shape down
the path, passing through each of them where it crosses the path,
in order, the profile first.
Fields
corner: PipeCornerPipeThrough
A pipe whose profile may be a flat face of the running solid, whose
path may be edges of a solid, and whose last section may be a point
it closes to; the rest reads as for Pipe.
Primitive
Fillet
Round the selected edges; with follow_tangent, every edge meeting
one of them tangentially joins the selection, and so on along the
chain.
Chamfer
Bevel the selected edges, taking tangent chains as a fillet does.
Draft
Tilt the selected faces by angle_deg about their intersection with
the neutral plane.
Fields
Refine
Merge adjacent faces of the solid that lie on one plane: the split a fuse or cut leaves where two pieces meet flush.
OffsetFaces
Offset faces of the running solid along their outward normals by
distance (negative into the material), the faces around them
following on their own surfaces.
MoveFaces
Move faces of the running solid rigidly by transform (row-major,
a translation or a rotation), the faces around them following.
RemoveFaces
Remove faces of the running solid and close the openings from the neighbouring faces’ own geometry: a hole, a boss or a fillet taken away. Faces as points on them, named where they have names.
Thickness
Hollow the solid, removing the faces sampled by open_faces.
Fields
open_face_names: Vec<TopoName>The name of each open face, one per point; empty or zero where a face has none.
join: ThicknessJoinHow the walls meet where the solid’s faces meet.
Transform
Re-apply earlier steps’ tool solids (or the whole current solid when
originals is empty) under each transform, fusing additive tools and
cutting subtractive ones. originals holds chain indices of earlier
shape-producing steps.
Boolean
Boolean against an external solid (another body’s shape snapshot, ogeom native-format text bytes).
Fields
Surface(SurfaceOp)
A surface step: a sheet added to the body, or the body’s sheets joined, trimmed or mirrored.
Implementations§
Source§impl SolidOp
impl SolidOp
Sourcepub fn starts_shape(&self) -> bool
pub fn starts_shape(&self) -> bool
Whether the step makes a shape of its own, so a chain may begin with it: a new solid, or a surface step that adds a sheet.
Sourcepub fn boolean_op(&self) -> Option<BooleanOp>
pub fn boolean_op(&self) -> Option<BooleanOp>
The boolean role of a shape-producing step; None for modifiers.