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)
--- /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>
)
# 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)
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()
/// 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();
/// 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();