mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 10:21:00 +00:00
Design: Text and SVG draw INTO the open sketch instead of beside it
Mirror of snaporca 1fb7786d9a (DesignPanel.cpp and DesignCanvas.cpp applied as patches; parity 30 / 16, shared files byte-identical). With a sketch open, Text/SVG outlines become ordinary Line entities via push_closed_lines() instead of a separate Sketch feature carrying rigid imported_regions — so the letters can be constrained, trimmed and extruded like anything drawn by hand. The buttons and offer actions arm Select first when in Sketch mode, since begin_sketch() does not run until a tool is armed. add_imported_regions() calls reset_autoedit(): without it the glyph contours entered the draw-then-edit queue and opened a Length field on the first segment, which freezes the canvas. Caught on the rig, not by reading. No sketch open: unchanged — a new Sketch feature, still dropped on a picked face. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM
This commit is contained in:
co-authored by
Claude Opus 5
parent
447c71a0d2
commit
bc4fb3b680
@@ -389,6 +389,14 @@ void DesignCanvas::set_sketch_construction(bool c)
|
||||
m_sketch_tool.set_construction(c);
|
||||
}
|
||||
|
||||
bool DesignCanvas::add_sketch_regions(
|
||||
const std::vector<std::vector<std::vector<Vec2d>>>& regions)
|
||||
{
|
||||
const bool ok = m_sketch_tool.add_imported_regions(regions);
|
||||
if (ok) request_repaint();
|
||||
return ok;
|
||||
}
|
||||
|
||||
void DesignCanvas::set_sketch_polygon_sides(int n)
|
||||
{
|
||||
m_sketch_tool.set_polygon_sides(n);
|
||||
|
||||
Reference in New Issue
Block a user