Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/IntCurveSurface_ThePolyhedronOfHInter.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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_ThePolyhedronOfHInter_HeaderFile
0018 #define _IntCurveSurface_ThePolyhedronOfHInter_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <Bnd_Box.hxx>
0022 #include <NCollection_Array1.hxx>
0023 #include <NCollection_HArray1.hxx>
0024 
0025 class Adaptor3d_HSurfaceTool;
0026 class Bnd_Box;
0027 
0028 class IntCurveSurface_ThePolyhedronOfHInter
0029 {
0030 public:
0031   DEFINE_STANDARD_ALLOC
0032 
0033   Standard_EXPORT IntCurveSurface_ThePolyhedronOfHInter(
0034     const occ::handle<Adaptor3d_Surface>& Surface,
0035     const int                             nbdU,
0036     const int                             nbdV,
0037     const double                          U1,
0038     const double                          V1,
0039     const double                          U2,
0040     const double                          V2);
0041 
0042   Standard_EXPORT IntCurveSurface_ThePolyhedronOfHInter(
0043     const occ::handle<Adaptor3d_Surface>& Surface,
0044     const NCollection_Array1<double>&     Upars,
0045     const NCollection_Array1<double>&     Vpars);
0046 
0047   Standard_EXPORT void Destroy();
0048 
0049   ~IntCurveSurface_ThePolyhedronOfHInter() { Destroy(); }
0050 
0051   Standard_EXPORT void DeflectionOverEstimation(const double flec);
0052 
0053   Standard_EXPORT void UMinSingularity(const bool Sing);
0054 
0055   Standard_EXPORT void UMaxSingularity(const bool Sing);
0056 
0057   Standard_EXPORT void VMinSingularity(const bool Sing);
0058 
0059   Standard_EXPORT void VMaxSingularity(const bool Sing);
0060 
0061   //! get the size of the discretization.
0062   Standard_EXPORT void Size(int& nbdu, int& nbdv) const;
0063 
0064   //! Give the number of triangles in this double array of
0065   Standard_EXPORT int NbTriangles() const;
0066 
0067   //! Give the 3 points of the triangle of address Index in
0068   //! the double array of triangles.
0069   Standard_EXPORT void Triangle(const int Index, int& P1, int& P2, int& P3) const;
0070 
0071   //! Give the address Tricon of the triangle connexe to the
0072   //! triangle of address Triang by the edge Pivot Pedge and
0073   //! the third point of this connexe triangle. When we are
0074   //! on a free edge TriCon==0 but the function return the
0075   //! value of the triangle in the other side of Pivot on
0076   //! the free edge. Used to turn around a vertex.
0077   Standard_EXPORT int TriConnex(const int Triang,
0078                                 const int Pivot,
0079                                 const int Pedge,
0080                                 int&      TriCon,
0081                                 int&      OtherP) const;
0082 
0083   //! Give the number of point in the double array of
0084   //! triangles ((nbdu+1)*(nbdv+1)).
0085   Standard_EXPORT int NbPoints() const;
0086 
0087   //! Set the value of a field of the double array of
0088   //! points.
0089   Standard_EXPORT void Point(const gp_Pnt& thePnt,
0090                              const int     lig,
0091                              const int     col,
0092                              const double  U,
0093                              const double  V);
0094 
0095   //! Give the point of index i in the MaTriangle.
0096   Standard_EXPORT const gp_Pnt& Point(const int Index, double& U, double& V) const;
0097 
0098   //! Give the point of index i in the MaTriangle.
0099   Standard_EXPORT const gp_Pnt& Point(const int Index) const;
0100 
0101   //! Give the point of index i in the MaTriangle.
0102   Standard_EXPORT void Point(const int Index, gp_Pnt& P) const;
0103 
0104   //! Give the bounding box of the MaTriangle.
0105   Standard_EXPORT const Bnd_Box& Bounding() const;
0106 
0107   //! Compute the array of boxes. The box <n> corresponding
0108   //! to the triangle <n>.
0109   Standard_EXPORT void FillBounding();
0110 
0111   //! Give the array of boxes. The box <n> corresponding
0112   //! to the triangle <n>.
0113   Standard_EXPORT const occ::handle<NCollection_HArray1<Bnd_Box>>& ComponentsBounding() const;
0114 
0115   Standard_EXPORT double DeflectionOverEstimation() const;
0116 
0117   Standard_EXPORT bool HasUMinSingularity() const;
0118 
0119   Standard_EXPORT bool HasUMaxSingularity() const;
0120 
0121   Standard_EXPORT bool HasVMinSingularity() const;
0122 
0123   Standard_EXPORT bool HasVMaxSingularity() const;
0124 
0125   //! Give the plane equation of the triangle of address Triang.
0126   Standard_EXPORT void PlaneEquation(const int Triang,
0127                                      gp_XYZ&   NormalVector,
0128                                      double&   PolarDistance) const;
0129 
0130   //! Give the plane equation of the triangle of address Triang.
0131   Standard_EXPORT bool Contain(const int Triang, const gp_Pnt& ThePnt) const;
0132 
0133   Standard_EXPORT void Parameters(const int Index, double& U, double& V) const;
0134 
0135   //! This method returns true if the edge based on points with
0136   //! indices Index1 and Index2 represents a boundary edge. It is
0137   //! necessary to take into account the boundary deflection for
0138   //! this edge.
0139   Standard_EXPORT bool IsOnBound(const int Index1, const int Index2) const;
0140 
0141   //! This method returns a border deflection.
0142   double GetBorderDeflection() const { return TheBorderDeflection; }
0143 
0144   Standard_EXPORT void Dump() const;
0145 
0146 protected:
0147   Standard_EXPORT void Init(const occ::handle<Adaptor3d_Surface>& Surface,
0148                             const double                          U1,
0149                             const double                          V1,
0150                             const double                          U2,
0151                             const double                          V2);
0152 
0153   Standard_EXPORT void Init(const occ::handle<Adaptor3d_Surface>& Surface,
0154                             const NCollection_Array1<double>&     Upars,
0155                             const NCollection_Array1<double>&     Vpars);
0156 
0157 private:
0158   int                                       nbdeltaU;
0159   int                                       nbdeltaV;
0160   Bnd_Box                                   TheBnd;
0161   occ::handle<NCollection_HArray1<Bnd_Box>> TheComponentsBnd;
0162   double                                    TheDeflection;
0163   void*                                     C_MyPnts;
0164   void*                                     C_MyU;
0165   void*                                     C_MyV;
0166   bool                                      UMinSingular;
0167   bool                                      UMaxSingular;
0168   bool                                      VMinSingular;
0169   bool                                      VMaxSingular;
0170   double                                    TheBorderDeflection;
0171   void*                                     C_MyIsOnBounds;
0172 };
0173 
0174 #endif // _IntCurveSurface_ThePolyhedronOfHInter_HeaderFile