$1 = 0;
}
} else
- if (!PyUnicode_Check(item))
+ if (!PyUnicode_Check(item) && !PyBool_Check(item))
$1 = 0;
}
}
PyObject * item = PySequence_GetItem($input, i);
if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
if (!temp_selection) {
- PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection or string.");
+ PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection, string or boolean.");
return NULL;
}
temp.push_back(FiltersAPI_Argument(*temp_selection));
} else
if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_string, $descriptor(std::string*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
if (!temp_string) {
- PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection or string.");
+ PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection, string or boolean.");
return NULL;
}
temp.push_back(FiltersAPI_Argument(*temp_string));
} else
if (PyUnicode_Check(item)) {
temp.push_back(FiltersAPI_Argument(PyUnicode_AsUTF8(item)));
+ } else
+ if (PyBool_Check(item)) {
+ temp.push_back(FiltersAPI_Argument(item == Py_True));
} else {
- PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection or string.");
+ PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection, string or boolean.");
return NULL;
}
Py_DECREF(item);
}
$1 = &temp;
} else {
- PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection or std::string.");
+ PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection, string or boolean.");
return NULL;
}
}
{
}
+FiltersAPI_Argument::FiltersAPI_Argument(const bool theValue)
+ : myBoolean(theValue)
+{
+}
+
FiltersAPI_Argument::FiltersAPI_Argument(const std::string& theValue)
: myValue(theValue)
{
{
if (mySelectionAttr)
theDumper << mySelectionAttr;
- else if (mySelection.variantType() == ModelHighAPI_Selection::VT_Empty)
- theDumper << "\"" << myValue << "\"";
+ else if (mySelection.variantType() == ModelHighAPI_Selection::VT_Empty) {
+ if (myValue.empty())
+ theDumper << myBoolean;
+ else
+ theDumper << "\"" << myValue << "\"";
+ }
}
public:
FILTERSAPI_EXPORT FiltersAPI_Argument();
+ FILTERSAPI_EXPORT
+ FiltersAPI_Argument(const bool theValue);
+
FILTERSAPI_EXPORT
FiltersAPI_Argument(const std::string& theValue);
FILTERSAPI_EXPORT
virtual ~FiltersAPI_Argument();
+ const bool boolean() const { return myBoolean; }
const std::string& string() const { return myValue; }
const ModelHighAPI_Selection& selection() const { return mySelection; }
void dump(ModelHighAPI_Dumper& theDumper) const;
private:
+ bool myBoolean;
std::string myValue;
ModelHighAPI_Selection mySelection;
AttributeSelectionPtr mySelectionAttr;
static void separateArguments(const std::list<FiltersAPI_Argument>& theArguments,
std::list<ModelHighAPI_Selection>& theSelections,
- std::list<std::string>& theTextArgs)
+ std::list<std::string>& theTextArgs,
+ std::list<bool>& theBoolArgs)
{
std::list<FiltersAPI_Argument>::const_iterator anIt = theArguments.begin();
for (; anIt != theArguments.end(); ++anIt) {
if (anIt->selection().variantType() != ModelHighAPI_Selection::VT_Empty)
theSelections.push_back(anIt->selection());
- else if (!anIt->string().empty())
+ else if (anIt->string().empty())
+ theBoolArgs.push_back(anIt->boolean());
+ else
theTextArgs.push_back(anIt->string());
}
}
// separate selection arguments and strings
std::list<ModelHighAPI_Selection> aSelections;
std::list<std::string> aTexts;
- separateArguments(anArgs, aSelections, aTexts);
+ std::list<bool> aBools;
+ separateArguments(anArgs, aSelections, aTexts, aBools);
- // fill arguments of the filter
std::list<AttributePtr> aFilterArgs = aBase->filterArgs((*anIt)->name());
- for (std::list<AttributePtr>::iterator aFIt = aFilterArgs.begin();
- aFIt != aFilterArgs.end(); ++aFIt) {
+ std::list<AttributePtr>::iterator aFIt = aFilterArgs.begin();
+ // first boolean argument is always "Reversed" flag
+ AttributeBooleanPtr aReversedFlag =
+ std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(*aFIt);
+ if (aReversedFlag)
+ ++aFIt;
+ // fill arguments of the filter
+ for (; aFIt != aFilterArgs.end(); ++aFIt) {
AttributeSelectionListPtr aSelList =
std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(*aFIt);
if (aSelList)
else {
AttributeStringPtr aString =
std::dynamic_pointer_cast<ModelAPI_AttributeString>(*aFIt);
- if (aString && aTexts.size() == 1)
- fillAttribute(aTexts.front(), aString);
+ if (aString) {
+ if (aTexts.size() == 1)
+ fillAttribute(aTexts.front(), aString);
+ }
+ else {
+ AttributeBooleanPtr aBoolean =
+ std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(*aFIt);
+ if (aBoolean && aBools.size() == 1)
+ fillAttribute(aBools.front(), aBoolean);
+ }
}
}
}
myFilterArguments.push_back(FiltersAPI_Argument(aString->value()));
continue;
}
+
+ AttributeBooleanPtr aBoolean = std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(*anArgIt);
+ if (aBoolean) {
+ myFilterArguments.push_back(FiltersAPI_Argument(aBoolean->value()));
+ continue;
+ }
}
}
GeomAlgoAPI
)
+SET(PROJECT_PYFILES
+ FiltersPlugin_TopoConnectedFaces.py
+)
+
SET(XML_RESOURCES
plugin-Filters.xml
filter-BelongsTo.xml
filter-OnPlaneSide.xml
filter-OppositeToEdge.xml
filter-RelativeToSolid.xml
+ filter-TopoConnectedFaces.xml
)
ADD_DEFINITIONS(-DFILTERS_EXPORTS ${OpenCASCADE_DEFINITIONS})
INSTALL(TARGETS Filters DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+INSTALL(FILES ${PROJECT_PYFILES} DESTINATION ${SHAPER_INSTALL_ADDONS})
+
ADD_UNIT_TESTS(
TestFilters.py
TestFilter_ExternalFaces.py
TestFilter_HorizontalFaces.py
TestFilter_VerticalFaces.py
+ TestFilter_TopoConnectedFaces_Vertex1.py
+ TestFilter_TopoConnectedFaces_Vertex2.py
+ TestFilter_TopoConnectedFaces_Vertex3.py
+ TestFilter_TopoConnectedFaces_Prop_Vertex1.py
+ TestFilter_TopoConnectedFaces_Prop_Vertex2.py
+ TestFilter_TopoConnectedFaces_Prop_Vertex3.py
+ TestFilter_TopoConnectedFaces_Edge1.py
+ TestFilter_TopoConnectedFaces_Edge2.py
+ TestFilter_TopoConnectedFaces_Edge3.py
+ TestFilter_TopoConnectedFaces_Prop_Edge1.py
+ TestFilter_TopoConnectedFaces_Prop_Edge2.py
+ TestFilter_TopoConnectedFaces_Prop_Edge3.py
+ TestFilter_TopoConnectedFaces_Face1.py
+ TestFilter_TopoConnectedFaces_Face2.py
+ TestFilter_TopoConnectedFaces_Face3.py
+ TestFilter_TopoConnectedFaces_Prop_Face1.py
+ TestFilter_TopoConnectedFaces_Prop_Face2.py
+ TestFilter_TopoConnectedFaces_Prop_Face3.py
)
#include "FiltersPlugin_RelativeToSolid.h"
#include "FiltersPlugin_ExternalFaces.h"
+#include <Config_ModuleReader.h>
+
#include <ModelAPI_Session.h>
#include <ModelAPI_FiltersFactory.h>
aFactory->registerFilter("RelativeToSolid", new FiltersPlugin_RelativeToSolid);
aFactory->registerFilter("ExternalFaces", new FiltersPlugin_ExternalFaces);
+ Config_ModuleReader::loadScript("FiltersPlugin_TopoConnectedFaces");
+
ModelAPI_Session::get()->registerPlugin(this);
}
--- /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
+#
+
+
+from ModelAPI import *
+from GeomAPI import *
+from GeomAlgoAPI import GeomAlgoAPI_MapShapesAndAncestors as mapShapesAndAncestors
+
+FILTER_ID = "TopoConnectedFaces"
+
+def singleton(cls):
+ instance = cls()
+ instance.__call__ = lambda: instance
+ return instance
+
+@singleton
+class FiltersPlugin_TopoConnectedFaces(ModelAPI_Filter):
+ """
+ Filter for faces topologically connected to the selected object.
+ """
+
+ def __init__(self):
+ """x.__init__(...) initializes x; see x.__class__.__doc__ for signature"""
+ ModelAPI_Filter.__init__(self)
+ self.myCached = {}
+
+ def name(self):
+ """ Description of the filter """
+ return "Topologically connected faces"
+
+ def isSupported(self, theType):
+ """ Supported types of filtered shapes """
+ return theType == GeomAPI_Shape.FACE
+
+ def isOk(self, theShape, theResult, theArgs):
+ """ True if theShape is applicable for the filter """
+ selectedShapeAttr = modelAPI_AttributeSelection(theArgs.argument("Shape"))
+ if selectedShapeAttr is None:
+ return False
+ selectedShape = selectedShapeAttr.value()
+ isPropagated = modelAPI_AttributeBoolean(theArgs.argument("Propagation")).value()
+
+ # cache selected shape and applicable faces
+ if selectedShape not in self.myCached:
+ anOwner = bodyOwner(theResult, True)
+ if anOwner is None:
+ anOwner = modelAPI_ResultBody(theResult)
+ if anOwner is None:
+ return False
+ topLevelShape = anOwner.shape()
+ mapVFAlgo = mapShapesAndAncestors(topLevelShape, GeomAPI_Shape.VERTEX, GeomAPI_Shape.FACE)
+ mapVF = mapVFAlgo.map()
+ mapEFAlgo = mapShapesAndAncestors(topLevelShape, GeomAPI_Shape.EDGE, GeomAPI_Shape.FACE)
+ mapEF = mapEFAlgo.map()
+
+ # faces adjacent to the selected shape
+ applicableFaces = OriShapeSet()
+ if selectedShape.shapeType() == GeomAPI_Shape.VERTEX:
+ if selectedShape in mapVF: applicableFaces = mapVF[selectedShape]
+ elif selectedShape.shapeType() == GeomAPI_Shape.EDGE:
+ if selectedShape in mapEF: applicableFaces = mapEF[selectedShape]
+ elif selectedShape.shapeType() == GeomAPI_Shape.FACE:
+ applicableFaces.insert(selectedShape)
+ self.adjacentFaces(selectedShape, mapVF, GeomAPI_Shape.VERTEX, applicableFaces, False)
+ else:
+ return False
+ # propagate the connection
+ if isPropagated:
+ appFacesCopy = applicableFaces
+ for ind in range(appFacesCopy.size()):
+ self.adjacentFaces(appFacesCopy[ind], mapEF, GeomAPI_Shape.EDGE, applicableFaces)
+ self.myCached[selectedShape] = applicableFaces
+
+ return theShape in self.myCached[selectedShape]
+
+ def xmlRepresentation(self):
+ """ Returns XML string which represents GUI of the filter """
+ return self.xmlFromFile("filter-TopoConnectedFaces.xml")
+
+ def initAttributes(self, theArgs):
+ """ Initializes arguments of a filter """
+ theArgs.initAttribute("Shape", ModelAPI_AttributeSelection_typeId())
+ theArgs.initAttribute("Propagation", ModelAPI_AttributeBoolean_typeId())
+
+ def adjacentFaces(self, theFace, theMapSA, theShapeType, theApplicableFaces, theRecursive = True):
+ """ Find all faces neighbour to theFace """
+ exp = GeomAPI_ShapeExplorer(theFace, theShapeType)
+ while exp.more():
+ if exp.current() in theMapSA:
+ faces = theMapSA[exp.current()]
+ for ind in range(faces.size()):
+ f = faces[ind]
+ if f not in theApplicableFaces:
+ theApplicableFaces.insert(f)
+ if theRecursive:
+ self.adjacentFaces(f, theMapSA, theShapeType, theApplicableFaces)
+ exp.next()
+
+
+# Register the filter object
+filter = FiltersPlugin_TopoConnectedFaces
+aSession = ModelAPI_Session.get()
+aSession.filters().registerFilter(FILTER_ID, filter)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "[Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_2/Plane_2&Box_1_1/Top"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = False
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "([Cylinder_1_1/Face_1][Cylinder_1_1/Face_2])([Cylinder_1_1/Face_1][Cylinder_1_1/Face_3])"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = False
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultCylinder_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = False; exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_3/Modified_Face&Box_1_1/Left"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_0, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Cylinder_1_1/Face_3"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = False
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultCylinder_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = True; exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "[Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = True
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = True
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = True
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_2/Plane_2&Box_1_1/Top"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = True
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = True
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = True
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "([Cylinder_1_1/Face_1][Cylinder_1_1/Face_2])([Cylinder_1_1/Face_1][Cylinder_1_1/Face_3])"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = False
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = True
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_3/Modified_Face&Box_1_1/Left"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = True
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = True
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = True
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = True
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = True
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = True
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Cylinder_1_1/Face_3"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = False
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = True
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_3/Modified_Face&Box_1_1/Top][Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = True
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = True
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = True
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_2/Modified_Face&Box_1_1/Top][Partition_1_1_2/Modified_Face&Plane_1/Plane_1][Partition_1_1_2/Modified_Face&Plane_2/Plane_2]"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = True
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = True
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = True
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Cylinder_1_1/Face_1][Cylinder_1_1/Face_3]"), True])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = False
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = True
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_3/Modified_Face&Box_1_1/Top][Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_2/Modified_Face&Box_1_1/Top][Partition_1_1_2/Modified_Face&Plane_1/Plane_1][Partition_1_1_2/Modified_Face&Plane_2/Plane_2]"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_0, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_0, exp.current())] = True; exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_2, exp.current())] = False; exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_3, exp.current())] = False; exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /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
+#
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Cylinder_1_1/Face_1][Cylinder_1_1/Face_3]"), False])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_0 = Partition_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_0.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_0, exp.current())] = False
+ exp.next()
+
+ResultBox_1 = Partition_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+
+ResultBox_2 = Partition_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_2.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_2, exp.current())] = False
+ exp.next()
+
+ResultBox_3 = Partition_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_3.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_3, exp.current())] = False
+ exp.next()
+
+# Faces of the cylinder
+ResultCylinder_1 = Cylinder_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultCylinder_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = True; exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
--- /dev/null
+<filter id="TopoConnectedFaces">
+ <shape_selector id="TopoConnectedFaces__Shape"
+ label="Shape:"
+ tooltip="Select vertex, edge or face."
+ shape_types="vertex edge face">
+ <validator id="GeomValidators_ShapeType" parameters="vertex,edge,face"/>
+ </shape_selector>
+ <boolvalue id="TopoConnectedFaces__Propagation" label="Propagation"/>
+</filter>
// standard definitions
%include "typemaps.i"
%include "std_list.i"
-%include "std_string.i"
+%include "std_map.i"
+%include "std_set.i"
%include "std_shared_ptr.i"
+%include "std_string.i"
// shared pointers
%shared_ptr(GeomAPI_AISObject)
// std::list -> []
%template(PointList) std::list<std::shared_ptr<GeomAPI_Pnt> >;
%template(ShapeList) std::list<std::shared_ptr<GeomAPI_Shape> >;
+// std::set -> []
+%template(ShapeSet) std::set<std::shared_ptr<GeomAPI_Shape>, GeomAPI_Shape::Comparator>;
+%template(OriShapeSet) std::set<std::shared_ptr<GeomAPI_Shape>, GeomAPI_Shape::ComparatorWithOri>;
+// std::map -> {}
+%template(ShapeToShapesMap) std::map<std::shared_ptr<GeomAPI_Shape>, std::set<std::shared_ptr<GeomAPI_Shape>, GeomAPI_Shape::ComparatorWithOri>, GeomAPI_Shape::Comparator>;
{
return theShape1->impl<TopoDS_Shape>().TShape() < theShape2->impl<TopoDS_Shape>().TShape();
}
+
+bool GeomAPI_Shape::ComparatorWithOri::operator()(
+ const std::shared_ptr<GeomAPI_Shape>& theShape1,
+ const std::shared_ptr<GeomAPI_Shape>& theShape2) const
+{
+ const TopoDS_Shape& aShape1 = theShape1->impl<TopoDS_Shape>();
+ const TopoDS_Shape& aShape2 = theShape2->impl<TopoDS_Shape>();
+ return (aShape1.TShape() < aShape2.TShape()) ||
+ (aShape1.TShape() == aShape2.TShape() &&
+ aShape1.Orientation() < aShape2.Orientation());
+}
GEOMAPI_EXPORT bool isSelfIntersected(const int theLevelOfCheck = 9) const;
public:
+ /// \brief Compare addresses of shapes
class Comparator
{
public:
bool operator ()(const std::shared_ptr<GeomAPI_Shape>& theShape1,
const std::shared_ptr<GeomAPI_Shape>& theShape2) const;
};
+
+ /// \brief Compare addresses of shapes with respect to orientation of shapes.
+ /// Same TShapes with opposite orientations will be treated as different.
+ class ComparatorWithOri
+ {
+ public:
+ /// Return \c true if the address of the first shape is less than the address of the second
+ GEOMAPI_EXPORT
+ bool operator ()(const std::shared_ptr<GeomAPI_Shape>& theShape1,
+ const std::shared_ptr<GeomAPI_Shape>& theShape2) const;
+ };
};
//! Pointer on list of shapes
GeomAlgoAPI_NExplode.h
GeomAlgoAPI_Offset.h
GeomAlgoAPI_SolidClassifier.h
+ GeomAlgoAPI_MapShapesAndAncestors.h
)
SET(PROJECT_SOURCES
GeomAlgoAPI_NExplode.cpp
GeomAlgoAPI_Offset.cpp
GeomAlgoAPI_SolidClassifier.cpp
+ GeomAlgoAPI_MapShapesAndAncestors.cpp
)
SET(PROJECT_LIBRARIES
%shared_ptr(GeomAlgoAPI_ConeSegment)
%shared_ptr(GeomAlgoAPI_Copy)
%shared_ptr(GeomAlgoAPI_Symmetry)
+%shared_ptr(GeomAlgoAPI_MapShapesAndAncestors)
// all supported interfaces
%include "GeomAlgoAPI_MakeShape.h"
%include "GeomAlgoAPI_Copy.h"
%include "GeomAlgoAPI_Symmetry.h"
%include "GeomAlgoAPI_Box.h"
+%include "GeomAlgoAPI_MapShapesAndAncestors.h"
%typemap(out) std::list< std::shared_ptr< GeomAPI_Shape > >::value_type & {
$result = SWIG_NewPointerObj(SWIG_as_voidptr(new std::shared_ptr<GeomAPI_Shape>(*$1)), $descriptor(std::shared_ptr<GeomAPI_Shape> *), SWIG_POINTER_OWN | 0 );
--- /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 "GeomAlgoAPI_MapShapesAndAncestors.h"
+
+#include <GeomAPI_ShapeExplorer.h>
+
+GeomAlgoAPI_MapShapesAndAncestors::GeomAlgoAPI_MapShapesAndAncestors(
+ const std::shared_ptr<GeomAPI_Shape> theShape,
+ const GeomAPI_Shape::ShapeType theShapeType,
+ const GeomAPI_Shape::ShapeType theAncestorType)
+{
+ perform(theShape, theShapeType, theAncestorType);
+}
+
+void GeomAlgoAPI_MapShapesAndAncestors::perform(
+ const std::shared_ptr<GeomAPI_Shape> theShape,
+ const GeomAPI_Shape::ShapeType theShapeType,
+ const GeomAPI_Shape::ShapeType theAncestorType)
+{
+ myMap.clear();
+
+ GeomAPI_ShapeExplorer anAncIt(theShape, theAncestorType);
+ for (; anAncIt.more(); anAncIt.next()) {
+ GeomAPI_ShapeExplorer aShIt(anAncIt.current(), theShapeType);
+ for (; aShIt.more(); aShIt.next())
+ myMap[aShIt.current()].insert(anAncIt.current());
+ }
+}
--- /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 GeomAlgoAPI_MapShapesAndAncestors_H_
+#define GeomAlgoAPI_MapShapesAndAncestors_H_
+
+#include <GeomAlgoAPI.h>
+
+#include <GeomAPI_Shape.h>
+
+#include <map>
+#include <set>
+
+typedef std::set<GeomShapePtr, GeomAPI_Shape::ComparatorWithOri> SetOfShapes;
+typedef std::map<GeomShapePtr, SetOfShapes, GeomAPI_Shape::Comparator> MapShapeToShapes;
+
+/// \class GeomAlgoAPI_MapShapesAndAncestors
+/// \ingroup DataAlgo
+/// \brief Perform mapping specified types of sub-shapes of given shape
+class GeomAlgoAPI_MapShapesAndAncestors
+{
+public:
+ /// \brief Perform mapping.
+ GEOMALGOAPI_EXPORT
+ GeomAlgoAPI_MapShapesAndAncestors(const std::shared_ptr<GeomAPI_Shape> theShape,
+ const GeomAPI_Shape::ShapeType theShapeType,
+ const GeomAPI_Shape::ShapeType theAncestorType);
+ /// \brief Perform mapping.
+ GEOMALGOAPI_EXPORT
+ void perform(const std::shared_ptr<GeomAPI_Shape> theShape,
+ const GeomAPI_Shape::ShapeType theShapeType,
+ const GeomAPI_Shape::ShapeType theAncestorType);
+
+ /// \return Map of sub-shapes.
+ const MapShapeToShapes& map() const { return myMap; }
+
+private:
+ MapShapeToShapes myMap;
+};
+
+#endif
#include "GeomAlgoAPI_ConeSegment.h"
#include "GeomAlgoAPI_Copy.h"
#include "GeomAlgoAPI_Symmetry.h"
+ #include "GeomAlgoAPI_MapShapesAndAncestors.h"
#include <memory>
#include <string>
%feature("director") ModelAPI_CompositeFeature;
%feature("director") ModelAPI_Data;
%feature("director") ModelAPI_Folder;
+%feature("director") ModelAPI_Filter;
// shared pointers
// For ModelAPI_ResultConstruction.shape()
class ModelAPI_Filter
{
public:
+ virtual ~ModelAPI_Filter() {}
+
/// Returns name of the filter to represent it in GUI
virtual const std::string& name() const = 0;
/// not redefined.
virtual void initAttributes(ModelAPI_FiltersArgs& theArguments) {}
-protected:
/// Returns XML string which represents GUI of the filter
/// by reading corresponding XML file.
- MODELAPI_EXPORT std::string xmlFromFile(const std::string& theConfigFile) const;
+ MODELAPI_EXPORT virtual std::string xmlFromFile(const std::string& theConfigFile) const;
private:
bool myIsReverse;