0025418: Debug output to be limited to OCC development environment
[occt.git] / src / ChFiDS / ChFiDS_ChamfSpine.cxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <ChFiDS_ChamfSpine.ixx>
18 #include <TColStd_HArray1OfBoolean.hxx>
19
20 //=======================================================================
21 //function : ChFiDS_ChamfSpine
22 //purpose  : 
23 //=======================================================================
24
25 ChFiDS_ChamfSpine::ChFiDS_ChamfSpine(){}
26
27 ChFiDS_ChamfSpine::ChFiDS_ChamfSpine(const Standard_Real Tol):
28 ChFiDS_Spine(Tol)
29 {}
30
31
32 //=======================================================================
33 //function : GetDist
34 //purpose  : 
35 //=======================================================================
36
37 void ChFiDS_ChamfSpine::GetDist(Standard_Real& Dis) const
38 {
39   if (mChamf != ChFiDS_Sym)   Standard_Failure::Raise("Chamfer is not symetric");
40   Dis = d1;
41 }
42
43 //=======================================================================
44 //function : SetDist
45 //purpose  : 
46 //=======================================================================
47
48 void ChFiDS_ChamfSpine::SetDist(const Standard_Real Dis)
49 {
50   //isconstant->Init(Standard_True);
51   mChamf = ChFiDS_Sym;  
52   d1     = Dis;
53 }
54
55
56
57
58 //=======================================================================
59 //function : Dists
60 //purpose  : 
61 //=======================================================================
62
63 void ChFiDS_ChamfSpine::Dists(Standard_Real& Dis1,
64                               Standard_Real& Dis2)const
65 {
66   if (mChamf != ChFiDS_TwoDist)  Standard_Failure::Raise("Chamfer is not a Two Dists Chamfer");
67   Dis1 = d1;
68   Dis2 = d2;
69 }
70
71 //=======================================================================
72 //function : SetDists
73 //purpose  : 
74 //=======================================================================
75
76 void ChFiDS_ChamfSpine::SetDists(const Standard_Real Dis1,
77                                  const Standard_Real Dis2)
78 {
79   //isconstant->Init(Standard_True);
80   mChamf = ChFiDS_TwoDist;
81   d1     = Dis1;
82   d2     = Dis2;
83 }
84
85
86 //=======================================================================
87 //function : GetDistAngle
88 //purpose  : 
89 //=======================================================================
90
91 void ChFiDS_ChamfSpine::GetDistAngle(Standard_Real& Dis,
92                                      Standard_Real& Angle,
93                                      Standard_Boolean& DisOnF1)const
94 {
95   if (mChamf != ChFiDS_DistAngle)  Standard_Failure::Raise("Chamfer is not a Two Dists Chamfer");
96   Dis     = d1;
97   Angle   = angle;
98   DisOnF1 = dison1;
99 }
100
101 //=======================================================================
102 //function : SetDistAngle
103 //purpose  : 
104 //=======================================================================
105
106 void ChFiDS_ChamfSpine::SetDistAngle(const Standard_Real Dis,
107                                      const Standard_Real Angle,
108                                      const Standard_Boolean DisOnF1)
109 {
110   //isconstant->Init(Standard_True);
111   mChamf = ChFiDS_DistAngle;
112   d1     = Dis;
113   angle  = Angle;
114   dison1 = DisOnF1;
115 }
116
117
118 //=======================================================================
119 //function : IsChamfer
120 //purpose  : 
121 //=======================================================================
122
123 ChFiDS_ChamfMethod  ChFiDS_ChamfSpine::IsChamfer() const
124 {
125
126   return mChamf;
127 }
128
129
130