forked from 1b-agent/opencadstudio-upstream
Feat: hatch boundary grip editing — all edge types supported
Polyline, Line, CircularArc, EllipticArc, and Spline boundary edges all get diamond grips at their control vertices. Dragging a grip updates the underlying DXF boundary vertex and immediately rebuilds the GPU hatch model via Scene::apply_grip. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
36d51286d4
commit
749f3b99dc
3 files changed
+158
-3
No files matched your search
@@ -1660,6 +1660,15 @@ impl Scene {
|
||||
if let Some(entity) = self.document.get_entity_mut(handle) {
|
||||
dispatch::apply_grip(entity, grip_id, apply);
|
||||
}
|
||||
// Rebuild the GPU hatch model when a hatch boundary vertex moves.
|
||||
if let Some(EntityType::Hatch(dxf)) = self.document.get_entity(handle) {
|
||||
let color = tessellate::aci_to_rgba(&dxf.common.color);
|
||||
if let Some(model) = Self::hatch_model_from_dxf(dxf, color) {
|
||||
self.hatches.insert(handle, model);
|
||||
} else {
|
||||
self.hatches.remove(&handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Hit-test convenience: wire name → Handle ──────────────────────────
|
||||
|
||||
Reference in new issue
Block a user