blob: e7660ee9f0bbb2640f3afc63060c7fc2c94ccdc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
// File: LocalAnalysis.cxx
// Created: Mon Sep 9 15:01:49 1996
// Author: Herve LOUESSARD
// <hl1@sgi38>
#include<LocalAnalysis.ixx>
#include<LocalAnalysis_SurfaceContinuity.hxx>
#include<LocalAnalysis_CurveContinuity.hxx>
/*********************************************************************************/
/*********************************************************************************/
void LocalAnalysis::Dump(const LocalAnalysis_SurfaceContinuity& surfconti, Standard_OStream& o)
{ if (!surfconti.IsDone())
{ o<<"Problem in the computation "<<endl;
if (surfconti.StatusError()==LocalAnalysis_NullFirstDerivative)
o<<"one of the first derivatives is null" <<endl;
else if(surfconti.StatusError()==LocalAnalysis_NullSecondDerivative)
o<<"one of the second derivatives is null" <<endl;
else if(surfconti.StatusError()==LocalAnalysis_NormalNotDefined)
o<<"one (or both) normal is undefined" <<endl;
else if(surfconti.StatusError()==LocalAnalysis_CurvatureNotDefined)
o<<"one of the mean curvatures is undefined" <<endl; }
else
switch(surfconti.ContinuityStatus())
{ case GeomAbs_C0 :{ if (surfconti.IsC0() )
o<<" Continuity Status : C0 " <<endl;
else o<<" Continuity Status : No C0 "<<endl;
o<<" C0Value = "<<surfconti.C0Value() <<endl;
} break;
case GeomAbs_C1 :{ if (surfconti.IsC1())
o<<" Continuity Status : C1 " <<endl;
else
{if (surfconti.IsC0() )
o<<" Continuity Status : C0 " <<endl;
else o<<" Continuity Status : NoC0 "<<endl;
}
o<<" C0Value = "<<surfconti.C0Value()<<endl;
o<<" C1UAngle = "<<surfconti.C1UAngle()<<endl;
o<<" C1URatio = "<<surfconti.C1URatio()<<endl;
o<<" C1VAngle = "<<surfconti.C1VAngle()<<endl;
o<<" C1VRatio = "<<surfconti.C1VRatio()<<endl;
} break;
case GeomAbs_C2 :{ if (surfconti.IsC2())
o<<" Continuity Status : C2 " <<endl;
else
{if (surfconti.IsC1() )
o<<" Continuity Status : C1 " <<endl;
else
{ if (surfconti.IsC0() )
o<<" Continuity Status : C0 " <<endl;
else o<<" Continuity Status : NoC0 "<<endl;}
}
o<<" C0Value = "<<surfconti.C0Value()<<endl;
o<<" C1UAngle = "<<surfconti.C1UAngle()<<endl;
o<<" C1VAngle = "<<surfconti.C1VAngle()<<endl;
o<<" C2UAngle = "<<surfconti.C2UAngle()<<endl;
o<<" C2VAngle = "<<surfconti.C2VAngle()<<endl;
o<<" C1URatio = "<<surfconti.C1URatio()<<endl;
o<<" C1VRatio = "<<surfconti.C1VRatio()<<endl;
o<<" C2URatio = "<<surfconti.C2URatio()<<endl;
o<<" C2VRatio = "<<surfconti.C2VRatio()<<endl;
} break;
case GeomAbs_G1 :{ if (surfconti.IsG1())
o<<" Continuity Status : G1 " <<endl;
else
{if (surfconti.IsC0() )
o<<" Continuity Status : G0 " <<endl;
else o<<" Continuity Status : NoG0 "<<endl;
}
o<<" G0Value = "<<surfconti.C0Value()<<endl;
o<<" G1Angle = "<<surfconti.G1Angle()<<endl<<endl;
} break;
case GeomAbs_G2 :{ if (surfconti.IsG2())
o<<" Continuity Status : G2 " <<endl;
else
{if (surfconti.IsG1() )
o<<" Continuity Status : G1 " <<endl;
else
{ if (surfconti.IsC0() )
o<<" Continuity Status : G0 " <<endl;
else o<<" Continuity Status : NoG0 "<<endl;}
}
o<<" G0Value = "<<surfconti.C0Value()<<endl;
o<<" G1Value = "<<surfconti.G1Angle()<<endl;
o<<" G2CurvatureGap = "<<surfconti.G2CurvatureGap()<<endl;
} break;
default : {}
}
}
/*********************************************************************************/
void LocalAnalysis::Dump(const LocalAnalysis_CurveContinuity& curvconti, Standard_OStream& o)
{ if (!curvconti.IsDone())
{ o<<"Problem in the computation "<<endl;
if (curvconti.StatusError()==LocalAnalysis_NullFirstDerivative)
o<<"one (or both) first derivative is null" <<endl;
else if(curvconti.StatusError()==LocalAnalysis_NullSecondDerivative)
o<<"one (or both) second derivative is null" <<endl;
else if(curvconti.StatusError()==LocalAnalysis_TangentNotDefined)
o<<"one (or both) tangent is undefined " <<endl;
else if(curvconti.StatusError()==LocalAnalysis_NormalNotDefined)
o<<"one (or both) normal is undefined" <<endl;}
else
switch(curvconti.ContinuityStatus())
{ case GeomAbs_C0 :{ if (curvconti.IsC0() )
o<<" Continuity Status : C0 " <<endl;
else o<<" Continuity Status : No C0 "<<endl;
o<<" C0Value = "<<curvconti.C0Value() <<endl;
} break;
case GeomAbs_C1 :{ if (curvconti.IsC1())
o<<" Continuity Status : C1 " <<endl;
else
{if (curvconti.IsC0() )
o<<" Continuity Status : C0 " <<endl;
else o<<" Continuity Status : NoC0 "<<endl;
}
o<<" C0Value = "<<curvconti.C0Value()<<endl;
o<<" C1Angle = "<<curvconti.C1Angle()<<endl;
o<<" C1Ratio = "<<curvconti.C1Ratio()<<endl;
} break;
case GeomAbs_C2 :{ if (curvconti.IsC2())
o<<" Continuity Status : C2 " <<endl;
else
{if (curvconti.IsC1() )
o<<" Continuity Status : C1 " <<endl;
else
{ if (curvconti.IsC0() )
o<<" Continuity Status : C0 " <<endl;
else o<<" Continuity Status : NoC0 "<<endl;}
}
o<<" C0Value = "<<curvconti.C0Value()<<endl;
o<<" C1Angle = "<<curvconti.C1Angle()<<endl;
o<<" C2Angle = "<<curvconti.C2Angle()<<endl;
o<<" C1Ratio = "<<curvconti.C1Ratio()<<endl;
o<<" C2Ratio = "<<curvconti.C2Ratio()<<endl;
}break;
case GeomAbs_G1 :{ if (curvconti.IsG1())
o<<" Continuity Status : G1 " <<endl;
else
{if (curvconti.IsC0() )
o<<" Continuity Status : G0 " <<endl;
else o<<" Continuity Status : NoG0 "<<endl;
}
o<<" G0Value = "<<curvconti.C0Value()<<endl;
o<<" G1Angle = "<<curvconti.G1Angle()<<endl;
} break;
case GeomAbs_G2 :{ if (curvconti.IsG2())
o<<" Continuity Status : G2 " <<endl;
else
{if (curvconti.IsG1() )
o<<" Continuity Status : G1 " <<endl;
else
{ if (curvconti.IsC0() )
o<<" Continuity Status : G0 " <<endl;
else o<<" Continuity Status : NoG0 "<<endl;}
}
o<<" G0Value = "<<curvconti.C0Value()<<endl;
o<<" G1Angle = "<<curvconti.G1Angle()<<endl;
o<<" G2Angle = "<<curvconti.G2Angle()<<endl;
o<<" Relative curvature variation = "<<curvconti.G2CurvatureVariation()<<endl;
} break;
default : {}
}
}
/*********************************************************************************/
/*********************************************************************************/
|