refactor: Implement Rectangle tool with snapping and dimensions
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "Document.h"
|
||||
#include "SketchFeature.h"
|
||||
#include "SketchLine.h"
|
||||
#include "SketchRectangle.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
#include <QInputDialog>
|
||||
@@ -140,6 +141,13 @@ void ApplicationController::addLine(const gp_Pnt& start, const gp_Pnt& end)
|
||||
}
|
||||
}
|
||||
|
||||
void ApplicationController::addRectangle(const gp_Pnt& corner1, const gp_Pnt& corner2)
|
||||
{
|
||||
if (m_activeSketch) {
|
||||
m_activeSketch->addObject(new SketchRectangle(corner1, corner2));
|
||||
}
|
||||
}
|
||||
|
||||
void ApplicationController::endSketch()
|
||||
{
|
||||
m_activeSketch = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user