15b24536e5c08150c6c5b7efc09b84177c39202f
[occt.git] / src / GeomFill / GeomFill_GuideTrihedronPlan.hxx
1 // Created on: 1998-06-23
2 // Created by: Stephanie HUMEAU
3 // Copyright (c) 1998-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _GeomFill_GuideTrihedronPlan_HeaderFile
18 #define _GeomFill_GuideTrihedronPlan_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <TColgp_HArray2OfPnt2d.hxx>
24 #include <math_Vector.hxx>
25 #include <Standard_Integer.hxx>
26 #include <GeomFill_PipeError.hxx>
27 #include <GeomFill_TrihedronWithGuide.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <Standard_Real.hxx>
30 #include <GeomAbs_Shape.hxx>
31 #include <TColStd_Array1OfReal.hxx>
32 class Adaptor3d_HCurve;
33 class GeomFill_Frenet;
34 class Standard_OutOfRange;
35 class Standard_ConstructionError;
36 class GeomFill_TrihedronLaw;
37 class gp_Vec;
38
39
40 class GeomFill_GuideTrihedronPlan;
41 DEFINE_STANDARD_HANDLE(GeomFill_GuideTrihedronPlan, GeomFill_TrihedronWithGuide)
42
43 //! Trihedron in  the case of sweeping along a guide curve defined
44 //! by the orthogonal  plan on  the trajectory
45 class GeomFill_GuideTrihedronPlan : public GeomFill_TrihedronWithGuide
46 {
47
48 public:
49
50   
51   Standard_EXPORT GeomFill_GuideTrihedronPlan(const Handle(Adaptor3d_HCurve)& theGuide);
52   
53   Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& thePath) Standard_OVERRIDE;
54   
55   Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
56   
57   //! Give a status to the Law
58   //! Returns PipeOk (default implementation)
59   Standard_EXPORT virtual GeomFill_PipeError ErrorStatus() const Standard_OVERRIDE;
60   
61   Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Guide() const Standard_OVERRIDE;
62   
63   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
64   
65   Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
66   
67   Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
68   
69   //! Sets the bounds of the parametric interval on
70   //! the function
71   //! This determines the derivatives in these values if the
72   //! function is not Cn.
73   Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
74   
75   //! Returns  the number  of  intervals for  continuity
76   //! <S>.
77   //! May be one if Continuity(me) >= <S>
78   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
79   
80   //! Stores in <T> the  parameters bounding the intervals
81   //! of continuity <S>.
82   //!
83   //! The array must provide  enough room to  accomodate
84   //! for the parameters. i.e. T.Length() > NbIntervals()
85   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
86   
87   //! Get average value of M(t) and V(t) it is usfull to
88   //! make fast approximation of rational  surfaces.
89   Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
90   
91   //! Say if the law is Constant
92   Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
93   
94   //! Say if the law is defined, only by the 3d Geometry of
95   //! the setted Curve
96   //! Return False by Default.
97   Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
98   
99   Standard_EXPORT virtual void Origine (const Standard_Real OrACR1, const Standard_Real OrACR2) Standard_OVERRIDE;
100
101
102
103
104   DEFINE_STANDARD_RTTIEXT(GeomFill_GuideTrihedronPlan,GeomFill_TrihedronWithGuide)
105
106 protected:
107
108
109
110
111 private:
112
113   
114   Standard_EXPORT void Init();
115   
116   Standard_EXPORT void InitX (const Standard_Real Param);
117
118   Handle(Adaptor3d_HCurve) myTrimmed;
119   Handle(Adaptor3d_HCurve) myCurve;
120   Handle(TColgp_HArray2OfPnt2d) Pole;
121   math_Vector X;
122   math_Vector XTol;
123   math_Vector Inf;
124   math_Vector Sup;
125   Handle(GeomFill_Frenet) frenet;
126   Standard_Integer myNbPts;
127   GeomFill_PipeError myStatus;
128
129
130 };
131
132
133
134
135
136
137
138 #endif // _GeomFill_GuideTrihedronPlan_HeaderFile