return;
// TODO: Check that the selection corresponds to selection type
+ // TODO: Use the feature kind definition like SKETCH_KIND instead of the direct text
if (aFeature->getKind().compare("Sketch") != 0)
return;
${PROJECT_SOURCE_DIR}/src/ModelAPI
${PROJECT_SOURCE_DIR}/src/Model
${PROJECT_SOURCE_DIR}/src/ModuleBase
+ ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
${CAS_INCLUDE_DIRS})
LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
#include "XGUI_SelectionMgr.h"
#include "XGUI_Displayer.h"
+#include "PartSetPlugin_Part.h"
+
#include <ModelAPI_Data.h>
#include <ModelAPI_AttributeDocRef.h>
#include <ModelAPI_Object.h>
FeaturePtr aFeature = aFeatures.first();
//Process Feature
if (aFeature) {
- if (aFeature->getKind() == "Part") {
+ if (aFeature->getKind() == PARTSET_PART_KIND) {
ObjectPtr aObject = boost::dynamic_pointer_cast<ModelAPI_Object>(aFeature);
DocumentPtr aFeaDoc = aObject->featureRef()->data()->docRef("PartDocument")->value();
if (aMgr->currentDocument() == aFeaDoc)
#include <ModelAPI_AttributeDocRef.h>
#include <ModelAPI_Object.h>
+#include <PartSetPlugin_Part.h>
+
#include <Events_Loop.h>
#include <Events_Error.h>
#include <ModuleBase_Operation.h>
bool aHasPart = false;
for (aIt = aFeatures.begin(); aIt != aFeatures.end(); ++aIt) {
FeaturePtr aFeature = (*aIt);
- if (aFeature->getKind() == "Part") {
+ if (aFeature->getKind() == PARTSET_PART_KIND) {
aHasPart = true;
break;
}
PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
aMgr->rootDocument()->startOperation();
foreach (FeaturePtr aFeature, theList) {
- if (aFeature->getKind() == "Part") {
+ if (aFeature->getKind() == PARTSET_PART_KIND) {
DocumentPtr aDoc;
if (!XGUI_Tools::isModelObject(aFeature)) {
aDoc = aFeature->data()->docRef("PartDocument")->value();