SHAPER 9.16.0
GeomAPI_Face.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef GeomAPI_Face_H_
21#define GeomAPI_Face_H_
22
23#include <GeomAPI_Shape.h>
24
25class GeomAPI_Pln;
26class GeomAPI_Sphere;
28class GeomAPI_Cone;
29class GeomAPI_Torus;
30
36{
37public:
39 GEOMAPI_EXPORT
41
43 GEOMAPI_EXPORT
44 GeomAPI_Face(const std::shared_ptr<GeomAPI_Shape>& theShape);
45
47 GEOMAPI_EXPORT
48 virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theFace) const;
49
51 GEOMAPI_EXPORT
52 virtual bool isSameGeometry(const std::shared_ptr<GeomAPI_Shape> theShape) const;
53
55 GEOMAPI_EXPORT
56 bool isCylindrical() const;
57
59 GEOMAPI_EXPORT
60 std::shared_ptr<GeomAPI_Pln> getPlane() const;
61
63 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Sphere> getSphere() const;
64
66 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Cylinder> getCylinder() const;
67
69 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Cone> getCone() const;
70
72 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Torus> getTorus() const;
73
75 GEOMAPI_EXPORT virtual std::shared_ptr<GeomAPI_Pnt> middlePoint() const;
76
78 GEOMAPI_EXPORT virtual bool optimalBounds(
79 double& theUMin, double& theUMax,
80 double& theVMin, double& theVMax
81 ) const;
82};
83
85typedef std::shared_ptr<GeomAPI_Face> GeomFacePtr;
86
87#endif
88
Conical surface in 3D.
Definition: GeomAPI_Cone.h:34
Cylindrical surface in 3D.
Definition: GeomAPI_Cylinder.h:34
Interface to the face object.
Definition: GeomAPI_Face.h:36
virtual GEOMAPI_EXPORT bool isEqual(const std::shared_ptr< GeomAPI_Shape > theFace) const
Returns true if the current face is geometrically equal to the given face.
Definition: GeomAPI_Face.cpp:87
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Cone > getCone() const
Returns cone if the face is based on the conical surface.
Definition: GeomAPI_Face.cpp:325
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pln > getPlane() const
Returns the base plane of the face (if it is planar) with location in the center of the face.
Definition: GeomAPI_Face.cpp:238
virtual GEOMAPI_EXPORT bool isSameGeometry(const std::shared_ptr< GeomAPI_Shape > theShape) const
Returns true if faces have same underlying surface.
Definition: GeomAPI_Face.cpp:140
GEOMAPI_EXPORT GeomAPI_Face()
Creation of empty (null) shape.
Definition: GeomAPI_Face.cpp:75
virtual GEOMAPI_EXPORT bool optimalBounds(double &theUMin, double &theUMax, double &theVMin, double &theVMax) const
Returns bounding box in UV-space.
Definition: GeomAPI_Face.cpp:392
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Cylinder > getCylinder() const
Returns cylinder if the face is based on the cylindrical surface.
Definition: GeomAPI_Face.cpp:301
GEOMAPI_EXPORT bool isCylindrical() const
Returns true if the face is a cylindrical face.
Definition: GeomAPI_Face.cpp:227
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Torus > getTorus() const
Returns torus if the face is based on the toroidal surface.
Definition: GeomAPI_Face.cpp:352
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Sphere > getSphere() const
Returns sphere if the face is based on the spherical surface.
Definition: GeomAPI_Face.cpp:284
virtual GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt > middlePoint() const
Returns inner point in the face.
Definition: GeomAPI_Face.cpp:372
\Plane in 3D place, defined by normal, center and x-direction.
Definition: GeomAPI_Pln.h:38
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Spherical surface in 3D.
Definition: GeomAPI_Sphere.h:33
Toroidal surface in 3D.
Definition: GeomAPI_Torus.h:34