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 <[email protected]> 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
@@ -199,7 +199,16 @@ impl Session {
|
||||
let mut design: Option<Arc<Design>> = None;
|
||||
if let Some(stored) = &file.geometry.design {
|
||||
let (opened, source) = reopen("design", stored, base, roots, MAX_DESIGN_BYTES as u64, open_design, &mut warnings);
|
||||
design = opened.map(Arc::new);
|
||||
design = opened.and_then(|d| match super::datum::partitioned(&d, &file.model) {
|
||||
Ok(cut) => Some(Arc::new(cut)),
|
||||
Err(e) => {
|
||||
warnings.push(format!("the design's partitions could not be applied ({e}); the model opens without the design"));
|
||||
None
|
||||
}
|
||||
});
|
||||
if let Some(d) = &design {
|
||||
warnings.extend(d.errors.iter().filter(|e| e.feature.starts_with("partition ")).map(|e| format!("{}: {}", e.feature, e.message)));
|
||||
}
|
||||
sources.design = Some(source);
|
||||
}
|
||||
let mut surfaces = Vec::new();
|
||||
|
||||
Reference in new issue
Block a user