From 6039fe3fa2a27e2a49ee2ebee6295ed154eda498 Mon Sep 17 00:00:00 2001 From: Artem Zhidkov Date: Thu, 28 May 2020 15:37:27 +0300 Subject: [PATCH] Avoid rotating of 2D coordinates for faces based on sketch elements. --- src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index 867bb355b..6e6e3f999 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -202,7 +202,7 @@ static void sortAreas(TopTools_ListOfShape& theAreas, void GeomAlgoAPI_SketchBuilder::build( const std::shared_ptr& theOrigin, - const std::shared_ptr& /*theDirX*/, + const std::shared_ptr& theDirX, const std::shared_ptr& theNorm, const std::list >& theEdges) { @@ -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(), theNorm->impl())); + gp_Ax3 aPlnAxes(theOrigin->impl(), theNorm->impl(), theDirX->impl()); + Handle(Geom_Surface) aPlane(new Geom_Plane(aPlnAxes)); TopoDS_Face aPlnFace; aBuilder.MakeFace(aPlnFace, aPlane, Precision::Confusion()); -- 2.39.2