Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-24 10:28:52

0001 // Created on: 1993-09-28
0002 // Created by: Bruno DUMORTIER
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 _GeomFill_HeaderFile
0018 #define _GeomFill_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Convert_ParameterisationType.hxx>
0025 #include <Standard_Real.hxx>
0026 #include <gp_Pnt.hxx>
0027 #include <NCollection_Array1.hxx>
0028 #include <Standard_Boolean.hxx>
0029 #include <gp_Vec.hxx>
0030 #include <Standard_Integer.hxx>
0031 class Geom_Surface;
0032 class Geom_Curve;
0033 class gp_Vec;
0034 class gp_Pnt;
0035 
0036 //! Tools and Data to filling Surface and Sweep Surfaces
0037 class GeomFill
0038 {
0039 public:
0040   DEFINE_STANDARD_ALLOC
0041 
0042   //! Builds a ruled surface between the two curves, Curve1 and Curve2.
0043   Standard_EXPORT static occ::handle<Geom_Surface> Surface(const occ::handle<Geom_Curve>& Curve1,
0044                                                            const occ::handle<Geom_Curve>& Curve2);
0045 
0046   Standard_EXPORT static void GetCircle(const Convert_ParameterisationType TConv,
0047                                         const gp_Vec&                      ns1,
0048                                         const gp_Vec&                      ns2,
0049                                         const gp_Vec&                      nplan,
0050                                         const gp_Pnt&                      pt1,
0051                                         const gp_Pnt&                      pt2,
0052                                         const double                       Rayon,
0053                                         const gp_Pnt&                      Center,
0054                                         NCollection_Array1<gp_Pnt>&        Poles,
0055                                         NCollection_Array1<double>&        Weigths);
0056 
0057   Standard_EXPORT static bool GetCircle(const Convert_ParameterisationType TConv,
0058                                         const gp_Vec&                      ns1,
0059                                         const gp_Vec&                      ns2,
0060                                         const gp_Vec&                      dn1w,
0061                                         const gp_Vec&                      dn2w,
0062                                         const gp_Vec&                      nplan,
0063                                         const gp_Vec&                      dnplan,
0064                                         const gp_Pnt&                      pts1,
0065                                         const gp_Pnt&                      pts2,
0066                                         const gp_Vec&                      tang1,
0067                                         const gp_Vec&                      tang2,
0068                                         const double                       Rayon,
0069                                         const double                       DRayon,
0070                                         const gp_Pnt&                      Center,
0071                                         const gp_Vec&                      DCenter,
0072                                         NCollection_Array1<gp_Pnt>&        Poles,
0073                                         NCollection_Array1<gp_Vec>&        DPoles,
0074                                         NCollection_Array1<double>&        Weigths,
0075                                         NCollection_Array1<double>&        DWeigths);
0076 
0077   Standard_EXPORT static bool GetCircle(const Convert_ParameterisationType TConv,
0078                                         const gp_Vec&                      ns1,
0079                                         const gp_Vec&                      ns2,
0080                                         const gp_Vec&                      dn1w,
0081                                         const gp_Vec&                      dn2w,
0082                                         const gp_Vec&                      d2n1w,
0083                                         const gp_Vec&                      d2n2w,
0084                                         const gp_Vec&                      nplan,
0085                                         const gp_Vec&                      dnplan,
0086                                         const gp_Vec&                      d2nplan,
0087                                         const gp_Pnt&                      pts1,
0088                                         const gp_Pnt&                      pts2,
0089                                         const gp_Vec&                      tang1,
0090                                         const gp_Vec&                      tang2,
0091                                         const gp_Vec&                      Dtang1,
0092                                         const gp_Vec&                      Dtang2,
0093                                         const double                       Rayon,
0094                                         const double                       DRayon,
0095                                         const double                       D2Rayon,
0096                                         const gp_Pnt&                      Center,
0097                                         const gp_Vec&                      DCenter,
0098                                         const gp_Vec&                      D2Center,
0099                                         NCollection_Array1<gp_Pnt>&        Poles,
0100                                         NCollection_Array1<gp_Vec>&        DPoles,
0101                                         NCollection_Array1<gp_Vec>&        D2Poles,
0102                                         NCollection_Array1<double>&        Weigths,
0103                                         NCollection_Array1<double>&        DWeigths,
0104                                         NCollection_Array1<double>&        D2Weigths);
0105 
0106   Standard_EXPORT static void GetShape(const double                  MaxAng,
0107                                        int&                          NbPoles,
0108                                        int&                          NbKnots,
0109                                        int&                          Degree,
0110                                        Convert_ParameterisationType& TypeConv);
0111 
0112   Standard_EXPORT static void Knots(const Convert_ParameterisationType TypeConv,
0113                                     NCollection_Array1<double>&        TKnots);
0114 
0115   Standard_EXPORT static void Mults(const Convert_ParameterisationType TypeConv,
0116                                     NCollection_Array1<int>&           TMults);
0117 
0118   Standard_EXPORT static void GetMinimalWeights(const Convert_ParameterisationType TConv,
0119                                                 const double                       AngleMin,
0120                                                 const double                       AngleMax,
0121                                                 NCollection_Array1<double>&        Weigths);
0122 
0123   //! Used by the generical classes to determine
0124   //! Tolerance for approximation
0125   Standard_EXPORT static double GetTolerance(const Convert_ParameterisationType TConv,
0126                                              const double                       AngleMin,
0127                                              const double                       Radius,
0128                                              const double                       AngularTol,
0129                                              const double                       SpatialTol);
0130 };
0131 
0132 #endif // _GeomFill_HeaderFile