Salome HOME
Added interfaces to OCC data and algos: features must not depend on OCC
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchBase.cpp
1 #include <PartSet_OperationSketchBase.h>
2
3 #include <SketchPlugin_Feature.h>
4
5 #ifdef _DEBUG
6 #include <QDebug>
7 #endif
8
9 using namespace std;
10
11 /*!
12  \brief Constructor
13   \param theId an feature index
14   \param theParent the object parent
15  */
16 PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId,
17                                                              QObject* theParent)
18 : ModuleBase_PropPanelOperation(theId, theParent)
19 {
20 }
21
22 /*!
23  * \brief Destructor
24  */
25 PartSet_OperationSketchBase::~PartSet_OperationSketchBase()
26 {
27 }
28
29 /**
30  * Returns the feature preview shape
31  */
32 const TopoDS_Shape& PartSet_OperationSketchBase::preview() const
33 {
34   shared_ptr<SketchPlugin_Feature> aFeature = dynamic_pointer_cast<SketchPlugin_Feature>(feature());
35   return *(static_cast<TopoDS_Shape*>(aFeature->preview()->implementation()));
36 }
37
38 /*!
39  * Perform the operation start and emit signal about visualization of the operation preview
40  */
41 void PartSet_OperationSketchBase::startOperation()
42 {
43   ModuleBase_PropPanelOperation::startOperation();
44
45   emit visualizePreview();
46 }