SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
-IF (NOT OPENPARTS_BUILD_DOC)
+IF (NOT CADBUILDER_BUILD_DOC)
OPTION(SHAPER_BUILD_DOC "Generate SHAPER documentation" ON)
-ENDIF(OPENPARTS_BUILD_DOC)
+ENDIF(NOT CADBUILDER_BUILD_DOC)
INCLUDE(SalomeMacros)
ENDIF(WIN32)
IF(HAVE_SALOME)
- SET(EXCLUDE_DOC_DIR "*/AppElements/* */OpenParts/*")
+ SET(EXCLUDE_DOC_DIR "*/AppElements/* */CADBuilder/*")
ELSE(HAVE_SALOME)
SET(EXCLUDE_DOC_DIR "*/Shaper/*")
ENDIF(HAVE_SALOME)
* \defgroup Salome A Salome connector
*
* \brief A set of classes which provide wrapping of
- * OpenParts application as SALOME module
+ * CAD Builder application as SALOME module
*/
/**
/*!
\page general_architecture General Architecture
-OpenPARTS is made of Workshop (see XGUI_Workshop) which loads a Module (see ModuleBase_IModule), connecting its features with GUI, providing it with services for launching of operations, tools for user inputs and visualisation of results. The Module can consist of one or several plug-ins which provide implementation of Module features. Each plug-in can implement one or several features. These features can be structured by Workbenches within Workshop. Workshop provides introducing of these Workbenches within main window in form of menus or/and tool bars.
+CAD Builder is made of Workshop (see XGUI_Workshop) which loads a Module (see ModuleBase_IModule), connecting its features with GUI, providing it with services for launching of operations, tools for user inputs and visualisation of results. The Module can consist of one or several plug-ins which provide implementation of Module features. Each plug-in can implement one or several features. These features can be structured by Workbenches within Workshop. Workshop provides introducing of these Workbenches within main window in form of menus or/and tool bars.
\n
-Workshop interacts with a Module with help of specific interface defined in ModuleBase package. Each module for OpenPARTS application has to implement ModuleBase_IModile interface.
+Workshop interacts with a Module with help of specific interface defined in ModuleBase package. Each module for CAD Builder application has to implement ModuleBase_IModile interface.
\n
A Module manages a one document (ModelAPI_Document). This document consists of a one root document and several, loaded by request, sub-documents. Each sub-document can be stored in a single file.
\n
-<b>Main features of the general architecture of OpenPARTS:</b>
+<b>Main features of the general architecture of CAD Builder:</b>
<ul>
-<li> OpenPARTS consists of a one Module running within a Workshop.</li>
+<li> CAD Builder consists of a one Module running within a Workshop.</li>
<li> This Module produces one type of Document only.</li>
<li> This Document consists of a main document and several sub-documents which can be stored and loaded as separated files.</li>
<li> A Module is made of one or several Plug-ins implementing Features supported of the Module.</li>
<li> These Features are structured by Workbenches.</li>
<li> The Module communicates with the Workshop through Interfaces.</li>
-<li> The API of OpenPARTS consists of the Interface of the Workshop and of Modules.</li>
+<li> The API of CAD Builder consists of the Interface of the Workshop and of Modules.</li>
<li> A configuration file describes the composition of the Workshop where the Module and Plug-ins are referenced by their unique names.</li>
</ul>
\n\n
\n\n
Feature is a peace of code which performs an operation. The Feature is a main component of a plug-in. It consists of input attributes, operation functionality and result objects (one or several). All features are defined in plug-ins by the specific feature developer (in C++ or python).
\n
-For today there is a one implementation of OpenPARTS application which implements Part Set functionality (PartSet_Module).
-The geometric model (i.e. the whole geometry produce by PartSet) is created through operations, or features (ModelAPI_Feature), which define a meaningful piece of design (see \ref Plugins group). In order to easily create dedicated variants of the modeler, also to gradually develop OpenPARTS, each feature is implemented in a <i>Plug-in</i> (ModelAPI_Plugin, a piece of application including its own GUI, built separately from the application. It is loaded dynamically to the application). In other words, a Module is made of a collection of Plug-ins.
+For today there is a one implementation of CAD Builder application which implements Part Set functionality (PartSet_Module).
+The geometric model (i.e. the whole geometry produce by PartSet) is created through operations, or features (ModelAPI_Feature), which define a meaningful piece of design (see \ref Plugins group). In order to easily create dedicated variants of the modeler, also to gradually develop CAD Builder, each feature is implemented in a <i>Plug-in</i> (ModelAPI_Plugin, a piece of application including its own GUI, built separately from the application. It is loaded dynamically to the application). In other words, a Module is made of a collection of Plug-ins.
Each sub-document contains a data of a one Part. When the user saves its session, all documents are saved: the PartSet and each Part.
\n
- **Add Step** button adds a new time step;
- **Remove Step** button deletes the current time step.
+**Visualization of field**
+
+When a field is created then its result in data tree looks like following.
+
+.. image:: images/field_steps_tree.png
+ :align: center
+
+.. centered::
+ Result of created field with two steps.
+
+It consists of a Field result object and steps as sub-objects. Only one object can be displayed at one moment: field or one of its step. Field result presentation repersents entities used for the Field definition.
+Step presentation shows field entities and values defined on them. For example a step defined on faces with double values looks like following.
+
+.. image:: images/step_faces_double.png
+ :align: center
+
+Color bar for displayed step is shown only if the setep is selected in **Object Browser**. Desirable parameters of the Color bar (position, number of intervals, text color) can be defined in **Preferences** dialog box.
**TUI Commands**:
.. |shape_group.icon| image:: images/shape_group.png
+.. |plus.icon| image:: images/add.png
+.. |minus.icon| image:: images/reverce.png
+.. |delete.icon| image:: images/delete.png
Group
=====
- The list of selected entities of the given type. Multiple selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection. To delete entities from the list, select them and call pop-up menu *Delete* item.
+- **Selection by filters** button opens "selection by filters" property panel and allows to select entities by set of selected filters.
+
+- **Show only** button allows to hide all other objects and shapes and show only selected ones.
+
- Control **Add elements that share the same topology** allows to add automatically all elements laying on the same topology that was selected and remove these elements if they have disappeared due to the parametrical update. They will be represented as one line in the list of selection and managed in the viewer as one object if this flag is enabled. If flag becomes disabled when such elements are already in the list, they will become divided in one line per one shape.
+**Selection by filters**
+
+If user presses this button then following property panel appears.
+
+.. image:: images/selection_by_filters.png
+ :align: center
+
+.. centered::
+ Selection by filters property panel
+
+In this panel:
+
+- **Filters** a panel for added filters.
+
+- **Add new filter** combo box. It contains accessible filters according to the selection mode defined in **Group** property panel. When user selects an item from this combo box a filter item appears in **Filters** panel like in the following example:
+
+.. image:: images/selection_by_filters_added.png
+ :align: center
+
+.. centered::
+ Filters **Horizontal faces** and **On plane** added to the property panel.
+
+Each filter item can be deleted with help of |delete.icon| button. A filter can be reverced with help of toggle button |plus.icon|/|minus.icon|. Also a filter could have input fields in case
+if the filter has arguments.
+
+- **Select** button traverces all objects of a current document and selects entities acceptable by currently defined set of filters. All selected entities will be shown in viewer 3d with
+blue semi-transparent color. Any modification in filters clears current selection.
+
+- **Number of selected objects** shows number currently selected entities.
+
+- **Show only** check box lets to hide all non-selected objects.
+
+**Accept** button in the **Selection by filters** property panel reopens **Group** property panel again and transfers all selected entities to the corresponded list.
+
**TUI Command**:
.. py:function:: model.addGroup(Part_1_doc, [model.selection("EDGE", "Cone_1_1/Face_1&Cone_1_1/Face_2"), model.selection("EDGE", "Cone_1_1/Face_1")])
aValue = std::string(anEnv) +
FSEP + "share" + FSEP + "salome" + FSEP + "resources" + FSEP + "shaper";
} else {
- anEnv = getenv("OPENPARTS_ROOT_DIR");
+ anEnv = getenv("CADBUILDER_ROOT_DIR");
if (anEnv) {
aValue = std::string(anEnv) + FSEP + "resources";
}
aValue = std::string(anEnv) +
FSEP + "share" + FSEP + "salome" + FSEP + "resources" + FSEP + "shaper";
} else {
- anEnv = getenv("OPENPARTS_ROOT_DIR");
+ anEnv = getenv("CADBUILDER_ROOT_DIR");
if (anEnv) {
aValue = std::string(anEnv) + FSEP + "plugins";
}
if (aSolution == 1)
anEnvName<<"SHAPER_ROOT_DIR";
else if (aSolution == 2)
- anEnvName<<"OPENPARTS_ROOT_DIR";
+ anEnvName<<"CADBUILDER_ROOT_DIR";
else
- anEnvName<<"OPENPARTS_PLUGINS_DIR";
+ anEnvName<<"CADBUILDER_ROOT_DIR";
char* anEnv = getenv(anEnvName.str().c_str());
if (!anEnv)
if (aResultIndex == theFindIndex)
return aFileName;
aResultIndex++;
- if (aSolution == 1) // don't allow SHAPER and OpenParts paths treated simultaneously
+ if (aSolution == 1) // don't allow SHAPER and CADBuilder paths treated simultaneously
aSolution++;
}
}
field = salome.ObjectToSObject(shape3).FindSubObject(1)[1].GetObject()
assert(field)
assert(field.GetName() == "Field_1")
-assert(field.GetSteps() == [0, 1])
+assert(field.GetSteps() == [1, 2])
shape4 = getGEOMShape(3)
assert(not shape4)
AttributeIntArrayPtr aStamps = aFieldFeature->intArray("stamps");
for (int aStepIndex = 0; aStepIndex < aTables->tables(); aStepIndex++) {
- XAO::Step* aStep = aXaoField->addNewStep(aStepIndex);
- aStep->setStep(aStepIndex);
+ XAO::Step* aStep = aXaoField->addNewStep(aStepIndex + 1);
+ aStep->setStep(aStepIndex + 1);
int aStampIndex = aStamps->value(aStepIndex);
aStep->setStamp(aStampIndex);
int aNumElements = isWholePart ? aXaoField->countElements() : aTables->rows();
**TUI Command**:
-.. py:function:: model.exportToFile(Part_doc, FileNameString, ObjectsList)*
+.. py:function:: model.exportToFile(Part_doc, FileNameString, ObjectsList)
:param part: The current part object
:param string: The file name
TestFilter_OnPlane_Exclude.py
TestFilter_OnLine.py
TestFilter_OnLine_Exclude.py
- TestFilter_OnGeometry_Edge.py
- TestFilter_OnGeometry_Face.py
- TestFilter_OnGeometry_Exclude_Edge.py
- TestFilter_OnGeometry_Exclude_Face.py
+ TestFilter_OnGeometry_Edge1.py
+ TestFilter_OnGeometry_Edge2.py
+ TestFilter_OnGeometry_Face1.py
+ TestFilter_OnGeometry_Face2.py
+ TestFilter_OnGeometry_Face3.py
+ TestFilter_OnGeometry_Exclude_Edge1.py
+ TestFilter_OnGeometry_Exclude_Edge2.py
+ TestFilter_OnGeometry_Exclude_Face1.py
+ TestFilter_OnGeometry_Exclude_Face2.py
+ TestFilter_OnGeometry_Exclude_Face3.py
TestFilter_OnPlaneSide_Face.py
TestFilter_OnPlaneSide_Plane.py
TestFilter_OnPlaneSide_Exclude_Face.py
TestFilter_RelativeToSolid_Exclude_NotOn.py
TestFilter_RelativeToSolid_Exclude_InAndOn.py
TestFilter_RelativeToSolid_Exclude_OutAndOn.py
- TestFilter_ExternalFaces.py
- TestFilter_ExternalFaces_Exclude.py
+ TestFilter_ExternalFaces1.py
+ TestFilter_ExternalFaces2.py
+ TestFilter_ExternalFaces_Exclude1.py
+ TestFilter_ExternalFaces_Exclude2.py
TestFilter_HorizontalFaces.py
TestFilter_HorizontalFaces_Exclude.py
TestFilter_VerticalFaces.py
if (!theShape->isFace())
return false;
+ // verify INTERNAL flag
+ TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
+ if (aShape.Orientation() == TopAbs_INTERNAL)
+ return false;
+
+ // check number of solids containing the face
ResultBodyPtr anOwner = ModelAPI_Tools::bodyOwner(theResult, true);
if (!anOwner) {
anOwner = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
TopTools_IndexedDataMapOfShapeListOfShape aMapFS;
TopExp::MapShapesAndUniqueAncestors(anOwnerShape->impl<TopoDS_Shape>(),
TopAbs_FACE, TopAbs_SOLID, aMapFS);
- const TopTools_ListOfShape& aSolids = aMapFS.FindFromKey(theShape->impl<TopoDS_Shape>());
+ const TopTools_ListOfShape& aSolids = aMapFS.FindFromKey(aShape);
return aSolids.Extent() <= 1;
}
for (int i = 0; i < aList->size(); i++) {
AttributeSelectionPtr aAttr = aList->value(i);
GeomShapePtr aGeom = aAttr->value();
- if (aGeom->isSameGeometry(theShape))
+ if (!aGeom)
+ aGeom = aAttr->context()->shape();
+ if (aGeom && aGeom->isSameGeometry(theShape))
return true;
}
return false;
std::shared_ptr<ModelAPI_AttributeBoolean> aBool =
std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(data()->addFloatingAttribute(
kReverseAttrID, ModelAPI_AttributeBoolean::typeId(), *aFIt));
- aBool->setValue(false); // not reversed by default
+ if (!aBool->isInitialized())
+ aBool->setValue(false); // not reversed by default
ModelAPI_FiltersArgs anArgs;
anArgs.setFeature(std::dynamic_pointer_cast<ModelAPI_FiltersFeature>(data()->owner()));
anArgs.setFilter(*aFIt);
bool FiltersPlugin_VerticalFace::isOk(const GeomShapePtr& theShape, const ResultPtr&,
const ModelAPI_FiltersArgs& theArgs) const
{
- if (!theShape->isFace() || !theShape->isPlanar())
- return false;
+ static const double THE_TOLERANCE = 1.e-7;
+
+ bool isVertical = false;
+ if (!theShape->isFace())
+ return isVertical;
GeomFacePtr aFace(new GeomAPI_Face(theShape));
GeomPlanePtr aPlane = aFace->getPlane();
- GeomDirPtr aDir = aPlane->direction();
- return fabs(aDir->z()) <= 1.e-7;
+ if (aPlane) {
+ GeomDirPtr aDir = aPlane->direction();
+ isVertical = fabs(aDir->z()) <= THE_TOLERANCE;
+ }
+ else {
+ GeomCylinderPtr aCylinder = aFace->getCylinder();
+ if (aCylinder) {
+ GeomDirPtr aDir = aCylinder->axis();
+ isVertical = fabs(fabs(aDir->z()) - 1.0) <= THE_TOLERANCE;
+ }
+ }
+ return isVertical;
}
+++ /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"))
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
-Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
-Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces")])
-model.end()
-
-Reference = {}
-# Faces of the box
-ResultBox_1 = Partition_1.result().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())] = False; 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())] = 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())] = 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()
-# Faces of the cylinder
-ResultCylinder_1 = Translation_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)
-
-Reference = {
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Back"): True,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Plane_1/Plane_1"): True,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Bottom"): True,
- model.selection("FACE", "Box_1_1/Right"): True,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"): True,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Front"): True,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Back"): True,
- model.selection("FACE", "Box_1_1/Left"): True,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Bottom"): True,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Plane_1/Plane_1"): True,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top"): True,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Front"): True,
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): True,
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_2"): True,
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_3"): True,
-}
-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"))
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces")])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_1 = Partition_1.result().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())] = False; 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())] = 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())] = 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()
+# Faces of the cylinder
+ResultCylinder_1 = Translation_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)
+
+Reference = {
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Back"): True,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Plane_1/Plane_1"): True,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Bottom"): True,
+ model.selection("FACE", "Box_1_1/Right"): True,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"): True,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Front"): True,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Back"): True,
+ model.selection("FACE", "Box_1_1/Left"): True,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Bottom"): True,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Plane_1/Plane_1"): True,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top"): True,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Front"): True,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): True,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_2"): True,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_3"): True,
+}
+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 SketchAPI import *
+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"))
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
+SketchLine_1 = Sketch_1.addLine(15, 2, 5, 2)
+SketchLine_2 = Sketch_1.addLine(5, 2, 5, 8)
+SketchLine_3 = Sketch_1.addLine(5, 8, 15, 8)
+SketchLine_4 = Sketch_1.addLine(15, 8, 15, 2)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_2.result(), 5, True)
+SketchConstraintDistance_2 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_4.result(), 15, True)
+SketchConstraintDistance_3 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_1.result(), 2, True)
+SketchConstraintDistance_4 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_3.result(), 8, True)
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")])
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Face_1_1")], 20190506)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces")])
+model.end()
+
+Reference = {}
+
+ResultPartition = Partition_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultPartition.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+assert(not exp.more())
+
+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"))
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
-Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
-Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces", exclude = True)])
-model.end()
-
-Reference = {}
-# Faces of the box
-ResultBox_1 = Partition_1.result().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())] = 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())] = 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())] = False; exp.next()
-Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
-Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
-# Faces of the cylinder
-ResultCylinder_1 = Translation_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)
-
-Reference = {
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Back"): False,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Plane_1/Plane_1"): False,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Bottom"): False,
- model.selection("FACE", "Box_1_1/Right"): False,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"): False,
- model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Front"): False,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Back"): False,
- model.selection("FACE", "Box_1_1/Left"): False,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Bottom"): False,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Plane_1/Plane_1"): False,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top"): False,
- model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Front"): False,
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): False,
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_2"): False,
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_3"): False,
-}
-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"))
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces", exclude = True)])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_1 = Partition_1.result().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())] = 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())] = 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())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+# Faces of the cylinder
+ResultCylinder_1 = Translation_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)
+
+Reference = {
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Back"): False,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Plane_1/Plane_1"): False,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Bottom"): False,
+ model.selection("FACE", "Box_1_1/Right"): False,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"): False,
+ model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Front"): False,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Back"): False,
+ model.selection("FACE", "Box_1_1/Left"): False,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Bottom"): False,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Plane_1/Plane_1"): False,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top"): False,
+ model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Front"): False,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): False,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_2"): False,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_3"): False,
+}
+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 SketchAPI import *
+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"))
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
+SketchLine_1 = Sketch_1.addLine(15, 2, 5, 2)
+SketchLine_2 = Sketch_1.addLine(5, 2, 5, 8)
+SketchLine_3 = Sketch_1.addLine(5, 8, 15, 8)
+SketchLine_4 = Sketch_1.addLine(15, 8, 15, 2)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_2.result(), 5, True)
+SketchConstraintDistance_2 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_4.result(), 15, True)
+SketchConstraintDistance_3 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_1.result(), 2, True)
+SketchConstraintDistance_4 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_3.result(), 8, True)
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")])
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Face_1_1")], 20190506)
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces", exclude = True)])
+model.end()
+
+Reference = {}
+
+ResultPartition = Partition_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultPartition.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = True; exp.next()
+Reference[model.selection(ResultPartition, exp.current())] = False; exp.next()
+assert(not exp.more())
+
+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"))
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
-Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
-FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_1/Plane_1&Box_1_1/Front"), model.selection("EDGE", "[Partition_1_1_1/Modified_Face&Box_1_1/Top][Partition_1_1_1/Modified_Face&Box_1_1/Front]")])])
-model.end()
-
-Reference = {}
-# Faces of the box
-ResultBox_1 = Partition_1.result().resultSubShapePair()[0]
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = False
- exp.next()
-# Faces of the cylinder
-ResultCylinder_1 = Translation_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()
-# Edges of the original box (selected as a sub-shapes of the result to keep original surface).
-# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
-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())] = 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()
-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())] = 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())] = 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())] = 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())] = False; 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())] = 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())] = 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())] = 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())] = 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())] = 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())] = 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())] = False; exp.next()
-Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
-Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
-# Edges of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = False
- exp.next()
-# Vertices of the original box
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = False
- exp.next()
-# Vertices of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = False
- exp.next()
-
-model.checkFilter(Part_1_doc, model, FilterFace, 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"))
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
+FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_1/Plane_1&Box_1_1/Front"), model.selection("EDGE", "[Partition_1_1_1/Modified_Face&Box_1_1/Top][Partition_1_1_1/Modified_Face&Box_1_1/Front]")])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_1 = Partition_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+# Faces of the cylinder
+ResultCylinder_1 = Translation_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()
+# Edges of the original box (selected as a sub-shapes of the result to keep original surface).
+# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
+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())] = 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()
+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())] = 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())] = 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())] = 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())] = False; 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())] = 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())] = 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())] = 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())] = 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())] = 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())] = 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())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+assert(not exp.more())
+# Edges of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+# Vertices of the original box
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+# Vertices of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, FilterFace, 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 *
+from SketchAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [], model.selection(), 100, 0)
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 80)
+SketchLine_1 = Sketch_1.addLine(-70.03988514133886, -38.65765757761403, 65.03214823048954, -46.59205615260649)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1])
+SketchLine_2 = Sketch_1.addLine(6.89273184263731, -79.70251092497334, 48.24895637932232, 63.81252391424628)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_1.results()[1])
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_1).coordinates())
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 80)
+Extrusion_1.setNestedSketch(Sketch_1)
+model.do()
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("EDGE", "[Extrusion_1_1_3/Generated_Face&Sketch_1/SketchCircle_1_2][Extrusion_1_1_3/To_Face]")])])
+model.end()
+
+Reference = {}
+# Extrusion Solid 1
+ResultExtrusion = Extrusion_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 6
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+assert(not exp.more())
+
+# Extrusion Solid 2
+ResultExtrusion = Extrusion_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+assert(not exp.more())
+
+# Extrusion Solid 3
+ResultExtrusion = Extrusion_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+assert(not exp.more())
+
+# Extrusion Solid 4
+ResultExtrusion = Extrusion_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+assert(not exp.more())
+
+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"))
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
-Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
-FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_1/Plane_1&Box_1_1/Front"), model.selection("EDGE", "[Partition_1_1_1/Modified_Face&Box_1_1/Top][Partition_1_1_1/Modified_Face&Box_1_1/Front]")])])
-model.end()
-
-Reference = {}
-# Faces of the box
-ResultBox_1 = Partition_1.result().resultSubShapePair()[0]
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = True
- exp.next()
-# Faces of the cylinder
-ResultCylinder_1 = Translation_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()
-# Edges of the original box (selected as a sub-shapes of the result to keep original surface).
-# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
-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())] = 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()
-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()
-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())] = 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())] = 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())] = False; 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())] = 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())] = 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()
-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())] = 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())] = 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()
-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()
-Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
-# Edges of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = True
- exp.next()
-# Vertices of the original box
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = True
- exp.next()
-# Vertices of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = True
- exp.next()
-
-model.checkFilter(Part_1_doc, model, FilterFace, 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"))
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
+FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_1/Plane_1&Box_1_1/Front"), model.selection("EDGE", "[Partition_1_1_1/Modified_Face&Box_1_1/Top][Partition_1_1_1/Modified_Face&Box_1_1/Front]")])])
+model.end()
+
+Reference = {}
+# Faces of the box
+ResultBox_1 = Partition_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.FACE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+# Faces of the cylinder
+ResultCylinder_1 = Translation_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()
+# Edges of the original box (selected as a sub-shapes of the result to keep original surface).
+# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
+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())] = 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()
+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()
+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())] = 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())] = 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())] = False; 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())] = 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())] = 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()
+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())] = 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())] = 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()
+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()
+Reference[model.selection(ResultBox_1, exp.current())] = False; exp.next()
+assert(not exp.more())
+# Edges of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = True
+ exp.next()
+# Vertices of the original box
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+# Vertices of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = True
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, FilterFace, 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 *
+from SketchAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [], model.selection(), 100, 0)
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 80)
+SketchLine_1 = Sketch_1.addLine(-70.03988514133886, -38.65765757761403, 65.03214823048954, -46.59205615260649)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1])
+SketchLine_2 = Sketch_1.addLine(6.89273184263731, -79.70251092497334, 48.24895637932232, 63.81252391424628)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_1.results()[1])
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_1).coordinates())
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 80)
+Extrusion_1.setNestedSketch(Sketch_1)
+model.do()
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("EDGE", "[Extrusion_1_1_3/Generated_Face&Sketch_1/SketchCircle_1_2][Extrusion_1_1_3/To_Face]")])])
+model.end()
+
+Reference = {}
+# Extrusion Solid 1
+ResultExtrusion = Extrusion_1.result().subResult(0).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 6
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+assert(not exp.more())
+
+# Extrusion Solid 2
+ResultExtrusion = Extrusion_1.result().subResult(1).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+assert(not exp.more())
+
+# Extrusion Solid 3
+ResultExtrusion = Extrusion_1.result().subResult(2).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+assert(not exp.more())
+
+# Extrusion Solid 4
+ResultExtrusion = Extrusion_1.result().subResult(3).resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# edges of face 2
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 3
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 4
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# edges of face 5
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+assert(not exp.more())
+
+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"))
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
-Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
-FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top")])])
-model.end()
-
-Reference = {}
-# Faces of the box (selected as a sub-shapes of the result to keep original surface).
-# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
-ResultBox_1 = Partition_1.result().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())] = False; 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())] = 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()
-Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
-Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
-# Faces of the cylinder
-ResultCylinder_1 = Translation_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()
-# Edges of the original box
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = True
- exp.next()
-# Edges of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = True
- exp.next()
-# Vertices of the original box
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = True
- exp.next()
-# Vertices of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = True
- exp.next()
-
-model.checkFilter(Part_1_doc, model, FilterFace, 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"))
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
+FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top")])])
+model.end()
+
+Reference = {}
+# Faces of the box (selected as a sub-shapes of the result to keep original surface).
+# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
+ResultBox_1 = Partition_1.result().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())] = False; 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())] = 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()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultBox_1, exp.current())] = True; exp.next()
+assert(not exp.more())
+# Faces of the cylinder
+ResultCylinder_1 = Translation_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()
+assert(not exp.more())
+# Edges of the original box
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+# Edges of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = True
+ exp.next()
+# Vertices of the original box
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = True
+ exp.next()
+# Vertices of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = True
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, FilterFace, 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 *
+from SketchAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [], model.selection(), 100, 0)
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 80)
+SketchLine_1 = Sketch_1.addLine(-70.03988514133886, -38.65765757761403, 65.03214823048954, -46.59205615260649)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1])
+SketchLine_2 = Sketch_1.addLine(6.89273184263731, -79.70251092497334, 48.24895637932232, 63.81252391424628)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_1.results()[1])
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_1).coordinates())
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 80)
+Extrusion_1.setNestedSketch(Sketch_1)
+Revolution_1 = model.addRevolution(Part_1_doc, [], model.selection("EDGE", "PartSet/OZ"), 270, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
+SketchLine_3 = Sketch_2.addLine(80, -20, 20, -20)
+SketchLine_4 = Sketch_2.addLine(20, -20, 20, -100)
+SketchLine_5 = Sketch_2.addLine(20, -100, 80, -100)
+SketchLine_6 = Sketch_2.addLine(80, -100, 80, -20)
+SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintHorizontal_1 = Sketch_2.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_1 = Sketch_2.setVertical(SketchLine_4.result())
+SketchConstraintHorizontal_2 = Sketch_2.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_2 = Sketch_2.setVertical(SketchLine_6.result())
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_2 = SketchProjection_2.createdFeature()
+SketchConstraintDistance_1 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_6.result(), 80, True)
+SketchConstraintDistance_2 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_4.result(), 20, True)
+SketchConstraintDistance_3 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_3.result(), 20, True)
+SketchConstraintDistance_4 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_5.result(), 100, True)
+Revolution_1.setNestedSketch(Sketch_2)
+model.do()
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("FACE", "Extrusion_1_1_3/Generated_Face&Sketch_1/SketchCircle_1_2")])])
+model.end()
+
+Reference = {}
+# Extrusion
+ResultExtrusion = Extrusion_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.FACE)
+# faces of solid 1
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# faces of solid 2
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# faces of solid 3
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# faces of solid 4
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# Revolution
+ResultRevolution = Revolution_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultRevolution.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, 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 *
+from SketchAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [], model.selection(), 100, 0)
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 80)
+SketchLine_1 = Sketch_1.addLine(-70.03988514133886, -38.65765757761403, 65.03214823048954, -46.59205615260649)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1])
+SketchLine_2 = Sketch_1.addLine(6.89273184263731, -79.70251092497334, 48.24895637932232, 63.81252391424628)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_1.results()[1])
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_1).coordinates())
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 80)
+Extrusion_1.setNestedSketch(Sketch_1)
+Revolution_1 = model.addRevolution(Part_1_doc, [], model.selection("EDGE", "PartSet/OZ"), 270, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
+SketchLine_3 = Sketch_2.addLine(80, -20, 20, -20)
+SketchLine_4 = Sketch_2.addLine(20, -20, 20, -100)
+SketchLine_5 = Sketch_2.addLine(20, -100, 80, -100)
+SketchLine_6 = Sketch_2.addLine(80, -100, 80, -20)
+SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintHorizontal_1 = Sketch_2.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_1 = Sketch_2.setVertical(SketchLine_4.result())
+SketchConstraintHorizontal_2 = Sketch_2.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_2 = Sketch_2.setVertical(SketchLine_6.result())
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_2 = SketchProjection_2.createdFeature()
+SketchConstraintDistance_1 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_6.result(), 80, True)
+SketchConstraintDistance_2 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_4.result(), 20, True)
+SketchConstraintDistance_3 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_3.result(), 20, True)
+SketchConstraintDistance_4 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_5.result(), 100, True)
+Revolution_1.setNestedSketch(Sketch_2)
+model.do()
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("FACE", "Extrusion_1_1_3/To_Face")])])
+model.end()
+
+Reference = {}
+# Extrusion
+ResultExtrusion = Extrusion_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.FACE)
+# faces of solid 1
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# faces of solid 2
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# faces of solid 3
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# faces of solid 4
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# Revolution
+ResultRevolution = Revolution_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultRevolution.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, 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"))
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
-Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
-FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top")])])
-model.end()
-
-Reference = {}
-# Faces of the box (selected as a sub-shapes of the result to keep original surface).
-# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
-ResultBox_1 = Partition_1.result().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())] = 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())] = 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())] = False; exp.next()
-# Faces of the cylinder
-ResultCylinder_1 = Translation_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()
-# Edges of the original box
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = False
- exp.next()
-# Edges of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = False
- exp.next()
-# Vertices of the original box
-exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultBox_1, exp.current())] = False
- exp.next()
-# Vertices of the cylinder
-exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
-while exp.more():
- Reference[model.selection(ResultCylinder_1, exp.current())] = False
- exp.next()
-
-model.checkFilter(Part_1_doc, model, FilterFace, 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"))
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506)
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20)
+FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top")])])
+model.end()
+
+Reference = {}
+# Faces of the box (selected as a sub-shapes of the result to keep original surface).
+# Note: the expected values have to be updated if ShapeExplorer will return another order of sub-shapes.
+ResultBox_1 = Partition_1.result().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())] = 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())] = 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())] = False; exp.next()
+assert(not exp.more())
+# Faces of the cylinder
+ResultCylinder_1 = Translation_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultCylinder_1, exp.current())] = False; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = True; exp.next()
+Reference[model.selection(ResultCylinder_1, exp.current())] = False; exp.next()
+assert(not exp.more())
+# Edges of the original box
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.EDGE)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+# Edges of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.EDGE)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+# Vertices of the original box
+exp = GeomAPI_ShapeExplorer(ResultBox_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultBox_1, exp.current())] = False
+ exp.next()
+# Vertices of the cylinder
+exp = GeomAPI_ShapeExplorer(ResultCylinder_1.shape(), GeomAPI_Shape.VERTEX)
+while exp.more():
+ Reference[model.selection(ResultCylinder_1, exp.current())] = False
+ exp.next()
+
+model.checkFilter(Part_1_doc, model, FilterFace, 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 *
+from SketchAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [], model.selection(), 100, 0)
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 80)
+SketchLine_1 = Sketch_1.addLine(-70.03988514133886, -38.65765757761403, 65.03214823048954, -46.59205615260649)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1])
+SketchLine_2 = Sketch_1.addLine(6.89273184263731, -79.70251092497334, 48.24895637932232, 63.81252391424628)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_1.results()[1])
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_1).coordinates())
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 80)
+Extrusion_1.setNestedSketch(Sketch_1)
+Revolution_1 = model.addRevolution(Part_1_doc, [], model.selection("EDGE", "PartSet/OZ"), 270, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
+SketchLine_3 = Sketch_2.addLine(80, -20, 20, -20)
+SketchLine_4 = Sketch_2.addLine(20, -20, 20, -100)
+SketchLine_5 = Sketch_2.addLine(20, -100, 80, -100)
+SketchLine_6 = Sketch_2.addLine(80, -100, 80, -20)
+SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintHorizontal_1 = Sketch_2.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_1 = Sketch_2.setVertical(SketchLine_4.result())
+SketchConstraintHorizontal_2 = Sketch_2.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_2 = Sketch_2.setVertical(SketchLine_6.result())
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_2 = SketchProjection_2.createdFeature()
+SketchConstraintDistance_1 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_6.result(), 80, True)
+SketchConstraintDistance_2 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_4.result(), 20, True)
+SketchConstraintDistance_3 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_3.result(), 20, True)
+SketchConstraintDistance_4 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_5.result(), 100, True)
+Revolution_1.setNestedSketch(Sketch_2)
+model.do()
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("FACE", "Extrusion_1_1_3/Generated_Face&Sketch_1/SketchCircle_1_2")])])
+model.end()
+
+Reference = {}
+# Extrusion
+ResultExtrusion = Extrusion_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.FACE)
+# faces of solid 1
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# faces of solid 2
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# faces of solid 3
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# faces of solid 4
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+# Revolution
+ResultRevolution = Revolution_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultRevolution.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = True; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, 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 *
+from SketchAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [], model.selection(), 100, 0)
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 80)
+SketchLine_1 = Sketch_1.addLine(-70.03988514133886, -38.65765757761403, 65.03214823048954, -46.59205615260649)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.results()[1])
+SketchLine_2 = Sketch_1.addLine(6.89273184263731, -79.70251092497334, 48.24895637932232, 63.81252391424628)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchCircle_1.results()[1])
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchCircle_1.results()[1])
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchCircle_1.center(), SketchAPI_Point(SketchPoint_1).coordinates())
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 80)
+Extrusion_1.setNestedSketch(Sketch_1)
+Revolution_1 = model.addRevolution(Part_1_doc, [], model.selection("EDGE", "PartSet/OZ"), 270, 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
+SketchLine_3 = Sketch_2.addLine(80, -20, 20, -20)
+SketchLine_4 = Sketch_2.addLine(20, -20, 20, -100)
+SketchLine_5 = Sketch_2.addLine(20, -100, 80, -100)
+SketchLine_6 = Sketch_2.addLine(80, -100, 80, -20)
+SketchConstraintCoincidence_6 = Sketch_2.setCoincident(SketchLine_6.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_7 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintCoincidence_8 = Sketch_2.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintHorizontal_1 = Sketch_2.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_1 = Sketch_2.setVertical(SketchLine_4.result())
+SketchConstraintHorizontal_2 = Sketch_2.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_2 = Sketch_2.setVertical(SketchLine_6.result())
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_2 = SketchProjection_2.createdFeature()
+SketchConstraintDistance_1 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_6.result(), 80, True)
+SketchConstraintDistance_2 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_4.result(), 20, True)
+SketchConstraintDistance_3 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_3.result(), 20, True)
+SketchConstraintDistance_4 = Sketch_2.setDistance(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_5.result(), 100, True)
+Revolution_1.setNestedSketch(Sketch_2)
+model.do()
+Filters = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("FACE", "Extrusion_1_1_3/To_Face")])])
+model.end()
+
+Reference = {}
+# Extrusion
+ResultExtrusion = Extrusion_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultExtrusion.shape(), GeomAPI_Shape.FACE)
+# faces of solid 1
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# faces of solid 2
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# faces of solid 3
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# faces of solid 4
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = False; exp.next()
+Reference[model.selection(ResultExtrusion, exp.current())] = True; exp.next()
+# Revolution
+ResultRevolution = Revolution_1.result().resultSubShapePair()[0]
+exp = GeomAPI_ShapeExplorer(ResultRevolution.shape(), GeomAPI_Shape.FACE)
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+Reference[model.selection(ResultRevolution, exp.current())] = False; exp.next()
+
+model.checkFilter(Part_1_doc, model, Filters, Reference)
model.selection("FACE", "LinearCopy_1_1_3/MF:Translated&Box_1_1/Right"): True,
model.selection("FACE", "LinearCopy_1_1_3/MF:Translated&Box_1_1/Left"): True,
# Faces of the cylinder
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): False,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): True,
model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_2"): False,
model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_3"): False,
# Edges and vertices are not applicable
model.selection("FACE", "LinearCopy_1_1_3/MF:Translated&Box_1_1/Right"): False,
model.selection("FACE", "LinearCopy_1_1_3/MF:Translated&Box_1_1/Left"): False,
# Faces of the cylinder
- model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): True,
+ model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_1"): False,
model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_2"): True,
model.selection("FACE", "Translation_1_1/MF:Translated&Cylinder_1_1/Face_3"): True,
# Edges and vertices are not applicable
{
return Precision::IsInfinite(myHeight);
}
+
+//=================================================================================================
+bool GeomAPI_Cylinder::isCoincident(const GeomCylinderPtr theCylinder, const double theTolerance)
+{
+ if (!theCylinder)
+ return false;
+
+ gp_Cylinder* anOther = theCylinder->implPtr<gp_Cylinder>();
+ if (fabs(MY_CYL->Radius() - anOther->Radius()) < theTolerance) {
+ gp_Dir aDir1 = MY_CYL->Position().Direction();
+ gp_Dir aDir2 = anOther->Position().Direction();
+ if (aDir1.IsParallel(aDir2, Precision::Angular())) {
+ gp_Pnt aLoc1 = MY_CYL->Location();
+ gp_Pnt aLoc2 = anOther->Location();
+ gp_Vec aVec12(aLoc1, aLoc2);
+ if (aVec12.SquareMagnitude() < theTolerance * theTolerance ||
+ aVec12.IsParallel(aDir1, Precision::Angular())) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
/// Return \c true is the cylinder is infinite
GEOMAPI_EXPORT bool isInfinite() const;
+ /// Returns true if cylinders have same axis and radii.
+ GEOMAPI_EXPORT bool isCoincident(const std::shared_ptr<GeomAPI_Cylinder> theCylinder,
+ const double theTolerance = 1.e-7);
+
private:
double myHeight;
};
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Ellipse.hxx>
#include <Geom_Plane.hxx>
+#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAPI_ExtremaCurveSurface.hxx>
#include <GeomAPI_IntCS.hxx>
#include <GeomAdaptor_Curve.hxx>
}
}
+static Handle(Geom_Curve) baseCurve(const TopoDS_Edge& theEdge)
+{
+ double aFirst, aLast;
+ Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theEdge, aFirst, aLast);
+ while (aCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+ Handle(Geom_TrimmedCurve) tc = Handle(Geom_TrimmedCurve)::DownCast(aCurve);
+ aCurve = tc->BasisCurve();
+ }
+ return aCurve;
+}
+
bool GeomAPI_Edge::isSameGeometry(const std::shared_ptr<GeomAPI_Shape> theShape) const
{
if (!theShape->isEdge())
return false;
+ if (isSame(theShape))
+ return true;
+
TopoDS_Edge anOwnEdge = TopoDS::Edge(impl<TopoDS_Shape>());
TopoDS_Edge anOtherEdge = TopoDS::Edge(theShape->impl<TopoDS_Shape>());
- double aFirst, aLast;
- Handle(Geom_Curve) anOwnCurve = BRep_Tool::Curve(anOwnEdge, aFirst, aLast);
- Handle(Geom_Curve) anOtherCurve = BRep_Tool::Curve(anOtherEdge, aFirst, aLast);
- return anOwnCurve == anOtherCurve;
+ Handle(Geom_Curve) anOwnCurve = baseCurve(anOwnEdge);
+ Handle(Geom_Curve) anOtherCurve = baseCurve(anOtherEdge);
+ GeomAPI_ExtremaCurveCurve anExtrema(anOwnCurve, anOtherCurve);
+
+ bool isSame = anExtrema.Extrema().IsParallel() &&
+ anExtrema.TotalLowerDistance() < Precision::Confusion();
+ return isSame;
}
bool GeomAPI_Edge::isLine() const
#include <BRepAdaptor_Surface.hxx>
#include <BRepGProp_Face.hxx>
#include <BRepTools.hxx>
+#include <BRepTopAdaptor_TopolTool.hxx>
#include <Geom_Surface.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
+#include <Geom_SweptSurface.hxx>
#include <Geom_ToroidalSurface.hxx>
+#include <GeomAdaptor_HSurface.hxx>
#include <GeomLib_IsPlanarSurface.hxx>
+#include <IntPatch_ImpImpIntersection.hxx>
#include <IntTools_Context.hxx>
#include <Standard_Type.hxx>
#include <TopoDS.hxx>
return aRes == Standard_True;
}
+static Handle(Geom_Surface) baseSurface(const TopoDS_Face& theFace)
+{
+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace);
+ while (aSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
+ Handle(Geom_RectangularTrimmedSurface) rts =
+ Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf);
+ aSurf = rts->BasisSurface();
+ }
+ return aSurf;
+}
+
bool GeomAPI_Face::isSameGeometry(const std::shared_ptr<GeomAPI_Shape> theShape) const
{
if (!theShape->isFace())
return false;
+ if (isSame(theShape))
+ return true;
+
+ GeomFacePtr anOther = theShape->face();
+ if (isPlanar() && anOther->isPlanar()) {
+ GeomPlanePtr anOwnPlane = getPlane();
+ GeomPlanePtr anOtherPlane = anOther->getPlane();
+ return anOwnPlane->isCoincident(anOtherPlane);
+ }
+
TopoDS_Face anOwnFace = TopoDS::Face(impl<TopoDS_Shape>());
TopoDS_Face anOtherFace = TopoDS::Face(theShape->impl<TopoDS_Shape>());
- Handle(Geom_Surface) anOwnSurf = BRep_Tool::Surface(anOwnFace);
- Handle(Geom_Surface) anOtherSurf = BRep_Tool::Surface(anOtherFace);
- return anOwnSurf == anOtherSurf;
+ Handle(Geom_Surface) anOwnSurf = baseSurface(anOwnFace);
+ Handle(Geom_Surface) anOtherSurf = baseSurface(anOtherFace);
+
+ // case of two elementary surfaces
+ if (anOwnSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
+ anOtherSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
+ {
+ Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(anOwnSurf);
+ Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(anOtherSurf);
+
+ Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool();
+ Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
+
+ try {
+ IntPatch_ImpImpIntersection anIIInt(aGA1, aTT1, aGA2, aTT2,
+ Precision::Confusion(),
+ Precision::Confusion());
+ if (!anIIInt.IsDone() || anIIInt.IsEmpty())
+ return false;
+
+ return anIIInt.TangentFaces();
+ }
+ catch (Standard_Failure const&) {
+ return false;
+ }
+ }
+
+ // case of two cylindrical surfaces, at least one of which is a swept surface
+ // swept surfaces: SurfaceOfLinearExtrusion, SurfaceOfRevolution
+ if ((anOwnSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
+ anOwnSurf->IsKind(STANDARD_TYPE(Geom_SweptSurface))) &&
+ (anOtherSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
+ anOtherSurf->IsKind(STANDARD_TYPE(Geom_SweptSurface))))
+ {
+ GeomCylinderPtr anOwnCyl = getCylinder();
+ GeomCylinderPtr anOtherCyl = anOther->getCylinder();
+ return anOwnCyl && anOtherCyl && anOwnCyl->isCoincident(anOtherCyl);
+ }
+
+ return false;
}
bool GeomAPI_Face::isCylindrical() const
}
}
} else { // create/update/delete
- if (myCheckTransactions && !isOperation())
- Events_InfoMessage("Model_Session",
- "Modification of data structure outside of the transaction").send();
+ if (myCheckTransactions && !isOperation()) {
+ // check it is done in real opened document: 2958
+ bool aIsActual = true;
+ static const Events_ID kDeletedEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED);
+ if (theMessage->eventID() == kDeletedEvent) {
+ aIsActual = false;
+ std::shared_ptr<ModelAPI_ObjectDeletedMessage> aDeleted =
+ std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
+ std::list<std::shared_ptr<ModelAPI_Document> > allOpened =
+ Model_Session::allOpenedDocuments();
+ std::list<std::pair<std::shared_ptr<ModelAPI_Document>, std::string>>::const_iterator
+ aGIter = aDeleted->groups().cbegin();
+ for (; !aIsActual && aGIter != aDeleted->groups().cend(); aGIter++) {
+ std::list<std::shared_ptr<ModelAPI_Document> >::iterator anOpened = allOpened.begin();
+ for(; anOpened != allOpened.end(); anOpened++) {
+ if (aGIter->first == *anOpened) {
+ aIsActual = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (aIsActual)
+ Events_InfoMessage("Model_Session",
+ "Modification of data structure outside of the transaction").send();
+ }
// if part is deleted, make the root as the current document (on undo of Parts creations)
static const Events_ID kDeletedEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED);
if (theMessage->eventID() == kDeletedEvent) {
std::list<ModelHighAPI_Selection> ModelHighAPI_Interface::results() const
{
- const_cast<ModelHighAPI_Interface*>(this)->execute();
+ const_cast<ModelHighAPI_Interface*>(this)->execute(true);
std::list<ModelHighAPI_Selection> aSelectionList;
virtual bool customizeObject(ObjectPtr theObject, const ModuleBase_CustomizeFlag& theFlag,
const bool theUpdateViewer);
+ /// Disable displaying of custom mode
+ /// \param theMode a mode to disable
+ virtual void disableCustomMode(ModuleBase_CustomizeFlag theMode) {}
+
+ /// Enables disabled custom mode
+ virtual void enableCustomModes() {}
+
/// This method is called on object browser creation for customization of module specific features
/// \param theObjectBrowser a pinter on Object Browser widget
virtual void customizeObjectBrowser(QWidget* theObjectBrowser) {}
Handle(Prs3d_Drawer) ModuleBase_IViewer::DefaultHighlightDrawer;
ModuleBase_IViewer::ModuleBase_IViewer(QObject* theParent)
- : QObject(theParent), myIs2dMode(false)
+ : QObject(theParent), myIs2dMode(false), myShowHighlight(false)
{
}
// \param theText is a title
virtual void setColorScaleTitle(const QString& theText) = 0;
+ /// Switches On additional highlight for objects preselection
+ void showSelectionHighlight() {
+ myShowHighlight = true;
+ }
+
+ /// Switches Off additional highlight for objects preselection
+ void hideSelectionHighlight() {
+ myShowHighlight = false;
+ }
+
static Handle(Prs3d_Drawer) DefaultHighlightDrawer;
signals:
QMap<Handle(V3d_View), double> myWindowScale;
bool myIs2dMode;
+
+ bool myShowHighlight;
};
#endif
aFile = std::string(anEnv) +
FSEP + "share" + FSEP + "salome" + FSEP + "resources" + FSEP + "shaper";
} else {
- anEnv = getenv("OPENPARTS_ROOT_DIR");
+ anEnv = getenv("CADBUILDER_ROOT_DIR");
if (anEnv)
aFile = std::string(anEnv) + FSEP + "resources";
}
//********************************************************************
void ModuleBase_WidgetMultiSelector::deactivate()
{
+ myWorkshop->module()->enableCustomModes();
+
ModuleBase_WidgetSelector::deactivate();
if (myVisibleObjects.size())
onShowOnly(false);
for (aIt = aResults.cbegin(); aIt != aResults.cend(); aIt++) {
myVisibleObjects.removeAll(*aIt);
}
+ myWorkshop->module()->disableCustomMode(ModuleBase_IModule::CustomizeArguments);
}
+ else
+ myWorkshop->module()->enableCustomModes();
+
foreach(ObjectPtr aObj, myVisibleObjects) {
aObj->setDisplayed(!theChecked);
}
updatePreview(aComp);
updateNumberSelected();
updateObject(myFeature);
+ onShowOnly(myShowBtn->isChecked());
}
void ModuleBase_WidgetSelectionFilter::updatePreview(const TopoDS_Shape& theShape)
Handle(AIS_InteractiveContext) aCtx = myWorkshop->viewer()->AISContext();
if (theShow) {
- myListIO.Clear();
- aCtx->DisplayedObjects(AIS_KOI_Shape, -1, myListIO);
- myListIO.Remove(myPreview);
+ AIS_ListOfInteractive aList;
+ aCtx->DisplayedObjects(AIS_KOI_Shape, -1, aList);
+ aList.Remove(myPreview);
+ if (aList.Size() > 0)
+ myListIO = aList;
}
AIS_ListOfInteractive::const_iterator aIt;
Handle(AIS_Shape) aShapeIO;
myShowBtn->setChecked(false);
clearCurrentSelection(true);
updateNumberSelected();
+
+ QList<ModuleBase_FilterItem*> aItemsList = myFiltersWgt->findChildren<ModuleBase_FilterItem*>();
+ foreach(ModuleBase_FilterItem* aItem, aItemsList) {
+ QList<ModuleBase_ModelWidget*> aWidgetsList = aItem->widgets();
+ foreach(ModuleBase_ModelWidget* aWidget, aWidgetsList) {
+ if (!aWidget->feature().get())
+ aWidget->setFeature(myFeature);
+ aWidget->restoreValue();
+ }
+ }
updateObject(myFeature);
+
+ // Redisplay the feature on order to Customize presentations from filters with selectors
+ static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
+ ModelAPI_EventCreator::get()->sendUpdated(myFeature, EVENT_DISP);
+ Events_Loop::loop()->flush(EVENT_DISP);
}
//#define DO_NOT_VISUALIZE_CUSTOM_PRESENTATION
PartSet_CustomPrs::PartSet_CustomPrs(ModuleBase_IWorkshop* theWorkshop)
- : myWorkshop(theWorkshop), myFeature(FeaturePtr()), myPresentationIsEmpty(false)
+ : myWorkshop(theWorkshop), myFeature(FeaturePtr()), myPresentationIsEmpty(false),
+ myDisabledMode(-1)
{
Events_Loop* aLoop = Events_Loop::loop();
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION));
{
bool isModified = false;
+ if (myDisabledMode == theFlag)
+ return isModified;
+
// update the AIS objects content
AISObjectPtr aPresentation = getPresentation(theFlag, true);
Handle(AIS_InteractiveObject) anAISIO = aPresentation->impl<Handle(AIS_InteractiveObject)>();
if (theFlag == ModuleBase_IModule::CustomizeArguments ||
theFlag == ModuleBase_IModule::CustomizeResults) {
anOperationPrs->setPointMarker(5, 2.);
- anOperationPrs->setWidth(1);
+ anOperationPrs->setWidth((theFlag == ModuleBase_IModule::CustomizeHighlightedObjects)? 2 : 1);
}
else if (theFlag == ModuleBase_IModule::CustomizeHighlightedObjects)
anAISPrs->useAISWidth();
/// it caused erroneus case because the presentation has linkage to the previous context.
void clearPrs();
+ /// Disable displaying of custom mode
+ /// \param theMode a mode to disable
+ void disableCustomMode(ModuleBase_IModule::ModuleBase_CustomizeFlag theMode) {
+ myDisabledMode = theMode;
+ erasePresentation(theMode, false);
+ }
+
+ /// Enables disabled custom mode
+ void enableCustomModes() { myDisabledMode = -1; }
+
//! Redefinition of Events_Listener method to listen a moment that the presentation becomes empty
virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
QMap<ModuleBase_IModule::ModuleBase_CustomizeFlag, AISObjectPtr> myPresentations;
/// State whether the presentation is activated/deactivated
QMap<ModuleBase_IModule::ModuleBase_CustomizeFlag, bool> myIsActive;
+
+ int myDisabledMode;
};
#endif
{
return myRoot;
}
+
+//******************************************************
+void PartSet_Module::disableCustomMode(ModuleBase_CustomizeFlag theMode) {
+ myCustomPrs->disableCustomMode(theMode);
+}
+
+//******************************************************
+void PartSet_Module::enableCustomModes() {
+ myCustomPrs->enableCustomModes();
+}
virtual bool customizeObject(ObjectPtr theObject, const ModuleBase_CustomizeFlag& theFlag,
const bool theUpdateViewer);
+ /// Disable displaying of custom mode
+ /// \param theMode a mode to disable
+ virtual void disableCustomMode(ModuleBase_CustomizeFlag theMode);
+
+ /// Enables disabled custom mode
+ virtual void enableCustomModes();
+
/// This method is called on object browser creation for customisation of module specific features
/// \param theObjectBrowser a pinter on Object Browser widget
virtual void customizeObjectBrowser(QWidget* theObjectBrowser);
QMap<ObjectPtr, QList<GeomShapePtr> >& theObjectShapes)
{
XGUI_Displayer* aDisplayer = XGUI_Tools::workshop(theWorkshop)->displayer();
- if (XGUI_Displayer::isVisible(aDisplayer, theObject)) {
+ // VSV: Do not use isVisible checking because it can be used when state "Show Only" is ON
+ //if (XGUI_Displayer::isVisible(aDisplayer, theObject)) {
if (theGeomShape.get()) {
if (theObjectShapes.contains(theObject))
theObjectShapes[theObject].append(theGeomShape);
.arg(ModuleBase_Tools::objectInfo(theObject)).toStdString().c_str());
#endif
}
- }
+ //}
}
void PartSet_OperationPrs::getFeatureShapes(const FeaturePtr& theFeature,
- **Show geometrical constraints** check box - displays/hides geometrical constraints:
- **Show dimensional constraints** check box - displays/hides dimensional constraints;
- **Show existing expressions** check box - displays/hides expressions.
+- **Show free points** check box - highlights free points in the current sketch if it is checked.
+- **Change sketch plane** button - allows to change working plane of the current sketch.
Now it is possible to:
aFile = std::string(anEnv) +
FSEP + "share" + FSEP + "salome" + FSEP + "resources" + FSEP + "shaper";
} else {
- anEnv = getenv("OPENPARTS_ROOT_DIR");
+ anEnv = getenv("CADBUILDER_ROOT_DIR");
if (anEnv)
aFile = std::string(anEnv) + FSEP + "resources";
}
else if (theEvent->type() == QEvent::KeyPress) {
QKeyEvent* aKeyEvent = dynamic_cast<QKeyEvent*>(theEvent);
myOperationMgr->setSHIFTPressed(aKeyEvent->modifiers() & Qt::ShiftModifier);
- switch (aKeyEvent->key()) {
- case Qt::Key_Escape:
- isAccepted = myOperationMgr->onKeyPressed(theObject, aKeyEvent);
- break;
- default:
- break;
- }
+ isAccepted = myOperationMgr->onKeyPressed(theObject, aKeyEvent);
}
}
if (!isAccepted)
isAccepted = true;
}
}
- }
- break;
- break;
- default:
+ }
+ break;
+ case Qt::Key_H:
+ if ((theEvent->modifiers() == Qt::NoModifier))
+ myWorkshop->viewer()->hideSelectionHighlight();
+ break;
+ default:
isAccepted = false;
break;
}
}
}
break;
+ case Qt::Key_H:
+ if ((theEvent->modifiers() == Qt::NoModifier))
+ myWorkshop->viewer()->showSelectionHighlight();
+ break;
}
return isAccepted;
}
XGUI_ViewerProxy::XGUI_ViewerProxy(XGUI_Workshop* theParent)
: ModuleBase_IViewer(theParent),
- myWorkshop(theParent), myShowHighlight(false)
+ myWorkshop(theParent)
{
}
ResultPtr myResult;
AIS_ListOfInteractive myHighlights;
- bool myShowHighlight;
};
#endif
static QString MyFilter2(QObject::tr("SHAPER files (*.shaper)"));
static QString MyExtension(".shaper");
#else
-static QString MyFilter(QObject::tr("OpenParts files (*.opp);;All files (*.*)"));
-static QString MyFilter2(QObject::tr("OpenParts files (*.opp)"));
+static QString MyFilter(QObject::tr("CAD Builder files (*.opp);;All files (*.*)"));
+static QString MyFilter2(QObject::tr("CAD Builder files (*.opp)"));
static QString MyExtension(".opp");
#endif
"salome" + aSep + "gui" + aSep + "SHAPER";
}
#else
- QString aDir(getenv("OPENPARTS_ROOT_DIR"));
+ QString aDir(getenv("CADBUILDER_ROOT_DIR"));
aDocDir = aDir + aSep + "doc" + aSep + "gui";
#endif
QString aFileName = aDocDir + aSep + aHelpPage;
void createDockWidgets();
/// Extends undo/redo toolbutton's with history menu
- /// \param theObject - in the OpenParts it is a QToolButton by itself,
+ /// \param theObject - in the CADBuilder it is a QToolButton by itself,
/// in salome mode - QAction that creates a button.
/// \param theSignal - void "updateUndoHistory" or "updateRedoHistory" SIGNAL;
/// \param theSlot - onUndo(int) or onRedo(int) SLOT