pub enum SurfaceOp {
Show 22 variants
Extrude {
curves: Vec<CurveSource>,
direction: [f64; 3],
length: f64,
symmetric: bool,
},
Revolve {
curves: Vec<CurveSource>,
origin: [f64; 3],
axis: [f64; 3],
angle_deg: f64,
},
PlanarFill {
curves: Vec<CurveSource>,
},
Fill {
boundary: Vec<CurveSource>,
continuity: Continuity,
},
Ruled {
first: CurveSource,
second: CurveSource,
},
Loft {
sections: Vec<CurveSource>,
closed: bool,
},
Sweep {
profile: Vec<CurveSource>,
path: Vec<CurveSource>,
frame: PipeFrame,
},
GuidedLoft {
sections: Vec<CurveSource>,
guides: Vec<CurveSource>,
},
SweepTwoRails {
profile: Vec<CurveSource>,
first_rail: Vec<CurveSource>,
second_rail: Vec<CurveSource>,
},
Offset {
faces: Vec<FaceProbe>,
distance: f64,
},
Extend {
edges: Vec<EdgeProbe>,
length: f64,
continuity: Continuity,
},
Blend {
first: EdgeProbe,
second: EdgeProbe,
continuity: Continuity,
},
Split {
faces: Vec<FaceProbe>,
curves: Vec<CurveSource>,
},
Sew {
gap: f64,
},
Fillet {
edges: Vec<EdgeProbe>,
radius: f64,
},
FilletFaces {
first: FaceProbe,
second: FaceProbe,
radius: f64,
flip: [bool; 2],
},
Thicken {
thickness: f64,
both_sides: bool,
},
TrimByPlane {
origin: [f64; 3],
normal: [f64; 3],
},
Mirror {
origin: [f64; 3],
normal: [f64; 3],
},
TrimByScan {
scan: Vec<[f32; 3]>,
triangles: Vec<u32>,
tolerance: f64,
share: f64,
},
FitScattered {
points: Vec<[f64; 3]>,
tolerance: f64,
},
FitNetwork {
curves: Vec<CurveSource>,
polylines: Vec<Vec<[f64; 3]>>,
patches: Vec<[i32; 4]>,
chained: Vec<[Vec<i32>; 4]>,
corrections: u32,
points: Vec<[f64; 3]>,
tolerance: f64,
smoothing: f64,
creases: Vec<u32>,
},
}Expand description
The steps of surface modelling. A constructive step (every one but
Sew, TrimByPlane and Mirror) adds its sheet to the body beside
what is there; the rest act on all of the body’s shape.
Variants§
Extrude
Each curve swept straight along direction by length, both ways
by half of it when symmetric.
Revolve
Each curve turned by angle_deg about the axis through origin
along axis.
PlanarFill
The flat face closed planar loops bound, a loop inside another a hole in it.
Fields
curves: Vec<CurveSource>Fill
The surface curves meeting end to end bound, meeting the faces the
boundary edges belong to with continuity.
Ruled
The surface of straight lines between two curves, end to end.
Loft
A surface through section curves in order, closing back to the first
when closed.
Sweep
A profile curve swept along a path.
GuidedLoft
A surface through section curves in order that also follows guide curves, each crossing every section once: one face.
SweepTwoRails
A profile running from the first rail’s start to the second’s, swept along both: at each point along them it is turned and scaled so its ends ride the rails.
Offset
Faces carried off along their normals by distance, as new faces.
Extend
Faces carried past picked edges of their boundary by length.
Blend
A surface bridging two edges, meeting each edge’s face with
continuity.
Split
Picked faces split along curves projected onto them.
Sew
The body’s faces joined where their edges meet, or come within
gap of each other (0 for exactly); a shell that closes becomes a
solid.
Fillet
A round of radius along picked edges where two faces of a sheet
meet.
FilletFaces
A round of radius between two faces of the body that need share
no edge, such as two separate surfaces, each cut back to where it
meets the round. The ball rolls on the side each face’s normal
points to, on the other where flip says so.
Thicken
The body’s sheets given thickness along their normals (both ways
by half when both_sides): a solid.
TrimByPlane
The body’s sheets cut by the plane through origin, the side
normal points to kept.
Mirror
The body’s shape and its reflection in the plane through origin
square to normal.
TrimByScan
The body’s sheets cut by each other, the faces lying on scan
kept (at least share of each face’s area within tolerance of
it) and sewn: a closed shell becomes a solid. The scan’s
triangles, scan vertices taken three by three from triangles,
are in the body’s frame.
FitScattered
A free-form (B-spline) sheet fitted to scattered points, such as
a region of a scan, within tolerance of them where it can.
FitNetwork
A network of B-spline patches fitted to points at once, each
patch bounded by curves of the network and meeting its neighbours
across them without a gap, tangent unless the curve is a crease.
The network’s curves are curves, one chain each, then
polylines; a patch names its sides in order round it as curve
numbers from 1, negative where the curve runs against the walk and 0
for a side shrunk to a point.