From dafaada56771856e79680511badcefd5cc0c4e34 Mon Sep 17 00:00:00 2001 From: dbv Date: Tue, 10 Nov 2015 10:12:51 +0300 Subject: [PATCH] Bug #1073: RevolutionCut by Bounding planes and offsets option problem --- src/GeomAlgoAPI/GeomAlgoAPI_Revolution.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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()); -- 2.39.2