42cf5bc1 |
1 | // Created on: 1992-10-14 |
2 | // Created by: Christophe MARION |
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 _HLRBRep_ThePolyhedronToolOfInterCSurf_HeaderFile |
18 | #define _HLRBRep_ThePolyhedronToolOfInterCSurf_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Bnd_HArray1OfBox.hxx> |
25 | #include <Standard_Real.hxx> |
26 | #include <Standard_Integer.hxx> |
27 | #include <Standard_Boolean.hxx> |
28 | class Standard_OutOfRange; |
29 | class HLRBRep_ThePolyhedronOfInterCSurf; |
30 | class Bnd_Box; |
31 | class gp_Pnt; |
32 | |
42cf5bc1 |
33 | class HLRBRep_ThePolyhedronToolOfInterCSurf |
34 | { |
35 | public: |
36 | |
37 | DEFINE_STANDARD_ALLOC |
38 | |
36b9ff75 |
39 | //! Give the bounding box of the PolyhedronTool. |
0177fe26 |
40 | static const Bnd_Box& Bounding (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh); |
41 | |
36b9ff75 |
42 | //! Give the array of boxes. The box <n> corresponding |
43 | //! to the triangle <n>. |
0177fe26 |
44 | static const Handle(Bnd_HArray1OfBox)& ComponentsBounding (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh); |
42cf5bc1 |
45 | |
0177fe26 |
46 | //! Give the tolerance of the polygon. |
47 | static Standard_Real DeflectionOverEstimation (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh); |
42cf5bc1 |
48 | |
0177fe26 |
49 | //! Give the number of triangles in this polyhedral surface. |
50 | static Standard_Integer NbTriangles (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh); |
42cf5bc1 |
51 | |
0177fe26 |
52 | //! Give the indices of the 3 points of the triangle of |
53 | //! address Index in the PolyhedronTool. |
54 | static void Triangle (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Index, Standard_Integer& P1, Standard_Integer& P2, Standard_Integer& P3); |
42cf5bc1 |
55 | |
0177fe26 |
56 | //! Give the point of index i in the polyhedral surface. |
57 | static const gp_Pnt& Point (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Index); |
42cf5bc1 |
58 | |
0177fe26 |
59 | //! Give the address Tricon of the triangle connexe to |
60 | //! the triangle of address Triang by the edge Pivot Pedge |
61 | //! and the third point of this connexe triangle. |
62 | //! When we are on a free edge TriCon==0 but the function return |
63 | //! the value of the triangle in the other side of Pivot on the free edge. |
64 | //! Used to turn around a vertex. |
65 | static Standard_Integer TriConnex (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Triang, const Standard_Integer Pivot, const Standard_Integer Pedge, Standard_Integer& TriCon, Standard_Integer& OtherP); |
42cf5bc1 |
66 | |
0177fe26 |
67 | //! This method returns true if the edge based on points with |
68 | //! indices Index1 and Index2 represents a boundary edge. |
69 | //! It is necessary to take into account the boundary deflection for this edge. |
70 | static Standard_Boolean IsOnBound (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Index1, const Standard_Integer Index2); |
42cf5bc1 |
71 | |
0177fe26 |
72 | //! This method returns a border deflection of the polyhedron. |
73 | static Standard_Real GetBorderDeflection (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh); |
42cf5bc1 |
74 | |
0177fe26 |
75 | Standard_EXPORT static void Dump (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh); |
42cf5bc1 |
76 | |
77 | }; |
78 | |
79 | #define ThePolyhedron HLRBRep_ThePolyhedronOfInterCSurf |
80 | #define ThePolyhedron_hxx <HLRBRep_ThePolyhedronOfInterCSurf.hxx> |
81 | #define IntCurveSurface_PolyhedronTool HLRBRep_ThePolyhedronToolOfInterCSurf |
82 | #define IntCurveSurface_PolyhedronTool_hxx <HLRBRep_ThePolyhedronToolOfInterCSurf.hxx> |
83 | |
84 | #include <IntCurveSurface_PolyhedronTool.lxx> |
85 | |
86 | #undef ThePolyhedron |
87 | #undef ThePolyhedron_hxx |
88 | #undef IntCurveSurface_PolyhedronTool |
89 | #undef IntCurveSurface_PolyhedronTool_hxx |
90 | |
91 | |
92 | |
93 | |
94 | #endif // _HLRBRep_ThePolyhedronToolOfInterCSurf_HeaderFile |