From: dbv Date: Tue, 10 Nov 2015 07:12:51 +0000 (+0300) Subject: Bug #1073: RevolutionCut by Bounding planes and offsets option problem X-Git-Tag: V_2.0.0_alfa2~43^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dafaada56771856e79680511badcefd5cc0c4e34;p=modules%2Fshaper.git Bug #1073: RevolutionCut by Bounding planes and offsets option problem --- 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());