]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Debug : use plane for symmetry.
authorClarisse Genrault <clarisse.genrault@cea.fr>
Thu, 16 Feb 2017 14:52:54 +0000 (15:52 +0100)
committerClarisse Genrault <clarisse.genrault@cea.fr>
Thu, 16 Feb 2017 14:52:54 +0000 (15:52 +0100)
src/FeaturesPlugin/FeaturesPlugin_Symmetry.cpp

index b1b34237b6821cb90bea397a4422b7c215fb7c8a..d254eeef70bc3e9ff461c135abc20d7a2a1b06d0 100644 (file)
@@ -18,6 +18,9 @@
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_ResultPart.h>
 
+#include <iostream>
+#include <GeomAlgoAPI_FaceBuilder.h>
+
 //=================================================================================================
 FeaturesPlugin_Symmetry::FeaturesPlugin_Symmetry()
 {
@@ -274,15 +277,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()));
   }