forked from 1b-agent/opencadstudio-upstream
Align arc creation and editing behavior
This commit is contained in:
1 parent
573ed3245e
commit
5f9d8a9e0e
15 files changed
+537
-337
No files matched your search
@@ -127,8 +127,8 @@ fn offset_circle(c: &CircleEnt, dist: f64, side_pt: Vec3) -> Option<EntityType>
|
||||
// ── Arc offset ─────────────────────────────────────────────────────────────
|
||||
|
||||
fn offset_arc(a: &ArcEnt, dist: f64, side_pt: Vec3) -> Option<EntityType> {
|
||||
let px = side_pt.x as f64;
|
||||
let py = side_pt.y as f64;
|
||||
let plane = crate::entities::curve::arc_curve(a).plane;
|
||||
let [px, py] = plane.project(side_pt.as_dvec3().to_array())?;
|
||||
let dc = ((px - a.center.x).powi(2) + (py - a.center.y).powi(2)).sqrt();
|
||||
|
||||
let new_r = if dc < a.radius {
|
||||
|
||||
Reference in new issue
Block a user