Salome HOME
Merge branch 'master' of newgeom:newgeom
authormpv <mikhail.ponikarov@opencascade.com>
Wed, 23 Apr 2014 04:23:41 +0000 (08:23 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Wed, 23 Apr 2014 04:23:41 +0000 (08:23 +0400)
Conflicts:
CMakeLists.txt
src/Config/CMakeLists.txt
src/Config/plugins.xml
src/PartSet/CMakeLists.txt
src/SketchPlugin/CMakeLists.txt
src/SketchPlugin/SketchPlugin_Sketch.cpp
src/SketchPlugin/SketchPlugin_Sketch.h

CMakeLists.txt
src/Config/plugin-Sketch.xml [new file with mode: 0644]
src/PartSet/CMakeLists.txt
src/SketchPlugin/SketchPlugin_Sketch.cpp
src/SketchPlugin/SketchPlugin_Sketch.h

index dc4b8fd191e0706ff1d6fbfeffaf69c846558569..68d5857256d658732db8002c042c5f70db069f85 100644 (file)
@@ -27,6 +27,7 @@ ADD_SUBDIRECTORY (src/PartSet)
 ADD_SUBDIRECTORY (src/PartSetPlugin)
 ADD_SUBDIRECTORY (src/ConstructionPlugin)
 ADD_SUBDIRECTORY (src/SketchPlugin)
+ADD_SUBDIRECTORY (src/SketchPlugin)
 ADD_SUBDIRECTORY (src/PyConsole)
 ADD_SUBDIRECTORY (src/PyEvent)
 ADD_SUBDIRECTORY (src/PyInterp)
diff --git a/src/Config/plugin-Sketch.xml b/src/Config/plugin-Sketch.xml
new file mode 100644 (file)
index 0000000..755458b
--- /dev/null
@@ -0,0 +1,18 @@
+<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>
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();