1 // File: SketchPlugin_Sketch.cxx
2 // Created: 27 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #include "SketchPlugin_Sketch.h"
6 #include <ModelAPI_Data.h>
7 #include <GeomAlgoAPI_FaceBuilder.h>
11 // face of the square-face displayed for selection of general plane
12 const double PLANE_SIZE = 200;
14 SketchPlugin_Sketch::SketchPlugin_Sketch()
18 void SketchPlugin_Sketch::initAttributes()
20 //data()->addAttribute(PART_ATTR_DOC_REF, ModelAPI_AttributeDocRef::type());
23 void SketchPlugin_Sketch::execute()
27 const boost::shared_ptr<GeomAPI_Shape>& SketchPlugin_Sketch::preview()
29 boost::shared_ptr<GeomAPI_Pnt> anOrigin(new GeomAPI_Pnt(0, 0, 0));
30 boost::shared_ptr<GeomAPI_Dir> aNormal(new GeomAPI_Dir(1, 0, 0));
31 boost::shared_ptr<GeomAPI_Shape> aFace =
32 GeomAlgoAPI_FaceBuilder::square(anOrigin, aNormal, PLANE_SIZE);