0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / ChFiDS / ChFiDS_FilSpine.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-04-24
2// Created by: Modelistation
3// Copyright (c) 1995-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 _ChFiDS_FilSpine_HeaderFile
18#define _ChFiDS_FilSpine_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <TColgp_SequenceOfXY.hxx>
24#include <Law_Laws.hxx>
25#include <ChFiDS_Spine.hxx>
26#include <Standard_Real.hxx>
27#include <Standard_Boolean.hxx>
28#include <Standard_Integer.hxx>
29class TopoDS_Edge;
30class TopoDS_Vertex;
31class gp_XY;
32class Law_Function;
33class Law_Composite;
34class ChFiDS_HElSpine;
35
36
37class ChFiDS_FilSpine;
38DEFINE_STANDARD_HANDLE(ChFiDS_FilSpine, ChFiDS_Spine)
39
40//! Provides data specific to the fillets -
41//! vector or rule of evolution (C2).
42class ChFiDS_FilSpine : public ChFiDS_Spine
43{
44
45public:
46
47
48 Standard_EXPORT ChFiDS_FilSpine();
49
50 Standard_EXPORT ChFiDS_FilSpine(const Standard_Real Tol);
51
52 Standard_EXPORT virtual void Reset (const Standard_Boolean AllData = Standard_False) Standard_OVERRIDE;
53
54 //! initializes the constant vector on edge E.
55 Standard_EXPORT void SetRadius (const Standard_Real Radius, const TopoDS_Edge& E);
56
57 //! resets the constant vector on edge E.
58 Standard_EXPORT void UnSetRadius (const TopoDS_Edge& E);
59
60 //! initializes the vector on Vertex V.
61 Standard_EXPORT void SetRadius (const Standard_Real Radius, const TopoDS_Vertex& V);
62
63 //! resets the vector on Vertex V.
64 Standard_EXPORT void UnSetRadius (const TopoDS_Vertex& V);
65
66 //! initializes the vector on the point of parameter W.
67 Standard_EXPORT void SetRadius (const gp_XY& UandR, const Standard_Integer IinC);
68
69 //! initializes the constant vector on all spine.
70 Standard_EXPORT void SetRadius (const Standard_Real Radius);
71
72 //! initializes the rule of evolution on all spine.
73 Standard_EXPORT void SetRadius (const Handle(Law_Function)& C, const Standard_Integer IinC);
74
75 //! returns true if the radius is constant
76 //! all along the spine.
77 Standard_EXPORT Standard_Boolean IsConstant() const;
78
79 //! returns true if the radius is constant
80 //! all along the edge E.
81 Standard_EXPORT Standard_Boolean IsConstant (const Standard_Integer IE) const;
82
83 //! returns the radius if the fillet is constant
84 //! all along the spine.
85 Standard_EXPORT Standard_Real Radius() const;
86
87 //! returns the radius if the fillet is constant
88 //! all along the edge E.
89 Standard_EXPORT Standard_Real Radius (const Standard_Integer IE) const;
90
91 //! returns the radius if the fillet is constant
92 //! all along the edge E.
93 Standard_EXPORT Standard_Real Radius (const TopoDS_Edge& E) const;
94
95 Standard_EXPORT virtual void AppendElSpine (const Handle(ChFiDS_HElSpine)& Els) Standard_OVERRIDE;
96
97 Standard_EXPORT Handle(Law_Composite) Law (const Handle(ChFiDS_HElSpine)& Els) const;
98
99 //! returns the elementary law
100 Standard_EXPORT Handle(Law_Function)& ChangeLaw (const TopoDS_Edge& E);
101
102 //! returns the maximum radius if the fillet is non-constant
103 Standard_EXPORT Standard_Real MaxRadFromSeqAndLaws() const;
104
105
106
107
108 DEFINE_STANDARD_RTTI(ChFiDS_FilSpine,ChFiDS_Spine)
109
110protected:
111
112
113
114
115private:
116
117
118 Standard_EXPORT Handle(Law_Composite) ComputeLaw (const Handle(ChFiDS_HElSpine)& Els);
119
120 Standard_EXPORT void AppendLaw (const Handle(ChFiDS_HElSpine)& Els);
121
122 TColgp_SequenceOfXY parandrad;
123 Law_Laws laws;
124
125
126};
127
128
129
130
131
132
133
134#endif // _ChFiDS_FilSpine_HeaderFile