From: dbv Date: Fri, 22 May 2015 17:01:39 +0000 (+0300) Subject: Fix for GeomAlgoAPI_FaceBuidler method name change. X-Git-Tag: V_1.2.0~108 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a7f01520fbcac6a489a25a6657bc8edec6a0eb23;p=modules%2Fshaper.git Fix for GeomAlgoAPI_FaceBuidler method name change. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp index d03b76169..fd014f73f 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp @@ -42,18 +42,6 @@ std::shared_ptr GeomAlgoAPI_FaceBuilder::square( return aRes; } -std::shared_ptr GeomAlgoAPI_FaceBuilder::plane(std::shared_ptr theCenter, - std::shared_ptr theNormal) -{ - const gp_Pnt& aCenter = theCenter->impl(); - const gp_Dir& aDir = theNormal->impl(); - gp_Pln aPlane(aCenter, aDir); - BRepBuilderAPI_MakeFace aFaceBuilder(aPlane); - std::shared_ptr aRes(new GeomAPI_Shape); - aRes->setImpl(new TopoDS_Shape(aFaceBuilder.Face())); - return aRes; -} - std::shared_ptr GeomAlgoAPI_FaceBuilder::plane( std::shared_ptr theFace) { @@ -82,6 +70,23 @@ std::shared_ptr GeomAlgoAPI_FaceBuilder::plane( return aResult; } +std::shared_ptr GeomAlgoAPI_FaceBuilder::planarFace(std::shared_ptr theAxis) +{ + return planarFace(theAxis->origin(), theAxis->dir()); +} + +std::shared_ptr GeomAlgoAPI_FaceBuilder::planarFace(std::shared_ptr theCenter, + std::shared_ptr theNormal) +{ + const gp_Pnt& aCenter = theCenter->impl(); + const gp_Dir& aDir = theNormal->impl(); + gp_Pln aPlane(aCenter, aDir); + BRepBuilderAPI_MakeFace aFaceBuilder(aPlane); + std::shared_ptr aRes(new GeomAPI_Shape); + aRes->setImpl(new TopoDS_Shape(aFaceBuilder.Face())); + return aRes; +} + std::shared_ptr GeomAlgoAPI_FaceBuilder::planarFace(std::shared_ptr thePlane, double theX, double theY, double theWidth, double theHeight) diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.h b/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.h index 9f15bb5c0..204e0f36c 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.h @@ -8,6 +8,7 @@ #define GeomAlgoAPI_FaceBuilder_H_ #include +#include #include #include #include @@ -32,13 +33,16 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_FaceBuilder static std::shared_ptr square(std::shared_ptr thePlane, const double theSize); - /// Creates the plane by given point of the center and normal to the plane. - static std::shared_ptr plane(std::shared_ptr theCenter, - std::shared_ptr theNormal); - /// Returns the plane of the planar face. If it is not planar, returns empty ptr. static std::shared_ptr plane(std::shared_ptr theFace); + /// Creates the planar face by given axis. + static std::shared_ptr planarFace(std::shared_ptr theAxis); + + /// Creates the planar face by given point of the center and normal to the plane. + static std::shared_ptr planarFace(std::shared_ptr theCenter, + std::shared_ptr theNormal); + /// Creates a planar face by given plane, left lower point and size. static std::shared_ptr planarFace(std::shared_ptr thePlane, double theX, double theY,