forked from 1b-agent/opencadstudio-upstream
fix(render): UTM-precise UCS icon + fallback outlines (hatch etc.)
Two UTM-scale rendering defects. - UCS icon jittered: it projects only axis DIRECTIONS but went through the full view_proj, whose ~5.7e6 translation cancels catastrophically in f32. Feed it the rotation-only view_proj_rte instead (translation dropped). - Fallback outline geometry (hatch boundary, viewport/insert/ole2frame frames, Solid3D edge wires) built absolute f32 points with an empty points_low, so at UTM the outline sat ~0.5 m off its own fill (the hatch fill renders precisely via the world_origin-relative HatchModel pipeline). FallbackGeometry now carries absolute f64 points + key vertices; the tessellate dispatcher splits them into the double-single high/low pair the relative-to-eye wire pass needs, so outlines land exactly on their fills. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
ef55b49db5
commit
dd1f2e49bb
7 files changed
+72
-46
No files matched your search
@@ -16,11 +16,16 @@ use crate::scene::model::wire_model::{SnapHint, TangentGeom, WireModel};
|
||||
/// callsite when the dispatcher wraps these into a WireModel.
|
||||
///
|
||||
/// Layout: `(points, snap_pts, tangent_geoms, key_vertices)`.
|
||||
///
|
||||
/// `points` are ABSOLUTE world coordinates in f64 — the dispatcher splits them
|
||||
/// into the double-single high/low pair the relative-to-eye renderer needs, so
|
||||
/// fallback outlines (hatch boundary, viewport/insert/ole2frame frames) stay
|
||||
/// glued to their fills at UTM scale instead of quantizing ~0.5 m in f32.
|
||||
pub type FallbackGeometry = (
|
||||
Vec<[f32; 3]>,
|
||||
Vec<[f64; 3]>,
|
||||
Vec<(Vec3, SnapHint)>,
|
||||
Vec<TangentGeom>,
|
||||
Vec<[f32; 3]>,
|
||||
Vec<[f64; 3]>,
|
||||
);
|
||||
|
||||
// ── Arc tessellation helpers ─────────────────────────────────────────────
|
||||
|
||||
Reference in new issue
Block a user