##
#------ NewGEOM ------
-export NEW_GEOM_ROOT_DIR=${ROOT_DIR}/install
-export PATH=${NEW_GEOM_ROOT_DIR}/bin:${NEW_GEOM_ROOT_DIR}/plugins:${PATH}
-export PYTHONPATH=${NEW_GEOM_ROOT_DIR}/swig:${PYTHONPATH}
-export LD_LIBRARY_PATH=${NEW_GEOM_ROOT_DIR}/bin:${NEW_GEOM_ROOT_DIR}/swig:${NEW_GEOM_ROOT_DIR}/plugins:${LD_LIBRARY_PATH}
-export NEW_GEOM_CONFIG_FILE=${NEW_GEOM_ROOT_DIR}/plugins
-export NewGeomResources=${NEW_GEOM_ROOT_DIR}/resources
+export NEWGEOM_ROOT_DIR=${ROOT_DIR}/install
+export PATH=${NEWGEOM_ROOT_DIR}/bin:${NEWGEOM_ROOT_DIR}/plugins:${PATH}
+export PYTHONPATH=${NEWGEOM_ROOT_DIR}/swig:${PYTHONPATH}
+export LD_LIBRARY_PATH=${NEWGEOM_ROOT_DIR}/bin:${NEWGEOM_ROOT_DIR}/swig:${NEWGEOM_ROOT_DIR}/plugins:${LD_LIBRARY_PATH}
+export NEW_GEOM_CONFIG_FILE=${NEWGEOM_ROOT_DIR}/plugins
+export NewGeomResources=${NEWGEOM_ROOT_DIR}/resources
# Correcting path which defined with error
export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
-export LightAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
+export SalomeAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
-SUITApp LightApp --modules=NewGeom
\ No newline at end of file
+${PYTHONBIN} "${KERNEL_ROOT_DIR}/bin/salome/envSalome.py"
+${PYTHONBIN} "${KERNEL_ROOT_DIR}/bin/salome/runSalome.py"
/// Returns the sub-feature unique identifier in this composite feature by zero-base index
virtual int subFeatureId(const int theIndex) const = 0;
+
+ /// Returns true if feature or reuslt belong to this composite feature as subs
+ virtual bool isSub(ObjectPtr theObject) const = 0;
};
//! Pointer on the composite feature object
}
/// Returns document this feature belongs to
- virtual boost::shared_ptr<ModelAPI_Document> document()
+ virtual boost::shared_ptr<ModelAPI_Document> document() const
{
return ModelAPI_Object::document();
}
}
/// Returns document this feature belongs to
- virtual boost::shared_ptr<ModelAPI_Document> document()
+ virtual boost::shared_ptr<ModelAPI_Document> document() const
{
return myDoc;
}
#include <QObject>
#include <QString>
#include <QStringList>
-#include <list>
class ModuleBase_ModelWidget;
class ModuleBase_OperationDescription;
return aD1 && aD2 && aD3;
}
}
+ } else {
+ // This is not object controlled by the filter
+ return Standard_True;
}
}
- // This is not object controlled by the filter
- return Standard_True;
+ return Standard_False;
}
// Clear standard selection modes
aDisplayer->setSelectionModes(aModes);
aDisplayer->openLocalContext();
- // Get default selection modes
- aModes = sketchSelectionModes(ObjectPtr());
- aDisplayer->activateObjectsOutOfContext(aModes);
// Set filter
mySketchFilter = new ModuleBase_ShapeInPlaneFilter(thePln);
aDisplayer->addSelectionFilter(mySketchFilter);
+
+ // Get default selection modes
+ aModes = sketchSelectionModes(ObjectPtr());
+ aDisplayer->activateObjectsOutOfContext(aModes);
}
void PartSet_Module::onFeatureConstructed(ObjectPtr theFeature, int theMode)
return subFeature(theIndex)->data()->featureId();
}
+bool SketchPlugin_Sketch::isSub(ObjectPtr theObject) const
+{
+ // check is this feature of result
+ FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
+ if (!aFeature) {
+ ResultPtr aRes = boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+ if (aRes)
+ aFeature = document()->feature(aRes);
+ }
+ if (aFeature) {
+ list<ObjectPtr> aSubs = data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->list();
+ for(list<ObjectPtr>::iterator aSubIt = aSubs.begin(); aSubIt != aSubs.end(); aSubIt++) {
+ if (*aSubIt == aFeature)
+ return true;
+ }
+ }
+ return false;
+}
+
boost::shared_ptr<GeomAPI_Pnt> SketchPlugin_Sketch::to3D(const double theX, const double theY)
{
boost::shared_ptr<GeomDataAPI_Point> aC = boost::dynamic_pointer_cast<GeomDataAPI_Point>(
/// Returns the sub-feature unique identifier in this composite feature by zero-base index
SKETCHPLUGIN_EXPORT virtual int subFeatureId(const int theIndex) const;
+ /// Returns true if feature or reuslt belong to this composite feature as subs
+ SKETCHPLUGIN_EXPORT virtual bool isSub(ObjectPtr theObject) const;
+
/// Construction result is allways recomuted on the fly
SKETCHPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}