0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / BRep / BRep_TFace.hxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRep_TFace_HeaderFile
18 #define _BRep_TFace_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <TopLoc_Location.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <TopoDS_TFace.hxx>
27 class Geom_Surface;
28 class Poly_Triangulation;
29 class TopLoc_Location;
30 class TopoDS_TShape;
31
32
33 class BRep_TFace;
34 DEFINE_STANDARD_HANDLE(BRep_TFace, TopoDS_TFace)
35
36 //! The Tface from BRep  is  based  on the TFace  from
37 //! TopoDS. The TFace contains :
38 //!
39 //! * A suface, a tolerance and a Location.
40 //!
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).
44 //!
45 //! *  An    optional Triangulation.   If  there  is a
46 //! triangulation the surface can be absent.
47 //!
48 //! The  Location is  used   for the Surface.
49 //!
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.
54 //!
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
59 {
60
61 public:
62
63   
64   //! Creates an empty TFace.
65   Standard_EXPORT BRep_TFace();
66   
67     const Handle(Geom_Surface)& Surface() const;
68   
69     const Handle(Poly_Triangulation)& Triangulation() const;
70   
71     const TopLoc_Location& Location() const;
72   
73     Standard_Real Tolerance() const;
74   
75     void Surface (const Handle(Geom_Surface)& S);
76   
77     void Triangulation (const Handle(Poly_Triangulation)& T);
78   
79     void Location (const TopLoc_Location& L);
80   
81     void Tolerance (const Standard_Real T);
82   
83     Standard_Boolean NaturalRestriction() const;
84   
85     void NaturalRestriction (const Standard_Boolean N);
86   
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;
90
91   //! Dumps the content of me into the stream
92   Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
93
94
95
96
97   DEFINE_STANDARD_RTTIEXT(BRep_TFace,TopoDS_TFace)
98
99 protected:
100
101
102
103
104 private:
105
106
107   Handle(Geom_Surface) mySurface;
108   Handle(Poly_Triangulation) myTriangulation;
109   TopLoc_Location myLocation;
110   Standard_Real myTolerance;
111   Standard_Boolean myNaturalRestriction;
112
113
114 };
115
116
117 #include <BRep_TFace.lxx>
118
119
120
121
122
123 #endif // _BRep_TFace_HeaderFile