X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_ShapeTools.cpp;h=7c0f462e086a033cd980920130a521a79856ba09;hb=f0cec241aae9ca16d86e166f45cb5c4987d2c792;hp=247e6126e7a4eb58a28fd89cac9d150ac7a25545;hpb=1ad74436601ac5f8d43d01b2a1d7f9ff6521b223;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp index 247e6126e..7c0f462e0 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp @@ -419,33 +419,33 @@ std::shared_ptr GeomAlgoAPI_ShapeTools::faceToInfinitePlane(const } //================================================================================================== -std::shared_ptr GeomAlgoAPI_ShapeTools::fitPlaneToBox(const std::shared_ptr thePlane, - const std::list >& thePoints) +std::shared_ptr GeomAlgoAPI_ShapeTools::fitPlaneToBox(const std::shared_ptr thePlane, + const std::list >& thePoints) { - std::shared_ptr aResultShape; + std::shared_ptr aResultFace; if(!thePlane.get()) { - return aResultShape; + return aResultFace; } const TopoDS_Shape& aShape = thePlane->impl(); if(aShape.ShapeType() != TopAbs_FACE) { - return aResultShape; + return aResultFace; } TopoDS_Face aFace = TopoDS::Face(aShape); Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); if(aSurf.IsNull()) { - return aResultShape; + return aResultFace; } GeomLib_IsPlanarSurface isPlanar(aSurf); if(!isPlanar.IsPlanar()) { - return aResultShape; + return aResultFace; } if(thePoints.size() != 8) { - return aResultShape; + return aResultFace; } const gp_Pln& aFacePln = isPlanar.Plan(); @@ -465,10 +465,10 @@ std::shared_ptr GeomAlgoAPI_ShapeTools::fitPlaneToBox(const std:: if(aPntV < VMin) VMin = aPntV; if(aPntV > VMax) VMax = aPntV; } - aResultShape.reset(new GeomAPI_Shape); - aResultShape->setImpl(new TopoDS_Shape(BRepLib_MakeFace(aFacePln, UMin, UMax, VMin, VMax).Face())); + aResultFace.reset(new GeomAPI_Face()); + aResultFace->setImpl(new TopoDS_Face(BRepLib_MakeFace(aFacePln, UMin, UMax, VMin, VMax).Face())); - return aResultShape; + return aResultFace; } //==================================================================================================