Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:16:49

0001 // Created on: 1995-04-24
0002 // Created by: Modelistation
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _ChFiDS_FilSpine_HeaderFile
0018 #define _ChFiDS_FilSpine_HeaderFile
0019 
0020 #include <ChFiDS_Spine.hxx>
0021 #include <ChFiDS_ElSpine.hxx>
0022 #include <Law_Function.hxx>
0023 #include <NCollection_List.hxx>
0024 #include <gp_XY.hxx>
0025 #include <NCollection_Sequence.hxx>
0026 
0027 class TopoDS_Edge;
0028 class TopoDS_Vertex;
0029 class gp_XY;
0030 class Law_Function;
0031 class Law_Composite;
0032 
0033 //! Provides data specific to the fillets -
0034 //! vector or rule of evolution (C2).
0035 class ChFiDS_FilSpine : public ChFiDS_Spine
0036 {
0037 
0038 public:
0039   Standard_EXPORT ChFiDS_FilSpine();
0040 
0041   Standard_EXPORT ChFiDS_FilSpine(const double Tol);
0042 
0043   Standard_EXPORT void Reset(const bool AllData = false) override;
0044 
0045   //! initializes the constant vector on edge E.
0046   Standard_EXPORT void SetRadius(const double Radius, const TopoDS_Edge& E);
0047 
0048   //! resets the constant vector on edge E.
0049   Standard_EXPORT void UnSetRadius(const TopoDS_Edge& E);
0050 
0051   //! initializes the vector on Vertex V.
0052   Standard_EXPORT void SetRadius(const double Radius, const TopoDS_Vertex& V);
0053 
0054   //! resets the vector on Vertex V.
0055   Standard_EXPORT void UnSetRadius(const TopoDS_Vertex& V);
0056 
0057   //! initializes the vector on the point of parameter W.
0058   Standard_EXPORT void SetRadius(const gp_XY& UandR, const int IinC);
0059 
0060   //! initializes the constant vector on all spine.
0061   Standard_EXPORT void SetRadius(const double Radius);
0062 
0063   //! initializes the rule of evolution on all spine.
0064   Standard_EXPORT void SetRadius(const occ::handle<Law_Function>& C, const int IinC);
0065 
0066   //! returns true if the radius is constant
0067   //! all along the spine.
0068   Standard_EXPORT bool IsConstant() const;
0069 
0070   //! returns true if the radius is constant
0071   //! all along the edge E.
0072   Standard_EXPORT bool IsConstant(const int IE) const;
0073 
0074   //! returns the radius if the fillet is constant
0075   //! all along the spine.
0076   Standard_EXPORT double Radius() const;
0077 
0078   //! returns the radius if the fillet is constant
0079   //! all along the edge E.
0080   Standard_EXPORT double Radius(const int IE) const;
0081 
0082   //! returns the radius if the fillet is constant
0083   //! all along the edge E.
0084   Standard_EXPORT double Radius(const TopoDS_Edge& E) const;
0085 
0086   Standard_EXPORT void AppendElSpine(const occ::handle<ChFiDS_ElSpine>& Els) override;
0087 
0088   Standard_EXPORT occ::handle<Law_Composite> Law(const occ::handle<ChFiDS_ElSpine>& Els) const;
0089 
0090   //! returns the elementary law
0091   Standard_EXPORT occ::handle<Law_Function>& ChangeLaw(const TopoDS_Edge& E);
0092 
0093   //! returns the maximum radius if the fillet is non-constant
0094   Standard_EXPORT double MaxRadFromSeqAndLaws() const;
0095 
0096   DEFINE_STANDARD_RTTIEXT(ChFiDS_FilSpine, ChFiDS_Spine)
0097 
0098 private:
0099   Standard_EXPORT occ::handle<Law_Composite> ComputeLaw(const occ::handle<ChFiDS_ElSpine>& Els);
0100 
0101   Standard_EXPORT void AppendLaw(const occ::handle<ChFiDS_ElSpine>& Els);
0102 
0103   NCollection_Sequence<gp_XY>                 parandrad;
0104   NCollection_List<occ::handle<Law_Function>> laws;
0105 };
0106 
0107 #endif // _ChFiDS_FilSpine_HeaderFile