Salome HOME
Fix SIGSEGV on model.checkPythonDump() in GUI
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_SketchBuilder.cpp
index ceb786746a45f5cb4ea2578f5225b540519bf735..0654ee22fdab4039fe1c31b197618b7c72e3e4d2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -213,7 +213,8 @@ void GeomAlgoAPI_SketchBuilder::build(
 
   BRep_Builder aBuilder;
   // Planar face, where the sketch was built
-  Handle(Geom_Surface) aPlane(new Geom_Plane(theOrigin->impl<gp_Pnt>(), theNorm->impl<gp_Dir>()));
+  gp_Ax3 aPlnAxes(theOrigin->impl<gp_Pnt>(), theNorm->impl<gp_Dir>(), theDirX->impl<gp_Dir>());
+  Handle(Geom_Surface) aPlane(new Geom_Plane(aPlnAxes));
   TopoDS_Face aPlnFace;
   aBuilder.MakeFace(aPlnFace, aPlane, Precision::Confusion());
 
@@ -221,8 +222,8 @@ void GeomAlgoAPI_SketchBuilder::build(
   BOPAlgo_Builder* aBB = new BOPAlgo_Builder;
   aBB->AddArgument(aPlnFace);
   // Set fuzzy value for BOP, because PlaneGCS can solve the set of constraints with
-  // the precision up to 1e-5 if the sketch contains arcs.
-  static const double THE_FUZZY_TOL = 1.e-5;
+  // the precision up to 5.e-5 if the sketch contains arcs.
+  static const double THE_FUZZY_TOL = 5.e-5;
   aBB->SetFuzzyValue(THE_FUZZY_TOL);
 
   setImpl(aBB);