forked from 1b-agent/opencadstudio-upstream
fix(geometry): honor polyline OCS in commands
Route editing and derived geometry through kernel world-space curves.\n\nRefs #797\nRefs #798\nRefs #799
This commit is contained in:
1 parent
08f4cc97f8
commit
7c818d15e9
12 files changed
+127
-60
No files matched your search
@@ -10,7 +10,7 @@
|
||||
// 3. Pick a point on the side to offset toward, or choose Multiple
|
||||
// to keep offsetting the newly created result at the same distance
|
||||
|
||||
use crate::entities::curve::entity_curve;
|
||||
use crate::entities::curve::{entity_curve, lwpolyline_world_xy};
|
||||
use crate::modules::draw::modify::spline_ops::spline_sample_xy;
|
||||
use acadrust::entities::LwVertex;
|
||||
use acadrust::entities::{
|
||||
@@ -160,6 +160,9 @@ fn offset_arc(a: &ArcEnt, dist: f64, side_pt: Vec3) -> Option<EntityType> {
|
||||
/// offset passed to the algorithm is always ±1. This avoids fixed-epsilon
|
||||
/// failures on tiny drawings and on UTM-scale coordinates.
|
||||
fn offset_lwpolylines(p: &LwPolyline, dist: f64, side_pt: Vec3) -> Vec<EntityType> {
|
||||
let Some(p) = lwpolyline_world_xy(p) else {
|
||||
return Vec::new();
|
||||
};
|
||||
let source = KernelPolyline {
|
||||
closed: p.is_closed,
|
||||
vertices: p
|
||||
|
||||
Reference in new issue
Block a user