Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:15:46

0001 // Created on: 1993-12-06
0002 // Created by: Jacques GOUSSARD
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 _BRepBlend_BlendTool_HeaderFile
0018 #define _BRepBlend_BlendTool_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 
0022 class gp_Pnt2d;
0023 class Adaptor2d_Curve2d;
0024 class Adaptor3d_HVertex;
0025 
0026 class BRepBlend_BlendTool
0027 {
0028 public:
0029   DEFINE_STANDARD_ALLOC
0030 
0031   //! Projects the point P on the arc C.
0032   //! If the methods returns true, the projection is
0033   //! successful, and Paramproj is the parameter on the arc
0034   //! of the projected point, Dist is the distance between
0035   //! P and the curve..
0036   //! If the method returns false, Param proj and Dist
0037   //! are not significant.
0038   Standard_EXPORT static bool Project(const gp_Pnt2d&                       P,
0039                                       const occ::handle<Adaptor3d_Surface>& S,
0040                                       const occ::handle<Adaptor2d_Curve2d>& C,
0041                                       double&                               Paramproj,
0042                                       double&                               Dist);
0043 
0044   Standard_EXPORT static bool Inters(const gp_Pnt2d&                       P1,
0045                                      const gp_Pnt2d&                       P2,
0046                                      const occ::handle<Adaptor3d_Surface>& S,
0047                                      const occ::handle<Adaptor2d_Curve2d>& C,
0048                                      double&                               Param,
0049                                      double&                               Dist);
0050 
0051   //! Returns the parameter of the vertex V on the edge A.
0052   static double Parameter(const occ::handle<Adaptor3d_HVertex>& V,
0053                           const occ::handle<Adaptor2d_Curve2d>& A);
0054 
0055   //! Returns the parametric tolerance on the arc A
0056   //! used to consider that the vertex and another point meet,
0057   //! i-e if std::abs(Parameter(Vertex)-Parameter(OtherPnt))<=
0058   //! Tolerance, the points are "merged".
0059   static double Tolerance(const occ::handle<Adaptor3d_HVertex>& V,
0060                           const occ::handle<Adaptor2d_Curve2d>& A);
0061 
0062   static bool SingularOnUMin(const occ::handle<Adaptor3d_Surface>& S);
0063 
0064   static bool SingularOnUMax(const occ::handle<Adaptor3d_Surface>& S);
0065 
0066   static bool SingularOnVMin(const occ::handle<Adaptor3d_Surface>& S);
0067 
0068   static bool SingularOnVMax(const occ::handle<Adaptor3d_Surface>& S);
0069 
0070   Standard_EXPORT static int NbSamplesU(const occ::handle<Adaptor3d_Surface>& S,
0071                                         const double                          u1,
0072                                         const double                          u2);
0073 
0074   Standard_EXPORT static int NbSamplesV(const occ::handle<Adaptor3d_Surface>& S,
0075                                         const double                          v1,
0076                                         const double                          v2);
0077 
0078   //! Returns the parametric limits on the arc C.
0079   //! These limits must be finite : they are either
0080   //! the real limits of the arc, for a finite arc,
0081   //! or a bounding box for an infinite arc.
0082   Standard_EXPORT static void Bounds(const occ::handle<Adaptor2d_Curve2d>& C,
0083                                      double&                               Ufirst,
0084                                      double&                               Ulast);
0085 
0086   static occ::handle<Adaptor2d_Curve2d> CurveOnSurf(const occ::handle<Adaptor2d_Curve2d>& C,
0087                                                     const occ::handle<Adaptor3d_Surface>& S);
0088 };
0089 
0090 #include <BRepBlend_BlendTool.lxx>
0091 
0092 #endif // _BRepBlend_BlendTool_HeaderFile