feat: Implement sketch object base class and line geometry

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-14 19:12:59 -07:00
parent f46590219a
commit a1cfbc2e3f
6 changed files with 159 additions and 0 deletions

26
src/SketchLine.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef SKETCHLINE_H
#define SKETCHLINE_H
#include "SketchObject.h"
#include <gp_Pnt.hxx>
class SketchLine : public SketchObject
{
public:
SketchLine();
SketchLine(const gp_Pnt& start, const gp_Pnt& end);
ObjectType type() const override;
void read(const QJsonObject& json) override;
void write(QJsonObject& json) const override;
const gp_Pnt& startPoint() const;
const gp_Pnt& endPoint() const;
private:
gp_Pnt m_start;
gp_Pnt m_end;
};
#endif // SKETCHLINE_H