refactor: Introduce SketchTool base class and derived tool skeletons

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-17 10:18:36 -07:00
parent e64755ea0c
commit 3e2f464de9
7 changed files with 209 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ class Document;
class FeatureBrowser;
class SketchFeature;
class Camera;
class SketchTool;
class ViewportWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
@@ -90,10 +91,8 @@ private:
SketchPlane m_highlightedPlane = SketchPlane::NONE;
int m_activeTool = 0;
bool m_isDefiningLine = false;
gp_Pnt m_firstLinePoint;
bool m_isDefiningRectangle = false;
gp_Pnt m_firstRectanglePoint;
SketchTool* m_activeSketchTool = nullptr;
QMap<int, SketchTool*> m_sketchTools;
QPoint m_currentMousePos;
bool m_isSnappingOrigin = false;
bool m_isSnappingVertex = false;