Salome HOME
Issue #2082 Sketch multiple rotation does not work as expected: debug information
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Symmetry.cpp
index e38bff2e8ed32fdcf20fe24b434d9e8d9e5fcf3f..2c3bd6521cd85c24a0cd5864debab0733dd86f89 100644 (file)
@@ -6,19 +6,22 @@
 
 #include <FeaturesPlugin_Symmetry.h>
 
-#include <ModelAPI_AttributeSelectionList.h>
-#include <ModelAPI_AttributeString.h>
-#include <ModelAPI_ResultBody.h>
+#include <GeomAlgoAPI_PointBuilder.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Face.h>
 #include <GeomAPI_Lin.h>
 #include <GeomAPI_Pln.h>
+#include <GeomAPI_Trsf.h>
 
-#include <GeomAlgoAPI_PointBuilder.h>
-
+#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_ResultBody.h>
 #include <ModelAPI_ResultPart.h>
 
+#include <iostream>
+#include <GeomAlgoAPI_FaceBuilder.h>
+
 //=================================================================================================
 FeaturesPlugin_Symmetry::FeaturesPlugin_Symmetry()
 {
@@ -275,15 +278,15 @@ void FeaturesPlugin_Symmetry::performSymmetryByPlane()
   std::shared_ptr<GeomAPI_Pln> aPln;
   std::shared_ptr<ModelAPI_AttributeSelection> anObjRef =
     selection(FeaturesPlugin_Symmetry::PLANE_OBJECT_ID());
-  if(anObjRef && anObjRef->value() && anObjRef->value()->isFace()) {
+  if (anObjRef && anObjRef->value() && anObjRef->value()->isFace()) {
     aPln = std::shared_ptr<GeomAPI_Face>(new GeomAPI_Face(anObjRef->value()))->getPlane();
   }
   else if (anObjRef && !anObjRef->value() && anObjRef->context() &&
-             anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
+             anObjRef->context()->shape() && anObjRef->context()->shape()->isFace()) {
     aPln =
       std::shared_ptr<GeomAPI_Face>(new GeomAPI_Face(anObjRef->context()->shape()))->getPlane();
   }
-  if(aPln) {
+  if (aPln) {
     aPlane = std::shared_ptr<GeomAPI_Ax2>(new GeomAPI_Ax2(aPln->location(),
                                                           aPln->direction()));
   }