1 // Created on: 1993-12-06
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepBlend_BlendTool_HeaderFile
18 #define _BRepBlend_BlendTool_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Integer.hxx>
28 class Adaptor3d_HSurface;
29 class Adaptor2d_HCurve2d;
30 class Adaptor3d_HVertex;
34 class BRepBlend_BlendTool
41 //! Projects the point P on the arc C.
42 //! If the methods returns Standard_True, the projection is
43 //! successful, and Paramproj is the parameter on the arc
44 //! of the projected point, Dist is the distance between
46 //! If the method returns Standard_False, Param proj and Dist
47 //! are not significant.
48 Standard_EXPORT static Standard_Boolean Project (const gp_Pnt2d& P, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Paramproj, Standard_Real& Dist);
50 Standard_EXPORT static Standard_Boolean Inters (const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Param, Standard_Real& Dist);
52 //! Returns the parameter of the vertex V on the edge A.
53 static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A);
55 //! Returns the parametric tolerance on the arc A
56 //! used to consider that the vertex and another point meet,
57 //! i-e if Abs(Parameter(Vertex)-Parameter(OtherPnt))<=
58 //! Tolerance, the points are "merged".
59 static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A);
61 static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_HSurface)& S);
63 static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_HSurface)& S);
65 static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_HSurface)& S);
67 static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_HSurface)& S);
69 Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2);
71 Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2);
73 //! Returns the parametric limits on the arc C.
74 //! These limits must be finite : they are either
75 //! the real limits of the arc, for a finite arc,
76 //! or a bounding box for an infinite arc.
77 Standard_EXPORT static void Bounds (const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast);
79 static Handle(Adaptor2d_HCurve2d) CurveOnSurf (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S);
99 #include <BRepBlend_BlendTool.lxx>
105 #endif // _BRepBlend_BlendTool_HeaderFile