1 // Created on: 1993-04-07
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1993-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 _IntCurveSurface_ThePolyhedronToolOfHInter_HeaderFile
18 #define _IntCurveSurface_ThePolyhedronToolOfHInter_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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 IntCurveSurface_ThePolyhedronOfHInter;
35 class IntCurveSurface_ThePolyhedronToolOfHInter
42 //! Give the bounding box of the PolyhedronTool.
43 static const Bnd_Box& Bounding (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
45 //! Give the array of boxes. The box <n> corresponding
46 //! to the triangle <n>.
47 static const Handle(Bnd_HArray1OfBox)& ComponentsBounding (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
49 //! Give the tolerance of the polygon.
50 static Standard_Real DeflectionOverEstimation (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
52 //! Give the number of triangles in this polyedral surface.
53 static Standard_Integer NbTriangles (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
55 //! Give the indices of the 3 points of the triangle of
56 //! address Index in the PolyhedronTool.
57 static void Triangle (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Index, Standard_Integer& P1, Standard_Integer& P2, Standard_Integer& P3);
59 //! Give the point of index i in the polyedral surface.
60 static const gp_Pnt& Point (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Index);
62 //! Give the addresse Tricon of the triangle connexe to
63 //! the triangle of address Triang by the edge Pivot Pedge
64 //! and the third point of this connexe triangle. When we
65 //! are on a free edge TriCon==0 but the function return
66 //! the value of the triangle in the other side of Pivot
67 //! on the free edge. Used to turn around a vertex.
68 static Standard_Integer TriConnex (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Triang, const Standard_Integer Pivot, const Standard_Integer Pedge, Standard_Integer& TriCon, Standard_Integer& OtherP);
70 //! This method returns true if the edge based on points with
71 //! indices Index1 and Index2 represents a boundary edge. It is
72 //! necessary to take into account the boundary deflection for
74 static Standard_Boolean IsOnBound (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Index1, const Standard_Integer Index2);
76 //! This method returns a border deflection of the polyhedron.
77 static Standard_Real GetBorderDeflection (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
79 Standard_EXPORT static void Dump (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
98 #define ThePolyhedron IntCurveSurface_ThePolyhedronOfHInter
99 #define ThePolyhedron_hxx <IntCurveSurface_ThePolyhedronOfHInter.hxx>
100 #define IntCurveSurface_PolyhedronTool IntCurveSurface_ThePolyhedronToolOfHInter
101 #define IntCurveSurface_PolyhedronTool_hxx <IntCurveSurface_ThePolyhedronToolOfHInter.hxx>
103 #include <IntCurveSurface_PolyhedronTool.lxx>
106 #undef ThePolyhedron_hxx
107 #undef IntCurveSurface_PolyhedronTool
108 #undef IntCurveSurface_PolyhedronTool_hxx
113 #endif // _IntCurveSurface_ThePolyhedronToolOfHInter_HeaderFile