forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
765e6606e2
commit
48e6d0d553
42 files changed
+124
-8
No files matched your search
@@ -160,6 +160,7 @@ impl CadCommand for AttdefCommand {
|
||||
// Show a small cross at the insertion point.
|
||||
let d = 0.15_f32;
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "attdef_preview".into(),
|
||||
points: vec![
|
||||
|
||||
@@ -136,6 +136,7 @@ impl CadCommand for MlineCommand {
|
||||
.collect();
|
||||
pts.push([pt.x, pt.y, pt.z]);
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "mline_preview".into(),
|
||||
points: pts,
|
||||
|
||||
@@ -108,6 +108,7 @@ impl CadCommand for ImageCommand {
|
||||
let p3 = [origin.x, origin.y + world_height, origin.z];
|
||||
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "image_preview".into(),
|
||||
points: vec![p0, p1, p2, p3, p0],
|
||||
|
||||
@@ -84,6 +84,7 @@ impl CadCommand for RayCommand {
|
||||
let dir = (pt - base).normalize_or_zero();
|
||||
let far = base + dir * DISPLAY_EXTENT;
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "ray_preview".into(),
|
||||
points: vec![[base.x, base.y, base.z], [far.x, far.y, far.z]],
|
||||
@@ -175,6 +176,7 @@ impl CadCommand for XLineCommand {
|
||||
let far_pos = base + dir * DISPLAY_EXTENT;
|
||||
let far_neg = base - dir * DISPLAY_EXTENT;
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "xline_preview".into(),
|
||||
points: vec![
|
||||
|
||||
@@ -89,6 +89,7 @@ impl CadCommand for RevCloudCommand {
|
||||
self.points[0].z as f32,
|
||||
]);
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "revcloud_preview".into(),
|
||||
points: preview_pts,
|
||||
|
||||
@@ -114,6 +114,7 @@ impl CadCommand for WipeoutCommand {
|
||||
let min = p1.min(pt);
|
||||
let max = p1.max(pt);
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "wipeout_preview".into(),
|
||||
points: vec![
|
||||
@@ -156,6 +157,7 @@ impl CadCommand for WipeoutCommand {
|
||||
self.poly_pts[0].z as f32,
|
||||
]);
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "wipeout_poly_preview".into(),
|
||||
points: pts,
|
||||
|
||||
@@ -69,6 +69,7 @@ impl CadCommand for AreaCommand {
|
||||
pts.push(f(pt));
|
||||
pts.push(f(self.points[0]));
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "area_preview".into(),
|
||||
points: pts,
|
||||
|
||||
@@ -63,6 +63,7 @@ impl CadCommand for DistCommand {
|
||||
let p1 = self.first?;
|
||||
// The preview wire is purely visual, so f32 vertices are fine here.
|
||||
Some(WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: "dist_preview".into(),
|
||||
points: vec![
|
||||
|
||||
@@ -67,6 +67,7 @@ impl MeasureGeomCommand {
|
||||
/// Build a cyan preview wire connecting the picked points and the cursor.
|
||||
fn preview_wire(name: &str, pts: Vec<[f32; 3]>) -> WireModel {
|
||||
WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: name.to_string(),
|
||||
points: pts,
|
||||
|
||||
@@ -3059,6 +3059,7 @@ fn collect_runs(pts: &[[f64; 2]], take: &dyn Fn([f64; 2]) -> bool, out: &mut Vec
|
||||
/// Build a preview wire from a NaN-break point list.
|
||||
fn preview_wire(points: Vec<[f32; 3]>, color: [f32; 4], name: &str) -> WireModel {
|
||||
WireModel {
|
||||
dash_from_start: false,
|
||||
text_verts: Vec::new(),
|
||||
name: name.into(),
|
||||
points,
|
||||
|
||||
Reference in new issue
Block a user