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:
Hakan Seven 2026-06-24 10:09:19 +03:00
commit dd1f2e49bb
7 changed files with 72 additions and 46 deletions

View file

@ -551,11 +551,11 @@ impl crate::entities::traits::FallbackTess for Viewport {
world_offset: [f64; 3],
) -> crate::scene::convert::tess_util::FallbackGeometry {
let [ox, oy, oz] = world_offset;
let cx = (self.center.x - ox) as f32;
let cy = (self.center.y - oy) as f32;
let cz = (self.center.z - oz) as f32;
let hw = (self.width / 2.0) as f32;
let hh = (self.height / 2.0) as f32;
let cx = self.center.x - ox;
let cy = self.center.y - oy;
let cz = self.center.z - oz;
let hw = self.width / 2.0;
let hh = self.height / 2.0;
let pts = vec![
[cx - hw, cy - hh, cz],
[cx + hw, cy - hh, cz],