forked from 1b-agent/opencadstudio-upstream
Merge pull request #856 from ramox81/codex/align-circle-behavior
This commit is contained in:
commit
d9aead3fbc
12 files changed
+417
-172
No files matched your search
@@ -105,8 +105,8 @@ fn offset_xline(x: &XLineEnt, dist: f64, side_pt: Vec3) -> Option<EntityType> {
|
||||
// ── Circle offset ──────────────────────────────────────────────────────────
|
||||
|
||||
fn offset_circle(c: &CircleEnt, 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::circle_curve(c).plane;
|
||||
let [px, py] = plane.project(side_pt.as_dvec3().to_array())?;
|
||||
let dc = ((px - c.center.x).powi(2) + (py - c.center.y).powi(2)).sqrt();
|
||||
|
||||
let new_r = if dc < c.radius {
|
||||
|
||||
Reference in new issue
Block a user