ADD_SUBDIRECTORY (src/Event)
ADD_SUBDIRECTORY (src/Model)
ADD_SUBDIRECTORY (src/ModelAPI)
-ADD_SUBDIRECTORY (src/ModuleBase)
-ADD_SUBDIRECTORY (src/PartSet)
+ADD_SUBDIRECTORY (src/GeomAPI)
+ADD_SUBDIRECTORY (src/GeomAlgoAPI)
ADD_SUBDIRECTORY (src/PartSetPlugin)
ADD_SUBDIRECTORY (src/ConstructionPlugin)
ADD_SUBDIRECTORY (src/SketchPlugin)
+ADD_SUBDIRECTORY (src/ModuleBase)
+ADD_SUBDIRECTORY (src/PartSet)
ADD_SUBDIRECTORY (src/PyConsole)
ADD_SUBDIRECTORY (src/PyEvent)
ADD_SUBDIRECTORY (src/PyInterp)
+++ /dev/null
-<plugin>
- <workbench id="Sketch">
- <group id="Basic">
- <feature id="Sketch" text="New sketch" tooltip="Create a new sketch or edit an existing sketch" icon=":icons/sketch.png"/>
- </group>
- <group id="Operations">
- <feature id="Point" text="New point" tooltip="Create a new point" icon=":icons/point.png">
- <doublevalue id="x" label="X:" min="0" max="" step="0.1" default="0"
- icon=":pictures/x_point.png" tooltip="Set X"/>
- <doublevalue id="y" label="Y:" min="0" max="" step="0.1" default="1"
- icon=":pictures/y_point.png" tooltip="Set Y"/>
- <doublevalue id="z" label="Z:" min="0" max="10" step="0.1" default="2"
- icon=":pictures/z_point.png" tooltip="Set Z"/>
- </feature>
- <feature id="Line" text="New line" tooltip="Create a new line" icon=":icons/line.png"/>
- </group>
- </workbench>
-</plugin>
--- /dev/null
+FIND_PACKAGE(SWIG REQUIRED)
+INCLUDE(FindCAS)
+
+INCLUDE(${SWIG_USE_FILE})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+SET(PROJECT_HEADERS
+ GeomAPI.h
+ GeomAPI_Interface.h
+ GeomAPI_Pnt.h
+ GeomAPI_Dir.h
+ GeomAPI_Shape.h
+)
+
+SET(PROJECT_SOURCES
+ GeomAPI_Interface.cpp
+ GeomAPI_Pnt.cpp
+ GeomAPI_Dir.cpp
+ GeomAPI_Shape.cpp
+)
+
+ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${CAS_DEFINITIONS})
+ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+
+SET(CMAKE_SWIG_FLAGS "")
+
+SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+INCLUDE_DIRECTORIES(
+ ${CAS_INCLUDE_DIRS}
+)
+
+TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES} ${CAS_KERNEL})
+
+SET(SWIG_SCRIPTS
+ ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
+)
+
+SET(SWIG_LINK_LIBRARIES
+ GeomAPI
+ ${PYTHON_LIBRARIES}
+)
+
+SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
+SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
+
+IF(WIN32)
+ SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
+ENDIF(WIN32)
+
+INSTALL(TARGETS _GeomAPI DESTINATION swig)
+INSTALL(TARGETS GeomAPI DESTINATION bin)
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
--- /dev/null
+#ifndef GEOMAPI_H
+#define GEOMAPI_H
+
+#if defined GEOMAPI_EXPORTS
+#if defined WIN32
+#define GEOMAPI_EXPORT __declspec( dllexport )
+#else
+#define GEOMAPI_EXPORT
+#endif
+#else
+#if defined WIN32
+#define GEOMAPI_EXPORT __declspec( dllimport )
+#else
+#define GEOMAPI_EXPORT
+#endif
+#endif
+
+#endif
--- /dev/null
+/* GeomAPI.i */
+%module GeomAPI
+%{
+ #include "memory"
+ #include "GeomAPI.h"
+ #include "GeomAPI_Interface.h"
+ #include "GeomAPI_Pnt.h"
+ #include "GeomAPI_Shape.h"
+%}
+
+// to avoid error on this
+#define GEOMAPI_EXPORT
+
+// standard definitions
+%include "typemaps.i"
+%include "std_string.i"
+%include <std_shared_ptr.i>
+
+// boost pointers
+// %include <boost_shared_ptr.i>
+%shared_ptr(GeomAPI_Interface)
+%shared_ptr(GeomAPI_Pnt)
+%shared_ptr(GeomAPI_Shape)
+
+// all supported interfaces
+%include "GeomAPI_Interface.h"
+%include "GeomAPI_Pnt.h"
+%include "GeomAPI_Shape.h"
--- /dev/null
+// File: GeomAPI_Dir.cpp
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#include<GeomAPI_Dir.h>
+
+#include<gp_Dir.hxx>
+
+#define MY_DIR static_cast<gp_Pnt*>(myImpl)
+
+GeomAPI_Dir::GeomAPI_Dir(const double theX, const double theY, const double theZ)
+ : GeomAPI_Interface(new gp_Dir(theX, theY, theZ))
+{}
+
+double GeomAPI_Dir::x() const
+{
+ return MY_DIR->X();
+}
+
+double GeomAPI_Dir::y() const
+{
+ return MY_DIR->Y();
+}
+
+double GeomAPI_Dir::z() const
+{
+ return MY_DIR->Z();
+}
--- /dev/null
+// File: GeomAPI_Dir.hxx
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef GeomAPI_Dir_HeaderFile
+#define GeomAPI_Dir_HeaderFile
+
+#include <GeomAPI_Interface.h>
+
+/**\class GeomAPI_Dir
+ * \ingroup DataModel
+ * \brief 3D direction defined by three normalized coordinates
+ */
+
+class GEOMAPI_EXPORT GeomAPI_Dir: public GeomAPI_Interface
+{
+public:
+ /// Creation of direction by coordinates
+ GeomAPI_Dir(const double theX, const double theY, const double theZ);
+
+ /// returns X coordinate
+ double x() const;
+ /// returns Y coordinate
+ double y() const;
+ /// returns Z coordinate
+ double z() const;
+};
+
+#endif
+
--- /dev/null
+// File: GeomAPI_Interface.cpp
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#include <GeomAPI_Interface.h>
+
+GeomAPI_Interface::GeomAPI_Interface()
+{
+ myImpl = 0;
+}
+
+GeomAPI_Interface::GeomAPI_Interface(void* theImpl)
+{
+ myImpl = theImpl;
+}
+
+GeomAPI_Interface::~GeomAPI_Interface()
+{
+ if (myImpl)
+ delete myImpl;
+}
+
+void* GeomAPI_Interface::implementation()
+{
+ return myImpl;
+}
+
+void GeomAPI_Interface::setImplementation(void* theImpl)
+{
+ if (myImpl)
+ delete myImpl;
+ myImpl = theImpl;
+}
--- /dev/null
+// File: GeomAPI_Interface.hxx
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef GeomAPI_Interface_HeaderFile
+#define GeomAPI_Interface_HeaderFile
+
+#include <GeomAPI.h>
+
+/**\class GeomAPI_Interface
+ * \ingroup DataModel
+ * \brief General base class for all interfaces in this package
+ */
+
+class GEOMAPI_EXPORT GeomAPI_Interface
+{
+protected:
+ void* myImpl; ///< pointer to the internal implementation object
+
+public:
+ /// None - constructor
+ GeomAPI_Interface();
+
+ /// Constructor by the implementation pointer (used for internal needs)
+ GeomAPI_Interface(void* theImpl);
+
+ /// Destructor
+ virtual ~GeomAPI_Interface();
+
+ /// Returns the pointer to the implementation
+ void* implementation();
+ /// Updates the implementation (deletes the old one)
+ void setImplementation(void* theImpl);
+};
+
+#endif
+
--- /dev/null
+// File: GeomAPI_Pnt.cpp
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#include<GeomAPI_Pnt.h>
+
+#include<gp_Pnt.hxx>
+
+#define MY_PNT static_cast<gp_Pnt*>(myImpl)
+
+GeomAPI_Pnt::GeomAPI_Pnt(const double theX, const double theY, const double theZ)
+ : GeomAPI_Interface(new gp_Pnt(theX, theY, theZ))
+{}
+
+double GeomAPI_Pnt::x() const
+{
+ return MY_PNT->X();
+}
+
+double GeomAPI_Pnt::y() const
+{
+ return MY_PNT->Y();
+}
+
+double GeomAPI_Pnt::z() const
+{
+ return MY_PNT->Z();
+}
+
+void GeomAPI_Pnt::setX(const double theX)
+{
+ return MY_PNT->SetX(theX);
+}
+
+void GeomAPI_Pnt::setY(const double theY)
+{
+ return MY_PNT->SetY(theY);
+}
+
+void GeomAPI_Pnt::setZ(const double theZ)
+{
+ return MY_PNT->SetZ(theZ);
+}
--- /dev/null
+// File: GeomAPI_Pnt.hxx
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef GeomAPI_Pnt_HeaderFile
+#define GeomAPI_Pnt_HeaderFile
+
+#include <GeomAPI_Interface.h>
+
+/**\class GeomAPI_Pnt
+ * \ingroup DataModel
+ * \brief 3D point defined by three coordinates
+ */
+
+class GEOMAPI_EXPORT GeomAPI_Pnt: public GeomAPI_Interface
+{
+public:
+ /// Creation of point by coordinates
+ GeomAPI_Pnt(const double theX, const double theY, const double theZ);
+
+ /// returns X coordinate
+ double x() const;
+ /// returns Y coordinate
+ double y() const;
+ /// returns Z coordinate
+ double z() const;
+
+ /// sets X coordinate
+ void setX(const double theX);
+ /// sets Y coordinate
+ void setY(const double theY);
+ /// sets Z coordinate
+ void setZ(const double theZ);
+};
+
+#endif
+
--- /dev/null
+// File: GeomAPI_Shape.cpp
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#include<GeomAPI_Shape.h>
+
+#include<TopoDS_Shape.hxx>
+
+#define MY_PNT static_cast<gp_Pnt*>(myImpl)
+
+GeomAPI_Shape::GeomAPI_Shape()
+ : GeomAPI_Interface(new TopoDS_Shape())
+{}
--- /dev/null
+// File: GeomAPI_Shape.hxx
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef GeomAPI_Shape_HeaderFile
+#define GeomAPI_Shape_HeaderFile
+
+#include <GeomAPI_Interface.h>
+
+/**\class GeomAPI_Shape
+ * \ingroup DataModel
+ * \brief Interface to the topological shape object
+ */
+
+class GEOMAPI_EXPORT GeomAPI_Shape: public GeomAPI_Interface
+{
+public:
+ /// Creation of empty (null) shape
+ GeomAPI_Shape();
+};
+
+#endif
+
--- /dev/null
+FIND_PACKAGE(SWIG REQUIRED)
+INCLUDE(FindCAS)
+
+INCLUDE(${SWIG_USE_FILE})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+SET(PROJECT_HEADERS
+ GeomAlgoAPI.h
+ GeomAlgoAPI_FaceBuilder.h
+)
+
+SET(PROJECT_SOURCES
+ GeomAlgoAPI_FaceBuilder.cpp
+)
+
+ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
+ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+
+SET(CMAKE_SWIG_FLAGS "")
+
+SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+INCLUDE_DIRECTORIES(
+ ../GeomAPI
+ ${CAS_INCLUDE_DIRS}
+)
+
+TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES} GeomAPI ${CAS_KERNEL} ${CAS_MODELER})
+
+SET(SWIG_SCRIPTS
+ ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
+)
+
+SET(SWIG_LINK_LIBRARIES
+ GeomAlgoAPI
+ ${PYTHON_LIBRARIES}
+)
+
+SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
+SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
+
+IF(WIN32)
+ SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
+ENDIF(WIN32)
+
+INSTALL(TARGETS _GeomAlgoAPI DESTINATION swig)
+INSTALL(TARGETS GeomAlgoAPI DESTINATION bin)
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
--- /dev/null
+#ifndef GEOMALGOAPI_H
+#define GEOMALGOAPI_H
+
+#if defined GEOMALGOAPI_EXPORTS
+#if defined WIN32
+#define GEOMALGOAPI_EXPORT __declspec( dllexport )
+#else
+#define GEOMALGOAPI_EXPORT
+#endif
+#else
+#if defined WIN32
+#define GEOMALGOAPI_EXPORT __declspec( dllimport )
+#else
+#define GEOMALGOAPI_EXPORT
+#endif
+#endif
+
+#endif
--- /dev/null
+/* GeomAPI.i */
+%module GeomAlgoAPI
+%{
+ #include "memory"
+ #include "GeomAlgoAPI.h"
+ #include "GeomAlgoAPI_FaceBuilder.h"
+%}
+
+// to avoid error on this
+#define GEOMALGOAPI_EXPORT
+
+// standard definitions
+%include "typemaps.i"
+%include "std_string.i"
+%include <std_shared_ptr.i>
+
+// all supported interfaces
+%include "GeomAlgoAPI_FaceBuilder.h"
--- /dev/null
+// File: GeomAlgoAPI_FaceBuilder.cpp
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#include <GeomAlgoAPI_FaceBuilder.h>
+#include <gp_Pln.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <TopoDS_Face.hxx>
+
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_FaceBuilder::square(
+ std::shared_ptr<GeomAPI_Pnt> theCenter, std::shared_ptr<GeomAPI_Dir> theNormal,
+ const double theSize)
+{
+ gp_Pnt* aCenter = static_cast<gp_Pnt*>(theCenter->implementation());
+ gp_Dir* aDir = static_cast<gp_Dir*>(theNormal->implementation());
+ gp_Pln aPlane(*aCenter, *aDir);
+ // half of the size in each direction from the center
+ BRepBuilderAPI_MakeFace aFaceBuilder(aPlane,
+ -theSize / 2., theSize / 2., -theSize / 2., theSize / 2.);
+ std::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
+ aRes->setImplementation(new TopoDS_Shape(aFaceBuilder.Face()));
+ return aRes;
+}
--- /dev/null
+// File: GeomAlgoAPI_FaceBuilder.h
+// Created: 23 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef GeomAlgoAPI_FaceBuilder_HeaderFile
+#define GeomAlgoAPI_FaceBuilder_HeaderFile
+
+#include <GeomAlgoAPI.h>
+#include <GeomAPI_Shape.h>
+#include <GeomAPI_Pnt.h>
+#include <GeomAPI_Dir.h>
+#include <memory>
+
+/**\class GeomAlgoAPI_FaceBuilder
+ * \ingroup DataAlgo
+ * \brief Allows to create face-shapes by different parameters
+ */
+
+class GEOMALGOAPI_EXPORT GeomAlgoAPI_FaceBuilder
+{
+public:
+ /// Creates square planar face by given point of the center,
+ /// normal to the plane and size of square
+ static std::shared_ptr<GeomAPI_Shape> square(std::shared_ptr<GeomAPI_Pnt> theCenter,
+ std::shared_ptr<GeomAPI_Dir> theNormal, const double theSize);
+};
+
+#endif
SET(PROJECT_LIBRARIES
ModuleBase
Config
+ GeomAPI
${QT_LIBRARIES}
${CAS_KERNEL}
)
${CMAKE_SOURCE_DIR}/src/ModuleBase
${CMAKE_SOURCE_DIR}/src/ModelAPI
${CMAKE_SOURCE_DIR}/src/SketchPlugin
+ ${CMAKE_SOURCE_DIR}/src/GeomAPI
${CAS_INCLUDE_DIRS}
)
const TopoDS_Shape& PartSet_OperationSketchBase::preview() const
{
shared_ptr<SketchPlugin_Feature> aFeature = dynamic_pointer_cast<SketchPlugin_Feature>(feature());
- return aFeature->preview();
+ return *(static_cast<TopoDS_Shape*>(aFeature->preview()->implementation()));
}
/*!
INCLUDE(Common)
-INCLUDE(FindCAS)
SET(PROJECT_HEADERS
SketchPlugin.h
)
SET(PROJECT_LIBRARIES
- ${CAS_KERNEL}
- ${CAS_MODELER}
+ GeomAPI
+ GeomAlgoAPI
)
-ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS ${BOOST_DEFINITIONS} ${CAS_DEFINITIONS})
+ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
ADD_LIBRARY(SketchPlugin SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES} ModelAPI)
+TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES} ModelAPI GeomAPI GeomAlgoAPI)
INCLUDE_DIRECTORIES(
- ${CAS_INCLUDE_DIRS}
../ModelAPI
+ ../GeomAPI
+ ../GeomAlgoAPI
)
SET(XML_RESOURCES
/**
* Returns the sketch preview
*/
-const TopoDS_Shape& SketchPlugin_Feature::preview()
+const std::shared_ptr<GeomAPI_Shape>& SketchPlugin_Feature::preview()
{
return myPreview;
}
* Set the shape to the internal preview field
* \param theShape a preview shape
*/
-void SketchPlugin_Feature::setPreview(const TopoDS_Shape& theShape)
+void SketchPlugin_Feature::setPreview(const std::shared_ptr<GeomAPI_Shape>& theShape)
{
myPreview = theShape;
}
#include "SketchPlugin.h"
#include <ModelAPI_Feature.h>
-#include "TopoDS_Shape.hxx"
+#include <GeomAPI_Shape.h>
/**\class SketchPlugin_Feature
* \ingroup DataModel
class SketchPlugin_Feature: public ModelAPI_Feature
{
public:
- SKETCHPLUGIN_EXPORT virtual const TopoDS_Shape& preview() = 0;
+ SKETCHPLUGIN_EXPORT virtual const std::shared_ptr<GeomAPI_Shape>& preview() = 0;
protected:
- void setPreview(const TopoDS_Shape& theShape); ///< the preview shape
+ void setPreview(const std::shared_ptr<GeomAPI_Shape>& theShape); ///< the preview shape
private:
- TopoDS_Shape myPreview; ///< the preview shape
+ std::shared_ptr<GeomAPI_Shape> myPreview; ///< the preview shape
};
#endif
// Author: Mikhail PONIKAROV
#include "SketchPlugin_Sketch.h"
-#include "ModelAPI_Data.h"
-#include "ModelAPI_AttributeDocRef.h"
+#include <ModelAPI_Data.h>
+#include <GeomAlgoAPI_FaceBuilder.h>
using namespace std;
-#include <gp_Pln.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Vec.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-
-const double PLANE_U_MIN = -100;
-const double PLANE_U_MAX = 100;
-const double PLANE_V_MIN = -100;
-const double PLANE_V_MAX = 100;
+// face of the square-face displayed for selection of general plane
+const double PLANE_SIZE = 200;
SketchPlugin_Sketch::SketchPlugin_Sketch()
{
void SketchPlugin_Sketch::initAttributes()
{
- data()->addAttribute(PART_ATTR_DOC_REF, ModelAPI_AttributeDocRef::type());
+ //data()->addAttribute(PART_ATTR_DOC_REF, ModelAPI_AttributeDocRef::type());
}
void SketchPlugin_Sketch::execute()
{
- /*shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->docRef(PART_ATTR_DOC_REF);
- if (!aDocRef->value()) { // create a document if not yet created
- shared_ptr<ModelAPI_Document> aPartSetDoc = ModelAPI_PluginManager::get()->rootDocument();
- aDocRef->setValue(aPartSetDoc->subDocument(data()->getName()));
- }*/
}
-const TopoDS_Shape& SketchPlugin_Sketch::preview()
+const shared_ptr<GeomAPI_Shape>& SketchPlugin_Sketch::preview()
{
- if (SketchPlugin_Feature::preview().IsNull())
+ if (!SketchPlugin_Feature::preview())
{
- gp_Pnt anOrigin(0, 0, 0);
- gp_Dir aDir(gp_Vec(gp_Pnt(0,0,0), gp_Pnt(1,0,0)));
- gp_Pln aPlane(anOrigin, aDir);
- BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, PLANE_U_MIN, PLANE_U_MAX, PLANE_V_MIN,
- PLANE_V_MAX);
- setPreview(aFaceBuilder.Face());
+
+ shared_ptr<GeomAPI_Pnt> anOrigin(new GeomAPI_Pnt(0, 0, 0));
+ shared_ptr<GeomAPI_Dir> aNormal(new GeomAPI_Dir(1, 0, 0));
+ shared_ptr<GeomAPI_Shape> aFace =
+ GeomAlgoAPI_FaceBuilder::square(anOrigin, aNormal, PLANE_SIZE);
+ setPreview(aFace);
}
return SketchPlugin_Feature::preview();
}
#include "SketchPlugin.h"
#include <SketchPlugin_Feature.h>
-#include <TopoDS_Shape.hxx>
-
/// part reference attribute
const std::string PART_ATTR_DOC_REF = "SketchDocument";
SKETCHPLUGIN_EXPORT virtual void initAttributes();
/// Returns the sketch preview
- SKETCHPLUGIN_EXPORT virtual const TopoDS_Shape& preview();
+ SKETCHPLUGIN_EXPORT virtual const std::shared_ptr<GeomAPI_Shape>& preview();
/// Use plugin manager for features creation
SketchPlugin_Sketch();