X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Revolution.cpp;h=369ef292baedd2f60a7903af2bf98007452d5e35;hb=cacdf9c1e4b42af09db1aa302897a3188b77e0b0;hp=21eb56f29320d8bb9291b898013e361dfa8a2a0b;hpb=f85ae9faa90bb71573fe234331952a03f83bafb7;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Revolution.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Revolution.cpp index 21eb56f29..369ef292b 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Revolution.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Revolution.cpp @@ -53,9 +53,11 @@ GeomAlgoAPI_Revolution::GeomAlgoAPI_Revolution(std::shared_ptr th //================================================================================================= TopoDS_Face GeomAlgoAPI_Revolution::makeFaceFromPlane(gp_Pln& thePlane, const gp_Pnt& thePoint) { - gp_XYZ aVec = thePoint.XYZ() - thePlane.Location().XYZ(); - double aSign = aVec * thePlane.Axis().Direction().XYZ(); - if(aSign < 0) thePlane.SetAxis(thePlane.Axis().Reversed()); + if(!thePlane.Contains(thePoint, Precision::Confusion())) { + gp_XYZ aVec = thePoint.XYZ() - thePlane.Location().XYZ(); + double aSign = aVec * thePlane.Axis().Direction().XYZ(); + if(aSign < 0) thePlane.SetAxis(thePlane.Axis().Reversed()); + } BRepBuilderAPI_MakeFace aMakeFace(thePlane); TopoDS_Face aResultFace = TopoDS::Face(aMakeFace.Shape());