From: mpv Date: Thu, 20 Aug 2015 07:04:33 +0000 (+0300) Subject: Make sketch plane normal (created on selected planar face) oriented outside of the... X-Git-Tag: V_1.4.0_beta4~330 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=37d9cea3522ea5d2b6cba2ba57471d7803cac3f1;p=modules%2Fshaper.git Make sketch plane normal (created on selected planar face) oriented outside of the solid, so simple extrusion on this sketch is also directed outside. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp index 46a46d233..8e108ebfa 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp @@ -67,6 +67,12 @@ std::shared_ptr GeomAlgoAPI_FaceBuilder::plane( gp_Pln aPln = isPlanar.Plan(); double aA, aB, aC, aD; aPln.Coefficients(aA, aB, aC, aD); + if (aFace.Orientation() == TopAbs_REVERSED) { + aA = -aA; + aB = -aB; + aC = -aC; + aD = -aD; + } aResult = std::shared_ptr(new GeomAPI_Pln(aA, aB, aC, aD)); return aResult; }