]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Task #30 - Sketch base GUI: create, draw lines
authornds <natalia.donis@opencascade.com>
Tue, 22 Apr 2014 13:48:47 +0000 (17:48 +0400)
committernds <natalia.donis@opencascade.com>
Tue, 22 Apr 2014 13:48:47 +0000 (17:48 +0400)
The sketch addition to the OB.

src/PartSet/CMakeLists.txt
src/SketchPlugin/SketchPlugin_Sketch.cpp
src/SketchPlugin/SketchPlugin_Sketch.h

index 81da4af8346a1669793761e2f592b59cd60d7ff3..c4d25a782b504e5b99d66092d66f8f95f72c9f05 100644 (file)
@@ -60,7 +60,7 @@ ADD_LIBRARY(PartSet SHARED
 )
 
 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
-TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI SketchPlugin)
+TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI)
 
 ADD_DEPENDENCIES(PartSet ModuleBase)
 
index a665a700f45a15d12dc1dd9020310faf2ae39b89..7fb20f0798af5a74af220aebc6a835e99173ccda 100644 (file)
@@ -34,15 +34,11 @@ void SketchPlugin_Sketch::initAttributes()
 
 void SketchPlugin_Sketch::execute() 
 {
-  shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->docRef(PART_ATTR_DOC_REF);
+  /*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()));
-  }
-}
-
-shared_ptr<ModelAPI_Document> SketchPlugin_Sketch::documentToAdd() {
-  return ModelAPI_PluginManager::get()->rootDocument();
+  }*/
 }
 
 const TopoDS_Shape& SketchPlugin_Sketch::preview()
index 0ac6ce1c8614c304d130e5eb5a4a152b000b650f..a2b63388a83d7d4a75af49ae21cd2071671865e1 100644 (file)
@@ -26,7 +26,7 @@ public:
 
   /// Returns to which group in the document must be added feature
  SKETCHPLUGIN_EXPORT virtual const std::string& getGroup() 
-  {static std::string MY_GROUP = "Sketchs"; return MY_GROUP;}
+  {static std::string MY_GROUP = "Construction"; return MY_GROUP;}
 
   /// Creates a new part document if needed
  SKETCHPLUGIN_EXPORT virtual void execute();
@@ -34,8 +34,6 @@ public:
   /// Request for initialization of data model of the feature: adding all attributes
  SKETCHPLUGIN_EXPORT virtual void initAttributes();
 
- SKETCHPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Document> documentToAdd();
-
   /// Returns the sketch preview
   SKETCHPLUGIN_EXPORT virtual const TopoDS_Shape& preview();