Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-17 10:19:56

0001 // Created on: 1993-04-07
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IntCurveSurface_ThePolyhedronToolOfHInter_HeaderFile
0018 #define _IntCurveSurface_ThePolyhedronToolOfHInter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Bnd_Box.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <NCollection_HArray1.hxx>
0027 #include <gp_Pnt.hxx>
0028 #include <IntCurveSurface_ThePolyhedronOfHInter.hxx>
0029 
0030 class IntCurveSurface_ThePolyhedronToolOfHInter
0031 {
0032 public:
0033   DEFINE_STANDARD_ALLOC
0034 
0035   //! Give the bounding box of the PolyhedronTool.
0036   static const Bnd_Box& Bounding(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh)
0037   {
0038     return thePolyh.Bounding();
0039   }
0040 
0041   //! Give the array of boxes. The box <n> corresponding
0042   //! to the triangle <n>.
0043   static const occ::handle<NCollection_HArray1<Bnd_Box>>& ComponentsBounding(
0044     const IntCurveSurface_ThePolyhedronOfHInter& thePolyh)
0045   {
0046     return thePolyh.ComponentsBounding();
0047   }
0048 
0049   //! Give the tolerance of the polygon.
0050   static double DeflectionOverEstimation(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh)
0051   {
0052     return thePolyh.DeflectionOverEstimation();
0053   }
0054 
0055   //! Give the number of triangles in this polyhedral surface.
0056   static int NbTriangles(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh)
0057   {
0058     return thePolyh.NbTriangles();
0059   }
0060 
0061   //! Give the indices of the 3 points of the triangle of
0062   //! address Index in the PolyhedronTool.
0063   static void Triangle(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh,
0064                        const int                                    Index,
0065                        int&                                         P1,
0066                        int&                                         P2,
0067                        int&                                         P3)
0068   {
0069     thePolyh.Triangle(Index, P1, P2, P3);
0070   }
0071 
0072   //! Give the point of index i in the polyhedral surface.
0073   static const gp_Pnt& Point(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const int Index)
0074   {
0075     return thePolyh.Point(Index);
0076   }
0077 
0078   //! Give the address Tricon of the triangle connexe to
0079   //! the triangle of address Triang by the edge Pivot Pedge
0080   //! and the third point of this connexe triangle. When we
0081   //! are on a free edge TriCon==0 but the function return
0082   //! the value of the triangle in the other side of Pivot
0083   //! on the free edge. Used to turn around a vertex.
0084   static int TriConnex(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh,
0085                        const int                                    Triang,
0086                        const int                                    Pivot,
0087                        const int                                    Pedge,
0088                        int&                                         TriCon,
0089                        int&                                         OtherP)
0090   {
0091     return thePolyh.TriConnex(Triang, Pivot, Pedge, TriCon, OtherP);
0092   }
0093 
0094   //! This method returns true if the edge based on points with
0095   //! indices Index1 and Index2 represents a boundary edge. It is
0096   //! necessary to take into account the boundary deflection for
0097   //! this edge.
0098   static bool IsOnBound(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh,
0099                         const int                                    Index1,
0100                         const int                                    Index2)
0101   {
0102     return thePolyh.IsOnBound(Index1, Index2);
0103   }
0104 
0105   //! This method returns a border deflection of the polyhedron.
0106   static double GetBorderDeflection(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh)
0107   {
0108     return thePolyh.GetBorderDeflection();
0109   }
0110 
0111   Standard_EXPORT static void Dump(const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
0112 };
0113 
0114 #endif // _IntCurveSurface_ThePolyhedronToolOfHInter_HeaderFile