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 <noreply@anthropic.com>
This commit is contained in:
parent
36d51286d4
commit
749f3b99dc
3 changed files with 158 additions and 3 deletions
|
|
@ -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 ──────────────────────────
|
||||
|
|
|
|||
Loading…
Reference in a new issue