#include <FeaturesPlugin_Symmetry.h>
+#include <GeomAlgoAPI_CompoundBuilder.h>
#include <GeomAlgoAPI_PointBuilder.h>
#include <GeomAlgoAPI_FaceBuilder.h>
}
//=================================================================================================
-void FeaturesPlugin_Symmetry::performSymmetryByPoint()
+bool FeaturesPlugin_Symmetry::collectSourceObjects(ListOfShape& theSourceShapes,
+ std::list<ResultPtr>& theSourceResults)
{
- // Getting objects.
- ListOfShape anObjects;
- std::list<ResultPtr> aContextes;
AttributeSelectionListPtr anObjectsSelList =
selectionList(FeaturesPlugin_Symmetry::OBJECTS_LIST_ID());
if (anObjectsSelList->size() == 0) {
- return;
+ return false;
}
- for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
+ for (int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
anObjectsSelList->value(anObjectsIndex);
std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
- if(!anObject.get()) { // may be for not-activated parts
+ if (!anObject.get()) { // may be for not-activated parts
eraseResults();
- return;
+ return false;
}
- anObjects.push_back(anObject);
- aContextes.push_back(anObjectAttr->context());
+ theSourceShapes.push_back(anObject);
+ theSourceResults.push_back(anObjectAttr->context());
}
+ return true;
+}
+
+//=================================================================================================
+void FeaturesPlugin_Symmetry::performSymmetryByPoint()
+{
+ // Getting objects.
+ ListOfShape anObjects;
+ std::list<ResultPtr> aContextes;
+ if (!collectSourceObjects(anObjects, aContextes))
+ return;
//Getting point.
std::shared_ptr<GeomAPI_Pnt> aPoint;
std::shared_ptr<GeomAPI_Trsf> aTrsf(new GeomAPI_Trsf());
aTrsf->setSymmetry(aPoint);
ResultPartPtr anOrigin = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aContext);
- ResultPartPtr aResultPart = document()->copyPart(anOrigin, data(), aResultIndex);
- aResultPart->setTrsf(*aContext, aTrsf);
- setResult(aResultPart, aResultIndex);
- } else {
+ buildResult(anOrigin, aTrsf, aResultIndex);
+ }
+ else {
GeomAlgoAPI_Symmetry aSymmetryAlgo(aBaseShape, aPoint);
if (!aSymmetryAlgo.check()) {
break;
}
- ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
- loadNamingDS(aSymmetryAlgo, aResultBody, aBaseShape);
- setResult(aResultBody, aResultIndex);
+ buildResult(aSymmetryAlgo, aBaseShape, aResultIndex);
}
aResultIndex++;
}
// Getting objects.
ListOfShape anObjects;
std::list<ResultPtr> aContextes;
- AttributeSelectionListPtr anObjectsSelList =
- selectionList(FeaturesPlugin_Symmetry::OBJECTS_LIST_ID());
- if (anObjectsSelList->size() == 0) {
+ if (!collectSourceObjects(anObjects, aContextes))
return;
- }
- for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
- std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
- anObjectsSelList->value(anObjectsIndex);
- std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
- if(!anObject.get()) { // may be for not-activated parts
- eraseResults();
- return;
- }
- anObjects.push_back(anObject);
- aContextes.push_back(anObjectAttr->context());
- }
//Getting axis.
std::shared_ptr<GeomAPI_Ax1> anAxis;
std::shared_ptr<GeomAPI_Trsf> aTrsf(new GeomAPI_Trsf());
aTrsf->setSymmetry(anAxis);
ResultPartPtr anOrigin = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aContext);
- ResultPartPtr aResultPart = document()->copyPart(anOrigin, data(), aResultIndex);
- aResultPart->setTrsf(*aContext, aTrsf);
- setResult(aResultPart, aResultIndex);
- } else {
+ buildResult(anOrigin, aTrsf, aResultIndex);
+ }
+ else {
GeomAlgoAPI_Symmetry aSymmetryAlgo(aBaseShape, anAxis);
if (!aSymmetryAlgo.check()) {
break;
}
- ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
- loadNamingDS(aSymmetryAlgo, aResultBody, aBaseShape);
- setResult(aResultBody, aResultIndex);
+ buildResult(aSymmetryAlgo, aBaseShape, aResultIndex);
}
aResultIndex++;
}
// Getting objects.
ListOfShape anObjects;
std::list<ResultPtr> aContextes;
- AttributeSelectionListPtr anObjectsSelList =
- selectionList(FeaturesPlugin_Symmetry::OBJECTS_LIST_ID());
- if (anObjectsSelList->size() == 0) {
+ if (!collectSourceObjects(anObjects, aContextes))
return;
- }
- for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
- std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
- anObjectsSelList->value(anObjectsIndex);
- std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
- if(!anObject.get()) { // may be for not-activated parts
- eraseResults();
- return;
- }
- anObjects.push_back(anObject);
- aContextes.push_back(anObjectAttr->context());
- }
//Getting axis.
std::shared_ptr<GeomAPI_Ax2> aPlane;
std::shared_ptr<GeomAPI_Trsf> aTrsf(new GeomAPI_Trsf());
aTrsf->setSymmetry(aPlane);
ResultPartPtr anOrigin = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aContext);
- ResultPartPtr aResultPart = document()->copyPart(anOrigin, data(), aResultIndex);
- aResultPart->setTrsf(*aContext, aTrsf);
- setResult(aResultPart, aResultIndex);
+ buildResult(anOrigin, aTrsf, aResultIndex);
} else {
GeomAlgoAPI_Symmetry aSymmetryAlgo(aBaseShape, aPlane);
break;
}
- ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
- loadNamingDS(aSymmetryAlgo, aResultBody, aBaseShape);
- setResult(aResultBody, aResultIndex);
+ buildResult(aSymmetryAlgo, aBaseShape, aResultIndex);
}
aResultIndex++;
}
removeResults(aResultIndex);
}
+//=================================================================================================
+void FeaturesPlugin_Symmetry::buildResult(GeomAlgoAPI_Symmetry& theSymmetryAlgo,
+ std::shared_ptr<GeomAPI_Shape> theBaseShape,
+ int theResultIndex)
+{
+ // Compose source shape and the result of symmetry.
+ ListOfShape aShapes;
+ aShapes.push_back(theBaseShape);
+ aShapes.push_back(theSymmetryAlgo.shape());
+ std::shared_ptr<GeomAPI_Shape> aCompound = GeomAlgoAPI_CompoundBuilder::compound(aShapes);
+
+ // Store and name the result.
+ ResultBodyPtr aResultBody = document()->createBody(data(), theResultIndex);
+ aResultBody->storeModified(theBaseShape, aCompound);
+ loadNamingDS(theSymmetryAlgo, aResultBody, theBaseShape);
+ setResult(aResultBody, theResultIndex);
+}
+
+//=================================================================================================
+void FeaturesPlugin_Symmetry::buildResult(ResultPartPtr theOriginal,
+ std::shared_ptr<GeomAPI_Trsf> theTrsf,
+ int& theResultIndex)
+{
+ std::shared_ptr<GeomAPI_Trsf> anIdentity(new GeomAPI_Trsf());
+ ResultPartPtr aCopy = document()->copyPart(theOriginal, data(), theResultIndex);
+ aCopy->setTrsf(theOriginal, anIdentity);
+ setResult(aCopy, theResultIndex);
+
+ ++theResultIndex;
+
+ ResultPartPtr aResultPart = document()->copyPart(theOriginal, data(), theResultIndex);
+ aResultPart->setTrsf(theOriginal, theTrsf);
+ setResult(aResultPart, theResultIndex);
+}
+
//=================================================================================================
void FeaturesPlugin_Symmetry::loadNamingDS(GeomAlgoAPI_Symmetry& theSymmetryAlgo,
std::shared_ptr<ModelAPI_ResultBody> theResultBody,
std::shared_ptr<GeomAPI_Shape> theBaseShape)
{
- // Store and name the result.
- theResultBody->storeModified(theBaseShape, theSymmetryAlgo.shape());
-
// Name the faces
std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = theSymmetryAlgo.mapOfSubShapes();
std::string aReflectedName = "Symmetried";
# Symmetries
-Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_1_1")], model.selection("VERTEX", "PartSet/Origin"))
-Symmetry_2 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_2_1")], model.selection("VERTEX", "Point_1"))
-Symmetry_3 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_3_1")], model.selection("VERTEX", "Box_3_1/Front&Box_3_1/Right&Box_3_1/Top"))
-Symmetry_4 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_4_1")], model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1e"))
-Symmetry_5 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_5_1")], model.selection("VERTEX", "Vertex_1_1"))
-Symmetry_6 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_6_1")], model.selection("VERTEX", "InvalidName"))
-
-Symmetry_7 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_7_1")], model.selection("EDGE", "PartSet/OZ"))
-Symmetry_8 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_8_1")], model.selection("EDGE", "Axis_1"))
-Symmetry_9 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_9_1")], model.selection("EDGE", "Box_9_1/Front&Box_9_1/Top"))
-Symmetry_10 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_10_1")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"))
-Symmetry_11 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_11_1")], model.selection("EDGE", "Edge_1_1"))
-Symmetry_12 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_12_1")], model.selection("EDGE", "InvalidName"))
-
-Symmetry_13 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_13_1")], model.selection("FACE", "PartSet/XOY"))
-Symmetry_14 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_14_1")], model.selection("FACE", "Plane_1"))
-Symmetry_15 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_15_1")], model.selection("FACE", "Box_15_1/Front"))
-Symmetry_16 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_16_1")], model.selection("FACE", "Face_1_1"))
-Symmetry_17 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Box_17_1")], model.selection("FACE", "InvalidName"))
-Symmetry_18 = model.addSymmetry(Part_1_doc, [model.selection("SHELL", "Extrusion_1_1")], model.selection("FACE", "Plane_2"))
+Symmetry_1 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_1_1")], model.selection("VERTEX", "PartSet/Origin"))
+Symmetry_2 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_2_1")], model.selection("VERTEX", "Point_1"))
+Symmetry_3 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_3_1")], model.selection("VERTEX", "Box_3_1/Front&Box_3_1/Right&Box_3_1/Top"))
+Symmetry_4 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_4_1")], model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1e"))
+Symmetry_5 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_5_1")], model.selection("VERTEX", "Vertex_1_1"))
+Symmetry_6 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_6_1")], model.selection("VERTEX", "InvalidName"))
+
+Symmetry_7 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_7_1")], model.selection("EDGE", "PartSet/OZ"))
+Symmetry_8 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_8_1")], model.selection("EDGE", "Axis_1"))
+Symmetry_9 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_9_1")], model.selection("EDGE", "Box_9_1/Front&Box_9_1/Top"))
+Symmetry_10 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_10_1")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"))
+Symmetry_11 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_11_1")], model.selection("EDGE", "Edge_1_1"))
+Symmetry_12 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_12_1")], model.selection("EDGE", "InvalidName"))
+
+Symmetry_13 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_13_1")], model.selection("FACE", "PartSet/XOY"))
+Symmetry_14 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_14_1")], model.selection("FACE", "Plane_1"))
+Symmetry_15 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_15_1")], model.selection("FACE", "Box_15_1/Front"))
+Symmetry_16 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_16_1")], model.selection("FACE", "Face_1_1"))
+Symmetry_17 = model.addMirror(Part_1_doc, [model.selection("SOLID", "Box_17_1")], model.selection("FACE", "InvalidName"))
+Symmetry_18 = model.addMirror(Part_1_doc, [model.selection("SHELL", "Extrusion_1_1")], model.selection("FACE", "Plane_2"))
model.do()
model.end()
from GeomAPI import GeomAPI_Shape
model.testNbResults(Symmetry_1, 1)
-model.testNbSubResults(Symmetry_1, [0])
-model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_1, [2])
+model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_1, model, Part_1_doc)
model.testNbResults(Symmetry_2, 1)
-model.testNbSubResults(Symmetry_2, [0])
-model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_2, [2])
+model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_2, model, Part_1_doc)
model.testNbResults(Symmetry_3, 1)
-model.testNbSubResults(Symmetry_3, [0])
-model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_3, [2])
+model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_3, model, Part_1_doc)
model.testNbResults(Symmetry_4, 1)
-model.testNbSubResults(Symmetry_4, [0])
-model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_4, [2])
+model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_4, model, Part_1_doc)
model.testNbResults(Symmetry_5, 1)
-model.testNbSubResults(Symmetry_5, [0])
-model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_5, [2])
+model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_5, model, Part_1_doc)
model.testNbResults(Symmetry_7, 1)
-model.testNbSubResults(Symmetry_7, [0])
-model.testNbSubShapes(Symmetry_7, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_7, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_7, [2])
+model.testNbSubShapes(Symmetry_7, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_7, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_7, model, Part_1_doc)
model.testNbResults(Symmetry_8, 1)
-model.testNbSubResults(Symmetry_8, [0])
-model.testNbSubShapes(Symmetry_8, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_8, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_8, [2])
+model.testNbSubShapes(Symmetry_8, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_8, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_8, model, Part_1_doc)
model.testNbResults(Symmetry_9, 1)
-model.testNbSubResults(Symmetry_9, [0])
-model.testNbSubShapes(Symmetry_9, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_9, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_9, [2])
+model.testNbSubShapes(Symmetry_9, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_9, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_9, model, Part_1_doc)
model.testNbResults(Symmetry_10, 1)
-model.testNbSubResults(Symmetry_10, [0])
-model.testNbSubShapes(Symmetry_10, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_10, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_10, [2])
+model.testNbSubShapes(Symmetry_10, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_10, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_10, model, Part_1_doc)
model.testNbResults(Symmetry_11, 1)
-model.testNbSubResults(Symmetry_11, [0])
-model.testNbSubShapes(Symmetry_11, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_11, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_11, [2])
+model.testNbSubShapes(Symmetry_11, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_11, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_11, model, Part_1_doc)
model.testNbResults(Symmetry_13, 1)
-model.testNbSubResults(Symmetry_13, [0])
-model.testNbSubShapes(Symmetry_13, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_13, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_13, [2])
+model.testNbSubShapes(Symmetry_13, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_13, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_13, model, Part_1_doc)
model.testNbResults(Symmetry_14, 1)
-model.testNbSubResults(Symmetry_14, [0])
-model.testNbSubShapes(Symmetry_14, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_14, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_14, [2])
+model.testNbSubShapes(Symmetry_14, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_14, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_14, model, Part_1_doc)
model.testNbResults(Symmetry_15, 1)
-model.testNbSubResults(Symmetry_15, [0])
-model.testNbSubShapes(Symmetry_15, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_15, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_15, [2])
+model.testNbSubShapes(Symmetry_15, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_15, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_15, model, Part_1_doc)
model.testNbResults(Symmetry_16, 1)
-model.testNbSubResults(Symmetry_16, [0])
-model.testNbSubShapes(Symmetry_16, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Symmetry_16, GeomAPI_Shape.FACE, [6])
+model.testNbSubResults(Symmetry_16, [2])
+model.testNbSubShapes(Symmetry_16, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Symmetry_16, GeomAPI_Shape.FACE, [12])
model.testHaveNamingFaces(Symmetry_16, model, Part_1_doc)
model.testNbResults(Symmetry_6, 0)
model.testNbResults(Symmetry_17, 0)
assert(Symmetry_17.feature().error() == 'Attribute "plane_object" is not initialized.')
-# To uncomment when #2046 will be performed
-#model.testNbResults(Symmetry_18, 1)
-#model.testNbSubResults(Symmetry_18, [0])
-#model.testNbSubShapes(Symmetry_18, GeomAPI_Shape.SOLID, [0])
-#model.testNbSubShapes(Symmetry_18, GeomAPI_Shape.SHELL, [1])
-#model.testNbSubShapes(Symmetry_18, GeomAPI_Shape.FACE, [5])
-#model.testHaveNamingFaces(Symmetry_18, model, Part_1_doc)
\ No newline at end of file
+model.testNbResults(Symmetry_18, 1)
+model.testNbSubResults(Symmetry_18, [2])
+model.testNbSubShapes(Symmetry_18, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Symmetry_18, GeomAPI_Shape.SHELL, [2])
+model.testNbSubShapes(Symmetry_18, GeomAPI_Shape.FACE, [10])
+model.testHaveNamingFaces(Symmetry_18, model, Part_1_doc)