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.
18 #include <ChFiDS_ChamfSpine.hxx>
19 #include <Standard_Type.hxx>
20 #include <TColStd_HArray1OfBoolean.hxx>
22 IMPLEMENT_STANDARD_RTTIEXT(ChFiDS_ChamfSpine,ChFiDS_Spine)
24 //=======================================================================
25 //function : ChFiDS_ChamfSpine
27 //=======================================================================
28 ChFiDS_ChamfSpine::ChFiDS_ChamfSpine()
30 myMode = ChFiDS_ClassicChamfer;
33 ChFiDS_ChamfSpine::ChFiDS_ChamfSpine(const Standard_Real Tol):
36 myMode = ChFiDS_ClassicChamfer;
39 //=======================================================================
42 //=======================================================================
44 void ChFiDS_ChamfSpine::GetDist(Standard_Real& Dis) const
46 if (mChamf != ChFiDS_Sym) throw Standard_Failure("Chamfer is not symetric");
50 //=======================================================================
53 //=======================================================================
55 void ChFiDS_ChamfSpine::SetDist(const Standard_Real Dis)
57 //isconstant->Init(Standard_True);
65 //=======================================================================
68 //=======================================================================
70 void ChFiDS_ChamfSpine::Dists(Standard_Real& Dis1,
71 Standard_Real& Dis2)const
73 if (mChamf != ChFiDS_TwoDist) throw Standard_Failure("Chamfer is not a Two Dists Chamfer");
78 //=======================================================================
81 //=======================================================================
83 void ChFiDS_ChamfSpine::SetDists(const Standard_Real Dis1,
84 const Standard_Real Dis2)
86 //isconstant->Init(Standard_True);
87 mChamf = ChFiDS_TwoDist;
93 //=======================================================================
94 //function : GetDistAngle
96 //=======================================================================
98 void ChFiDS_ChamfSpine::GetDistAngle(Standard_Real& Dis,
99 Standard_Real& Angle) const
100 //Standard_Boolean& DisOnF1)const
102 if (mChamf != ChFiDS_DistAngle)
103 throw Standard_Failure("Chamfer is not a Two Dists Chamfer");
109 //=======================================================================
110 //function : SetDistAngle
112 //=======================================================================
114 void ChFiDS_ChamfSpine::SetDistAngle(const Standard_Real Dis,
115 const Standard_Real Angle)
116 //const Standard_Boolean DisOnF1)
118 //isconstant->Init(Standard_True);
119 mChamf = ChFiDS_DistAngle;
125 //=======================================================================
128 //=======================================================================
130 void ChFiDS_ChamfSpine::SetMode(const ChFiDS_ChamfMode theMode)
135 //=======================================================================
136 //function : IsChamfer
138 //=======================================================================
140 ChFiDS_ChamfMethod ChFiDS_ChamfSpine::IsChamfer() const