ADD_SUBDIRECTORY (src/SketchAPI)
ADD_SUBDIRECTORY (src/GDMLAPI)
ADD_SUBDIRECTORY (src/ConnectorAPI)
+ADD_SUBDIRECTORY (src/FiltersAPI)
# Tests
ADD_SUBDIRECTORY (test.API/SHAPER)
--- /dev/null
+# Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INCLUDE(Common)
+
+SET(PROJECT_HEADERS
+ FiltersAPI.h
+ FiltersAPI_Feature.h
+ FiltersAPI_Filter.h
+ FiltersAPI_Selection.h
+)
+
+SET(PROJECT_SOURCES
+ FiltersAPI_Feature.cpp
+ FiltersAPI_Filter.cpp
+ FiltersAPI_Selection.cpp
+)
+
+SET(PROJECT_LIBRARIES
+ ModelAPI
+ ModelHighAPI
+)
+
+INCLUDE_DIRECTORIES(
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
+)
+
+# Plugin headers dependency
+INCLUDE_DIRECTORIES(
+ ${PROJECT_SOURCE_DIR}/src/FiltersPlugin
+)
+
+ADD_DEFINITIONS(-DFILTERSAPI_EXPORTS)
+ADD_LIBRARY(FiltersAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+TARGET_LINK_LIBRARIES(FiltersAPI ${PROJECT_LIBRARIES})
+
+# SWIG wrapper
+
+INCLUDE(PythonAPI)
+
+SET_SOURCE_FILES_PROPERTIES(FiltersAPI.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(FiltersAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+SET(SWIG_LINK_LIBRARIES
+ FiltersAPI
+ ModelHighAPI
+ ModelAPI
+ ${PYTHON_LIBRARIES}
+)
+SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+
+SET(SWIG_MODULE_FiltersAPI_EXTRA_DEPS ${SWIG_MODULE_FiltersAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
+ doxyhelp.i
+ ${PROJECT_HEADERS}
+)
+
+IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ SWIG_ADD_LIBRARY(FiltersAPI LANGUAGE python SOURCES FiltersAPI.i ${PROJECT_HEADERS})
+ELSE()
+ SWIG_ADD_MODULE(FiltersAPI python FiltersAPI.i ${PROJECT_HEADERS})
+ENDIF()
+SWIG_LINK_LIBRARIES(FiltersAPI ${SWIG_LINK_LIBRARIES})
+
+IF(WIN32)
+ SET_TARGET_PROPERTIES(_FiltersAPI PROPERTIES DEBUG_OUTPUT_NAME _FiltersAPI_d)
+ENDIF(WIN32)
+
+INSTALL(TARGETS _FiltersAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(TARGETS FiltersAPI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/FiltersAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef FILTERSAPI_H
+#define FILTERSAPI_H
+
+#if defined FILTERSAPI_EXPORTS
+#if defined WIN32
+#define FILTERSAPI_EXPORT __declspec( dllexport )
+#else
+#define FILTERSAPI_EXPORT
+#endif
+#else
+#if defined WIN32
+#define FILTERSAPI_EXPORT __declspec( dllimport )
+#else
+#define FILTERSAPI_EXPORT
+#endif
+#endif
+
+#endif
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/* FiltersAPI.i */
+
+%module FiltersAPI
+
+%{
+ #include "FiltersAPI_swig.h"
+
+ // fix for SWIG v2.0.4
+ #define SWIGPY_SLICE_ARG(obj) ((PyObject*)(obj))
+%}
+
+%include "doxyhelp.i"
+
+// import other modules
+%import "ModelHighAPI.i"
+
+// to avoid error on this
+#define FILTERSAPI_EXPORT
+
+// standard definitions
+%include "typemaps.i"
+%include "std_list.i"
+%include "std_shared_ptr.i"
+
+// shared pointers
+%shared_ptr(FiltersAPI_Feature)
+%shared_ptr(FiltersAPI_Filter)
+
+// std::list -> []
+%template(FilterList) std::list<std::shared_ptr<FiltersAPI_Filter> >;
+
+// function with named parameters
+%feature("kwargs") addFilter;
+
+// all supported interfaces
+%include "FiltersAPI_Feature.h"
+%include "FiltersAPI_Filter.h"
+%include "FiltersAPI_Selection.h"
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "FiltersAPI_Feature.h"
+
+#include <ModelAPI_Feature.h>
+
+#include <ModelHighAPI_Dumper.h>
+
+FiltersAPI_Feature::FiltersAPI_Feature(
+ const std::shared_ptr<ModelAPI_Feature> & theFeature)
+: ModelHighAPI_Interface(theFeature)
+{
+ initialize();
+}
+
+FiltersAPI_Feature::~FiltersAPI_Feature()
+{
+}
+
+void FiltersAPI_Feature::setFilters(const std::list<FilterAPIPtr>& theFilters)
+{
+ FiltersFeaturePtr aBase = std::dynamic_pointer_cast<ModelAPI_FiltersFeature>(feature());
+ for (std::list<FilterAPIPtr>::const_iterator anIt = theFilters.begin();
+ anIt != theFilters.end(); ++anIt) {
+ aBase->addFilter((*anIt)->name());
+ aBase->setReversed((*anIt)->name(), (*anIt)->isReversed());
+ }
+}
+
+void FiltersAPI_Feature::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FiltersFeaturePtr aBase = std::dynamic_pointer_cast<ModelAPI_FiltersFeature>(feature());
+ if (!aBase)
+ return;
+
+ const std::string& aDocName = theDumper.name(aBase->document());
+ theDumper << "model.filters(" << aDocName << ", [";
+
+ std::list<std::string> aFilters = aBase->filters();
+ for (std::list<std::string>::iterator aFIt = aFilters.begin(); aFIt != aFilters.end(); ++aFIt) {
+ FiltersAPI_Filter aFilter(*aFIt, aBase->filterArgs(*aFIt));
+ if (aFIt != aFilters.begin())
+ theDumper << ", ";
+ aFilter.dump(theDumper);
+ }
+
+ theDumper << "])";
+}
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef FILTERSAPI_FEATURE_H_
+#define FILTERSAPI_FEATURE_H_
+
+#include "FiltersAPI.h"
+#include "FiltersAPI_Filter.h"
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+#include <FiltersPlugin_Selection.h>
+
+class ModelAPI_Feature;
+
+/**\class FiltersAPI_Feature
+ * \ingroup CPPHighAPI
+ * \brief Interface for the list of filters
+ */
+class FiltersAPI_Feature : public ModelHighAPI_Interface
+{
+public:
+ /// Constructor without values
+ FILTERSAPI_EXPORT
+ explicit FiltersAPI_Feature(const std::shared_ptr<ModelAPI_Feature> & theFeature);
+
+ /// Destructor
+ FILTERSAPI_EXPORT
+ virtual ~FiltersAPI_Feature();
+
+ INTERFACE_0(FiltersPlugin_Selection::ID())
+
+ /// assign list of filters
+ FILTERSAPI_EXPORT
+ void setFilters(const std::list<FilterAPIPtr>& theFilters);
+
+ /// Dump wrapped feature
+ FILTERSAPI_EXPORT
+ virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+};
+
+typedef std::shared_ptr<FiltersAPI_Feature> FiltersPtr;
+
+#endif
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "FiltersAPI_Filter.h"
+
+#include <ModelAPI_Attribute.h>
+#include <ModelAPI_AttributeBoolean.h>
+#include <ModelAPI_AttributeSelectionList.h>
+
+#include <ModelHighAPI_Dumper.h>
+
+FiltersAPI_Filter::FiltersAPI_Filter(
+ const std::string& theName,
+ const bool theRevertFilter,
+ const std::list<ModelHighAPI_Selection>& theArguments)
+ : myName(theName), myReversed(theRevertFilter), myFilterArguments(theArguments)
+{
+}
+
+FiltersAPI_Filter::FiltersAPI_Filter(const std::string& theName,
+ const std::list<AttributePtr>& theArguments)
+ : myName(theName)
+{
+ for (std::list<AttributePtr>::const_iterator anArgIt = theArguments.begin();
+ anArgIt != theArguments.end(); ++anArgIt) {
+ AttributeBooleanPtr aBoolAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(*anArgIt);
+ if (aBoolAttr)
+ myReversed = aBoolAttr->value();
+ else {
+ AttributeSelectionListPtr aSelList =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(*anArgIt);
+ if (aSelList) {
+ int aSize = aSelList->size();
+ for (int i = 0; i < aSize; ++i) {
+ AttributeSelectionPtr aSelection = aSelList->value(i);
+ myFilterArguments.push_back(
+ ModelHighAPI_Selection(aSelection->context(), aSelection->value()));
+ }
+ }
+ }
+ }
+}
+
+FiltersAPI_Filter::~FiltersAPI_Filter()
+{
+}
+
+void FiltersAPI_Filter::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ theDumper << "model.addFilter(name = \"" << myName << "\"";
+ if (myReversed)
+ theDumper << ", exclude = " << myReversed;
+ if (!myFilterArguments.empty())
+ theDumper << ", args = []";
+ theDumper << ")";
+}
+
+// ================================================================================================
+FilterAPIPtr addFilter(const std::string& name,
+ const bool exclude,
+ const std::list<ModelHighAPI_Selection>& args)
+{
+ return FilterAPIPtr(new FiltersAPI_Filter(name, exclude, args));
+}
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef FILTERSAPI_FILTER_H_
+#define FILTERSAPI_FILTER_H_
+
+#include "FiltersAPI.h"
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Selection.h>
+
+class ModelAPI_Attribute;
+
+/**\class FiltersAPI_Filter
+ * \ingroup CPPHighAPI
+ * \brief Interface for the Filter
+ */
+class FiltersAPI_Filter
+{
+public:
+ FILTERSAPI_EXPORT
+ FiltersAPI_Filter(
+ const std::string& theName,
+ const bool theRevertFilter = false,
+ const std::list<ModelHighAPI_Selection>& theArguments = std::list<ModelHighAPI_Selection>());
+
+ // Internal constructor based on filter arguments
+ FILTERSAPI_EXPORT
+ FiltersAPI_Filter(const std::string& theName,
+ const std::list<std::shared_ptr<ModelAPI_Attribute> >& theArguments);
+
+ /// Destructor
+ FILTERSAPI_EXPORT
+ virtual ~FiltersAPI_Filter();
+
+ const std::string& name() const { return myName; }
+ bool isReversed() const { return myReversed; }
+
+ /// Dump wrapped feature
+ FILTERSAPI_EXPORT
+ virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+
+private:
+ std::string myName;
+ bool myReversed;
+ std::list<ModelHighAPI_Selection> myFilterArguments;
+};
+
+typedef std::shared_ptr<FiltersAPI_Filter> FilterAPIPtr;
+
+/// Create list of filters
+FILTERSAPI_EXPORT FilterAPIPtr
+addFilter(const std::string& name = std::string(),
+ const bool exclude = false,
+ const std::list<ModelHighAPI_Selection>& args = std::list<ModelHighAPI_Selection>());
+
+#endif
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "FiltersAPI_Selection.h"
+
+FiltersAPI_Selection::FiltersAPI_Selection(const FiltersPtr & theFeature)
+{
+ myVariantType = VT_Filtering;
+ myFilterFeature = std::dynamic_pointer_cast<ModelAPI_FiltersFeature>(theFeature->feature());
+}
+
+FiltersAPI_Selection::~FiltersAPI_Selection()
+{
+}
+
+// ================================================================================================
+FiltersAPI_Selection filters(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<FilterAPIPtr>& theFilters)
+{
+ FeaturePtr aFeature = thePart->addFeature(FiltersPlugin_Selection::ID());
+ FiltersPtr aFiltersFeature(new FiltersAPI_Feature(aFeature));
+ aFiltersFeature->setFilters(theFilters);
+ return FiltersAPI_Selection(aFiltersFeature);
+}
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef FILTERSAPI_SELECTION_H_
+#define FILTERSAPI_SELECTION_H_
+
+#include "FiltersAPI.h"
+#include "FiltersAPI_Feature.h"
+
+#include <ModelHighAPI_Selection.h>
+
+
+/**\class FiltersAPI_Selection
+ * \ingroup CPPHighAPI
+ * \brief Interface for the selection of filters
+ */
+class FiltersAPI_Selection : public ModelHighAPI_Selection
+{
+public:
+ /// Constructor without values
+ FILTERSAPI_EXPORT
+ explicit FiltersAPI_Selection(const FiltersPtr& theFeature);
+
+ /// Destructor
+ FILTERSAPI_EXPORT
+ virtual ~FiltersAPI_Selection();
+};
+
+/// Create list of filters
+FILTERSAPI_EXPORT
+FiltersAPI_Selection filters(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<FilterAPIPtr>& theFilters);
+
+#endif
--- /dev/null
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef FiltersAPI_swig_H_
+#define FiltersAPI_swig_H_
+
+ #include <ModelHighAPI_swig.h>
+
+ #include "FiltersAPI.h"
+ #include "FiltersAPI_Feature.h"
+ #include "FiltersAPI_Filter.h"
+ #include "FiltersAPI_Selection.h"
+
+#endif // FiltersAPI_swig_H_
#include <ModelAPI_Document.h>
#include <ModelAPI_Entity.h>
#include <ModelAPI_Feature.h>
+#include <ModelAPI_FiltersFeature.h>
#include <ModelAPI_Folder.h>
#include <ModelAPI_Result.h>
#include <ModelAPI_ResultBody.h>
*this << anAttribute;
}
+ // check selection list is obtained by filters
+ FiltersFeaturePtr aFilters = theAttrSelList->filters();
+ if (aFilters) {
+ *myDumpStorage << ", ";
+ dumpFeature(aFilters, true);
+ }
+
*myDumpStorage << "]";
} else {
// obtain name of list (the feature may contain several selection lists)
theAttribute->append(
myWeakNamingPair.first, myWeakNamingPair.second.first, myWeakNamingPair.second.second);
return;
+ case VT_Filtering:
+ theAttribute->setFilters(myFilterFeature);
+ return;
}
}
class GeomAPI_Shape;
class ModelAPI_AttributeSelection;
class ModelAPI_AttributeSelectionList;
+class ModelAPI_FiltersFeature;
class ModelAPI_Result;
//--------------------------------------------------------------------------------------
typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> >
VT_ResultSubShapePair,
VT_TypeSubShapeNamePair,
VT_TypeInnerPointPair,
- VT_WeakNamingPair
+ VT_WeakNamingPair,
+ VT_Filtering
};
public:
MODELHIGHAPI_EXPORT
ModelHighAPI_Selection subResult(int theIndex) const;
-private:
+protected:
VariantType myVariantType;
ResultSubShapePair myResultSubShapePair;
TypeSubShapeNamePair myTypeSubShapeNamePair;
TypeInnerPointPair myTypeInnerPointPair;
TypeWeakNamingPair myWeakNamingPair;
+ std::shared_ptr<ModelAPI_FiltersFeature> myFilterFeature;
};
//--------------------------------------------------------------------------------------
from .construction import *
from .exchange import *
from .features import *
+from .filters import *
from .collection import *
from .parameter import *
from .partset import *
--- /dev/null
+# Copyright (C) 2015-2019 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+"""Package for Filters plugin for the Parametric Geometry API of the Modeler.
+"""
+
+from FiltersAPI import filters, addFilter