42 lines
783 B
C++
42 lines
783 B
C++
#ifndef SKETCHFEATURE_H
|
|
#define SKETCHFEATURE_H
|
|
|
|
#include <TopoDS_Shape.hxx>
|
|
#include <QList>
|
|
#include "Feature.h"
|
|
|
|
class SketchObject;
|
|
|
|
class SketchFeature : public Feature
|
|
{
|
|
public:
|
|
enum class SketchPlane {
|
|
XY,
|
|
XZ,
|
|
YZ
|
|
};
|
|
|
|
SketchFeature(const QString& name);
|
|
~SketchFeature();
|
|
|
|
QString type() const override;
|
|
|
|
void setPlane(SketchPlane plane);
|
|
SketchPlane plane() const;
|
|
|
|
const TopoDS_Shape& shape() const;
|
|
|
|
void addObject(SketchObject* object);
|
|
const QList<SketchObject*>& objects() const;
|
|
|
|
void read(const QJsonObject &json) override;
|
|
void write(QJsonObject &json) const override;
|
|
|
|
private:
|
|
SketchPlane m_plane;
|
|
TopoDS_Shape m_shape;
|
|
QList<SketchObject*> m_objects;
|
|
};
|
|
|
|
#endif // SKETCHFEATURE_H
|