Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-12-02 10:11:37

0001 // Created on: 2002-04-18
0002 // Created by: Michael KLOKOV
0003 // Copyright (c) 2002-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _IntTools_TopolTool_HeaderFile
0017 #define _IntTools_TopolTool_HeaderFile
0018 
0019 #include <Adaptor3d_TopolTool.hxx>
0020 #include <Adaptor3d_Surface.hxx>
0021 
0022 class gp_Pnt2d;
0023 class gp_Pnt;
0024 
0025 //! Class redefine methods of TopolTool from Adaptor3d
0026 //! concerning sample points
0027 class IntTools_TopolTool : public Adaptor3d_TopolTool
0028 {
0029 
0030 public:
0031   //! Empty constructor
0032   Standard_EXPORT IntTools_TopolTool();
0033 
0034   //! Initializes me by surface
0035   Standard_EXPORT IntTools_TopolTool(const occ::handle<Adaptor3d_Surface>& theSurface);
0036 
0037   //! Redefined empty initializer
0038   //!
0039   //! Warning:
0040   //! Raises the exception NotImplemented
0041   Standard_EXPORT void Initialize() override;
0042 
0043   //! Initializes me by surface
0044   Standard_EXPORT void Initialize(const occ::handle<Adaptor3d_Surface>& theSurface) override;
0045 
0046   Standard_EXPORT void ComputeSamplePoints() override;
0047 
0048   //! Computes the sample-points for the intersections algorithms
0049   Standard_EXPORT int NbSamplesU() override;
0050 
0051   //! Computes the sample-points for the intersections algorithms
0052   Standard_EXPORT int NbSamplesV() override;
0053 
0054   //! Computes the sample-points for the intersections algorithms
0055   Standard_EXPORT int NbSamples() override;
0056 
0057   //! Returns a 2d point from surface myS
0058   //! and a corresponded 3d point
0059   //! for given index.
0060   //! The index should be from 1 to NbSamples()
0061   Standard_EXPORT void SamplePoint(const int Index, gp_Pnt2d& P2d, gp_Pnt& P3d) override;
0062 
0063   //! compute the sample-points for the intersections algorithms
0064   //! by adaptive algorithm for BSpline surfaces. For other surfaces algorithm
0065   //! is the same as in method ComputeSamplePoints(), but only fill arrays of U
0066   //! and V sample parameters;
0067   //! theDefl is a required deflection
0068   //! theNUmin, theNVmin are minimal nb points for U and V.
0069   Standard_EXPORT void SamplePnts(const double theDefl,
0070                                   const int    theNUmin,
0071                                   const int    theNVmin) override;
0072 
0073   DEFINE_STANDARD_RTTIEXT(IntTools_TopolTool, Adaptor3d_TopolTool)
0074 
0075 private:
0076   int    myNbSmplU;
0077   int    myNbSmplV;
0078   double myU0;
0079   double myV0;
0080   double myDU;
0081   double myDV;
0082 };
0083 
0084 #endif // _IntTools_TopolTool_HeaderFile