cad-editor/src/scene/model
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven b3016ca892 feat(polyline): smooth per-segment taper for varying-width wide polylines
A wide polyline with per-vertex varying widths rendered at its widest edge
(uniform-width ones were already exact). Draw the true taper instead.

`WireModel.taper_widths` carries a per-point full band width. The wire
instance (native slim + web fat) gains per-endpoint `world_hw_a/b`, and both
wire shaders interpolate `mix(hw_a, hw_b, which_end)` so each segment's band
narrows/widens linearly — depth-tested, and the linetype dash still applies.

Alignment (widths must match the tessellated points) is solved by building
both together: a new `TruckObject::TaperedLines(points, widths)`, filled by
`common::tapered_band_points` (straight = endpoints, arc = 16 samples with the
width lerped along it). to_truck routes a varying-width polyline here —
LwPolyline before the PLINEGEN split, Polyline2D at its return — while a
uniform-width one keeps the constant-band Contour path unchanged. `world_width`
stays the widest edge as the PDF-stroke + zoom-floor fallback.

Blocks fall back to the constant-widest band (`LocalWire` carries no
taper_widths).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 16:36:06 +03:00
..
hatch_model.rs refactor(viewport): unify content-viewport clipping on the stencil path 2026-07-20 11:06:28 +03:00
hatch_patterns.rs fix: address review findings on merged #293/#292 hatch+snap 2026-07-06 20:23:59 +03:00
image_model.rs refactor(viewport): unify content-viewport clipping on the stencil path 2026-07-20 11:06:28 +03:00
mesh_model.rs feat(solid3d): ISOLINES and silhouettes on sphere and torus faces 2026-07-17 23:30:05 +03:00
mod.rs refactor(scene): rename model_solid to solid_model 2026-06-16 11:39:31 +03:00
object.rs feat(hatch): editable pattern props + origin grip 2026-07-08 22:48:33 +03:00
solid_model.rs refactor: remove dead world_offset plumbing (RTE migration is complete) 2026-06-24 18:35:02 +03:00
wire_model.rs feat(polyline): smooth per-segment taper for varying-width wide polylines 2026-07-20 16:36:06 +03:00