forked from 1b-agent/opencadstudio-upstream
Two viewport-navigation defects, both measured against commercial solutions.
The cursor stayed a hand during a zoom. `selection_overlay` took one boolean
for all three interactive navigation tools, so ZOOM Dynamic and ORBIT both
showed PAN's grab hand — which reads as "drag the sheet", the wrong promise
for either. Split it into a `NavCursor` enum: PAN keeps the open/closed hand,
ORBIT gets four-way arrows, and ZOOM Dynamic gets the magnifier carrying the
sign of the zoom actually under way — "+" dragging up, "-" dragging down,
latched with a 2 px dead zone so a hand held still cannot strobe the glyph.
ZOOM Dynamic also reused `box_anchor` to remember where a drag began, so a
selection marquee rubber-banded across the screen while the view zoomed; the
drawing is now suppressed, the state left alone for `reproject_box_anchor`.
ZOOM EXTENTS did not reach the whole drawing, for three separate reasons, now
answered by one shared `Scene::visible_block_bounds`:
- A quartile filter dropped any wire whose centroid sat outside the
inter-quartile consensus of the others. It was meant to stop one junk wire
from a bad parse poisoning the box, but it could not tell parser junk from
an outlying detail, a survey point, or a block placed away from the rest,
and silently refused to frame them. Gone; the absolute 1e16 sentinel gate
the paper path already used is the only filter, and the XLine / Ray display
segments that motivated the heuristic are handled explicitly.
- HATCH tessellates to no wires at all, and the model path never read the
fill models, so a drawing whose outermost geometry is a fill — or which is
nothing but fills — had nothing to frame. It now folds them in, reusing the
renderer's own warm cache on the hot path rather than re-exploding every
INSERT per ZOOM EXTENTS.
- Inside a floating viewport the fit came from `compute_model_space_extents`,
which walked only `key_vertices` — empty for every tessellated curve.
Circles, arcs, ellipses and splines contributed nothing. Fixing it also
corrects plot Extents, sheet-set framing, viewport auto-fit and SpaceMouse
model bounds, which all inherited that blind spot.
Bounds stay f64 into the camera: a UTM drawing lost whole metres to the old
f32 round-trip. Drawing extents also no longer read the camera — the result is
cached per geometry epoch, and a floating viewport's camera is derived FROM
the extents, so `camera_for_viewport` recursed into a stack overflow.
`model_space_extents_mixed_entities_accuracy` asserted the curve-blind result;
it now asserts the true bounds.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
80 lines
1.8 KiB
Rust
80 lines
1.8 KiB
Rust
//! Consolidated integration test runner for OpenCADStudio.
|
|
//!
|
|
//! Gathers and executes all integration test suites as submodules within a
|
|
//! single test binary.
|
|
|
|
#[path = "active_space_roundtrip.rs"]
|
|
mod active_space_roundtrip;
|
|
|
|
#[path = "annotative_context_roundtrip.rs"]
|
|
mod annotative_context_roundtrip;
|
|
|
|
#[path = "annotative_context_synthesis.rs"]
|
|
mod annotative_context_synthesis;
|
|
|
|
#[path = "block_hatch_export.rs"]
|
|
mod block_hatch_export;
|
|
|
|
#[path = "block_text_draw_depth.rs"]
|
|
mod block_text_draw_depth;
|
|
|
|
#[path = "dim_copy_check.rs"]
|
|
mod dim_copy_check;
|
|
|
|
#[path = "dim_leader_render_check.rs"]
|
|
mod dim_leader_render_check;
|
|
|
|
#[path = "dim_line_color_roundtrip.rs"]
|
|
mod dim_line_color_roundtrip;
|
|
|
|
#[path = "explode_regression.rs"]
|
|
mod explode_regression;
|
|
|
|
#[path = "flatten_regression.rs"]
|
|
mod flatten_regression;
|
|
|
|
#[path = "hatch_shader_lod.rs"]
|
|
mod hatch_shader_lod;
|
|
|
|
#[path = "mesh_shader_limits.rs"]
|
|
mod mesh_shader_limits;
|
|
|
|
#[path = "page_setup_root_repair.rs"]
|
|
mod page_setup_root_repair;
|
|
|
|
#[path = "parametric_constraints_solve.rs"]
|
|
mod parametric_constraints_solve;
|
|
|
|
#[path = "pdf_export_images_check.rs"]
|
|
mod pdf_export_images_check;
|
|
|
|
#[path = "pdf_export_text_check.rs"]
|
|
mod pdf_export_text_check;
|
|
|
|
#[path = "presspull_curved_boundary.rs"]
|
|
mod presspull_curved_boundary;
|
|
|
|
#[path = "section_plane_roundtrip.rs"]
|
|
mod section_plane_roundtrip;
|
|
|
|
#[path = "text_font_rendering.rs"]
|
|
mod text_font_rendering;
|
|
|
|
#[path = "text_shader_minification.rs"]
|
|
mod text_shader_minification;
|
|
|
|
#[path = "ucs_face_plane.rs"]
|
|
mod ucs_face_plane;
|
|
|
|
#[path = "viewport_wide_polyline_plot_width.rs"]
|
|
mod viewport_wide_polyline_plot_width;
|
|
|
|
#[path = "xclip_plot_test.rs"]
|
|
mod xclip_plot_test;
|
|
|
|
#[path = "zoom_extents_coverage.rs"]
|
|
mod zoom_extents_coverage;
|
|
|
|
#[path = "zoom_extents_xline.rs"]
|
|
mod zoom_extents_xline;
|