forked from 1b-agent/fieldcraft-upstream
Datums: drawn at the model's extent, never framed, the selected one shown
A datum plane is drawn as the model's extent within it (where it cuts the model's box, in the plane's axes) plus a 5 % margin, a datum axis along the model's extent plus the margin, instead of squares 1.2 diagonals wide. Fit, Home, the standard views and headless pictures frame the model without the datums (they stay inside the clipping radius). The datum selected in the browser is drawn highlighted and on top, even when hidden. 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
b19277ae7a
commit
dddb2d0584
6 files changed
+239
-56
No files matched your search
@@ -209,7 +209,7 @@ fn datum_at(app: &mut ModelApp, at: Pos2) -> Option<String> {
|
||||
let mut best: Option<(f32, String)> = None;
|
||||
for name in names {
|
||||
let mut drawn = fieldcraft_render::Scene::default();
|
||||
fieldcraft_render::glyphs::datums(&app.session.model, &bounds, &|n| n == name, &colors, &mut drawn);
|
||||
fieldcraft_render::glyphs::datums(&app.session.model, &bounds, &|n| n == name, None, &colors, &mut drawn);
|
||||
for l in &drawn.lines {
|
||||
let (Some(a), Some(b)) = (to_screen(app, l.a), to_screen(app, l.b)) else { continue };
|
||||
let xy = |p: Pos2| [f64::from(p.x), f64::from(p.y)];
|
||||
|
||||
Reference in new issue
Block a user