fix(thickness): edit persists + wide polyline extrudes as a solid tube

Entering a thickness (DXF 39 extrusion) on a wide polyline now works end
to end:

- The properties Thickness field is a General-group common prop, so it is
  routed to apply_common_prop (set_entity_thickness) instead of the
  geometry setter, which ignored it — the value was silently dropped and
  reverted to 0.
- A wide polyline extrudes its whole band into a 3-D tube (outer + inner
  walls with top and bottom caps), not just its centreline.
- The tube is real 3-D geometry, not a flat draw-order hatch: it renders
  solid in every view mode with true depth, so nothing shows through the
  walls. The flat 2-D band fill is skipped for a thickened polyline.
- A fill whose triangles span depth keeps its real depth (no draw-order
  bias), so the extrusion's own edge wires stay in front of the surface
  and remain visible instead of only the silhouette.
- The corner and cap edge lines read black, framing the coloured tube.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-20 13:40:12 +03:00
1 parent 626e8091f7
commit 3d37e1f8d8
5 files changed
+124 -3

No files matched your search

+5
View File
@@ -691,6 +691,11 @@ impl Scene {
// Wide LWPolyline and Polyline2D fills
for entity in self.document.entities() {
let (common, fill_origin, fills) = match entity {
// A thickened wide LwPolyline becomes a 3-D tube: its bottom cap
// is drawn as a real depth-tested surface by the tessellator, not
// as this flat 2-D band (which, having only draw-order depth,
// would show through the tube walls in a 3-D view).
EntityType::LwPolyline(pl) if pl.thickness.abs() > 1e-10 => continue,
EntityType::LwPolyline(pl) => {
let (o, f) = crate::entities::lwpolyline::wide_fills(pl);
(&pl.common, o, f)