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 SevenandClaude Opus 4.8 committed 2026-07-17 01:49:18 +03:00
1 parent 765e6606e2
commit 48e6d0d553
42 files changed
+124 -8

No files matched your search

+2
View File
@@ -186,6 +186,7 @@ impl CadCommand for AlignedDimensionCommand {
let p1 = p1.as_vec3();
let p2 = p2.as_vec3();
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimaligned_preview".into(),
points: vec![[p1.x, p1.y, p1.z], [p2.x, p2.y, p2.z]],
@@ -233,6 +234,7 @@ fn preview_aligned(p1: DVec3, p2: DVec3, dim_pt: DVec3) -> WireModel {
let d1 = d1.as_vec3();
let d2 = d2.as_vec3();
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimaligned_preview".into(),
points: vec![
+1
View File
@@ -130,6 +130,7 @@ fn v3(pt: DVec3) -> Vector3 {
fn preview_wire(points: Vec<Vec3>) -> WireModel {
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimangular_preview".to_string(),
points: points.into_iter().map(|p| [p.x, p.y, p.z]).collect(),
+1
View File
@@ -180,6 +180,7 @@ fn v3(p: DVec3) -> Vector3 {
fn preview_line(a: Vec3, b: Vec3) -> WireModel {
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimdia_preview".into(),
points: vec![[a.x, a.y, a.z], [b.x, b.y, b.z]],
+1
View File
@@ -179,6 +179,7 @@ impl CadCommand for DimBaselineCommand {
let dim_line_pt2 = dim_line_pt2.as_vec3();
let pt = pt.as_vec3();
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimbase_preview".into(),
points: vec![
+1
View File
@@ -159,6 +159,7 @@ impl CadCommand for DimContinueCommand {
let dim_line_pt = p1 + perp * (dim_line_perp - p1.dot(perp));
let dim_line_pt2 = pt + perp * (dim_line_perp - pt.dot(perp));
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimcont_preview".into(),
points: vec![
+1
View File
@@ -85,6 +85,7 @@ impl CadCommand for DimJogLineCommand {
}
let d = 0.3_f32;
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimjog_preview".into(),
// Jog zigzag in the XY drawing plane (Z is elevation, ~0). The old
+1
View File
@@ -100,6 +100,7 @@ impl CadCommand for DimTeditCommand {
}
let d = 0.2_f32;
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimtedit_preview".into(),
// Marker box in the XY drawing plane (Z is elevation, ~0). The old
+1
View File
@@ -163,6 +163,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
points.push([w2.x, w2.y, w2.z]);
}
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "leader_preview".into(),
points,
+1
View File
@@ -218,6 +218,7 @@ fn v3(pt: DVec3) -> Vector3 {
fn preview_wire(points: Vec<DVec3>) -> WireModel {
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimlinear_preview".to_string(),
points: points
+1
View File
@@ -150,6 +150,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
points.push([w2.x, w2.y, w2.z]);
}
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "mleader_preview".into(),
points,
+1
View File
@@ -458,6 +458,7 @@ impl CadCommand for MLeaderCollectCommand {
fn preview_wire(pts: &[Vec3]) -> WireModel {
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "mleader_edit_preview".into(),
points: pts.iter().map(|p| [p.x, p.y, p.z]).collect(),
+1
View File
@@ -121,6 +121,7 @@ fn ordinate_elbow(feature: DVec3, leader: DVec3, is_x: bool) -> DVec3 {
fn preview_wire(points: Vec<Vec3>) -> WireModel {
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimordinate_preview".into(),
points: points.into_iter().map(|p| [p.x, p.y, p.z]).collect(),
+1
View File
@@ -90,6 +90,7 @@ impl CadCommand for QdimCommand {
}
let d = 0.5_f32;
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "qdim_preview".into(),
points: vec![[pt.x - d * 3.0, pt.y, pt.z], [pt.x + d * 3.0, pt.y, pt.z]],
+1
View File
@@ -185,6 +185,7 @@ fn v3(pt: DVec3) -> Vector3 {
fn preview_wire(points: Vec<Vec3>) -> WireModel {
WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "dimradius_preview".to_string(),
points: points.into_iter().map(|p| [p.x, p.y, p.z]).collect(),
+1
View File
@@ -139,6 +139,7 @@ impl CadCommand for TableCommand {
let y = pt.y;
let z = pt.z;
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "table_preview".into(),
points: vec![
+1
View File
@@ -84,6 +84,7 @@ impl CadCommand for ToleranceCommand {
}
let d = 0.15_f32;
Some(WireModel {
dash_from_start: false,
text_verts: Vec::new(),
name: "tolerance_preview".into(),
points: vec![