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:
2026-02-16 20:45:39 -07:00
parent 2b455f57d4
commit 246372b847
9 changed files with 267 additions and 1 deletions

26
src/SketchRectangle.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef SKETCHRECTANGLE_H
#define SKETCHRECTANGLE_H
#include "SketchObject.h"
#include <gp_Pnt.hxx>
class SketchRectangle : public SketchObject
{
public:
SketchRectangle();
SketchRectangle(const gp_Pnt& corner1, const gp_Pnt& corner2);
ObjectType type() const override;
void read(const QJsonObject& json) override;
void write(QJsonObject& json) const override;
const gp_Pnt& corner1() const;
const gp_Pnt& corner2() const;
private:
gp_Pnt m_corner1;
gp_Pnt m_corner2;
};
#endif // SKETCHRECTANGLE_H