0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / GeomFill / GeomFill_TrihedronLaw.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-12-02
2// Created by: Philippe MANGIN
3// Copyright (c) 1997-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_TrihedronLaw_HeaderFile
18#define _GeomFill_TrihedronLaw_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <MMgt_TShared.hxx>
24#include <GeomFill_PipeError.hxx>
25#include <Standard_Boolean.hxx>
26#include <Standard_Real.hxx>
27#include <Standard_Integer.hxx>
28#include <GeomAbs_Shape.hxx>
29#include <TColStd_Array1OfReal.hxx>
30class Adaptor3d_HCurve;
31class Standard_OutOfRange;
32class Standard_NotImplemented;
33class gp_Vec;
34
35
36class GeomFill_TrihedronLaw;
37DEFINE_STANDARD_HANDLE(GeomFill_TrihedronLaw, MMgt_TShared)
38
39//! To define Trihedron along one Curve
40class GeomFill_TrihedronLaw : public MMgt_TShared
41{
42
43public:
44
45
46 Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C);
47
48 Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const = 0;
49
50 //! Give a status to the Law
51 //! Returns PipeOk (default implementation)
52 Standard_EXPORT virtual GeomFill_PipeError ErrorStatus() const;
53
54 //! compute Triedrhon on curve at parameter <Param>
55 Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) = 0;
56
57 //! compute Triedrhon and derivative Trihedron on curve
58 //! at parameter <Param>
59 //! Warning : It used only for C1 or C2 aproximation
60 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);
61
62 //! compute Trihedron on curve
63 //! first and seconde derivatives.
64 //! Warning : It used only for C2 aproximation
65 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);
66
67 //! Returns the number of intervals for continuity
68 //! <S>.
69 //! May be one if Continuity(me) >= <S>
70 Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const = 0;
71
72 //! Stores in <T> the parameters bounding the intervals
73 //! of continuity <S>.
74 //!
75 //! The array must provide enough room to accomodate
76 //! for the parameters. i.e. T.Length() > NbIntervals()
77 Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const = 0;
78
79 //! Sets the bounds of the parametric interval on
80 //! the function
81 //! This determines the derivatives in these values if the
82 //! function is not Cn.
83 Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last);
84
85 //! Gets the bounds of the parametric interval on
86 //! the function
87 Standard_EXPORT void GetInterval (Standard_Real& First, Standard_Real& Last);
88
89 //! Get average value of M(t) and V(t) it is usfull to
90 //! make fast approximation of rational surfaces.
91 Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) = 0;
92
93 //! Say if the law is Constant
94 Standard_EXPORT virtual Standard_Boolean IsConstant() const;
95
96 //! Say if the law is defined, only by the 3d Geometry of
97 //! the setted Curve
98 //! Return False by Default.
99 Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const;
100
101
102
103
92efcf78 104 DEFINE_STANDARD_RTTIEXT(GeomFill_TrihedronLaw,MMgt_TShared)
42cf5bc1 105
106protected:
107
108
109 Handle(Adaptor3d_HCurve) myCurve;
110 Handle(Adaptor3d_HCurve) myTrimmed;
111
112
113private:
114
115
116
117
118};
119
120
121
122
123
124
125
126#endif // _GeomFill_TrihedronLaw_HeaderFile