0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection...
[occt.git] / src / IntPolyh / IntPolyh_Tools.hxx
1 // Created by: Eugeny MALTCHIKOV
2 // Copyright (c) 2017 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #ifndef _IntPolyh_Tools_HeaderFile
16 #define _IntPolyh_Tools_HeaderFile
17
18 #include <TColStd_Array1OfReal.hxx>
19 #include <IntPolyh_ArrayOfPointNormal.hxx>
20
21 class Adaptor3d_HSurface;
22 //! The class provides tools for surface sampling.
23 class IntPolyh_Tools
24 {
25 public:
26
27   //! Checks if the surface can be enlarged in U or V direction.
28   Standard_EXPORT static void IsEnlargePossible(const Handle(Adaptor3d_HSurface)& theSurf,
29                                                 Standard_Boolean& theUEnlarge,
30                                                 Standard_Boolean& theVEnlarge);
31
32   //! Makes the sampling of the given surface <theSurf> 
33   //! making the net of <theNbSU> x <theNbSV> sampling points.
34   //! The flag <theEnlargeZone> controls the enlargement of the
35   //! sampling zone on the surface.
36   //! The parameters of the sampling points are stored into
37   //! <theUPars> and <theVPars> arrays.
38   Standard_EXPORT static void MakeSampling(const Handle(Adaptor3d_HSurface)& theSurf,
39                                            const Standard_Integer theNbSU,
40                                            const Standard_Integer theNbSV,
41                                            const Standard_Boolean theEnlargeZone,
42                                            TColStd_Array1OfReal& theUPars,
43                                            TColStd_Array1OfReal& theVPars);
44
45   //! Computes the deflection tolerance on the surface for the given sampling.
46   Standard_EXPORT static Standard_Real ComputeDeflection(const Handle(Adaptor3d_HSurface)& theSurf,
47                                                          const TColStd_Array1OfReal& theUPars,
48                                                          const TColStd_Array1OfReal& theVPars);
49
50   //! Fills the array <thePoints> with the points (triangulation nodes) on the surface
51   //! and normal directions of the surface in these points.
52   Standard_EXPORT static void FillArrayOfPointNormal(const Handle(Adaptor3d_HSurface)& theSurf,
53                                                      const TColStd_Array1OfReal& theUPars,
54                                                      const TColStd_Array1OfReal& theVPars,
55                                                      IntPolyh_ArrayOfPointNormal& thePoints);
56
57
58 };
59
60 #endif // _IntPolyh_Tools_HeaderFile