feat(dgn-ls): dash walls from start + fix wall connector and cap identity

DET pipe walls now carry the stroke pattern (dash_from_start), which
tiles from each wall's own start vertex and skips the A-type end
alignment that was force-lighting a solid dash under the end symbol.

Two rendering fixes on top:
- Dedup the host polyline's vertices before offsetting the walls. Some
  DGN pipe polylines carry trailing duplicate end vertices; a zero-length
  segment gave offset_xy a degenerate normal, leaving that vertex
  un-offset and folding the wall down to the centre line. The two walls'
  fold segments met at the centre and drew a spurious line linking them.
- Re-key the symbol (end circle / half-ellipse) wires to the host handle
  so the whole pipe picks and selects as one entity instead of the
  symbols acting as separate phantom entities.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-17 01:49:18 +03:00
commit 48e6d0d553
42 changed files with 124 additions and 8 deletions

View file

@ -286,6 +286,15 @@ fn wire_distances(wire: &WireModel) -> (Vec<f32>, f32, f32) {
return (dists, 0.0, 0.0);
}
// DGN line styles draw the pattern from the START vertex with continuous
// phase and are NOT end-aligned. The raw arc-length distances already put
// dist 0 at the first vertex, so a dash-first pattern begins a dash exactly
// there. Return before the A-type / centring logic that standard linetypes
// use (see `WireModel::dash_from_start`).
if wire.dash_from_start {
return (dists, 0.0, 0.0);
}
// Align only a proper alternating pattern that BEGINS with a dash followed
// by a gap — every standard linetype does (DASHED/DASHDOT/CENTER/HIDDEN/…).
// Gap-first, dot-first, single-element, or consecutive-dash patterns keep