Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-05 08:34:25

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 IntTools_TopolTool;
0026 DEFINE_STANDARD_HANDLE(IntTools_TopolTool, Adaptor3d_TopolTool)
0027 
0028 //! Class redefine methods of TopolTool from Adaptor3d
0029 //! concerning sample points
0030 class IntTools_TopolTool : public Adaptor3d_TopolTool
0031 {
0032 
0033 public:
0034   //! Empty constructor
0035   Standard_EXPORT IntTools_TopolTool();
0036 
0037   //! Initializes me by surface
0038   Standard_EXPORT IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface);
0039 
0040   //! Redefined empty initializer
0041   //!
0042   //! Warning:
0043   //! Raises the exception NotImplemented
0044   Standard_EXPORT virtual void Initialize() Standard_OVERRIDE;
0045 
0046   //! Initializes me by surface
0047   Standard_EXPORT virtual void Initialize(const Handle(Adaptor3d_Surface)& theSurface)
0048     Standard_OVERRIDE;
0049 
0050   Standard_EXPORT virtual void ComputeSamplePoints() Standard_OVERRIDE;
0051 
0052   //! Computes the sample-points for the intersections algorithms
0053   Standard_EXPORT virtual Standard_Integer NbSamplesU() Standard_OVERRIDE;
0054 
0055   //! Computes the sample-points for the intersections algorithms
0056   Standard_EXPORT virtual Standard_Integer NbSamplesV() Standard_OVERRIDE;
0057 
0058   //! Computes the sample-points for the intersections algorithms
0059   Standard_EXPORT virtual Standard_Integer NbSamples() Standard_OVERRIDE;
0060 
0061   //! Returns a 2d point from surface myS
0062   //! and a corresponded 3d point
0063   //! for given index.
0064   //! The index should be from 1 to NbSamples()
0065   Standard_EXPORT virtual void SamplePoint(const Standard_Integer Index,
0066                                            gp_Pnt2d&              P2d,
0067                                            gp_Pnt&                P3d) Standard_OVERRIDE;
0068 
0069   //! compute the sample-points for the intersections algorithms
0070   //! by adaptive algorithm for BSpline surfaces. For other surfaces algorithm
0071   //! is the same as in method ComputeSamplePoints(), but only fill arrays of U
0072   //! and V sample parameters;
0073   //! theDefl is a required deflection
0074   //! theNUmin, theNVmin are minimal nb points for U and V.
0075   Standard_EXPORT virtual void SamplePnts(const Standard_Real    theDefl,
0076                                           const Standard_Integer theNUmin,
0077                                           const Standard_Integer theNVmin) Standard_OVERRIDE;
0078 
0079   DEFINE_STANDARD_RTTIEXT(IntTools_TopolTool, Adaptor3d_TopolTool)
0080 
0081 protected:
0082 private:
0083   Standard_Integer myNbSmplU;
0084   Standard_Integer myNbSmplV;
0085   Standard_Real    myU0;
0086   Standard_Real    myV0;
0087   Standard_Real    myDU;
0088   Standard_Real    myDV;
0089 };
0090 
0091 #endif // _IntTools_TopolTool_HeaderFile