cad-editor/src/scene
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 0d543e8c88 fix(block_cache): harden defn local_offset against NaN + bad-extent poison
Two latent traps in the first-pass centroid scan:

- A bbox where x/y were finite but z was NaN would skip the z update;
  if NO entity contributed a finite z, `min[2]` stayed at `INFINITY` and
  `max[2]` at `NEG_INFINITY`. `(INF + NEG_INF) * 0.5 = NaN`, so the defn's
  `local_offset.z` was NaN, propagating to every cast point in the defn.
  Track `have` per axis and default missing axes to 0.

- A single corrupt entity at parser-garbage coords (1e15+) silently
  dragged the centroid out of the real geometry's neighbourhood. Reject
  per-axis values above `SANE_EXTENT` so one bad bbox doesn't ruin the
  whole defn.

Also include `Insert::insert_point` as a contributing sample so a
composite block (only nested Inserts, no direct wires) still gets a
non-zero offset — useful for the nested-defn AABB transforms even
though no direct LocalWire stores against it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 21:56:27 +03:00
..
pipeline perf(scene): frustum-cull wires using camera view AABB 2026-05-14 13:52:04 +03:00
acad_to_truck.rs fix(render): preserve f64 precision until world_offset subtraction 2026-05-12 23:47:40 +03:00
block_cache.rs fix(block_cache): harden defn local_offset against NaN + bad-extent poison 2026-05-14 21:56:27 +03:00
camera.rs cargo fmt 2026-05-12 10:36:15 +03:00
complex_lt.rs cargo fmt 2026-05-12 10:36:15 +03:00
cxf.rs cargo fmt 2026-05-12 10:36:15 +03:00
dispatch.rs first commit 2026-03-22 14:56:27 +03:00
grip.rs cargo fmt 2026-05-12 10:36:15 +03:00
hatch_model.rs fix(hatch): more improvement on arc boundary and pattern 2026-05-10 20:29:39 +03:00
hatch_patterns.rs first commit 2026-03-22 14:56:27 +03:00
hit_test.rs cargo fmt 2026-05-12 10:36:15 +03:00
image_model.rs cargo fmt 2026-05-12 10:36:15 +03:00
mesh_model.rs first commit 2026-03-22 14:56:27 +03:00
mod.rs feat(xref+block): bind xref tables, fade rendered geometry, per-defn precision offset 2026-05-14 21:45:37 +03:00
object.rs first commit 2026-03-22 14:56:27 +03:00
paper_canvas.rs cargo fmt 2026-05-12 10:36:15 +03:00
properties.rs refactor: deduplicate entity type name mapping 2026-04-24 01:44:33 +03:00
render.rs perf(scene): pixel-size LOD cull at zoom-out 2026-05-14 14:22:39 +03:00
selection.rs Split large files: ribbon widgets and scene render/selection 2026-03-22 23:07:43 +03:00
solid3d_tess.rs cargo fmt 2026-05-12 10:36:15 +03:00
tessellate.rs fix(render): preserve f64 precision until world_offset subtraction 2026-05-12 23:47:40 +03:00
transform.rs cargo fmt 2026-05-12 10:36:15 +03:00
truck_tess.rs cargo fmt 2026-05-12 10:36:15 +03:00
viewport_pane.rs cargo fmt 2026-05-12 10:36:15 +03:00
wire_model.rs cargo fmt 2026-05-12 10:36:15 +03:00