forked from 1b-agent/fieldcraft-upstream
Engine: geometry.datum, geometry.datum.axis and geometry.partition
Datum planes by principal plane and offset, three points, or point and normal; datum axes by principal axis, two points, or point and direction. geometry.partition cuts the open design by a datum plane and keeps the partition in the model, so geometry.open, file.open and undo cut the design again. Requirements, forms and the Prepare entries are wired; features.md lists them as ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
b0d0fc9900
commit
1c16972cf2
10 files changed
+497
-8
No files matched your search
@@ -803,6 +803,54 @@ pub const OPEN_DESIGN: &[Field] = &[
|
||||
path("path", "Design", false).req(),
|
||||
choice("model", "Model", &[("keep", "Keep the current model"), ("new", "Start a new model")]).def("\"keep\""),
|
||||
];
|
||||
const POINT: Dim = D::Millimetre;
|
||||
pub const DATUM_PLANE: &[Field] = &[
|
||||
NAME,
|
||||
variants(
|
||||
"by",
|
||||
"Definition",
|
||||
&[
|
||||
variant(
|
||||
"offset",
|
||||
"Principal plane",
|
||||
&[
|
||||
choice("plane", "Plane", &[("yz", "YZ (normal X)"), ("zx", "ZX (normal Y)"), ("xy", "XY (normal Z)")]).req(),
|
||||
num("offset", "Offset", POINT).def("0"),
|
||||
],
|
||||
),
|
||||
variant(
|
||||
"three_points",
|
||||
"Three points",
|
||||
&[xyz("a", "Point A", POINT).req(), xyz("b", "Point B", POINT).req(), xyz("c", "Point C", POINT).req()],
|
||||
),
|
||||
variant("point_normal", "Point and normal", &[xyz("point", "Point", POINT).req(), xyz("normal", "Normal", D::None).req()]),
|
||||
],
|
||||
)
|
||||
.req()
|
||||
.def(r#"{"type": "offset"}"#),
|
||||
];
|
||||
pub const DATUM_AXIS: &[Field] = &[
|
||||
NAME,
|
||||
variants(
|
||||
"by",
|
||||
"Definition",
|
||||
&[
|
||||
variant(
|
||||
"principal",
|
||||
"Principal axis",
|
||||
&[choice("axis", "Axis", &[("x", "X"), ("y", "Y"), ("z", "Z")]).req(), xyz("through", "Through", POINT).hint("the origin")],
|
||||
),
|
||||
variant("two_points", "Two points", &[xyz("a", "Point A", POINT).req(), xyz("b", "Point B", POINT).req()]),
|
||||
variant("point_direction", "Point and direction", &[xyz("point", "Point", POINT).req(), xyz("direction", "Direction", D::None).req()]),
|
||||
],
|
||||
)
|
||||
.req()
|
||||
.def(r#"{"type": "principal"}"#),
|
||||
];
|
||||
pub const DATUM_DELETE: &[Field] = existing!("Datum", C::Datum);
|
||||
pub const PARTITION: &[Field] =
|
||||
&[NAME, reference("datum", "Datum plane", C::DatumPlane).req(), references("bodies", "Bodies", C::Body).hint("every body the plane divides")];
|
||||
pub const PARTITION_DELETE: &[Field] = existing!("Partition", C::Partition);
|
||||
pub const TESSELLATE: &[Field] = &[reference("body", "Body", C::Body).req(), TOLERANCE];
|
||||
pub const IMPORT_MESH: &[Field] = &[path("path", "3MF file", false).req()];
|
||||
pub const FILE_OPEN: &[Field] = &[path("path", "Model", false).req()];
|
||||
|
||||
Reference in new issue
Block a user