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 ChFiDS_ChamfSpine::ChFiDS_ChamfSpine(const Standard_Real Tol):
35 //=======================================================================
38 //=======================================================================
40 void ChFiDS_ChamfSpine::GetDist(Standard_Real& Dis) const
42 if (mChamf != ChFiDS_Sym) Standard_Failure::Raise("Chamfer is not symetric");
46 //=======================================================================
49 //=======================================================================
51 void ChFiDS_ChamfSpine::SetDist(const Standard_Real Dis)
53 //isconstant->Init(Standard_True);
61 //=======================================================================
64 //=======================================================================
66 void ChFiDS_ChamfSpine::Dists(Standard_Real& Dis1,
67 Standard_Real& Dis2)const
69 if (mChamf != ChFiDS_TwoDist) Standard_Failure::Raise("Chamfer is not a Two Dists Chamfer");
74 //=======================================================================
77 //=======================================================================
79 void ChFiDS_ChamfSpine::SetDists(const Standard_Real Dis1,
80 const Standard_Real Dis2)
82 //isconstant->Init(Standard_True);
83 mChamf = ChFiDS_TwoDist;
89 //=======================================================================
90 //function : GetDistAngle
92 //=======================================================================
94 void ChFiDS_ChamfSpine::GetDistAngle(Standard_Real& Dis,
96 Standard_Boolean& DisOnF1)const
98 if (mChamf != ChFiDS_DistAngle) Standard_Failure::Raise("Chamfer is not a Two Dists Chamfer");
104 //=======================================================================
105 //function : SetDistAngle
107 //=======================================================================
109 void ChFiDS_ChamfSpine::SetDistAngle(const Standard_Real Dis,
110 const Standard_Real Angle,
111 const Standard_Boolean DisOnF1)
113 //isconstant->Init(Standard_True);
114 mChamf = ChFiDS_DistAngle;
121 //=======================================================================
122 //function : IsChamfer
124 //=======================================================================
126 ChFiDS_ChamfMethod ChFiDS_ChamfSpine::IsChamfer() const