1 // Created on: 1995-10-17
2 // Created by: Laurent BOURESCHE
3 // Copyright (c) 1995-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 _GeomFill_BoundWithSurf_HeaderFile
18 #define _GeomFill_BoundWithSurf_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Adaptor3d_CurveOnSurface.hxx>
24 #include <GeomFill_Boundary.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Boolean.hxx>
28 class Adaptor3d_CurveOnSurface;
33 class GeomFill_BoundWithSurf;
34 DEFINE_STANDARD_HANDLE(GeomFill_BoundWithSurf, GeomFill_Boundary)
36 //! Defines a 3d curve as a boundary for a
37 //! GeomFill_ConstrainedFilling algorithm.
38 //! This curve is attached to an existing surface.
39 //! Defines a constrained boundary for filling
40 //! the computations are done with a CurveOnSurf and a
41 //! normals field defined by the normalized normal to
42 //! the surface along the PCurve.
43 //! Contains fields to allow a reparametrization of curve
44 //! and normals field.
45 class GeomFill_BoundWithSurf : public GeomFill_Boundary
52 //! Constructs a boundary object defined by the 3d curve CurveOnSurf.
53 //! The surface to be filled along this boundary will be in the
54 //! tolerance range defined by Tol3d.
55 //! What's more, at each point of CurveOnSurf, the angle
56 //! between the normal to the surface to be filled along this
57 //! boundary, and the normal to the surface on which
58 //! CurveOnSurf lies, must not be greater than TolAng.
59 //! This object is to be used as a boundary for a
60 //! GeomFill_ConstrainedFilling framework.
62 //! CurveOnSurf is an adapted curve, that is, an object
63 //! which is an interface between:
64 //! - the services provided by a curve lying on a surface from the package Geom
65 //! - and those required of the curve by the computation algorithm which uses it.
66 //! The adapted curve is created in the following way:
67 //! Handle(Geom_Surface) mySurface = ... ;
68 //! Handle(Geom2d_Curve) myParamCurve = ... ;
69 //! // where myParamCurve is a 2D curve in the parametric space of the surface mySurface
70 //! Handle(GeomAdaptor_HSurface)
72 //! GeomAdaptor_HSurface(mySurface);
73 //! Handle(Geom2dAdaptor_HCurve)
75 //! Geom2dAdaptor_HCurve(myParamCurve);
76 //! CurveOnSurf = Adaptor3d_CurveOnSurface(ParamCurve,Surface);
77 //! The boundary is then constructed with the CurveOnSurf object:
78 //! Standard_Real Tol = ... ;
79 //! Standard_Real TolAng = ... ;
80 //! myBoundary = GeomFill_BoundWithSurf (
81 //! CurveOnSurf, Tol, TolAng );
82 Standard_EXPORT GeomFill_BoundWithSurf(const Adaptor3d_CurveOnSurface& CurveOnSurf, const Standard_Real Tol3d, const Standard_Real Tolang);
84 Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
86 Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
88 Standard_EXPORT virtual Standard_Boolean HasNormals() const Standard_OVERRIDE;
90 Standard_EXPORT virtual gp_Vec Norm (const Standard_Real U) const Standard_OVERRIDE;
92 Standard_EXPORT virtual void D1Norm (const Standard_Real U, gp_Vec& N, gp_Vec& DN) const Standard_OVERRIDE;
94 Standard_EXPORT void Reparametrize (const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasDF, const Standard_Boolean HasDL, const Standard_Real DF, const Standard_Real DL, const Standard_Boolean Rev) Standard_OVERRIDE;
96 Standard_EXPORT void Bounds (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
98 Standard_EXPORT Standard_Boolean IsDegenerated() const Standard_OVERRIDE;
103 DEFINE_STANDARD_RTTIEXT(GeomFill_BoundWithSurf,GeomFill_Boundary)
113 Adaptor3d_CurveOnSurface myConS;
114 Handle(Law_Function) myPar;
125 #endif // _GeomFill_BoundWithSurf_HeaderFile