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
@@ -27,6 +27,7 @@ use acadrust::types::Vector3;
|
||||
use acadrust::{CadDocument, EntityType, Handle};
|
||||
|
||||
use crate::command::{CadCommand, CmdResult};
|
||||
use crate::entities::curve::lwpolyline_world_xy;
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
use glam::DVec3;
|
||||
use crate::t;
|
||||
@@ -188,6 +189,9 @@ pub fn normalize_entity_for_block(entity: EntityType) -> EntityType {
|
||||
}
|
||||
|
||||
fn explode_lwpolyline(p: &LwPolyline) -> Vec<EntityType> {
|
||||
let Some(p) = lwpolyline_world_xy(p) else {
|
||||
return vec![];
|
||||
};
|
||||
let n = p.vertices.len();
|
||||
if n < 2 {
|
||||
return vec![];
|
||||
|
||||
Reference in new issue
Block a user