0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / GeomFill / GeomFill_DiscreteTrihedron.hxx
CommitLineData
42cf5bc1 1// Created on: 2013-02-05
2// Created by: Julia GERASIMOVA
3// Copyright (c) 2001-2013 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _GeomFill_DiscreteTrihedron_HeaderFile
17#define _GeomFill_DiscreteTrihedron_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <gp_Pnt.hxx>
23#include <GeomFill_HSequenceOfAx2.hxx>
24#include <TColStd_HSequenceOfReal.hxx>
25#include <Standard_Boolean.hxx>
26#include <GeomFill_TrihedronLaw.hxx>
27#include <Standard_Real.hxx>
28#include <Standard_Integer.hxx>
29#include <GeomAbs_Shape.hxx>
30#include <TColStd_Array1OfReal.hxx>
31class GeomFill_Frenet;
32class Standard_OutOfRange;
33class Standard_ConstructionError;
34class GeomFill_TrihedronLaw;
35class Adaptor3d_HCurve;
36class gp_Vec;
37
38
39class GeomFill_DiscreteTrihedron;
40DEFINE_STANDARD_HANDLE(GeomFill_DiscreteTrihedron, GeomFill_TrihedronLaw)
41
42//! Defined Discrete Trihedron Law.
43//! The requirement for path curve is only G1.
44//! The result is C0-continuous surface
45//! that can be later approximated to C1.
46class GeomFill_DiscreteTrihedron : public GeomFill_TrihedronLaw
47{
48
49public:
50
51
52 Standard_EXPORT GeomFill_DiscreteTrihedron();
53
54 Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
55
56 Standard_EXPORT void Init();
57
58 Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
59
60 //! compute Trihedron on curve at parameter <Param>
61 Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
62
63 //! compute Trihedron and derivative Trihedron on curve
64 //! at parameter <Param>
65 //! Warning : It used only for C1 or C2 aproximation
66 //! For the moment it returns null values for DTangent, DNormal
67 //! and DBiNormal.
68 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;
69
70 //! compute Trihedron on curve
71 //! first and seconde derivatives.
72 //! Warning : It used only for C2 aproximation
73 //! For the moment it returns null values for DTangent, DNormal
74 //! DBiNormal, D2Tangent, D2Normal, D2BiNormal.
75 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;
76
77 //! Returns the number of intervals for continuity
78 //! <S>.
79 //! May be one if Continuity(me) >= <S>
80 Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
81
82 //! Stores in <T> the parameters bounding the intervals
83 //! of continuity <S>.
84 //!
85 //! The array must provide enough room to accomodate
86 //! for the parameters. i.e. T.Length() > NbIntervals()
87 Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
88
89 //! Get average value of Tangent(t) and Normal(t) it is usful to
90 //! make fast approximation of rational surfaces.
91 Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
92
93 //! Say if the law is Constant.
94 Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
95
96 //! Return True.
97 Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
98
99
100
101
92efcf78 102 DEFINE_STANDARD_RTTIEXT(GeomFill_DiscreteTrihedron,GeomFill_TrihedronLaw)
42cf5bc1 103
104protected:
105
106
107
108
109private:
110
111
112 gp_Pnt myPoint;
113 Handle(GeomFill_HSequenceOfAx2) myTrihedrons;
114 Handle(TColStd_HSequenceOfReal) myKnots;
115 Handle(GeomFill_Frenet) myFrenet;
116 Standard_Boolean myUseFrenet;
117
118
119};
120
121
122
123
124
125
126
127#endif // _GeomFill_DiscreteTrihedron_HeaderFile