forked from 1b-agent/opencadstudio-upstream
feat: ellipse arc endpoint snap and LWPolyline arc midpoint grips
Partial ellipse arcs now populate key_vertices with both endpoints so Endpoint snap works correctly. LWPolyline arc segments (bulge ≠ 0) get a diamond grip at the arc midpoint; dragging it recomputes the segment bulge via circumcircle of start/mid/end, giving interactive arc editing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
67022589df
commit
6fd740e38f
2 files changed
+114
-5
No files matched your search
@@ -96,11 +96,17 @@ fn to_truck(ell: &Ellipse) -> TruckEntity {
|
||||
let v_start = builder::vertex(*ctrl_pts.first().unwrap());
|
||||
let v_end = builder::vertex(*ctrl_pts.last().unwrap());
|
||||
let edge = Edge::new(&v_start, &v_end, Curve::BSplineCurve(bspline));
|
||||
let pt_start = ctrl_pts.first().unwrap();
|
||||
let pt_end = ctrl_pts.last().unwrap();
|
||||
let key_vertices = vec![
|
||||
[pt_start.x as f32, pt_start.y as f32, pt_start.z as f32],
|
||||
[pt_end.x as f32, pt_end.y as f32, pt_end.z as f32],
|
||||
];
|
||||
TruckEntity {
|
||||
object: TruckObject::Curve(edge),
|
||||
snap_pts: vec![(center_v3, SnapHint::Center)],
|
||||
tangent_geoms: vec![],
|
||||
key_vertices: vec![],
|
||||
key_vertices,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user