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 #include <ChFiDS_ChamfSpine.ixx>
18 #include <TColStd_HArray1OfBoolean.hxx>
20 //=======================================================================
21 //function : ChFiDS_ChamfSpine
23 //=======================================================================
25 ChFiDS_ChamfSpine::ChFiDS_ChamfSpine(){}
27 ChFiDS_ChamfSpine::ChFiDS_ChamfSpine(const Standard_Real Tol):
32 //=======================================================================
35 //=======================================================================
37 void ChFiDS_ChamfSpine::GetDist(Standard_Real& Dis) const
39 if (mChamf != ChFiDS_Sym) Standard_Failure::Raise("Chamfer is not symetric");
43 //=======================================================================
46 //=======================================================================
48 void ChFiDS_ChamfSpine::SetDist(const Standard_Real Dis)
50 //isconstant->Init(Standard_True);
58 //=======================================================================
61 //=======================================================================
63 void ChFiDS_ChamfSpine::Dists(Standard_Real& Dis1,
64 Standard_Real& Dis2)const
66 if (mChamf != ChFiDS_TwoDist) Standard_Failure::Raise("Chamfer is not a Two Dists Chamfer");
71 //=======================================================================
74 //=======================================================================
76 void ChFiDS_ChamfSpine::SetDists(const Standard_Real Dis1,
77 const Standard_Real Dis2)
79 //isconstant->Init(Standard_True);
80 mChamf = ChFiDS_TwoDist;
86 //=======================================================================
87 //function : GetDistAngle
89 //=======================================================================
91 void ChFiDS_ChamfSpine::GetDistAngle(Standard_Real& Dis,
93 Standard_Boolean& DisOnF1)const
95 if (mChamf != ChFiDS_DistAngle) Standard_Failure::Raise("Chamfer is not a Two Dists Chamfer");
101 //=======================================================================
102 //function : SetDistAngle
104 //=======================================================================
106 void ChFiDS_ChamfSpine::SetDistAngle(const Standard_Real Dis,
107 const Standard_Real Angle,
108 const Standard_Boolean DisOnF1)
110 //isconstant->Init(Standard_True);
111 mChamf = ChFiDS_DistAngle;
118 //=======================================================================
119 //function : IsChamfer
121 //=======================================================================
123 ChFiDS_ChamfMethod ChFiDS_ChamfSpine::IsChamfer() const