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
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 _ChFiDS_FilSpine_HeaderFile
18 #define _ChFiDS_FilSpine_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
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>
34 class ChFiDS_HElSpine;
37 class ChFiDS_FilSpine;
38 DEFINE_STANDARD_HANDLE(ChFiDS_FilSpine, ChFiDS_Spine)
40 //! Provides data specific to the fillets -
41 //! vector or rule of evolution (C2).
42 class ChFiDS_FilSpine : public ChFiDS_Spine
48 Standard_EXPORT ChFiDS_FilSpine();
50 Standard_EXPORT ChFiDS_FilSpine(const Standard_Real Tol);
52 Standard_EXPORT virtual void Reset (const Standard_Boolean AllData = Standard_False) Standard_OVERRIDE;
54 //! initializes the constant vector on edge E.
55 Standard_EXPORT void SetRadius (const Standard_Real Radius, const TopoDS_Edge& E);
57 //! resets the constant vector on edge E.
58 Standard_EXPORT void UnSetRadius (const TopoDS_Edge& E);
60 //! initializes the vector on Vertex V.
61 Standard_EXPORT void SetRadius (const Standard_Real Radius, const TopoDS_Vertex& V);
63 //! resets the vector on Vertex V.
64 Standard_EXPORT void UnSetRadius (const TopoDS_Vertex& V);
66 //! initializes the vector on the point of parameter W.
67 Standard_EXPORT void SetRadius (const gp_XY& UandR, const Standard_Integer IinC);
69 //! initializes the constant vector on all spine.
70 Standard_EXPORT void SetRadius (const Standard_Real Radius);
72 //! initializes the rule of evolution on all spine.
73 Standard_EXPORT void SetRadius (const Handle(Law_Function)& C, const Standard_Integer IinC);
75 //! returns true if the radius is constant
76 //! all along the spine.
77 Standard_EXPORT Standard_Boolean IsConstant() const;
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;
83 //! returns the radius if the fillet is constant
84 //! all along the spine.
85 Standard_EXPORT Standard_Real Radius() const;
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;
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;
95 Standard_EXPORT virtual void AppendElSpine (const Handle(ChFiDS_HElSpine)& Els) Standard_OVERRIDE;
97 Standard_EXPORT Handle(Law_Composite) Law (const Handle(ChFiDS_HElSpine)& Els) const;
99 //! returns the elementary law
100 Standard_EXPORT Handle(Law_Function)& ChangeLaw (const TopoDS_Edge& E);
102 //! returns the maximum radius if the fillet is non-constant
103 Standard_EXPORT Standard_Real MaxRadFromSeqAndLaws() const;
108 DEFINE_STANDARD_RTTI(ChFiDS_FilSpine,ChFiDS_Spine)
118 Standard_EXPORT Handle(Law_Composite) ComputeLaw (const Handle(ChFiDS_HElSpine)& Els);
120 Standard_EXPORT void AppendLaw (const Handle(ChFiDS_HElSpine)& Els);
122 TColgp_SequenceOfXY parandrad;
134 #endif // _ChFiDS_FilSpine_HeaderFile