Commit graph

12 commits

Author SHA1 Message Date
7535bd7a85 typing 2026-08-25 20:47:31 +03:00
3793c45f54 names from islands 2026-08-10 13:58:12 +03:00
32e43c748b grid 2026-08-07 16:04:51 +03:00
40cc779e5d grid placement 2026-08-07 15:00:58 +03:00
8154370c99 rotate legend 2026-08-07 14:33:15 +03:00
0c266dd8c7 3d grid 2026-08-06 12:31:44 +03:00
02175f379a draw lines 2026-08-04 15:44:42 +03:00
5cf0caefd0 up 2026-08-03 18:18:26 +03:00
7b8c54c2a5 sa2 2026-07-31 14:25:38 +03:00
c862e8976b contour 2026-07-30 19:29:23 +03:00
c2e1bc50a5 Fix contour silhouette detection for perpendicular faces
The silhouette detection was using 2D orientation (CCW/CW in XY projection)
which fails for faces perpendicular to the view direction. When a face's
normal is parallel to the Z-axis (truly perpendicular to top-down view),
the 2D cross product becomes zero and the face is neither CCW nor CW.

This fix replaces the 2D orientation approach with 3D normal-based detection:
- Categorize faces by the sign of normal.z:
  - normal.z < 0: front-facing (visible from top)
  - normal.z > 0: back-facing (not visible)
  - normal.z == 0: vertical/edge-on
- An edge is a silhouette if adjacent faces have different categories

This correctly detects silhouette edges for:
- Front-facing + back-facing faces
- Front-facing + vertical faces
- Back-facing + vertical faces

Affects: extract_silhouette_contour_edges() and extract_lineart_edges()

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-07-30 15:21:27 +03:00
a4068addf9 ref 2026-07-30 12:29:31 +03:00