1 // Created on: 1992-05-27
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRep_TFace_HeaderFile
18 #define _BRep_TFace_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TopLoc_Location.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <TopoDS_TFace.hxx>
28 class Poly_Triangulation;
29 class TopLoc_Location;
34 DEFINE_STANDARD_HANDLE(BRep_TFace, TopoDS_TFace)
36 //! The Tface from BRep is based on the TFace from
37 //! TopoDS. The TFace contains :
39 //! * A suface, a tolerance and a Location.
41 //! * A NaturalRestriction flag, when this flag is
42 //! True the boundary of the face is known to be the
43 //! parametric space (Umin, UMax, VMin, VMax).
45 //! * An optional Triangulation. If there is a
46 //! triangulation the surface can be absent.
48 //! The Location is used for the Surface.
50 //! The triangulation is in the same reference system
51 //! than the TFace. A point on mySurface must be
52 //! transformed with myLocation, but not a point on
53 //! the triangulation.
55 //! The Surface may be shared by different TFaces but
56 //! not the Triangulation, because the Triangulation
57 //! may be modified by the edges.
58 class BRep_TFace : public TopoDS_TFace
64 //! Creates an empty TFace.
65 Standard_EXPORT BRep_TFace();
67 const Handle(Geom_Surface)& Surface() const;
69 const Handle(Poly_Triangulation)& Triangulation() const;
71 const TopLoc_Location& Location() const;
73 Standard_Real Tolerance() const;
75 void Surface (const Handle(Geom_Surface)& S);
77 void Triangulation (const Handle(Poly_Triangulation)& T);
79 void Location (const TopLoc_Location& L);
81 void Tolerance (const Standard_Real T);
83 Standard_Boolean NaturalRestriction() const;
85 void NaturalRestriction (const Standard_Boolean N);
87 //! Returns a copy of the TShape with no sub-shapes.
88 //! The new Face has no triangulation.
89 Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
94 DEFINE_STANDARD_RTTIEXT(BRep_TFace,TopoDS_TFace)
104 Handle(Geom_Surface) mySurface;
105 Handle(Poly_Triangulation) myTriangulation;
106 TopLoc_Location myLocation;
107 Standard_Real myTolerance;
108 Standard_Boolean myNaturalRestriction;
114 #include <BRep_TFace.lxx>
120 #endif // _BRep_TFace_HeaderFile