X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_EdgeBuilder.cpp;h=86fe03d7b30a640cba5b53ce8f00af2c8848c396;hb=f64e1300ed35bb1e9a2486cdb5713355e832dd39;hp=0988697b833b580e85beb5a99656312923639f6b;hpb=380f01e1fce1a012267d604a1190d04bf4659447;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp index 0988697b8..86fe03d7b 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -162,12 +162,16 @@ std::shared_ptr GeomAlgoAPI_EdgeBuilder::cylinderAxis( std::shared_ptr GeomAlgoAPI_EdgeBuilder::lineCircle( std::shared_ptr theCenter, std::shared_ptr theNormal, - double theRadius) + double theRadius, double theRotationAngle) { const gp_Pnt& aCenter = theCenter->impl(); const gp_Dir& aDir = theNormal->impl(); + gp_Ax1 anAx(aCenter, aDir); + gp_Circ aCircle(gp_Ax2(aCenter, aDir), theRadius); + if (Abs(theRotationAngle) > 1.e-7) // Tolerance + aCircle.Rotate(anAx, theRotationAngle); BRepBuilderAPI_MakeEdge anEdgeBuilder(aCircle); std::shared_ptr aRes(new GeomAPI_Edge);