0030869: Modeling Data - BRepAdaptor_CompCurve incorrectly evaluates the boundary...
[occt.git] / src / QABugs / QABugs_20.cxx
CommitLineData
4e14c88f 1// Created on: 2015-10-26
2// Created by: Nikolai BUKHALOV
3// Copyright (c) 2002-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#include <QABugs.hxx>
17
18#include <gp_Ax2.hxx>
e5260e1d 19#include <Extrema_GenLocateExtPS.hxx>
4e14c88f 20#include <Geom_Circle.hxx>
21#include <Geom_SurfaceOfLinearExtrusion.hxx>
4db4247a 22#include <NCollection_List.hxx>
4e14c88f 23#include <TColgp_Array2OfPnt.hxx>
24#include <TColStd_Array2OfReal.hxx>
25#include <TColStd_Array1OfReal.hxx>
26#include <TColStd_Array1OfInteger.hxx>
2a9be0e2 27#include <Geom_BezierCurve.hxx>
4e14c88f 28#include <Geom_BSplineSurface.hxx>
2a9be0e2 29#include <GeomConvert.hxx>
02fd709b 30#include <Geom2d_Curve.hxx>
31#include <Geom2d_Line.hxx>
2a9be0e2 32#include <GeomFill_BSplineCurves.hxx>
02fd709b 33#include <Draw.hxx>
4e14c88f 34#include <DrawTrSurf.hxx>
02fd709b 35#include <ShapeConstruct_ProjectCurveOnSurface.hxx>
4e14c88f 36
8447359f 37#include <TopExp.hxx>
38#include <TopoDS_Vertex.hxx>
39#include <BRep_Tool.hxx>
40#include <TopoDS_Edge.hxx>
41#include <BRep_Builder.hxx>
42#include <BRepTools.hxx>
e5260e1d 43#include <BRepAdaptor_Surface.hxx>
8447359f 44#include <TopoDS.hxx>
45#include <DBRep.hxx>
46
b0cef606 47#include <BRepGProp.hxx>
48#include <DDocStd.hxx>
49#include <GProp_GProps.hxx>
50#include <TDocStd_Document.hxx>
51#include <XCAFDimTolObjects_DatumObject.hxx>
52#include <XCAFDimTolObjects_DimensionObject.hxx>
53#include <XCAFDimTolObjects_GeomToleranceObject.hxx>
54#include <XCAFDoc_Datum.hxx>
55#include <XCAFDoc_Dimension.hxx>
56#include <XCAFDoc_DimTolTool.hxx>
57#include <XCAFDoc_DocumentTool.hxx>
58#include <XCAFDoc_GeomTolerance.hxx>
59#include <XCAFDoc_ShapeTool.hxx>
5ae6e53d 60
61#include <HLRAppli_ReflectLines.hxx>
1fae7cda 62#include <HLRBRep_PolyHLRToShape.hxx>
63#include <HLRBRep_PolyAlgo.hxx>
5ae6e53d 64
d9d3107d 65#include <Standard_Failure.hxx>
66
1f26f80b 67#include <Bnd_OBB.hxx>
68#include <BRepBndLib.hxx>
69#include <OSD_Timer.hxx>
70
a5460e9d 71#include <limits>
72
4e14c88f 73//=======================================================================
74//function : SurfaceGenOCC26675_1
75//purpose : Generates a surface for intersect (in corresponding
76// test case). If we save these surfaces to the disk
77// then bug will not be reproduced. Therefore, this generator
78// is very important (despite its taking many lines of the code).
79//=======================================================================
80static Standard_Integer SurfaceGenOCC26675_1( Draw_Interpretor& theDI,
81 Standard_Integer theNArg,
82 const char ** theArgVal)
83{
84
85 if(theNArg < 2)
86 {
87 theDI << "Use OCC26675_1 result\n";
88 return 1;
89 }
90
91 const gp_Pnt aCircCenter(-112.93397037070100000000, +177.52792379072199000000, +10.63374076104853900000);
92 const gp_Dir aCircN(+0.00000000000000000000, +1.00000000000000000000, +0.00000000000000000000);
93 const gp_Dir aCircX(+0.00000000000000000000, -0.00000000000000000000, +1.00000000000000000000);
94 const gp_Dir anExtrDir(-500.00000000000000000000, -866.02540378443609000000, +0.00000000000000000000);
95 const gp_Ax2 aCircAxes(aCircCenter, aCircN, aCircX);
96 const Handle(Geom_Curve) aCurv = new Geom_Circle(aCircAxes, +50.00000000000000000000);
97
98 const Handle(Geom_Surface) aS2 = new Geom_SurfaceOfLinearExtrusion(aCurv, anExtrDir);
99
100 TColgp_Array2OfPnt aPoles(1, 7, 1, 81);
101 TColStd_Array2OfReal aWeights(1, 7, 1, 81);
102 TColStd_Array1OfReal aUKnots(1, 2), aVKnots(1, 12);
103 TColStd_Array1OfInteger aUMult(1, 2), aVMult(1, 12);
104 const Standard_Integer aUDegree = 6, aVDegree = 8;
105
106 aUKnots(1) = +0.00000000000000000000;
107 aUKnots(2) = +1.00000000000000000000;
108 aVKnots(1) = +0.08911853946147080300;
109 aVKnots(2) = +0.11779167587451674000;
110 aVKnots(3) = +0.14583467562325506000;
111 aVKnots(4) = +0.20255081178503931000;
112 aVKnots(5) = +0.25926694794682359000;
113 aVKnots(6) = +0.31598308410860781000;
114 aVKnots(7) = +0.34262437462234741000;
115 aVKnots(8) = +0.37067364397889985000;
116 aVKnots(9) = +0.39731552779654306000;
117 aVKnots(10) = +0.42536420384919182000;
118 aVKnots(11) = +0.45200329235672548000;
119 aVKnots(12) = +0.47802918742799144000;
120
121 aUMult(1) = 7;
122 aUMult(2) = 7;
123 aVMult(1) = 9;
124 aVMult(2) = 7;
125 aVMult(3) = 7;
126 aVMult(4) = 7;
127 aVMult(5) = 7;
128 aVMult(6) = 7;
129 aVMult(7) = 7;
130 aVMult(8) = 7;
131 aVMult(9) = 7;
132 aVMult(10) = 8;
133 aVMult(11) = 8;
134 aVMult(12) = 9;
135
136 ////
137 {
138 aWeights.ChangeValue(1, 1) = +1.02986327036737910000;
139 aPoles.ChangeValue(1, 1) = gp_Pnt(+131.75315905495660000000, +2.88570510351864900000, -66.24709307590461500000);
140 aWeights.ChangeValue(1, 2) = +1.02989244478761060000;
141 aPoles.ChangeValue(1, 2) = gp_Pnt(+128.70876344053133000000, +2.88791208181246970000, -67.92914281439198000000);
142 aWeights.ChangeValue(1, 3) = +1.02991676091113950000;
143 aPoles.ChangeValue(1, 3) = gp_Pnt(+125.64133203841195000000, +2.88975018186799830000, -69.56968825975690200000);
144 aWeights.ChangeValue(1, 4) = +1.02993613450133650000;
145 aPoles.ChangeValue(1, 4) = gp_Pnt(+122.55164101294532000000, +2.89121448973680460000, -71.16831921321855200000);
146 aWeights.ChangeValue(1, 5) = +1.02995970896170810000;
147 aPoles.ChangeValue(1, 5) = gp_Pnt(+119.44028474076808000000, +2.89299532863950050000, -72.72471137484106400000);
148 aWeights.ChangeValue(1, 6) = +1.02998196300928410000;
149 aPoles.ChangeValue(1, 6) = gp_Pnt(+116.30796917345266000000, +2.89467567823625730000, -74.23853925439507900000);
150 aWeights.ChangeValue(1, 7) = +1.02999781361772440000;
151 aPoles.ChangeValue(1, 7) = gp_Pnt(+113.15537818476763000000, +2.89587201010380560000, -75.70949847615843000000);
152 aWeights.ChangeValue(1, 8) = +1.03001626830283270000;
153 aPoles.ChangeValue(1, 8) = gp_Pnt(+109.98323502828077000000, +2.89726468512897210000, -77.13723994508107800000);
154 aWeights.ChangeValue(1, 9) = +1.03004822145815230000;
155 aPoles.ChangeValue(1, 9) = gp_Pnt(+103.60126699909762000000, +2.89967510685080440000, -79.90571269046952800000);
156 aWeights.ChangeValue(1, 10) = +1.03006364818936770000;
157 aPoles.ChangeValue(1, 10) = gp_Pnt(+100.39144092265354000000, +2.90083845616186050000, -81.24644132200651800000);
158 aWeights.ChangeValue(1, 11) = +1.03007725635592000000;
159 aPoles.ChangeValue(1, 11) = gp_Pnt(+97.16342330855667300000, +2.90186436688425700000, -82.54338871675531700000);
160 aWeights.ChangeValue(1, 12) = +1.03009045031501500000;
161 aPoles.ChangeValue(1, 12) = gp_Pnt(+93.91790293022438600000, +2.90285879918974650000, -83.79626764915399000000);
162 aWeights.ChangeValue(1, 13) = +1.03010285398183930000;
163 aPoles.ChangeValue(1, 13) = gp_Pnt(+90.65560197798836800000, +2.90379346029782100000, -85.00479786905465600000);
164 aWeights.ChangeValue(1, 14) = +1.03011393120350900000;
165 aPoles.ChangeValue(1, 14) = gp_Pnt(+87.37722618415423900000, +2.90462796925060120000, -86.16871841453435400000);
166 aWeights.ChangeValue(1, 15) = +1.03012484065787050000;
167 aPoles.ChangeValue(1, 15) = gp_Pnt(+84.08346762829417300000, +2.90544970249433290000, -87.28777941880029800000);
168 aWeights.ChangeValue(1, 16) = +1.03015471267321200000;
169 aPoles.ChangeValue(1, 16) = gp_Pnt(+74.15848807058078800000, +2.90769927244280210000, -90.50962423575197100000);
170 aWeights.ChangeValue(1, 17) = +1.03017194800922400000;
171 aPoles.ChangeValue(1, 17) = gp_Pnt(+67.48342008926763900000, +2.90899668032978950000, -92.47701903504494700000);
172 aWeights.ChangeValue(1, 18) = +1.03018680682765670000;
173 aPoles.ChangeValue(1, 18) = gp_Pnt(+60.75515833606132100000, +2.91011480947056490000, -94.26204121664201800000);
174 aWeights.ChangeValue(1, 19) = +1.03019958109549670000;
175 aPoles.ChangeValue(1, 19) = gp_Pnt(+53.97928154760177200000, +2.91107580930771360000, -95.86305268935117900000);
176 aWeights.ChangeValue(1, 20) = +1.03021050389503350000;
177 aPoles.ChangeValue(1, 20) = gp_Pnt(+47.16164692132413400000, +2.91189735380426780000, -97.27865560180262600000);
178 aWeights.ChangeValue(1, 21) = +1.03021974942385830000;
179 aPoles.ChangeValue(1, 21) = gp_Pnt(+40.30838837608569500000, +2.91259264267907050000, -98.50769317562559000000);
180 aWeights.ChangeValue(1, 22) = +1.03022743299486370000;
181 aPoles.ChangeValue(1, 22) = gp_Pnt(+33.42591476110869300000, +2.91317040233699530000, -99.54925039136011800000);
182 aWeights.ChangeValue(1, 23) = +1.03023979631718900000;
183 aPoles.ChangeValue(1, 23) = gp_Pnt(+19.61576136171939000000, +2.91409991934468550000, -101.25602945077115000000);
184 aWeights.ChangeValue(1, 24) = +1.03024450452679140000;
185 aPoles.ChangeValue(1, 24) = gp_Pnt(+12.68754355991407800000, +2.91445385083459700000, -101.92122234436175000000);
186 aWeights.ChangeValue(1, 25) = +1.03024781840890120000;
187 aPoles.ChangeValue(1, 25) = gp_Pnt(+5.74236948737514120000, +2.91470294045230770000, -102.39751844510502000000);
188 aWeights.ChangeValue(1, 26) = +1.03024979501192000000;
189 aPoles.ChangeValue(1, 26) = gp_Pnt(-1.21367831605073050000, +2.91485150371151920000, -102.68442590550356000000);
190 aWeights.ChangeValue(1, 27) = +1.03025046568879790000;
191 aPoles.ChangeValue(1, 27) = gp_Pnt(-8.17455041611474620000, +2.91490191238154670000, -102.78167594353056000000);
192 aWeights.ChangeValue(1, 28) = +1.03024983609703540000;
193 aPoles.ChangeValue(1, 28) = gp_Pnt(-15.13423127055194300000, +2.91485459458572780000, -102.68922293042964000000);
194 aWeights.ChangeValue(1, 29) = +1.03024788619868260000;
195 aPoles.ChangeValue(1, 29) = gp_Pnt(-22.08674002008992700000, +2.91470803482494080000, -102.40724441194320000000);
196 aWeights.ChangeValue(1, 30) = +1.03024126030624540000;
197 aPoles.ChangeValue(1, 30) = gp_Pnt(-35.96556766132121700000, +2.91420996731856930000, -101.46503408514069000000);
198 aWeights.ChangeValue(1, 31) = +1.03023657011944230000;
199 aPoles.ChangeValue(1, 31) = gp_Pnt(-42.89191729472150200000, +2.91385737699769360000, -100.80479886745856000000);
200 aWeights.ChangeValue(1, 32) = +1.03023047292900880000;
201 aPoles.ChangeValue(1, 32) = gp_Pnt(-49.79923779841396900000, +2.91339898565004060000, -99.95583114848535900000);
202 aWeights.ChangeValue(1, 33) = +1.03022290017099550000;
203 aPoles.ChangeValue(1, 33) = gp_Pnt(-56.68161614207340900000, +2.91282960709223810000, -98.91875138839027700000);
204 aWeights.ChangeValue(1, 34) = +1.03021374148842180000;
205 aPoles.ChangeValue(1, 34) = gp_Pnt(-63.53316994906088400000, +2.91214088593828220000, -97.69440448679608800000);
206 aWeights.ChangeValue(1, 35) = +1.03020284473128080000;
207 aPoles.ChangeValue(1, 35) = gp_Pnt(-70.34804877511381000000, +2.91132129711663760000, -96.28385939245710300000);
208 aWeights.ChangeValue(1, 36) = +1.03019001595653580000;
209 aPoles.ChangeValue(1, 36) = gp_Pnt(-77.12043535415037400000, +2.91035614521427500000, -94.68840860671046800000);
210 aWeights.ChangeValue(1, 37) = +1.03016805964614980000;
211 aPoles.ChangeValue(1, 37) = gp_Pnt(-86.96652166958519100000, +2.90870378328618400000, -92.08365976972685000000);
212 aWeights.ChangeValue(1, 38) = +1.03016062145972500000;
213 aPoles.ChangeValue(1, 38) = gp_Pnt(-90.07809790629383400000, +2.90814392820824040000, -91.21821667329717800000);
214 aWeights.ChangeValue(1, 39) = +1.03015268516758060000;
215 aPoles.ChangeValue(1, 39) = gp_Pnt(-93.17869710255469300000, +2.90754650188789080000, -90.31338955501080100000);
216 aWeights.ChangeValue(1, 40) = +1.03014422393874510000;
217 aPoles.ChangeValue(1, 40) = gp_Pnt(-96.26774201507643600000, +2.90690946644790090000, -89.36934028436292000000);
218 aWeights.ChangeValue(1, 41) = +1.03013520381253840000;
219 aPoles.ChangeValue(1, 41) = gp_Pnt(-99.34465666946248100000, +2.90623024256504880000, -88.38624129906430900000);
220 aWeights.ChangeValue(1, 42) = +1.03012558369857450000;
221 aPoles.ChangeValue(1, 42) = gp_Pnt(-102.40886646020824000000, +2.90550570939860810000, -87.36427556081821400000);
222 aWeights.ChangeValue(1, 43) = +1.03011531537676040000;
223 aPoles.ChangeValue(1, 43) = gp_Pnt(-105.45979824903711000000, +2.90473220450791560000, -86.30363650725728100000);
224 aWeights.ChangeValue(1, 44) = +1.03009266486593140000;
225 aPoles.ChangeValue(1, 44) = gp_Pnt(-111.76765655411073000000, +2.90302557752729130000, -84.02084620865503000000);
226 aWeights.ChangeValue(1, 45) = +1.03007954250893910000;
227 aPoles.ChangeValue(1, 45) = gp_Pnt(-115.02237879255169000000, +2.90203661863772000000, -82.79254553120374300000);
228 aWeights.ChangeValue(1, 46) = +1.03006700046846360000;
229 aPoles.ChangeValue(1, 46) = gp_Pnt(-118.26033551796380000000, +2.90109123094133370000, -81.51987347500843800000);
230 aWeights.ChangeValue(1, 47) = +1.03005153385518430000;
231 aPoles.ChangeValue(1, 47) = gp_Pnt(-121.48081153033489000000, +2.89992503429592440000, -80.20310945547186100000);
232 aWeights.ChangeValue(1, 48) = +1.03003663316288070000;
233 aPoles.ChangeValue(1, 48) = gp_Pnt(-124.68310204708784000000, +2.89880123910694910000, -78.84252385592422700000);
234 aWeights.ChangeValue(1, 49) = +1.03002002524051230000;
235 aPoles.ChangeValue(1, 49) = gp_Pnt(-127.86649232671233000000, +2.89754829341323060000, -77.43842231968982000000);
236 aWeights.ChangeValue(1, 50) = +1.03000192732161230000;
237 aPoles.ChangeValue(1, 50) = gp_Pnt(-131.03028254956638000000, +2.89618247462029290000, -75.99111259804850200000);
238 aWeights.ChangeValue(1, 51) = +1.02996526567113600000;
239 aPoles.ChangeValue(1, 51) = gp_Pnt(-137.09281139094972000000, +2.89341459629042360000, -73.11712223836046600000);
240 aWeights.ChangeValue(1, 52) = +1.02994403451589630000;
241 aPoles.ChangeValue(1, 52) = gp_Pnt(-139.99435839258939000000, +2.89181101472158900000, -71.69634981883045600000);
242 aWeights.ChangeValue(1, 53) = +1.02992866105538440000;
243 aPoles.ChangeValue(1, 53) = gp_Pnt(-142.87784656482347000000, +2.89064973421052680000, -70.23882874204873900000);
244 aWeights.ChangeValue(1, 54) = +1.02989968743283590000;
245 aPoles.ChangeValue(1, 54) = gp_Pnt(-145.74271824362268000000, +2.88845983550875030000, -68.74489127449217600000);
246 aWeights.ChangeValue(1, 55) = +1.02988222474524970000;
247 aPoles.ChangeValue(1, 55) = gp_Pnt(-148.58838121276386000000, +2.88713941077432070000, -67.21475112846350400000);
248 aWeights.ChangeValue(1, 56) = +1.02985386954408620000;
249 aPoles.ChangeValue(1, 56) = gp_Pnt(-151.41432118416620000000, +2.88499463682574180000, -65.64875099202183200000);
250 aWeights.ChangeValue(1, 57) = +1.02982704006090460000;
251 aPoles.ChangeValue(1, 57) = gp_Pnt(-154.21993049579214000000, +2.88296397171855910000, -64.04717955157212800000);
252 aWeights.ChangeValue(1, 58) = +1.02976639514278400000;
253 aPoles.ChangeValue(1, 58) = gp_Pnt(-160.00375832753414000000, +2.87837140815595260000, -60.64735416015690100000);
254 aWeights.ChangeValue(1, 59) = +1.02972545417711370000;
255 aPoles.ChangeValue(1, 59) = gp_Pnt(-162.97914403387477000000, +2.87526824819569480000, -58.84445149944087200000);
256 aWeights.ChangeValue(1, 60) = +1.02970377642253300000;
257 aPoles.ChangeValue(1, 60) = gp_Pnt(-165.92810584856278000000, +2.87362619373759860000, -56.99783055334398100000);
258 aWeights.ChangeValue(1, 61) = +1.02963665582001740000;
259 aPoles.ChangeValue(1, 61) = gp_Pnt(-168.85438185317770000000, +2.86853152516479340000, -55.11698298198095400000);
260 aWeights.ChangeValue(1, 62) = +1.02961756328192160000;
261 aPoles.ChangeValue(1, 62) = gp_Pnt(-171.75125340157436000000, +2.86708271055963240000, -53.19057330425229700000);
262 aWeights.ChangeValue(1, 63) = +1.02954937293527580000;
263 aPoles.ChangeValue(1, 63) = gp_Pnt(-174.62251681022158000000, +2.86190007017706360000, -51.22700225930964300000);
264 aWeights.ChangeValue(1, 64) = +1.02950097342691520000;
265 aPoles.ChangeValue(1, 64) = gp_Pnt(-177.46620192435449000000, +2.85821732043423180000, -49.22415777229338100000);
266 aWeights.ChangeValue(1, 65) = +1.02943612532291810000;
267 aPoles.ChangeValue(1, 65) = gp_Pnt(-180.28206426096281000000, +2.85327724467687100000, -47.18300981722491400000);
268 aWeights.ChangeValue(1, 66) = +1.02937840445786000000;
269 aPoles.ChangeValue(1, 66) = gp_Pnt(-182.89713737694305000000, +2.84888100315162470000, -45.28741010449485300000);
270 aWeights.ChangeValue(1, 67) = +1.02929786839840220000;
271 aPoles.ChangeValue(1, 67) = gp_Pnt(-185.48808576506855000000, +2.84272935508061810000, -43.35897595091199000000);
272 aWeights.ChangeValue(1, 68) = +1.02927785532845030000;
273 aPoles.ChangeValue(1, 68) = gp_Pnt(-188.05509745668041000000, +2.84122612975151250000, -41.39706700987362400000);
274 aWeights.ChangeValue(1, 69) = +1.02909457173363930000;
275 aPoles.ChangeValue(1, 69) = gp_Pnt(-190.59634219852757000000, +2.82717082550985440000, -39.40453806610211300000);
276 aWeights.ChangeValue(1, 70) = +1.02915656102508410000;
277 aPoles.ChangeValue(1, 70) = gp_Pnt(-193.11296933822229000000, +2.83195841118334000000, -37.37763511391345600000);
278 aWeights.ChangeValue(1, 71) = +1.02891246603941110000;
279 aPoles.ChangeValue(1, 71) = gp_Pnt(-195.60305999702362000000, +2.81322479805689340000, -35.32107774203857500000);
280 aWeights.ChangeValue(1, 72) = +1.02884001996307940000;
281 aPoles.ChangeValue(1, 72) = gp_Pnt(-198.06589030811097000000, +2.80764438138268390000, -33.23208121127716900000);
282 aWeights.ChangeValue(1, 73) = +1.02870418206103250000;
283 aPoles.ChangeValue(1, 73) = gp_Pnt(-200.50111697620073000000, +2.79717360924099090000, -31.11182660391394400000);
284 aWeights.ChangeValue(1, 74) = +1.02860417892814660000;
285 aPoles.ChangeValue(1, 74) = gp_Pnt(-202.93720652839650000000, +2.78949733525485710000, -28.99085629216911300000);
286 aWeights.ChangeValue(1, 75) = +1.02826579045547110000;
287 aPoles.ChangeValue(1, 75) = gp_Pnt(-205.34394850673777000000, +2.76315604312090550000, -26.83940109433629200000);
288 aWeights.ChangeValue(1, 76) = +1.02871793966742330000;
289 aPoles.ChangeValue(1, 76) = gp_Pnt(-207.72575255584553000000, +2.79855565223875710000, -24.65500081264426800000);
290 aWeights.ChangeValue(1, 77) = +1.02728787827176630000;
291 aPoles.ChangeValue(1, 77) = gp_Pnt(-210.07706367406874000000, +2.68725363743552850000, -22.43634910730148800000);
292 aWeights.ChangeValue(1, 78) = +1.02767535385809120000;
293 aPoles.ChangeValue(1, 78) = gp_Pnt(-212.39605978578481000000, +2.71705476277515070000, -20.20562112100595800000);
294 aWeights.ChangeValue(1, 79) = +1.02745809923169020000;
295 aPoles.ChangeValue(1, 79) = gp_Pnt(-214.68098626410506000000, +2.69985190382785320000, -17.91605900374278100000);
296 aWeights.ChangeValue(1, 80) = +1.02725110106359850000;
297 aPoles.ChangeValue(1, 80) = gp_Pnt(-216.94385389331507000000, +2.68435107488514250000, -15.61289037092123000000);
298 aWeights.ChangeValue(1, 81) = +1.02619749797986360000;
299 aPoles.ChangeValue(1, 81) = gp_Pnt(-219.16685583874414000000, +2.59983520096898510000, -13.28583956380401400000);
300 aWeights.ChangeValue(2, 1) = +1.00955713824395700000;
301 aPoles.ChangeValue(2, 1) = gp_Pnt(+131.76756408216349000000, +2.10451717388867540000, -66.27316135719137000000);
302 aWeights.ChangeValue(2, 2) = +1.00956608612165600000;
303 aPoles.ChangeValue(2, 2) = gp_Pnt(+128.72252404033563000000, +2.10631182699007670000, -67.95492700832653600000);
304 aWeights.ChangeValue(2, 3) = +1.00957354292813030000;
305 aPoles.ChangeValue(2, 3) = gp_Pnt(+125.65455798821807000000, +2.10780700070896730000, -69.59522708152212500000);
306 aWeights.ChangeValue(2, 4) = +1.00957948395970430000;
307 aPoles.ChangeValue(2, 4) = gp_Pnt(+122.56436007131990000000, +2.10899819276768510000, -71.19369911011085600000);
308 aWeights.ChangeValue(2, 5) = +1.00958671248272140000;
309 aPoles.ChangeValue(2, 5) = gp_Pnt(+119.45249930698063000000, +2.11044722765431250000, -72.74983445837314400000);
310 aWeights.ChangeValue(2, 6) = +1.00959353559448470000;
311 aPoles.ChangeValue(2, 6) = gp_Pnt(+116.31971419268339000000, +2.11181476538007030000, -74.26341133748536500000);
312 aWeights.ChangeValue(2, 7) = +1.00959839503054960000;
313 aPoles.ChangeValue(2, 7) = gp_Pnt(+113.16673272248508000000, +2.11278857229853930000, -75.73421464457315700000);
314 aWeights.ChangeValue(2, 8) = +1.00960405269294800000;
315 aPoles.ChangeValue(2, 8) = gp_Pnt(+109.99417142410560000000, +2.11392227976110990000, -77.16175403351917300000);
316 aWeights.ChangeValue(2, 9) = +1.00961384794963970000;
317 aPoles.ChangeValue(2, 9) = gp_Pnt(+103.61137952541701000000, +2.11588481923337430000, -79.92991318438167500000);
318 aWeights.ChangeValue(2, 10) = +1.00961857675621050000;
319 aPoles.ChangeValue(2, 10) = gp_Pnt(+100.40113044627800000000, +2.11683214779396200000, -81.27049552555527600000);
320 aWeights.ChangeValue(2, 11) = +1.00962274789480260000;
321 aPoles.ChangeValue(2, 11) = gp_Pnt(+97.17272090352022900000, +2.11766766635255620000, -82.56731642507010300000);
322 aWeights.ChangeValue(2, 12) = +1.00962679188946770000;
323 aPoles.ChangeValue(2, 12) = gp_Pnt(+93.92682593436140300000, +2.11847763961438810000, -83.82006598438695700000);
324 aWeights.ChangeValue(2, 13) = +1.00963059350869510000;
325 aPoles.ChangeValue(2, 13) = gp_Pnt(+90.66416580726762200000, +2.11923900414192050000, -85.02847304317147300000);
326 aWeights.ChangeValue(2, 14) = +1.00963398843777610000;
327 aPoles.ChangeValue(2, 14) = gp_Pnt(+87.38545325411524800000, +2.11991885797243330000, -86.19228543784532800000);
328 aWeights.ChangeValue(2, 15) = +1.00963733185346640000;
329 aPoles.ChangeValue(2, 15) = gp_Pnt(+84.09136475788710600000, +2.12058835416503610000, -87.31123582184922300000);
330 aWeights.ChangeValue(2, 16) = +1.00964648640037450000;
331 aPoles.ChangeValue(2, 16) = gp_Pnt(+74.16530685267888100000, +2.12242134451684360000, -90.53282418399284400000);
332 aWeights.ChangeValue(2, 17) = +1.00965176794147850000;
333 aPoles.ChangeValue(2, 17) = gp_Pnt(+67.48955141808187400000, +2.12347869023601370000, -92.50007118315201600000);
334 aWeights.ChangeValue(2, 18) = +1.00965632094816660000;
335 aPoles.ChangeValue(2, 18) = gp_Pnt(+60.76066172731987800000, +2.12439006790716880000, -94.28495774595940300000);
336 aWeights.ChangeValue(2, 19) = +1.00966023501695720000;
337 aPoles.ChangeValue(2, 19) = gp_Pnt(+53.98420072674593900000, +2.12517346720689600000, -95.88584819516199800000);
338 aWeights.ChangeValue(2, 20) = +1.00966358166845400000;
339 aPoles.ChangeValue(2, 20) = gp_Pnt(+47.16601123883578600000, +2.12584324589548320000, -97.30134659055448800000);
340 aWeights.ChangeValue(2, 21) = +1.00966641434734730000;
341 aPoles.ChangeValue(2, 21) = gp_Pnt(+40.31221541713015500000, +2.12641013013135180000, -98.53029698991525700000);
342 aWeights.ChangeValue(2, 22) = +1.00966876842241260000;
343 aPoles.ChangeValue(2, 22) = gp_Pnt(+33.42921418500849000000, +2.12688121470786750000, -99.57178366381829400000);
344 aWeights.ChangeValue(2, 23) = +1.00967255617655650000;
345 aPoles.ChangeValue(2, 23) = gp_Pnt(+19.61796125907087400000, +2.12763915883061920000, -101.27845724558523000000);
346 aWeights.ChangeValue(2, 24) = +1.00967399859793750000;
347 aPoles.ChangeValue(2, 24) = gp_Pnt(+12.68919279606528900000, +2.12792777824197280000, -101.94361028295506000000);
348 aWeights.ChangeValue(2, 25) = +1.00967501382968900000;
349 aPoles.ChangeValue(2, 25) = gp_Pnt(+5.74348853231593990000, +2.12813091177048630000, -102.41987704106546000000);
350 aWeights.ChangeValue(2, 26) = +1.00967561936957820000;
351 aPoles.ChangeValue(2, 26) = gp_Pnt(-1.21307744928976070000, +2.12825206894226590000, -102.70676666240287000000);
352 aWeights.ChangeValue(2, 27) = +1.00967582483410380000;
353 aPoles.ChangeValue(2, 27) = gp_Pnt(-8.17446448579617170000, +2.12829317854427910000, -102.80401081431219000000);
354 aWeights.ChangeValue(2, 28) = +1.00967563195849760000;
355 aPoles.ChangeValue(2, 28) = gp_Pnt(-15.13466558037753100000, +2.12825458864942170000, -102.71156371647888000000);
356 aWeights.ChangeValue(2, 29) = +1.00967503459672270000;
357 aPoles.ChangeValue(2, 29) = gp_Pnt(-22.08770764998126900000, +2.12813506662251010000, -102.42960214757312000000);
358 aWeights.ChangeValue(2, 30) = +1.00967300468446490000;
359 aPoles.ChangeValue(2, 30) = gp_Pnt(-35.96760988752987500000, +2.12772890088942160000, -101.48744752427969000000);
360 aWeights.ChangeValue(2, 31) = +1.00967156777535580000;
361 aPoles.ChangeValue(2, 31) = gp_Pnt(-42.89448004815705000000, +2.12744138030294440000, -100.82725372327035000000);
362 aWeights.ChangeValue(2, 32) = +1.00966969979090780000;
363 aPoles.ChangeValue(2, 32) = gp_Pnt(-49.80232400744441900000, +2.12706759457740000000, -99.97834162579670200000);
364 aWeights.ChangeValue(2, 33) = +1.00966737970297200000;
365 aPoles.ChangeValue(2, 33) = gp_Pnt(-56.68523628384353000000, +2.12660332632729520000, -98.94133225857957800000);
366 aWeights.ChangeValue(2, 34) = +1.00966457365849260000;
367 aPoles.ChangeValue(2, 34) = gp_Pnt(-63.53734456971785200000, +2.12604178346724470000, -97.71706998895581400000);
368 aWeights.ChangeValue(2, 35) = +1.00966123497950600000;
369 aPoles.ChangeValue(2, 35) = gp_Pnt(-70.35281013187348300000, +2.12537359908900880000, -96.30662240267085400000);
370 aWeights.ChangeValue(2, 36) = +1.00965730416314050000;
371 aPoles.ChangeValue(2, 36) = gp_Pnt(-77.12582820180557500000, +2.12458683129447450000, -94.71128014840769500000);
372 aWeights.ChangeValue(2, 37) = +1.00965057624220010000;
373 aPoles.ChangeValue(2, 37) = gp_Pnt(-86.97287762202962800000, +2.12324005462031540000, -92.10671540000876700000);
374 aWeights.ChangeValue(2, 38) = +1.00964829695753690000;
375 aPoles.ChangeValue(2, 38) = gp_Pnt(-90.08473551349412400000, +2.12278376932639290000, -91.24134329153459100000);
376 aWeights.ChangeValue(2, 39) = +1.00964586498084840000;
377 aPoles.ChangeValue(2, 39) = gp_Pnt(-93.18562459494498300000, +2.12229689243319890000, -90.33659169532975900000);
378 aWeights.ChangeValue(2, 40) = +1.00964327207694590000;
379 aPoles.ChangeValue(2, 40) = gp_Pnt(-96.27496896689456200000, +2.12177776971417840000, -89.39262240039663300000);
380 aWeights.ChangeValue(2, 41) = +1.00964050782222770000;
381 aPoles.ChangeValue(2, 41) = gp_Pnt(-99.35219429474524600000, +2.12122430736176200000, -88.40960770124299000000);
382 aWeights.ChangeValue(2, 42) = +1.00963755960468140000;
383 aPoles.ChangeValue(2, 42) = gp_Pnt(-102.41672784011750000000, +2.12063397196916760000, -87.38773038403248000000);
384 aWeights.ChangeValue(2, 43) = +1.00963441262388320000;
385 aPoles.ChangeValue(2, 43) = gp_Pnt(-105.46799849165807000000, +2.12000379050942020000, -86.32718371153289600000);
386 aWeights.ChangeValue(2, 44) = +1.00962747055142050000;
387 aPoles.ChangeValue(2, 44) = gp_Pnt(-111.77654530973133000000, +2.11861352771318150000, -84.04460889409097000000);
388 aWeights.ChangeValue(2, 45) = +1.00962344856326270000;
389 aPoles.ChangeValue(2, 45) = gp_Pnt(-115.03162075269803000000, +2.11780798556167320000, -82.81644583890866300000);
390 aWeights.ChangeValue(2, 46) = +1.00961960432211730000;
391 aPoles.ChangeValue(2, 46) = gp_Pnt(-118.26993104545312000000, +2.11703799459344700000, -81.54389579486141300000);
392 aWeights.ChangeValue(2, 47) = +1.00961486342011010000;
393 aPoles.ChangeValue(2, 47) = gp_Pnt(-121.49080060905077000000, +2.11608829135299810000, -80.22729418526657200000);
394 aWeights.ChangeValue(2, 48) = +1.00961029578343630000;
395 aPoles.ChangeValue(2, 48) = gp_Pnt(-124.69348951442340000000, +2.11517321690879800000, -78.86685283462101400000);
396 aWeights.ChangeValue(2, 49) = +1.00960520454014850000;
397 aPoles.ChangeValue(2, 49) = gp_Pnt(-127.87731027004676000000, +2.11415312105035590000, -77.46291256687052900000);
398 aWeights.ChangeValue(2, 50) = +1.00959965618773250000;
399 aPoles.ChangeValue(2, 50) = gp_Pnt(-131.04156234039974000000, +2.11304129636208420000, -76.01577573259778800000);
400 aWeights.ChangeValue(2, 51) = +1.00958841592243690000;
401 aPoles.ChangeValue(2, 51) = gp_Pnt(-137.10496896782513000000, +2.11078854745601690000, -73.14215015354327000000);
402 aWeights.ChangeValue(2, 52) = +1.00958190609540830000;
403 aPoles.ChangeValue(2, 52) = gp_Pnt(-140.00695092509352000000, +2.10948365684345340000, -71.72161996530125800000);
404 aWeights.ChangeValue(2, 53) = +1.00957719225994170000;
405 aPoles.ChangeValue(2, 53) = gp_Pnt(-142.89082065884315000000, +2.10853873486620720000, -70.26423921243410600000);
406 aWeights.ChangeValue(2, 54) = +1.00956830737110970000;
407 aPoles.ChangeValue(2, 54) = gp_Pnt(-145.75622246387837000000, +2.10675729535240960000, -68.77065477701791000000);
408 aWeights.ChangeValue(2, 55) = +1.00956295195561060000;
409 aPoles.ChangeValue(2, 55) = gp_Pnt(-148.60233584192389000000, +2.10568335609513650000, -67.24065593702246700000);
410 aWeights.ChangeValue(2, 56) = +1.00955425555818930000;
411 aPoles.ChangeValue(2, 56) = gp_Pnt(-151.42883073983140000000, +2.10393921590561070000, -65.67497260857376800000);
412 aWeights.ChangeValue(2, 57) = +1.00954602613011150000;
413 aPoles.ChangeValue(2, 57) = gp_Pnt(-154.23502547473331000000, +2.10228833319884910000, -64.07366145615235100000);
414 aWeights.ChangeValue(2, 58) = +1.00952742278729300000;
415 aPoles.ChangeValue(2, 58) = gp_Pnt(-160.02004322449872000000, +2.09855561509982950000, -60.67448614970191300000);
416 aWeights.ChangeValue(2, 59) = +1.00951486183164940000;
417 aPoles.ChangeValue(2, 59) = gp_Pnt(-162.99613088380306000000, +2.09603444654779600000, -58.87207545484513800000);
418 aWeights.ChangeValue(2, 60) = +1.00950821186194630000;
419 aPoles.ChangeValue(2, 60) = gp_Pnt(-165.94554723216726000000, +2.09470002788322150000, -57.02566663092176900000);
420 aWeights.ChangeValue(2, 61) = +1.00948761363819010000;
421 aPoles.ChangeValue(2, 61) = gp_Pnt(-168.87287521283019000000, +2.09056345777511910000, -55.14566924440539700000);
422 aWeights.ChangeValue(2, 62) = +1.00948175483840210000;
423 aPoles.ChangeValue(2, 62) = gp_Pnt(-171.77025983587509000000, +2.08938700649796160000, -53.21936605947655600000);
424 aWeights.ChangeValue(2, 63) = +1.00946082358399410000;
425 aPoles.ChangeValue(2, 63) = gp_Pnt(-174.64262250370552000000, +2.08518149324171190000, -51.25662423685646700000);
426 aWeights.ChangeValue(2, 64) = +1.00944596410269540000;
427 aPoles.ChangeValue(2, 64) = gp_Pnt(-177.48726621628353000000, +2.08219461660139650000, -49.25423871740036900000);
428 aWeights.ChangeValue(2, 65) = +1.00942605045267530000;
429 aPoles.ChangeValue(2, 65) = gp_Pnt(-180.30433731845508000000, +2.07819005191471670000, -47.21374002625280800000);
430 aWeights.ChangeValue(2, 66) = +1.00940832657289500000;
431 aPoles.ChangeValue(2, 66) = gp_Pnt(-182.92026834009920000000, +2.07462614892136180000, -45.31887901738367200000);
432 aWeights.ChangeValue(2, 67) = +1.00938358350026620000;
433 aPoles.ChangeValue(2, 67) = gp_Pnt(-185.51252638985017000000, +2.06964535925843180000, -43.39137009339865600000);
434 aWeights.ChangeValue(2, 68) = +1.00937745534293180000;
435 aPoles.ChangeValue(2, 68) = gp_Pnt(-188.07970214515959000000, +2.06841969296490240000, -41.42984981640538000000);
436 aWeights.ChangeValue(2, 69) = +1.00932110415642830000;
437 aPoles.ChangeValue(2, 69) = gp_Pnt(-190.62397551723822000000, +2.05705915800362950000, -39.43932945784815300000);
438 aWeights.ChangeValue(2, 70) = +1.00934018958961060000;
439 aPoles.ChangeValue(2, 70) = gp_Pnt(-193.13969442040633000000, +2.06091733419064350000, -37.41169132931209200000);
440 aWeights.ChangeValue(2, 71) = +1.00926513417552190000;
441 aPoles.ChangeValue(2, 71) = gp_Pnt(-195.63329272671066000000, +2.04578165519120160000, -35.35822241980492500000);
442 aWeights.ChangeValue(2, 72) = +1.00924284324010150000;
443 aPoles.ChangeValue(2, 72) = gp_Pnt(-198.09761820165846000000, +2.04128022217386820000, -33.26975126412686700000);
444 aWeights.ChangeValue(2, 73) = +1.00920104311988150000;
445 aPoles.ChangeValue(2, 73) = gp_Pnt(-200.53514329838038000000, +2.03283693524956680000, -31.15087616958502200000);
446 aWeights.ChangeValue(2, 74) = +1.00917029694372660000;
447 aPoles.ChangeValue(2, 74) = gp_Pnt(-202.97255799662608000000, +2.02663657044316060000, -29.03126127135719200000);
448 aWeights.ChangeValue(2, 75) = +1.00906597799637380000;
449 aPoles.ChangeValue(2, 75) = gp_Pnt(-205.38430250588374000000, +2.00548607046822540000, -26.88375382824776200000);
450 aWeights.ChangeValue(2, 76) = +1.00920552993214340000;
451 aPoles.ChangeValue(2, 76) = gp_Pnt(-207.76049754988114000000, +2.03384304897263670000, -24.69318019977189100000);
452 aWeights.ChangeValue(2, 77) = +1.00876475817298510000;
453 aPoles.ChangeValue(2, 77) = gp_Pnt(-210.12674832523484000000, +1.94448851661030540000, -22.49703905023471500000);
454 aWeights.ChangeValue(2, 78) = +1.00888387250469380000;
455 aPoles.ChangeValue(2, 78) = gp_Pnt(-212.44800842772909000000, +1.96852329008748410000, -20.25405344977475500000);
456 aWeights.ChangeValue(2, 79) = +1.00881670070680670000;
457 aPoles.ChangeValue(2, 79) = gp_Pnt(-214.73260668420895000000, +1.95481624964232450000, -17.97008076073228700000);
458 aWeights.ChangeValue(2, 80) = +1.00875338528797620000;
459 aPoles.ChangeValue(2, 80) = gp_Pnt(-216.99878954601004000000, +1.94217039944868790000, -15.66960286452947800000);
460 aWeights.ChangeValue(2, 81) = +1.00842683370719490000;
461 aPoles.ChangeValue(2, 81) = gp_Pnt(-219.23765241170187000000, +1.87520469423183880000, -13.35291936652889800000);
462 aWeights.ChangeValue(3, 1) = +0.99802424639217791000;
463 aPoles.ChangeValue(3, 1) = gp_Pnt(+131.89876890515018000000, +1.35189067474276530000, -66.51059820355672500000);
464 aWeights.ChangeValue(3, 2) = +0.99802234515929278000;
465 aPoles.ChangeValue(3, 2) = gp_Pnt(+128.85071311608803000000, +1.35313353595059940000, -68.19368716153405800000);
466 aWeights.ChangeValue(3, 3) = +0.99802076064203826000;
467 aPoles.ChangeValue(3, 3) = gp_Pnt(+125.77977143028471000000, +1.35416922698475650000, -69.83529373030198400000);
468 aWeights.ChangeValue(3, 4) = +0.99801949820651126000;
469 aPoles.ChangeValue(3, 4) = gp_Pnt(+122.68659332837821000000, +1.35499438550965670000, -71.43508181423516100000);
470 aWeights.ChangeValue(3, 5) = +0.99801796211084914000;
471 aPoles.ChangeValue(3, 5) = gp_Pnt(+119.57173533591266000000, +1.35599832254451200000, -72.99244308799212900000);
472 aWeights.ChangeValue(3, 6) = +0.99801651211145281000;
473 aPoles.ChangeValue(3, 6) = gp_Pnt(+116.43595392098000000000, +1.35694592285710100000, -74.50721127326711700000);
474 aWeights.ChangeValue(3, 7) = +0.99801547938002733000;
475 aPoles.ChangeValue(3, 7) = gp_Pnt(+113.28000153804584000000, +1.35762078417993900000, -75.97921900496575600000);
476 aWeights.ChangeValue(3, 8) = +0.99801427699595313000;
477 aPoles.ChangeValue(3, 8) = gp_Pnt(+110.10443724854701000000, +1.35840649430771500000, -77.40790012997213400000);
478 aWeights.ChangeValue(3, 9) = +0.99801219521191387000;
479 aPoles.ChangeValue(3, 9) = gp_Pnt(+103.71561277285424000000, +1.35976677896647580000, -80.17831514578958300000);
480 aWeights.ChangeValue(3, 10) = +0.99801119017200446000;
481 aPoles.ChangeValue(3, 10) = gp_Pnt(+100.50232486897988000000, +1.36042346207845170000, -81.51999289835789900000);
482 aWeights.ChangeValue(3, 11) = +0.99801030363459775000;
483 aPoles.ChangeValue(3, 11) = gp_Pnt(+97.27087733082035500000, +1.36100269005924380000, -82.81788136334564900000);
484 aWeights.ChangeValue(3, 12) = +0.99800944410125381000;
485 aPoles.ChangeValue(3, 12) = gp_Pnt(+94.02193936655145000000, +1.36156425167614130000, -84.07165794609035500000);
486 aWeights.ChangeValue(3, 13) = +0.99800863606857426000;
487 aPoles.ChangeValue(3, 13) = gp_Pnt(+90.75622955795523700000, +1.36209214789795310000, -85.28105659074749700000);
488 aWeights.ChangeValue(3, 14) = +0.99800791446328430000;
489 aPoles.ChangeValue(3, 14) = gp_Pnt(+87.47446474935537700000, +1.36256356235759690000, -86.44582972368263500000);
490 aWeights.ChangeValue(3, 15) = +0.99800720379689600000;
491 aPoles.ChangeValue(3, 15) = gp_Pnt(+84.17731596959211500000, +1.36302781837419680000, -87.56569962027794000000);
492 aWeights.ChangeValue(3, 16) = +0.99800525790220496000;
493 aPoles.ChangeValue(3, 16) = gp_Pnt(+74.24198734063921300000, +1.36429897306986340000, -90.78996991844945800000);
494 aWeights.ChangeValue(3, 17) = +0.99800413521623321000;
495 aPoles.ChangeValue(3, 17) = gp_Pnt(+67.56001809965197000000, +1.36503231983535440000, -92.75885901427626800000);
496 aWeights.ChangeValue(3, 18) = +0.99800316736440942000;
497 aPoles.ChangeValue(3, 18) = gp_Pnt(+60.82490109578901600000, +1.36566449260567850000, -94.54523441794054900000);
498 aWeights.ChangeValue(3, 19) = +0.99800233531441818000;
499 aPoles.ChangeValue(3, 19) = gp_Pnt(+54.04219505707111900000, +1.36620793936844790000, -96.14746061467829500000);
500 aWeights.ChangeValue(3, 20) = +0.99800162387306934000;
501 aPoles.ChangeValue(3, 20) = gp_Pnt(+47.21773986109732800000, +1.36667259642912180000, -97.56414160157402200000);
502 aWeights.ChangeValue(3, 21) = +0.99800102168630012000;
503 aPoles.ChangeValue(3, 21) = gp_Pnt(+40.35765665228271400000, +1.36706588836418840000, -98.79412083143951400000);
504 aWeights.ChangeValue(3, 22) = +0.99800052123917371000;
505 aPoles.ChangeValue(3, 22) = gp_Pnt(+33.46834796257081700000, +1.36739272798589770000, -99.83648116661171900000);
506 aWeights.ChangeValue(3, 23) = +0.99799971600020576000;
507 aPoles.ChangeValue(3, 23) = gp_Pnt(+19.64441706716387900000, +1.36791861440644060000, -101.54459131896159000000);
508 aWeights.ChangeValue(3, 24) = +0.99799940935225717000;
509 aPoles.ChangeValue(3, 24) = gp_Pnt(+12.70928858254282900000, +1.36811887624638580000, -102.21030492597274000000);
510 aWeights.ChangeValue(3, 25) = +0.99799919351964705000;
511 aPoles.ChangeValue(3, 25) = gp_Pnt(+5.75722078489831280000, +1.36825982711689180000, -102.68697252648171000000);
512 aWeights.ChangeValue(3, 26) = +0.99799906478455291000;
513 aPoles.ChangeValue(3, 26) = gp_Pnt(-1.20571159764999210000, +1.36834389755229970000, -102.97410341218257000000);
514 aWeights.ChangeValue(3, 27) = +0.99799902110371730000;
515 aPoles.ChangeValue(3, 27) = gp_Pnt(-8.17346746041202720000, +1.36837242333404090000, -103.07142929357101000000);
516 aWeights.ChangeValue(3, 28) = +0.99799906210844536000;
517 aPoles.ChangeValue(3, 28) = gp_Pnt(-15.14003926915473600000, +1.36834564548690430000, -102.97890429403182000000);
518 aWeights.ChangeValue(3, 29) = +0.99799918910460783000;
519 aPoles.ChangeValue(3, 29) = gp_Pnt(-22.09945300681867100000, +1.36826271027814080000, -102.69670494840925000000);
520 aWeights.ChangeValue(3, 30) = +0.99799962065035785000;
521 aPoles.ChangeValue(3, 30) = gp_Pnt(-35.99208002634647800000, +1.36798088374117890000, -101.75375562004130000000);
522 aWeights.ChangeValue(3, 31) = +0.99799992612548816000;
523 aPoles.ChangeValue(3, 31) = gp_Pnt(-42.92529183965938000000, +1.36778138671521220000, -101.09300634269859000000);
524 aWeights.ChangeValue(3, 32) = +0.99800032324181509000;
525 aPoles.ChangeValue(3, 32) = gp_Pnt(-49.83946240643516700000, +1.36752203923507090000, -100.24338136864999000000);
526 aWeights.ChangeValue(3, 33) = +0.99800081646744487000;
527 aPoles.ChangeValue(3, 33) = gp_Pnt(-56.72868525600537000000, +1.36719992054037180000, -99.20550257416397200000);
528 aWeights.ChangeValue(3, 34) = +0.99800141299480705000;
529 aPoles.ChangeValue(3, 34) = gp_Pnt(-63.58708851299418500000, +1.36681032802942060000, -97.98021473616272200000);
530 aWeights.ChangeValue(3, 35) = +0.99800212274065336000;
531 aPoles.ChangeValue(3, 35) = gp_Pnt(-70.40883481115771800000, +1.36634677727753220000, -96.56858555851044900000);
532 aWeights.ChangeValue(3, 36) = +0.99800295834605834000;
533 aPoles.ChangeValue(3, 36) = gp_Pnt(-77.18812120943384500000, +1.36580100206191160000, -94.97190570545618000000);
534 aWeights.ChangeValue(3, 37) = +0.99800438851666018000;
535 aPoles.ChangeValue(3, 37) = gp_Pnt(-87.04430869357409500000, +1.36486684103840930000, -92.36516064771883800000);
536 aWeights.ChangeValue(3, 38) = +0.99800487302440710000;
537 aPoles.ChangeValue(3, 38) = gp_Pnt(-90.15904180478642600000, +1.36455036334574700000, -91.49906951050012100000);
538 aWeights.ChangeValue(3, 39) = +0.99800538998403165000;
539 aPoles.ChangeValue(3, 39) = gp_Pnt(-93.26280104894121300000, +1.36421268117563340000, -90.59356682763008500000);
540 aWeights.ChangeValue(3, 40) = +0.99800594114472085000;
541 aPoles.ChangeValue(3, 40) = gp_Pnt(-96.35501076566437500000, +1.36385265030680070000, -89.64881447076304300000);
542 aWeights.ChangeValue(3, 41) = +0.99800652872047668000;
543 aPoles.ChangeValue(3, 41) = gp_Pnt(-99.43509702281136200000, +1.36346882243976730000, -88.66498478868943800000);
544 aWeights.ChangeValue(3, 42) = +0.99800715539011531000;
545 aPoles.ChangeValue(3, 42) = gp_Pnt(-102.50248760972849000000, +1.36305944519955100000, -87.64226061031386900000);
546 aWeights.ChangeValue(3, 43) = +0.99800782429726853000;
547 aPoles.ChangeValue(3, 43) = gp_Pnt(-105.55661203062589000000, +1.36262246213878830000, -86.58083524789229600000);
548 aWeights.ChangeValue(3, 44) = +0.99800929984388531000;
549 aPoles.ChangeValue(3, 44) = gp_Pnt(-111.87105232543304000000, +1.36165848631400000000, -84.29637819122412200000);
550 aWeights.ChangeValue(3, 45) = +0.99801015470554688000;
551 aPoles.ChangeValue(3, 45) = gp_Pnt(-115.12916723990907000000, +1.36109998387148300000, -83.06721412498791300000);
552 aWeights.ChangeValue(3, 46) = +0.99801097177629106000;
553 aPoles.ChangeValue(3, 46) = gp_Pnt(-118.37050305702043000000, +1.36056615831231790000, -81.79361556056927900000);
554 aWeights.ChangeValue(3, 47) = +0.99801197939908182000;
555 aPoles.ChangeValue(3, 47) = gp_Pnt(-121.59440429164877000000, +1.35990780214188640000, -80.47594855348815200000);
556 aWeights.ChangeValue(3, 48) = +0.99801295017732938000;
557 aPoles.ChangeValue(3, 48) = gp_Pnt(-124.80011198391350000000, +1.35927349774917520000, -79.11439339164216700000);
558 aWeights.ChangeValue(3, 49) = +0.99801403220993246000;
559 aPoles.ChangeValue(3, 49) = gp_Pnt(-127.98695272451793000000, +1.35856646260703170000, -77.70931006235629500000);
560 aWeights.ChangeValue(3, 50) = +0.99801521135673477000;
561 aPoles.ChangeValue(3, 50) = gp_Pnt(-131.15422466608416000000, +1.35779592883408770000, -76.26099835790641600000);
562 aWeights.ChangeValue(3, 51) = +0.99801760008173268000;
563 aPoles.ChangeValue(3, 51) = gp_Pnt(-137.22341426940562000000, +1.35623488186342090000, -73.38505097675174200000);
564 aWeights.ChangeValue(3, 52) = +0.99801898347031770000;
565 aPoles.ChangeValue(3, 52) = gp_Pnt(-140.12817143218851000000, +1.35533077140178190000, -71.96340636458091900000);
566 aWeights.ChangeValue(3, 53) = +0.99801998518653323000;
567 aPoles.ChangeValue(3, 53) = gp_Pnt(-143.01477271081365000000, +1.35467609324036100000, -70.50482384325539400000);
568 aWeights.ChangeValue(3, 54) = +0.99802187318341851000;
569 aPoles.ChangeValue(3, 54) = gp_Pnt(-145.88296929650440000000, +1.35344206211285110000, -69.01011970904052400000);
570 aWeights.ChangeValue(3, 55) = +0.99802301113749214000;
571 aPoles.ChangeValue(3, 55) = gp_Pnt(-148.73181832948791000000, +1.35269822187277230000, -67.47885556090747600000);
572 aWeights.ChangeValue(3, 56) = +0.99802485896116799000;
573 aPoles.ChangeValue(3, 56) = gp_Pnt(-151.56108889838526000000, +1.35149030610332030000, -65.91196867904423600000);
574 aWeights.ChangeValue(3, 57) = +0.99802660746081140000;
575 aPoles.ChangeValue(3, 57) = gp_Pnt(-154.37005843077941000000, +1.35034719652907540000, -64.30939181125272300000);
576 aWeights.ChangeValue(3, 58) = +0.99803055992501810000;
577 aPoles.ChangeValue(3, 58) = gp_Pnt(-160.16078498432634000000, +1.34776300585323040000, -60.90758294114521500000);
578 aWeights.ChangeValue(3, 59) = +0.99803322842151521000;
579 aPoles.ChangeValue(3, 59) = gp_Pnt(-163.13986451909619000000, +1.34601805132734250000, -59.10384793755353900000);
580 aWeights.ChangeValue(3, 60) = +0.99803464125751229000;
581 aPoles.ChangeValue(3, 60) = gp_Pnt(-166.09208359425281000000, +1.34509430571165490000, -57.25595351707911400000);
582 aWeights.ChangeValue(3, 61) = +0.99803901668572381000;
583 aPoles.ChangeValue(3, 61) = gp_Pnt(-169.02259847263389000000, +1.34223252516315280000, -55.37471701865561600000);
584 aWeights.ChangeValue(3, 62) = +0.99804026123487555000;
585 aPoles.ChangeValue(3, 62) = gp_Pnt(-171.92274649713781000000, +1.34141857200850120000, -53.44681670722970100000);
586 aWeights.ChangeValue(3, 63) = +0.99804470691034153000;
587 aPoles.ChangeValue(3, 63) = gp_Pnt(-174.79824691248783000000, +1.33851025764084610000, -51.48277226031661500000);
588 aWeights.ChangeValue(3, 64) = +0.99804786265209489000;
589 aPoles.ChangeValue(3, 64) = gp_Pnt(-177.64589658566118000000, +1.33644541377468110000, -49.47887210970986900000);
590 aWeights.ChangeValue(3, 65) = +0.99805209132461004000;
591 aPoles.ChangeValue(3, 65) = gp_Pnt(-180.46609411219177000000, +1.33367801102763010000, -47.43691639460438100000);
592 aWeights.ChangeValue(3, 66) = +0.99805585511720041000;
593 aPoles.ChangeValue(3, 66) = gp_Pnt(-183.08478109176986000000, +1.33121501172845690000, -45.54077967192022000000);
594 aWeights.ChangeValue(3, 67) = +0.99806110806405779000;
595 aPoles.ChangeValue(3, 67) = gp_Pnt(-185.68001727848417000000, +1.32777577033982250000, -43.61205685047624300000);
596 aWeights.ChangeValue(3, 68) = +0.99806241123000117000;
597 aPoles.ChangeValue(3, 68) = gp_Pnt(-188.24953622256075000000, +1.32692526187276720000, -41.64902509374122300000);
598 aWeights.ChangeValue(3, 69) = +0.99807437025077705000;
599 aPoles.ChangeValue(3, 69) = gp_Pnt(-190.79766796840426000000, +1.31909012471800140000, -39.65777616520052400000);
600 aWeights.ChangeValue(3, 70) = +0.99807032269259688000;
601 aPoles.ChangeValue(3, 70) = gp_Pnt(-193.31511620328166000000, +1.32174544077043810000, -37.62798636408343400000);
602 aWeights.ChangeValue(3, 71) = +0.99808625039380772000;
603 aPoles.ChangeValue(3, 71) = gp_Pnt(-195.81278252670535000000, +1.31130937814640340000, -35.57429171163009600000);
604 aWeights.ChangeValue(3, 72) = +0.99809097922828749000;
605 aPoles.ChangeValue(3, 72) = gp_Pnt(-198.28008499427182000000, +1.30820906528388470000, -33.48422839734306700000);
606 aWeights.ChangeValue(3, 73) = +0.99809984631895698000;
607 aPoles.ChangeValue(3, 73) = gp_Pnt(-200.72099421295775000000, +1.30239515227575060000, -31.36416391357070300000);
608 aWeights.ChangeValue(3, 74) = +0.99810637147759285000;
609 aPoles.ChangeValue(3, 74) = gp_Pnt(-203.16127009409345000000, +1.29812048781277520000, -29.24337154392900800000);
610 aWeights.ChangeValue(3, 75) = +0.99812847998895315000;
611 aPoles.ChangeValue(3, 75) = gp_Pnt(-205.57777363915829000000, +1.28359951668439790000, -27.09591401257074100000);
612 aWeights.ChangeValue(3, 76) = +0.99809892249848597000;
613 aPoles.ChangeValue(3, 76) = gp_Pnt(-207.95321979211485000000, +1.30303533816127510000, -24.90029856221717000000);
614 aWeights.ChangeValue(3, 77) = +0.99819234539248169000;
615 aPoles.ChangeValue(3, 77) = gp_Pnt(-210.32920376311637000000, +1.24168994973372330000, -22.71372419603407900000);
616 aWeights.ChangeValue(3, 78) = +0.99816706733577565000;
617 aPoles.ChangeValue(3, 78) = gp_Pnt(-212.65404345030839000000, +1.25824740351837460000, -20.46200135460381000000);
618 aWeights.ChangeValue(3, 79) = +0.99818127776964660000;
619 aPoles.ChangeValue(3, 79) = gp_Pnt(-214.94032188963598000000, +1.24888524402456480000, -18.17894168737611000000);
620 aWeights.ChangeValue(3, 80) = +0.99819475509197664000;
621 aPoles.ChangeValue(3, 80) = gp_Pnt(-217.21049138159862000000, +1.24010538580557930000, -15.87773552075580100000);
622 aWeights.ChangeValue(3, 81) = +0.99826376750414003000;
623 aPoles.ChangeValue(3, 81) = gp_Pnt(-219.45963474898130000000, +1.19454909379966280000, -13.56324778739743800000);
624 aWeights.ChangeValue(4, 1) = +0.99424302042862245000;
625 aPoles.ChangeValue(4, 1) = gp_Pnt(+132.13618409480023000000, +0.70840889522526063000, -66.94024029007874800000);
626 aWeights.ChangeValue(4, 2) = +0.99423758610938695000;
627 aPoles.ChangeValue(4, 2) = gp_Pnt(+129.08297406972278000000, +0.70909252303575865000, -68.62615176496952100000);
628 aWeights.ChangeValue(4, 3) = +0.99423305718875432000;
629 aPoles.ChangeValue(4, 3) = gp_Pnt(+126.00685240811242000000, +0.70966228194967051000, -70.27050713058781600000);
630 aWeights.ChangeValue(4, 4) = +0.99422944886444642000;
631 aPoles.ChangeValue(4, 4) = gp_Pnt(+122.90845587213282000000, +0.71011623149435366000, -71.87297804945868100000);
632 aWeights.ChangeValue(4, 5) = +0.99422505844796127000;
633 aPoles.ChangeValue(4, 5) = gp_Pnt(+119.78834767262531000000, +0.71066859395963999000, -73.43294438704307900000);
634 aWeights.ChangeValue(4, 6) = +0.99422091417503022000;
635 aPoles.ChangeValue(4, 6) = gp_Pnt(+116.64728496160824000000, +0.71119000548737488000, -74.95024473036627900000);
636 aWeights.ChangeValue(4, 7) = +0.99421796254996875000;
637 aPoles.ChangeValue(4, 7) = gp_Pnt(+113.48602386120655000000, +0.71156137519735096000, -76.42471498016054500000);
638 aWeights.ChangeValue(4, 8) = +0.99421452605999638000;
639 aPoles.ChangeValue(4, 8) = gp_Pnt(+110.30511547520040000000, +0.71199375553590705000, -77.85578472764748900000);
640 aWeights.ChangeValue(4, 9) = +0.99420857626658776000;
641 aPoles.ChangeValue(4, 9) = gp_Pnt(+103.90553506044348000000, +0.71274238201017392000, -80.63083668700706100000);
642 aWeights.ChangeValue(4, 10) = +0.99420570386914531000;
643 aPoles.ChangeValue(4, 10) = gp_Pnt(+100.68683453164211000000, +0.71310380757531833000, -81.97476109354066400000);
644 aWeights.ChangeValue(4, 11) = +0.99420317017586146000;
645 aPoles.ChangeValue(4, 11) = gp_Pnt(+97.44994659335081600000, +0.71342262156961334000, -83.27482261755635300000);
646 aWeights.ChangeValue(4, 12) = +0.99420071368291341000;
647 aPoles.ChangeValue(4, 12) = gp_Pnt(+94.19554253170841200000, +0.71373172711717636000, -84.53069694549194000000);
648 aWeights.ChangeValue(4, 13) = +0.99419840439350793000;
649 aPoles.ChangeValue(4, 13) = gp_Pnt(+90.92433917217061900000, +0.71402231445757036000, -85.74211902365664200000);
650 aWeights.ChangeValue(4, 14) = +0.99419634212229768000;
651 aPoles.ChangeValue(4, 14) = gp_Pnt(+87.63705473050230000000, +0.71428182289044062000, -86.90884124933938900000);
652 aWeights.ChangeValue(4, 15) = +0.99419431112670464000;
653 aPoles.ChangeValue(4, 15) = gp_Pnt(+84.33436439436984200000, +0.71453739893908408000, -88.03058362353205300000);
654 aWeights.ChangeValue(4, 16) = +0.99418875003915341000;
655 aPoles.ChangeValue(4, 16) = gp_Pnt(+74.38231313217285400000, +0.71523720648163680000, -91.26025430410756200000);
656 aWeights.ChangeValue(4, 17) = +0.99418554160984429000;
657 aPoles.ChangeValue(4, 17) = gp_Pnt(+67.68910051798944500000, +0.71564096751482986000, -93.23244050128337800000);
658 aWeights.ChangeValue(4, 18) = +0.99418277570171931000;
659 aPoles.ChangeValue(4, 18) = gp_Pnt(+60.94265918181897500000, +0.71598904839509359000, -95.02180567308657500000);
660 aWeights.ChangeValue(4, 19) = +0.99418039790864621000;
661 aPoles.ChangeValue(4, 19) = gp_Pnt(+54.14855416044807900000, +0.71628829211206946000, -96.62671289123449000000);
662 aWeights.ChangeValue(4, 20) = +0.99417836479981814000;
663 aPoles.ChangeValue(4, 20) = gp_Pnt(+47.31263275511362600000, +0.71654416141740851000, -98.04576467050098600000);
664 aWeights.ChangeValue(4, 21) = +0.99417664391975691000;
665 aPoles.ChangeValue(4, 21) = gp_Pnt(+40.44102486854357200000, +0.71676073875086976000, -99.27780280738555500000);
666 aWeights.ChangeValue(4, 22) = +0.99417521378830997000;
667 aPoles.ChangeValue(4, 22) = gp_Pnt(+33.54014335198198900000, +0.71694072618465221000, -100.32190824729783000000);
668 aWeights.ChangeValue(4, 23) = +0.99417291266204433000;
669 aPoles.ChangeValue(4, 23) = gp_Pnt(+19.69298272358705000000, +0.71723033475882103000, -102.03287833894613000000);
670 aWeights.ChangeValue(4, 24) = +0.99417203636017570000;
671 aPoles.ChangeValue(4, 24) = gp_Pnt(+12.74619890889187300000, +0.71734062296661449000, -102.69970663658552000000);
672 aWeights.ChangeValue(4, 25) = +0.99417141958182476000;
673 aPoles.ChangeValue(4, 25) = gp_Pnt(+5.78245043030823250000, +0.71741824902277995000, -103.17717197796689000000);
674 aWeights.ChangeValue(4, 26) = +0.99417105170022846000;
675 aPoles.ChangeValue(4, 26) = gp_Pnt(-1.19217909208406270000, +0.71746454980293017000, -103.46478315098152000000);
676 aWeights.ChangeValue(4, 27) = +0.99417092687508068000;
677 aPoles.ChangeValue(4, 27) = gp_Pnt(-8.17163978203099180000, +0.71748026003105458000, -103.56227159755184000000);
678 aWeights.ChangeValue(4, 28) = +0.99417104405253187000;
679 aPoles.ChangeValue(4, 28) = gp_Pnt(-15.14991535484593800000, +0.71746551227361877000, -103.46959139663633000000);
680 aWeights.ChangeValue(4, 29) = +0.99417140696519068000;
681 aPoles.ChangeValue(4, 29) = gp_Pnt(-22.12102296425817400000, +0.71741983693815459000, -103.18691926012113000000);
682 aWeights.ChangeValue(4, 30) = +0.99417264018315676000;
683 aPoles.ChangeValue(4, 30) = gp_Pnt(-36.03699423807252300000, +0.71726462804712465000, -102.24239043165372000000);
684 aWeights.ChangeValue(4, 31) = +0.99417351313460955000;
685 aPoles.ChangeValue(4, 31) = gp_Pnt(-42.98185258768797500000, +0.71715476185170723000, -101.58053487832193000000);
686 aWeights.ChangeValue(4, 32) = +0.99417464796983568000;
687 aPoles.ChangeValue(4, 32) = gp_Pnt(-49.90763755490115700000, +0.71701193671091712000, -100.72948788576410000000);
688 aWeights.ChangeValue(4, 33) = +0.99417605745995530000;
689 aPoles.ChangeValue(4, 33) = gp_Pnt(-56.80843390632649900000, +0.71683454604177377000, -99.68987236817491700000);
690 aWeights.ChangeValue(4, 34) = +0.99417776216385467000;
691 aPoles.ChangeValue(4, 34) = gp_Pnt(-63.67836146608049600000, +0.71662000367742562000, -98.46253420440308400000);
692 aWeights.ChangeValue(4, 35) = +0.99417979042818705000;
693 aPoles.ChangeValue(4, 35) = gp_Pnt(-70.51157486810592400000, +0.71636474389607163000, -97.04854231351581000000);
694 aWeights.ChangeValue(4, 36) = +0.99418217838737100000;
695 aPoles.ChangeValue(4, 36) = gp_Pnt(-77.30226331485057800000, +0.71606422146024096000, -95.44918875092946600000);
696 aWeights.ChangeValue(4, 37) = +0.99418626551507883000;
697 aPoles.ChangeValue(4, 37) = gp_Pnt(-87.17503156127875700000, +0.71554987190288122000, -92.83807781738744300000);
698 aWeights.ChangeValue(4, 38) = +0.99418765014289556000;
699 aPoles.ChangeValue(4, 38) = gp_Pnt(-90.29499963358738100000, +0.71537562386381059000, -91.97053762881716900000);
700 aWeights.ChangeValue(4, 39) = +0.99418912751868260000;
701 aPoles.ChangeValue(4, 39) = gp_Pnt(-93.40397633478176000000, +0.71518970580821706000, -91.06351986664817800000);
702 aWeights.ChangeValue(4, 40) = +0.99419070264287346000;
703 aPoles.ChangeValue(4, 40) = gp_Pnt(-96.50138523104767800000, +0.71499148886670094000, -90.11718659777564300000);
704 aWeights.ChangeValue(4, 41) = +0.99419238184469383000;
705 aPoles.ChangeValue(4, 41) = gp_Pnt(-99.58665166110419900000, +0.71478017704711161000, -89.13171035602891800000);
706 aWeights.ChangeValue(4, 42) = +0.99419417278216393000;
707 aPoles.ChangeValue(4, 42) = gp_Pnt(-102.65920271683186000000, +0.71455480723882170000, -88.10727415073346000000);
708 aWeights.ChangeValue(4, 43) = +0.99419608444209617000;
709 aPoles.ChangeValue(4, 43) = gp_Pnt(-105.71846722422283000000, +0.71431424921765596000, -87.04407147601585800000);
710 aWeights.ChangeValue(4, 44) = +0.99420030141669824000;
711 aPoles.ChangeValue(4, 44) = gp_Pnt(-112.04353021881408000000, +0.71378360593609291000, -84.75579106017932000000);
712 aWeights.ChangeValue(4, 45) = +0.99420274455295243000;
713 aPoles.ChangeValue(4, 45) = gp_Pnt(-115.30712351688430000000, +0.71347617951477893000, -83.52457168950516600000);
714 aWeights.ChangeValue(4, 46) = +0.99420507969516914000;
715 aPoles.ChangeValue(4, 46) = gp_Pnt(-118.55391065270935000000, +0.71318234625457844000, -82.24884224143599500000);
716 aWeights.ChangeValue(4, 47) = +0.99420795946419460000;
717 aPoles.ChangeValue(4, 47) = gp_Pnt(-121.78323693095153000000, +0.71281998990170370000, -80.92897147787398600000);
718 aWeights.ChangeValue(4, 48) = +0.99421073394729520000;
719 aPoles.ChangeValue(4, 48) = gp_Pnt(-124.99434061394447000000, +0.71247088780699119000, -79.56513754354314500000);
720 aWeights.ChangeValue(4, 49) = +0.99421382643715051000;
721 aPoles.ChangeValue(4, 49) = gp_Pnt(-128.18654935306802000000, +0.71208178090166396000, -78.15770189412481300000);
722 aWeights.ChangeValue(4, 50) = +0.99421719652005114000;
723 aPoles.ChangeValue(4, 50) = gp_Pnt(-131.35915951555538000000, +0.71165775668839981000, -76.70696466864815500000);
724 aWeights.ChangeValue(4, 51) = +0.99422402375653052000;
725 aPoles.ChangeValue(4, 51) = gp_Pnt(-137.43857370930490000000, +0.71079877890710363000, -73.82620311743470200000);
726 aWeights.ChangeValue(4, 52) = +0.99422797768691740000;
727 aPoles.ChangeValue(4, 52) = gp_Pnt(-140.34822128390073000000, +0.71030132584778982000, -72.40218284379008700000);
728 aWeights.ChangeValue(4, 53) = +0.99423084075610579000;
729 aPoles.ChangeValue(4, 53) = gp_Pnt(-143.23968120103163000000, +0.70994112075449667000, -70.94115847846593700000);
730 aWeights.ChangeValue(4, 54) = +0.99423623706224973000;
731 aPoles.ChangeValue(4, 54) = gp_Pnt(-146.11271315064005000000, +0.70926223398833632000, -69.44395856663618400000);
732 aWeights.ChangeValue(4, 55) = +0.99423948964319253000;
733 aPoles.ChangeValue(4, 55) = gp_Pnt(-148.96636467875118000000, +0.70885305306993507000, -67.91012785943519200000);
734 aWeights.ChangeValue(4, 56) = +0.99424477127021760000;
735 aPoles.ChangeValue(4, 56) = gp_Pnt(-151.80041102174371000000, +0.70818863107582075000, -66.34061951491401000000);
736 aWeights.ChangeValue(4, 57) = +0.99424976912431906000;
737 aPoles.ChangeValue(4, 57) = gp_Pnt(-154.61412826195317000000, +0.70755993553172780000, -64.73535576374381200000);
738 aWeights.ChangeValue(4, 58) = +0.99426106692542415000;
739 aPoles.ChangeValue(4, 58) = gp_Pnt(-160.41462700323274000000, +0.70613881146866808000, -61.32785485541679500000);
740 aWeights.ChangeValue(4, 59) = +0.99426869485276259000;
741 aPoles.ChangeValue(4, 59) = gp_Pnt(-163.39874797129167000000, +0.70517937516238605000, -59.52109641918814000000);
742 aWeights.ChangeValue(4, 60) = +0.99427273335051769000;
743 aPoles.ChangeValue(4, 60) = gp_Pnt(-166.35588428707737000000, +0.70467140031138198000, -57.67014968010805400000);
744 aWeights.ChangeValue(4, 61) = +0.99428524121150996000;
745 aPoles.ChangeValue(4, 61) = gp_Pnt(-169.29147402675417000000, +0.70309833118760823000, -55.78569706052214600000);
746 aWeights.ChangeValue(4, 62) = +0.99428879891231192000;
747 aPoles.ChangeValue(4, 62) = gp_Pnt(-172.19641321622018000000, +0.70265088960130029000, -53.85463096447261900000);
748 aWeights.ChangeValue(4, 63) = +0.99430150819260854000;
749 aPoles.ChangeValue(4, 63) = gp_Pnt(-175.07684836851479000000, +0.70105264832187786000, -51.88726956537038900000);
750 aWeights.ChangeValue(4, 64) = +0.99431053021705873000;
751 aPoles.ChangeValue(4, 64) = gp_Pnt(-177.92932492963632000000, +0.69991818857623234000, -49.88000737868681300000);
752 aWeights.ChangeValue(4, 65) = +0.99432262020918794000;
753 aPoles.ChangeValue(4, 65) = gp_Pnt(-180.75433885652521000000, +0.69839807993520564000, -47.83460859504128800000);
754 aWeights.ChangeValue(4, 66) = +0.99433338093448842000;
755 aPoles.ChangeValue(4, 66) = gp_Pnt(-183.37745173242254000000, +0.69704510882650861000, -45.93530736698277700000);
756 aWeights.ChangeValue(4, 67) = +0.99434840096468768000;
757 aPoles.ChangeValue(4, 67) = gp_Pnt(-185.97711214268182000000, +0.69515696483250133000, -44.00334265992864100000);
758 aWeights.ChangeValue(4, 68) = +0.99435212441487342000;
759 aPoles.ChangeValue(4, 68) = gp_Pnt(-188.55092060214918000000, +0.69468843290184534000, -42.03706245316480100000);
760 aWeights.ChangeValue(4, 69) = +0.99438632495837886000;
761 aPoles.ChangeValue(4, 69) = gp_Pnt(-191.10351948864678000000, +0.69039032514405918000, -40.04240176159244400000);
762 aWeights.ChangeValue(4, 70) = +0.99437474610357146000;
763 aPoles.ChangeValue(4, 70) = gp_Pnt(-193.62512272227769000000, +0.69184483548244469000, -38.00925246210125900000);
764 aWeights.ChangeValue(4, 71) = +0.99442029730057158000;
765 aPoles.ChangeValue(4, 71) = gp_Pnt(-196.12715745709386000000, +0.68612074693666814000, -35.95207510226987300000);
766 aWeights.ChangeValue(4, 72) = +0.99443382321708784000;
767 aPoles.ChangeValue(4, 72) = gp_Pnt(-198.59871781224271000000, +0.68442148883790921000, -33.85842837168388500000);
768 aWeights.ChangeValue(4, 73) = +0.99445918644353237000;
769 aPoles.ChangeValue(4, 73) = gp_Pnt(-201.04387700918369000000, +0.68123533540985159000, -31.73471330438436400000);
770 aWeights.ChangeValue(4, 74) = +0.99447784672499884000;
771 aPoles.ChangeValue(4, 74) = gp_Pnt(-203.48830197003542000000, +0.67889067518118906000, -29.61036197082074800000);
772 aWeights.ChangeValue(4, 75) = +0.99454111417144087000;
773 aPoles.ChangeValue(4, 75) = gp_Pnt(-205.90905874701556000000, +0.67094847421818948000, -27.45911353863423800000);
774 aWeights.ChangeValue(4, 76) = +0.99445650432969468000;
775 aPoles.ChangeValue(4, 76) = gp_Pnt(-208.28851122415659000000, +0.68156618053615436000, -25.25989914496455000000);
776 aWeights.ChangeValue(4, 77) = +0.99472383917628937000;
777 aPoles.ChangeValue(4, 77) = gp_Pnt(-210.66819860636727000000, +0.64801004101885640000, -23.06997485052475800000);
778 aWeights.ChangeValue(4, 78) = +0.99465154011060308000;
779 aPoles.ChangeValue(4, 78) = gp_Pnt(-212.99829629837927000000, +0.65709020698928045000, -20.81293704958459000000);
780 aWeights.ChangeValue(4, 79) = +0.99469225299704522000;
781 aPoles.ChangeValue(4, 79) = gp_Pnt(-215.28778722004142000000, +0.65198647566642243000, -18.52648999480212300000);
782 aWeights.ChangeValue(4, 80) = +0.99473072608314816000;
783 aPoles.ChangeValue(4, 80) = gp_Pnt(-217.56233176434088000000, +0.64714607636795729000, -16.22125679272672700000);
784 aWeights.ChangeValue(4, 81) = +0.99492849872148770000;
785 aPoles.ChangeValue(4, 81) = gp_Pnt(-219.81591407133737000000, +0.62237708094437050000, -13.90082269618381800000);
786 aWeights.ChangeValue(5, 1) = +0.99802424639217535000;
787 aPoles.ChangeValue(5, 1) = gp_Pnt(+132.45622778603641000000, +0.24240580374773624000, -67.51941232824347600000);
788 aWeights.ChangeValue(5, 2) = +0.99802234515930366000;
789 aPoles.ChangeValue(5, 2) = gp_Pnt(+129.39621499227619000000, +0.24264599956164210000, -69.20932849809996400000);
790 aWeights.ChangeValue(5, 3) = +0.99802076064199163000;
791 aPoles.ChangeValue(5, 3) = gp_Pnt(+126.31320722587012000000, +0.24284620475411531000, -70.85757023346207000000);
792 aWeights.ChangeValue(5, 4) = +0.99801949820656444000;
793 aPoles.ChangeValue(5, 4) = gp_Pnt(+123.20785947444472000000, +0.24300571706284735000, -72.46379895615213200000);
794 aWeights.ChangeValue(5, 5) = +0.99801796211084626000;
795 aPoles.ChangeValue(5, 5) = gp_Pnt(+120.08075545981777000000, +0.24319982314295371000, -74.02745916652884300000);
796 aWeights.ChangeValue(5, 6) = +0.99801651211139986000;
797 aPoles.ChangeValue(5, 6) = gp_Pnt(+116.93263892914923000000, +0.24338306180645181000, -75.54835063375608700000);
798 aWeights.ChangeValue(5, 7) = +0.99801547938007906000;
799 aPoles.ChangeValue(5, 7) = gp_Pnt(+113.76425167349765000000, +0.24351357797625062000, -77.02627451676777100000);
800 aWeights.ChangeValue(5, 8) = +0.99801427699593348000;
801 aPoles.ChangeValue(5, 8) = gp_Pnt(+110.57618061475338000000, +0.24366553774363486000, -78.46071663606139200000);
802 aWeights.ChangeValue(5, 9) = +0.99801219521177365000;
803 aPoles.ChangeValue(5, 9) = gp_Pnt(+104.16217613984874000000, +0.24392865233284403000, -81.24228081548614000000);
804 aWeights.ChangeValue(5, 10) = +0.99801119017243534000;
805 aPoles.ChangeValue(5, 10) = gp_Pnt(+100.93622072836907000000, +0.24405568433254640000, -82.58935804874866400000);
806 aWeights.ChangeValue(5, 11) = +0.99801030363411136000;
807 aPoles.ChangeValue(5, 11) = gp_Pnt(+97.69202612265307600000, +0.24416774311013159000, -83.89246252379766100000);
808 aWeights.ChangeValue(5, 12) = +0.99800944410126124000;
809 aPoles.ChangeValue(5, 12) = gp_Pnt(+94.43027249107268500000, +0.24427639255629080000, -85.15127753548810600000);
810 aWeights.ChangeValue(5, 13) = +0.99800863606905588000;
811 aPoles.ChangeValue(5, 13) = gp_Pnt(+91.15167507122404800000, +0.24437853537532742000, -86.36553541507953500000);
812 aWeights.ChangeValue(5, 14) = +0.99800791446282866000;
813 aPoles.ChangeValue(5, 14) = gp_Pnt(+87.85695090009397700000, +0.24446975628264125000, -87.53498464352057300000);
814 aWeights.ChangeValue(5, 15) = +0.99800720379704511000;
815 aPoles.ChangeValue(5, 15) = gp_Pnt(+84.54678770958248900000, +0.24455959646371978000, -88.65934979276558200000);
816 aWeights.ChangeValue(5, 16) = +0.99800525790220262000;
817 aPoles.ChangeValue(5, 16) = gp_Pnt(+74.57222162875666500000, +0.24480559775636487000, -91.89655746079053200000);
818 aWeights.ChangeValue(5, 17) = +0.99800413521623044000;
819 aPoles.ChangeValue(5, 17) = gp_Pnt(+67.86385477996348900000, +0.24494753702776123000, -93.87334138726605200000);
820 aWeights.ChangeValue(5, 18) = +0.99800316736440708000;
821 aPoles.ChangeValue(5, 18) = gp_Pnt(+61.10212188651380700000, +0.24506990714535715000, -95.66687639706128700000);
822 aWeights.ChangeValue(5, 19) = +0.99800233531441618000;
823 aPoles.ChangeValue(5, 19) = gp_Pnt(+54.29260355218377000000, +0.24517511152453569000, -97.27552257290322800000);
824 aWeights.ChangeValue(5, 20) = +0.99800162387306812000;
825 aPoles.ChangeValue(5, 20) = gp_Pnt(+47.44116356008504500000, +0.24526506890417449000, -98.69787956398771200000);
826 aWeights.ChangeValue(5, 21) = +0.99800102168629923000;
827 aPoles.ChangeValue(5, 21) = gp_Pnt(+40.55394899036769400000, +0.24534121333759545000, -99.93278652962781900000);
828 aWeights.ChangeValue(5, 22) = +0.99800052123917249000;
829 aPoles.ChangeValue(5, 22) = gp_Pnt(+33.63739034141031700000, +0.24540449418574758000, -100.97932209286283000000);
830 aWeights.ChangeValue(5, 23) = +0.99799971600020576000;
831 aPoles.ChangeValue(5, 23) = gp_Pnt(+19.75877904385457000000, +0.24550631764576064000, -102.69427034587730000000);
832 aWeights.ChangeValue(5, 24) = +0.99799940935225595000;
833 aPoles.ChangeValue(5, 24) = gp_Pnt(+12.79621461719473900000, +0.24554509442498113000, -103.36264862290150000000);
834 aWeights.ChangeValue(5, 25) = +0.99799919351964361000;
835 aPoles.ChangeValue(5, 25) = gp_Pnt(+5.81664173483571470000, +0.24557238768930081000, -103.84122357926364000000);
836 aWeights.ChangeValue(5, 26) = +0.99799906478454914000;
837 aPoles.ChangeValue(5, 26) = gp_Pnt(-1.17384006705611750000, +0.24558866712534574000, -104.12950288114470000000);
838 aWeights.ChangeValue(5, 27) = +0.99799902110371452000;
839 aPoles.ChangeValue(5, 27) = gp_Pnt(-8.16916502467035950000, +0.24559419086566145000, -104.22721740658889000000);
840 aWeights.ChangeValue(5, 28) = +0.99799906210844525000;
841 aPoles.ChangeValue(5, 28) = gp_Pnt(-15.16330109337111900000, +0.24558900548798951000, -104.13432123956672000000);
842 aWeights.ChangeValue(5, 29) = +0.99799918910460916000;
843 aPoles.ChangeValue(5, 29) = gp_Pnt(-22.15024989420349800000, +0.24557294601509544000, -103.85099166853988000000);
844 aWeights.ChangeValue(5, 30) = +0.99799962065035952000;
845 aPoles.ChangeValue(5, 30) = gp_Pnt(-36.09784025928350100000, +0.24551837507724711000, -102.90426687944763000000);
846 aWeights.ChangeValue(5, 31) = +0.99799992612548860000;
847 aPoles.ChangeValue(5, 31) = gp_Pnt(-43.05848024708384300000, +0.24547974681812620000, -102.24087223758063000000);
848 aWeights.ChangeValue(5, 32) = +0.99800032324181287000;
849 aPoles.ChangeValue(5, 32) = gp_Pnt(-50.00000136683811300000, +0.24542953068576923000, -101.38784584473753000000);
850 aWeights.ChangeValue(5, 33) = +0.99800081646744143000;
851 aPoles.ChangeValue(5, 33) = gp_Pnt(-56.91647304260395400000, +0.24536716218422927000, -100.34581179308852000000);
852 aWeights.ChangeValue(5, 34) = +0.99800141299480460000;
853 aPoles.ChangeValue(5, 34) = gp_Pnt(-63.80199929133657100000, +0.24529173277606747000, -99.11561770524215800000);
854 aWeights.ChangeValue(5, 35) = +0.99800212274065292000;
855 aPoles.ChangeValue(5, 35) = gp_Pnt(-70.65071863638867500000, +0.24520198988589620000, -97.69833476064030700000);
856 aWeights.ChangeValue(5, 36) = +0.99800295834605834000;
857 aPoles.ChangeValue(5, 36) = gp_Pnt(-77.45680402323041800000, +0.24509633690518939000, -96.09525772913629300000);
858 aWeights.ChangeValue(5, 37) = +0.99800438851665707000;
859 aPoles.ChangeValue(5, 37) = gp_Pnt(-87.35194268844766400000, +0.24491551610541196000, -93.47806376363495000000);
860 aWeights.ChangeValue(5, 38) = +0.99800487302440644000;
861 aPoles.ChangeValue(5, 38) = gp_Pnt(-90.47898339307414500000, +0.24485425955861742000, -92.60850028621504700000);
862 aWeights.ChangeValue(5, 39) = +0.99800538998403221000;
863 aPoles.ChangeValue(5, 39) = gp_Pnt(-93.59500505694055100000, +0.24478890139349116000, -91.69936647202810300000);
864 aWeights.ChangeValue(5, 40) = +0.99800594114472096000;
865 aPoles.ChangeValue(5, 40) = gp_Pnt(-96.69942959625443300000, +0.24471922075774133000, -90.75082469114758500000);
866 aWeights.ChangeValue(5, 41) = +0.99800652872047502000;
867 aPoles.ChangeValue(5, 41) = gp_Pnt(-99.79168063143930600000, +0.24464493811196314000, -89.76304779373697300000);
868 aWeights.ChangeValue(5, 42) = +0.99800715539011187000;
869 aPoles.ChangeValue(5, 42) = gp_Pnt(-102.87118348036965000000, +0.24456571523016235000, -88.73621911304020700000);
870 aWeights.ChangeValue(5, 43) = +0.99800782429726465000;
871 aPoles.ChangeValue(5, 43) = gp_Pnt(-105.93736515171811000000, +0.24448115520035879000, -87.67053246863201800000);
872 aWeights.ChangeValue(5, 44) = +0.99800929984371112000;
873 aPoles.ChangeValue(5, 44) = gp_Pnt(-112.27672847568951000000, +0.24429462970498794000, -85.37690123862388700000);
874 aWeights.ChangeValue(5, 45) = +0.99801015470633669000;
875 aPoles.ChangeValue(5, 45) = gp_Pnt(-115.54769755356581000000, +0.24418656943131900000, -84.14279592325505100000);
876 aWeights.ChangeValue(5, 46) = +0.99801097177455889000;
877 aPoles.ChangeValue(5, 46) = gp_Pnt(-118.80182311076892000000, +0.24408328894344730000, -82.86408351153079400000);
878 aWeights.ChangeValue(5, 47) = +0.99801197940129383000;
879 aPoles.ChangeValue(5, 47) = gp_Pnt(-122.03843417449148000000, +0.24395592759703674000, -81.54111184389478200000);
880 aWeights.ChangeValue(5, 48) = +0.99801295017559344000;
881 aPoles.ChangeValue(5, 48) = gp_Pnt(-125.25678060282321000000, +0.24383322797751039000, -80.17408187890907800000);
882 aWeights.ChangeValue(5, 49) = +0.99801403221073270000;
883 aPoles.ChangeValue(5, 49) = gp_Pnt(-128.45617956663568000000, +0.24369647262362162000, -78.76334161483092100000);
884 aWeights.ChangeValue(5, 50) = +0.99801521135655380000;
885 aPoles.ChangeValue(5, 50) = gp_Pnt(-131.63592529803751000000, +0.24354745092247693000, -77.30919404502431300000);
886 aWeights.ChangeValue(5, 51) = +0.99801760008187401000;
887 aPoles.ChangeValue(5, 51) = gp_Pnt(-137.72900951211963000000, +0.24324557860805471000, -74.42165429070698200000);
888 aWeights.ChangeValue(5, 52) = +0.99801898346970708000;
889 aPoles.ChangeValue(5, 52) = gp_Pnt(-140.64518873661288000000, +0.24307076523393223000, -72.99426192178911800000);
890 aWeights.ChangeValue(5, 53) = +0.99801998518786039000;
891 aPoles.ChangeValue(5, 53) = gp_Pnt(-143.54316005505726000000, +0.24294418386170585000, -71.52981926220020600000);
892 aWeights.ChangeValue(5, 54) = +0.99802187318168345000;
893 aPoles.ChangeValue(5, 54) = gp_Pnt(-146.42260629144496000000, +0.24270562978064991000, -70.02903356238938700000);
894 aWeights.ChangeValue(5, 55) = +0.99802301113888081000;
895 aPoles.ChangeValue(5, 55) = gp_Pnt(-149.28266198929455000000, +0.24256185427332766000, -68.49161271016626500000);
896 aWeights.ChangeValue(5, 56) = +0.99802485896051119000;
897 aPoles.ChangeValue(5, 56) = gp_Pnt(-152.12302992679020000000, +0.24232840183433180000, -66.91836178765569800000);
898 aWeights.ChangeValue(5, 57) = +0.99802660746095961000;
899 aPoles.ChangeValue(5, 57) = gp_Pnt(-154.94301695331424000000, +0.24210751871096883000, -65.30929034698890200000);
900 aWeights.ChangeValue(5, 58) = +0.99803055992501044000;
901 aPoles.ChangeValue(5, 58) = gp_Pnt(-160.75642720778953000000, +0.24160825342055195000, -61.89368007550259400000);
902 aWeights.ChangeValue(5, 59) = +0.99803322842160846000;
903 aPoles.ChangeValue(5, 59) = gp_Pnt(-163.74717060555361000000, +0.24127121961594802000, -60.08255013672670200000);
904 aWeights.ChangeValue(5, 60) = +0.99803464125717123000;
905 aPoles.ChangeValue(5, 60) = gp_Pnt(-166.71086689375946000000, +0.24109275824918924000, -58.22731479955884700000);
906 aWeights.ChangeValue(5, 61) = +0.99803901668628470000;
907 aPoles.ChangeValue(5, 61) = gp_Pnt(-169.65297207222594000000, +0.24054025241076704000, -56.33806928337021700000);
908 aWeights.ChangeValue(5, 62) = +0.99804026123435818000;
909 aPoles.ChangeValue(5, 62) = gp_Pnt(-172.56427255537395000000, +0.24038308942389072000, -54.40260496408483000000);
910 aWeights.ChangeValue(5, 63) = +0.99804470691060532000;
911 aPoles.ChangeValue(5, 63) = gp_Pnt(-175.45101016300779000000, +0.23982181928534163000, -52.43032166263763100000);
912 aWeights.ChangeValue(5, 64) = +0.99804786265202527000;
913 aPoles.ChangeValue(5, 64) = gp_Pnt(-178.30970270493245000000, +0.23942347201733374000, -50.41823769283568900000);
914 aWeights.ChangeValue(5, 65) = +0.99805209132460959000;
915 aPoles.ChangeValue(5, 65) = gp_Pnt(-181.14080917168710000000, +0.23888978094458979000, -48.36782293133622100000);
916 aWeights.ChangeValue(5, 66) = +0.99805585511722006000;
917 aPoles.ChangeValue(5, 66) = gp_Pnt(-183.76963089028271000000, +0.23841474156011525000, -46.46384963887197700000);
918 aWeights.ChangeValue(5, 67) = +0.99806110806389992000;
919 aPoles.ChangeValue(5, 67) = gp_Pnt(-186.37480135254410000000, +0.23775204017864099000, -44.52702607060874100000);
920 aWeights.ChangeValue(5, 68) = +0.99806241123039841000;
921 aPoles.ChangeValue(5, 68) = gp_Pnt(-188.95443339023049000000, +0.23758721013871806000, -42.55611011320790700000);
922 aWeights.ChangeValue(5, 69) = +0.99807437025022461000;
923 aPoles.ChangeValue(5, 69) = gp_Pnt(-191.51185439080101000000, +0.23607937004601673000, -40.55588840407725800000);
924 aWeights.ChangeValue(5, 70) = +0.99807032269304363000;
925 aPoles.ChangeValue(5, 70) = gp_Pnt(-194.03956238778505000000, +0.23658914396266717000, -38.51843887702921200000);
926 aWeights.ChangeValue(5, 71) = +0.99808625039358922000;
927 aPoles.ChangeValue(5, 71) = gp_Pnt(-196.54607703546344000000, +0.23458111537982981000, -36.45513422497234800000);
928 aWeights.ChangeValue(5, 72) = +0.99809097922833689000;
929 aPoles.ChangeValue(5, 72) = gp_Pnt(-199.02284030117690000000, +0.23398526561785285000, -34.35633603568415100000);
930 aWeights.ChangeValue(5, 73) = +0.99809984631895676000;
931 aPoles.ChangeValue(5, 73) = gp_Pnt(-201.47284391020807000000, +0.23286808083306546000, -32.22700780168109700000);
932 aWeights.ChangeValue(5, 74) = +0.99810637147739267000;
933 aPoles.ChangeValue(5, 74) = gp_Pnt(-203.92239692899503000000, +0.23204542949601353000, -30.09717639714928000000);
934 aWeights.ChangeValue(5, 75) = +0.99812847998973830000;
935 aPoles.ChangeValue(5, 75) = gp_Pnt(-206.34684289021220000000, +0.22926391512904498000, -27.93902362306789300000);
936 aWeights.ChangeValue(5, 76) = +0.99809892249694432000;
937 aPoles.ChangeValue(5, 76) = gp_Pnt(-208.73420674519565000000, +0.23297935369059405000, -25.73750919512989600000);
938 aWeights.ChangeValue(5, 77) = +0.99819234539430379000;
939 aPoles.ChangeValue(5, 77) = gp_Pnt(-211.11258262007470000000, +0.22122441504945897000, -23.53328220960779800000);
940 aWeights.ChangeValue(5, 78) = +0.99816706733442118000;
941 aPoles.ChangeValue(5, 78) = gp_Pnt(-213.44890831521380000000, +0.22441150695403267000, -21.27426418813643800000);
942 aWeights.ChangeValue(5, 79) = +0.99818127777024523000;
943 aPoles.ChangeValue(5, 79) = gp_Pnt(-215.74298068197336000000, +0.22262736656649654000, -18.98075706196405200000);
944 aWeights.ChangeValue(5, 80) = +0.99819475509184485000;
945 aPoles.ChangeValue(5, 80) = gp_Pnt(-218.02209738817496000000, +0.22092240555297402000, -16.66880151580776100000);
946 aWeights.ChangeValue(5, 81) = +0.99826376750413803000;
947 aPoles.ChangeValue(5, 81) = gp_Pnt(-220.27506837008727000000, +0.21227676902692139000, -14.33587171753685400000);
948 aWeights.ChangeValue(6, 1) = +1.00955713824395920000;
949 aPoles.ChangeValue(6, 1) = gp_Pnt(+132.82497533600920000000, -0.00000000000000355271, -68.18672206105269100000);
950 aWeights.ChangeValue(6, 2) = +1.00956608612165510000;
951 aPoles.ChangeValue(6, 2) = gp_Pnt(+129.75720107675980000000, -0.00000000000001501048, -69.88134023490506800000);
952 aWeights.ChangeValue(6, 3) = +1.00957354292813720000;
953 aPoles.ChangeValue(6, 3) = gp_Pnt(+126.66630562875893000000, +0.00000000000001468880, -71.53414324810810900000);
954 aWeights.ChangeValue(6, 4) = +1.00957948395969920000;
955 aPoles.ChangeValue(6, 4) = gp_Pnt(+123.55299204973852000000, -0.00000000000002420214, -73.14476521965842400000);
956 aWeights.ChangeValue(6, 5) = +1.00958671248272540000;
957 aPoles.ChangeValue(6, 5) = gp_Pnt(+120.41786571412476000000, +0.00000000000000774289, -74.71276629883676900000);
958 aWeights.ChangeValue(6, 6) = +1.00959353559449030000;
959 aPoles.ChangeValue(6, 6) = gp_Pnt(+117.26165038381876000000, +0.00000000000002827238, -76.23787924846354300000);
960 aWeights.ChangeValue(6, 7) = +1.00959839503053540000;
961 aPoles.ChangeValue(6, 7) = gp_Pnt(+114.08506189168672000000, -0.00000000000002567399, -77.71984701658058700000);
962 aWeights.ChangeValue(6, 8) = +1.00960405269295440000;
963 aPoles.ChangeValue(6, 8) = gp_Pnt(+110.88875430250306000000, +0.00000000000001531652, -79.15824703626482500000);
964 aWeights.ChangeValue(6, 9) = +1.00961384794965610000;
965 aPoles.ChangeValue(6, 9) = gp_Pnt(+104.45816547225203000000, +0.00000000000002372811, -81.94743615023858800000);
966 aWeights.ChangeValue(6, 10) = +1.00961857675613920000;
967 aPoles.ChangeValue(6, 10) = gp_Pnt(+101.22387341781818000000, -0.00000000000003253030, -83.29820264563102200000);
968 aWeights.ChangeValue(6, 11) = +1.00962274789490230000;
969 aPoles.ChangeValue(6, 11) = gp_Pnt(+97.97127406275538400000, +0.00000000000002165813, -84.60486564781918200000);
970 aWeights.ChangeValue(6, 12) = +1.00962679188945900000;
971 aPoles.ChangeValue(6, 12) = gp_Pnt(+94.70106106239124700000, +0.00000000000003307844, -85.86712155505158300000);
972 aWeights.ChangeValue(6, 13) = +1.00963059350859920000;
973 aPoles.ChangeValue(6, 13) = gp_Pnt(+91.41394873512904000000, -0.00000000000001002370, -87.08469757155246800000);
974 aWeights.ChangeValue(6, 14) = +1.00963398843787310000;
975 aPoles.ChangeValue(6, 14) = gp_Pnt(+88.11065082060795800000, -0.00000000000001620026, -88.25733602781997400000);
976 aWeights.ChangeValue(6, 15) = +1.00963733185343440000;
977 aPoles.ChangeValue(6, 15) = gp_Pnt(+84.79187377942922400000, +0.00000000000001387836, -89.38476986722990600000);
978 aWeights.ChangeValue(6, 16) = +1.00964648640037490000;
979 aPoles.ChangeValue(6, 16) = gp_Pnt(+74.79138897281484300000, +0.00000000000001147648, -92.63077806554609600000);
980 aWeights.ChangeValue(6, 17) = +1.00965176794147980000;
981 aPoles.ChangeValue(6, 17) = gp_Pnt(+68.06556894151637500000, +0.00000000000001348105, -94.61292925638954900000);
982 aWeights.ChangeValue(6, 18) = +1.00965632094816880000;
983 aPoles.ChangeValue(6, 18) = gp_Pnt(+61.28620656548358900000, +0.00000000000001132208, -96.41133393799678700000);
984 aWeights.ChangeValue(6, 19) = +1.00966023501695920000;
985 aPoles.ChangeValue(6, 19) = gp_Pnt(+54.45890525472331200000, +0.00000000000000779610, -98.02434736777235000000);
986 aWeights.ChangeValue(6, 20) = +1.00966358166845540000;
987 aPoles.ChangeValue(6, 20) = gp_Pnt(+47.58955228763309700000, +0.00000000000000496426, -99.45056478986435900000);
988 aWeights.ChangeValue(6, 21) = +1.00966641434734750000;
989 aPoles.ChangeValue(6, 21) = gp_Pnt(+40.68431826182812500000, +0.00000000000000415229, -100.68882169811890000000);
990 aWeights.ChangeValue(6, 22) = +1.00966876842241240000;
991 aPoles.ChangeValue(6, 22) = gp_Pnt(+33.74965652868991100000, +0.00000000000000595055, -101.73819405254569000000);
992 aWeights.ChangeValue(6, 23) = +1.00967255617655690000;
993 aPoles.ChangeValue(6, 23) = gp_Pnt(+19.83474481990451800000, +0.00000000000000626687, -103.45778313292877000000);
994 aWeights.ChangeValue(6, 24) = +1.00967399859793900000;
995 aPoles.ChangeValue(6, 24) = gp_Pnt(+12.85396744583563800000, +0.00000000000000961706, -104.12796934503771000000);
996 aWeights.ChangeValue(6, 25) = +1.00967501382969150000;
997 aPoles.ChangeValue(6, 25) = gp_Pnt(+5.85612456199985140000, +0.00000000000001451316, -104.60783896197547000000);
998 aWeights.ChangeValue(6, 26) = +1.00967561936958040000;
999 aPoles.ChangeValue(6, 26) = gp_Pnt(-1.15266320632332260000, +0.00000000000001739414, -104.89689790453474000000);
1000 aWeights.ChangeValue(6, 27) = +1.00967582483410530000;
1001 aPoles.ChangeValue(6, 27) = gp_Pnt(-8.16630892272242730000, +0.00000000000001688939, -104.99487618531697000000);
1002 aWeights.ChangeValue(6, 28) = +1.00967563195849790000;
1003 aPoles.ChangeValue(6, 28) = gp_Pnt(-15.17875958769639600000, +0.00000000000001381871, -104.90172793642448000000);
1004 aWeights.ChangeValue(6, 29) = +1.00967503459672230000;
1005 aPoles.ChangeValue(6, 29) = gp_Pnt(-22.18399638815323600000, +0.00000000000001119232, -104.61763141615558000000);
1006 aWeights.ChangeValue(6, 30) = +1.00967300468446440000;
1007 aPoles.ChangeValue(6, 30) = gp_Pnt(-36.16808769247344200000, +0.00000000000001926896, -103.66834538209933000000);
1008 aWeights.ChangeValue(6, 31) = +1.00967156777535520000;
1009 aPoles.ChangeValue(6, 31) = gp_Pnt(-43.14695215605046700000, +0.00000000000002086710, -103.00315490229345000000);
1010 aWeights.ChangeValue(6, 32) = +1.00966969979090850000;
1011 aPoles.ChangeValue(6, 32) = gp_Pnt(-50.10664482445217500000, +0.00000000000002115378, -102.14781821392242000000);
1012 aWeights.ChangeValue(6, 33) = +1.00966737970297340000;
1013 aPoles.ChangeValue(6, 33) = gp_Pnt(-57.04121502398449900000, +0.00000000000002158031, -101.10296070558179000000);
1014 aWeights.ChangeValue(6, 34) = +1.00966457365849420000;
1015 aPoles.ChangeValue(6, 34) = gp_Pnt(-63.94474533155499800000, +0.00000000000002290082, -99.86943240681669900000);
1016 aWeights.ChangeValue(6, 35) = +1.00966123497950670000;
1017 aPoles.ChangeValue(6, 35) = gp_Pnt(-70.81135197820185600000, +0.00000000000002517228, -98.44830786498150100000);
1018 aWeights.ChangeValue(6, 36) = +1.00965730416314160000;
1019 aPoles.ChangeValue(6, 36) = gp_Pnt(-77.63518524225725100000, +0.00000000000002775445, -96.84088598857995600000);
1020 aWeights.ChangeValue(6, 37) = +1.00965057624219750000;
1021 aPoles.ChangeValue(6, 37) = gp_Pnt(-87.55609990295042200000, +0.00000000000002423047, -94.21659328767886200000);
1022 aWeights.ChangeValue(6, 38) = +1.00964829695753600000;
1023 aPoles.ChangeValue(6, 38) = gp_Pnt(-90.69129861847109500000, +0.00000000000002587407, -93.34466557470412300000);
1024 aWeights.ChangeValue(6, 39) = +1.00964586498085130000;
1025 aPoles.ChangeValue(6, 39) = gp_Pnt(-93.81544408055053500000, +0.00000000000003006614, -92.43305897005754400000);
1026 aWeights.ChangeValue(6, 40) = +1.00964327207695040000;
1027 aPoles.ChangeValue(6, 40) = gp_Pnt(-96.92795589621758300000, +0.00000000000003388207, -91.48193626907418300000);
1028 aWeights.ChangeValue(6, 41) = +1.00964050782223150000;
1029 aPoles.ChangeValue(6, 41) = gp_Pnt(-100.02825520717420000000, +0.00000000000003564727, -90.49147079864104600000);
1030 aWeights.ChangeValue(6, 42) = +1.00963755960468200000;
1031 aPoles.ChangeValue(6, 42) = gp_Pnt(-103.11576472135789000000, +0.00000000000003493709, -89.46184640324143800000);
1032 aWeights.ChangeValue(6, 43) = +1.00963441262388120000;
1033 aPoles.ChangeValue(6, 43) = gp_Pnt(-106.18990874397944000000, +0.00000000000003257692, -88.39325742978746800000);
1034 aWeights.ChangeValue(6, 44) = +1.00962747055172470000;
1035 aPoles.ChangeValue(6, 44) = gp_Pnt(-112.54574015681582000000, +0.00000000000006160655, -86.09336936272072200000);
1036 aWeights.ChangeValue(6, 45) = +1.00962344856191890000;
1037 aPoles.ChangeValue(6, 45) = gp_Pnt(-115.82520602454126000000, -0.00000000000003931317, -84.85588414554271700000);
1038 aWeights.ChangeValue(6, 46) = +1.00961960432502520000;
1039 aPoles.ChangeValue(6, 46) = gp_Pnt(-119.08778487668772000000, +0.00000000000016494845, -83.57368219250022900000);
1040 aWeights.ChangeValue(6, 47) = +1.00961486341637220000;
1041 aPoles.ChangeValue(6, 47) = gp_Pnt(-122.33277704237545000000, -0.00000000000006102663, -82.24707666574315100000);
1042 aWeights.ChangeValue(6, 48) = +1.00961029578642010000;
1043 aPoles.ChangeValue(6, 48) = gp_Pnt(-125.55945424028559000000, +0.00000000000005443726, -80.87630621413205700000);
1044 aWeights.ChangeValue(6, 49) = +1.00960520453872830000;
1045 aPoles.ChangeValue(6, 49) = gp_Pnt(-128.76711471386264000000, +0.00000000000006731284, -79.46169679871513800000);
1046 aWeights.ChangeValue(6, 50) = +1.00959965618806670000;
1047 aPoles.ChangeValue(6, 50) = gp_Pnt(-131.95505034236234000000, +0.00000000000001744703, -78.00355594499717400000);
1048 aWeights.ChangeValue(6, 51) = +1.00958841592259230000;
1049 aPoles.ChangeValue(6, 51) = gp_Pnt(-138.06383173526737000000, +0.00000000000005091738, -75.10807262033468100000);
1050 aWeights.ChangeValue(6, 52) = +1.00958190609477040000;
1051 aPoles.ChangeValue(6, 52) = gp_Pnt(-140.98751167669514000000, +0.00000000000001249767, -73.67671445695528100000);
1052 aWeights.ChangeValue(6, 53) = +1.00957719226123470000;
1053 aPoles.ChangeValue(6, 53) = gp_Pnt(-143.89297197091258000000, +0.00000000000004304958, -72.20827197874005800000);
1054 aWeights.ChangeValue(6, 54) = +1.00956830736954160000;
1055 aPoles.ChangeValue(6, 54) = gp_Pnt(-146.77976177895343000000, +0.00000000000014315600, -70.70325097869228200000);
1056 aWeights.ChangeValue(6, 55) = +1.00956295195680430000;
1057 aPoles.ChangeValue(6, 55) = gp_Pnt(-149.64716302220674000000, -0.00000000000013374459, -69.16163316263994400000);
1058 aWeights.ChangeValue(6, 56) = +1.00955425555763600000;
1059 aPoles.ChangeValue(6, 56) = gp_Pnt(-152.49476001470052000000, +0.00000000000014982315, -67.58397318476696100000);
1060 aWeights.ChangeValue(6, 57) = +1.00954602613024340000;
1061 aPoles.ChangeValue(6, 57) = gp_Pnt(-155.32190503332637000000, -0.00000000000000021066, -65.97043121899140800000);
1062 aWeights.ChangeValue(6, 58) = +1.00952742278739690000;
1063 aPoles.ChangeValue(6, 58) = gp_Pnt(-161.15007234465017000000, -0.00000000000001992904, -62.54527347940126700000);
1064 aWeights.ChangeValue(6, 59) = +1.00951486183122910000;
1065 aPoles.ChangeValue(6, 59) = gp_Pnt(-164.14837014605524000000, +0.00000000000023572067, -60.72896647597298900000);
1066 aWeights.ChangeValue(6, 60) = +1.00950821186278380000;
1067 aPoles.ChangeValue(6, 60) = gp_Pnt(-167.11960531963629000000, -0.00000000000028988207, -58.86870049528032900000);
1068 aWeights.ChangeValue(6, 61) = +1.00948761363721440000;
1069 aPoles.ChangeValue(6, 61) = gp_Pnt(-170.06906478280905000000, +0.00000000000040689923, -56.97372124744497800000);
1070 aWeights.ChangeValue(6, 62) = +1.00948175483910860000;
1071 aPoles.ChangeValue(6, 62) = gp_Pnt(-172.98765254825670000000, -0.00000000000024250881, -55.03312548926784600000);
1072 aWeights.ChangeValue(6, 63) = +1.00946082358368820000;
1073 aPoles.ChangeValue(6, 63) = gp_Pnt(-175.88148729884773000000, +0.00000000000015443744, -53.05496328096450000000);
1074 aWeights.ChangeValue(6, 64) = +1.00944596410276510000;
1075 aPoles.ChangeValue(6, 64) = gp_Pnt(-178.74719668858941000000, +0.00000000000002184305, -51.03719587787818300000);
1076 aWeights.ChangeValue(6, 65) = +1.00942605045267690000;
1077 aPoles.ChangeValue(6, 65) = gp_Pnt(-181.58512029181043000000, +0.00000000000003863576, -48.98084041218928800000);
1078 aWeights.ChangeValue(6, 66) = +1.00940832657292460000;
1079 aPoles.ChangeValue(6, 66) = gp_Pnt(-184.22041885135505000000, +0.00000000000012642202, -47.07128183802177500000);
1080 aWeights.ChangeValue(6, 67) = +1.00938358350016230000;
1081 aPoles.ChangeValue(6, 67) = gp_Pnt(-186.83172267077580000000, -0.00000000000026075896, -45.12863792869809700000);
1082 aWeights.ChangeValue(6, 68) = +1.00937745534316470000;
1083 aPoles.ChangeValue(6, 68) = gp_Pnt(-189.41814135962036000000, +0.00000000000050815389, -43.15221363464823400000);
1084 aWeights.ChangeValue(6, 69) = +1.00932110415609880000;
1085 aPoles.ChangeValue(6, 69) = gp_Pnt(-191.98049421722968000000, -0.00000000000036869153, -41.14519558079494000000);
1086 aWeights.ChangeValue(6, 70) = +1.00934018958992230000;
1087 aPoles.ChangeValue(6, 70) = gp_Pnt(-194.51554398045388000000, +0.00000000000024701945, -39.10283303403318900000);
1088 aWeights.ChangeValue(6, 71) = +1.00926513417534820000;
1089 aPoles.ChangeValue(6, 71) = gp_Pnt(-197.02654362639632000000, +0.00000000000002378284, -37.03182458375535900000);
1090 aWeights.ChangeValue(6, 72) = +1.00924284324015100000;
1091 aPoles.ChangeValue(6, 72) = gp_Pnt(-199.50902604112426000000, +0.00000000000001468063, -34.92696457232537500000);
1092 aWeights.ChangeValue(6, 73) = +1.00920104311988210000;
1093 aPoles.ChangeValue(6, 73) = gp_Pnt(-201.96417476016930000000, +0.00000000000004485301, -32.79087292323346500000);
1094 aWeights.ChangeValue(6, 74) = +1.00917029694376930000;
1095 aPoles.ChangeValue(6, 74) = gp_Pnt(-204.41947086956830000000, +0.00000000000007013856, -30.65436716589900700000);
1096 aWeights.ChangeValue(6, 75) = +1.00906597799622610000;
1097 aPoles.ChangeValue(6, 75) = gp_Pnt(-206.84718146821811000000, -0.00000000000006381675, -28.48746943619916600000);
1098 aWeights.ChangeValue(6, 76) = +1.00920552993238920000;
1099 aPoles.ChangeValue(6, 76) = gp_Pnt(-209.24487385523256000000, +0.00000000000020688933, -26.28443183778934900000);
1100 aWeights.ChangeValue(6, 77) = +1.00876475817276390000;
1101 aPoles.ChangeValue(6, 77) = gp_Pnt(-211.61934752962611000000, -0.00000000000012087895, -24.05869960942788700000);
1102 aWeights.ChangeValue(6, 78) = +1.00888387250480620000;
1103 aPoles.ChangeValue(6, 78) = gp_Pnt(-213.96155431166437000000, +0.00000000000019025578, -21.80066237623914200000);
1104 aWeights.ChangeValue(6, 79) = +1.00881670070678450000;
1105 aPoles.ChangeValue(6, 79) = gp_Pnt(-216.26151615033589000000, -0.00000000000009572292, -19.49741392382435400000);
1106 aWeights.ChangeValue(6, 80) = +1.00875338528797620000;
1107 aPoles.ChangeValue(6, 80) = gp_Pnt(-218.54531424806936000000, +0.00000000000008182630, -17.17704407009146500000);
1108 aWeights.ChangeValue(6, 81) = +1.00842683370719580000;
1109 aPoles.ChangeValue(6, 81) = gp_Pnt(-220.79435406720884000000, +0.00000000000004973799, -14.82789528118522200000);
1110 aWeights.ChangeValue(7, 1) = +1.02986327036737910000;
1111 aPoles.ChangeValue(7, 1) = gp_Pnt(+133.20307692191452000000, -0.00000000000000177636, -68.87095947031473000000);
1112 aWeights.ChangeValue(7, 2) = +1.02989244478762340000;
1113 aPoles.ChangeValue(7, 2) = gp_Pnt(+130.12738123407763000000, -0.00000000000000516390, -70.57040146390383500000);
1114 aWeights.ChangeValue(7, 3) = +1.02991676091110000000;
1115 aPoles.ChangeValue(7, 3) = gp_Pnt(+127.02840986317391000000, +0.00000000000000554535, -72.22789464235242500000);
1116 aWeights.ChangeValue(7, 4) = +1.02993613450137910000;
1117 aPoles.ChangeValue(7, 4) = gp_Pnt(+123.90694758506712000000, -0.00000000000000702621, -73.84302715009133100000);
1118 aWeights.ChangeValue(7, 5) = +1.02995970896171030000;
1119 aPoles.ChangeValue(7, 5) = gp_Pnt(+120.76360256847768000000, -0.00000000000000047370, -75.41549467632542300000);
1120 aWeights.ChangeValue(7, 6) = +1.02998196300924330000;
1121 aPoles.ChangeValue(7, 6) = gp_Pnt(+117.59908279457284000000, +0.00000000000000772901, -76.94495426059752700000);
1122 aWeights.ChangeValue(7, 7) = +1.02999781361776170000;
1123 aPoles.ChangeValue(7, 7) = gp_Pnt(+114.41407453952652000000, -0.00000000000000327310, -78.43108601253017300000);
1124 aWeights.ChangeValue(7, 8) = +1.03001626830282000000;
1125 aPoles.ChangeValue(7, 8) = gp_Pnt(+111.20931631680004000000, +0.00000000000000421483, -79.87356087705671800000);
1126 aWeights.ChangeValue(7, 9) = +1.03004822145821140000;
1127 aPoles.ChangeValue(7, 9) = gp_Pnt(+104.76172782897289000000, +0.00000000000000259283, -82.67059011797552200000);
1128 aWeights.ChangeValue(7, 10) = +1.03006364818919470000;
1129 aPoles.ChangeValue(7, 10) = gp_Pnt(+101.51889932580750000000, +0.00000000000000793496, -84.02514647707548100000);
1130 aWeights.ChangeValue(7, 11) = +1.03007725635610380000;
1131 aPoles.ChangeValue(7, 11) = gp_Pnt(+98.25768758130365700000, +0.00000000000000127608, -85.33546669488836800000);
1132 aWeights.ChangeValue(7, 12) = +1.03009045031501540000;
1133 aPoles.ChangeValue(7, 12) = gp_Pnt(+94.97880175952953200000, +0.00000000000000289709, -86.60126064632369500000);
1134 aWeights.ChangeValue(7, 13) = +1.03010285398165520000;
1135 aPoles.ChangeValue(7, 13) = gp_Pnt(+91.68295682468645700000, +0.00000000000000548904, -87.82224920548925700000);
1136 aWeights.ChangeValue(7, 14) = +1.03011393120368040000;
1137 aPoles.ChangeValue(7, 14) = gp_Pnt(+88.37086140882031800000, -0.00000000000000004450, -88.99816853898946100000);
1138 aWeights.ChangeValue(7, 15) = +1.03012484065781210000;
1139 aPoles.ChangeValue(7, 15) = gp_Pnt(+85.04324466385365600000, +0.00000000000000407116, -90.12875955698966400000);
1140 aWeights.ChangeValue(7, 16) = +1.03015471267321310000;
1141 aPoles.ChangeValue(7, 16) = gp_Pnt(+75.01621211174902700000, +0.00000000000001208092, -93.38380423550353300000);
1142 aWeights.ChangeValue(7, 17) = +1.03017194800922480000;
1143 aPoles.ChangeValue(7, 17) = gp_Pnt(+68.27251352067813200000, +0.00000000000001147779, -95.37146758037383200000);
1144 aWeights.ChangeValue(7, 18) = +1.03018680682765580000;
1145 aPoles.ChangeValue(7, 18) = gp_Pnt(+61.47507566136914600000, +0.00000000000000851456, -97.17487791831784700000);
1146 aWeights.ChangeValue(7, 19) = +1.03019958109549560000;
1147 aPoles.ChangeValue(7, 19) = gp_Pnt(+54.62953031922813800000, +0.00000000000000645560, -98.79238303220959900000);
1148 aWeights.ChangeValue(7, 20) = +1.03021050389503310000;
1149 aPoles.ChangeValue(7, 20) = gp_Pnt(+47.74179355100338300000, +0.00000000000000683493, -100.22257163394704000000);
1150 aWeights.ChangeValue(7, 21) = +1.03021974942385920000;
1151 aPoles.ChangeValue(7, 21) = gp_Pnt(+40.81806392732334400000, +0.00000000000000945638, -101.46427420633951000000);
1152 aWeights.ChangeValue(7, 22) = +1.03022743299486530000;
1153 aPoles.ChangeValue(7, 22) = gp_Pnt(+33.86482072309787100000, +0.00000000000001239365, -102.51656369616552000000);
1154 aWeights.ChangeValue(7, 23) = +1.03023979631718960000;
1155 aPoles.ChangeValue(7, 23) = gp_Pnt(+19.91267581058432200000, +0.00000000000001269021, -104.24092170462040000000);
1156 aWeights.ChangeValue(7, 24) = +1.03024450452679180000;
1157 aPoles.ChangeValue(7, 24) = gp_Pnt(+12.91322103073442500000, +0.00000000000001310657, -104.91296575233191000000);
1158 aWeights.ChangeValue(7, 25) = +1.03024781840890150000;
1159 aPoles.ChangeValue(7, 25) = gp_Pnt(+5.89663552968925500000, +0.00000000000001362222, -105.39416639705574000000);
1160 aWeights.ChangeValue(7, 26) = +1.03024979501191980000;
1161 aPoles.ChangeValue(7, 26) = gp_Pnt(-1.13093554742009240000, +0.00000000000001442955, -105.68402704533355000000);
1162 aWeights.ChangeValue(7, 27) = +1.03025046568879810000;
1163 aPoles.ChangeValue(7, 27) = gp_Pnt(-8.16338049757019310000, +0.00000000000001553070, -105.78227646648484000000);
1164 aWeights.ChangeValue(7, 28) = +1.03024983609703620000;
1165 aPoles.ChangeValue(7, 28) = gp_Pnt(-15.19462185431612500000, +0.00000000000001673746, -105.68886888131540000000);
1166 aWeights.ChangeValue(7, 29) = +1.03024788619868390000;
1167 aPoles.ChangeValue(7, 29) = gp_Pnt(-22.21861718693262200000, +0.00000000000001767135, -105.40398398356824000000);
1168 aWeights.ChangeValue(7, 30) = +1.03024126030624560000;
1169 aPoles.ChangeValue(7, 30) = gp_Pnt(-36.24014829916134100000, +0.00000000000002019891, -104.45206611492652000000);
1170 aWeights.ChangeValue(7, 31) = +1.03023657011944200000;
1171 aPoles.ChangeValue(7, 31) = gp_Pnt(-43.23771519136024500000, +0.00000000000002161068, -103.78502949380328000000);
1172 aWeights.ChangeValue(7, 32) = +1.03023047292900840000;
1173 aPoles.ChangeValue(7, 32) = gp_Pnt(-50.21605719916001900000, +0.00000000000002249329, -102.92731708926736000000);
1174 aWeights.ChangeValue(7, 33) = +1.03022290017099440000;
1175 aPoles.ChangeValue(7, 33) = gp_Pnt(-57.16920057960702200000, +0.00000000000002320995, -101.87955571848956000000);
1176 aWeights.ChangeValue(7, 34) = +1.03021374148842140000;
1177 aPoles.ChangeValue(7, 34) = gp_Pnt(-64.09120253994868200000, +0.00000000000002399266, -100.64259867222304000000);
1178 aWeights.ChangeValue(7, 35) = +1.03020284473128120000;
1179 aPoles.ChangeValue(7, 35) = gp_Pnt(-70.97615252947152000000, +0.00000000000002494226, -99.21752532044712300000);
1180 aWeights.ChangeValue(7, 36) = +1.03019001595653670000;
1181 aPoles.ChangeValue(7, 36) = gp_Pnt(-77.81817349811507300000, +0.00000000000002602838, -97.60564061068184600000);
1182 aWeights.ChangeValue(7, 37) = +1.03016805964614980000;
1183 aPoles.ChangeValue(7, 37) = gp_Pnt(-87.76549855749630100000, +0.00000000000002703745, -94.97405836608523100000);
1184 aWeights.ChangeValue(7, 38) = +1.03016062145972500000;
1185 aPoles.ChangeValue(7, 38) = gp_Pnt(-90.90906843451735100000, +0.00000000000002735353, -94.09969925934423400000);
1186 aWeights.ChangeValue(7, 39) = +1.03015268516758060000;
1187 aPoles.ChangeValue(7, 39) = gp_Pnt(-94.04154842308000200000, +0.00000000000002795160, -93.18554984223239000000);
1188 aWeights.ChangeValue(7, 40) = +1.03014422393874510000;
1189 aPoles.ChangeValue(7, 40) = gp_Pnt(-97.16235536263198500000, +0.00000000000002873660, -92.23177350871787900000);
1190 aWeights.ChangeValue(7, 41) = +1.03013520381253840000;
1191 aPoles.ChangeValue(7, 41) = gp_Pnt(-100.27090735629974000000, +0.00000000000002960449, -91.23854430518403500000);
1192 aWeights.ChangeValue(7, 42) = +1.03012558369857450000;
1193 aPoles.ChangeValue(7, 42) = gp_Pnt(-103.36662387191370000000, +0.00000000000003044224, -90.20604688574815100000);
1194 aWeights.ChangeValue(7, 43) = +1.03011531537676040000;
1195 aPoles.ChangeValue(7, 43) = gp_Pnt(-106.44892584135401000000, +0.00000000000003112785, -89.13447646370049400000);
1196 aWeights.ChangeValue(7, 44) = +1.03009266486582220000;
1197 aPoles.ChangeValue(7, 44) = gp_Pnt(-112.82164316087234000000, +0.00000000000002877514, -86.82815610446842000000);
1198 aWeights.ChangeValue(7, 45) = +1.03007954250937140000;
1199 aPoles.ChangeValue(7, 45) = gp_Pnt(-116.10982863064515000000, +0.00000000000005217709, -85.58719260568324200000);
1200 aWeights.ChangeValue(7, 46) = +1.03006700046765860000;
1201 aPoles.ChangeValue(7, 46) = gp_Pnt(-119.38108228759732000000, -0.00000000000000364635, -84.30140001571530200000);
1202 aWeights.ChangeValue(7, 47) = +1.03005153385603830000;
1203 aPoles.ChangeValue(7, 47) = gp_Pnt(-122.63466837574235000000, +0.00000000000007773224, -82.97105629274108200000);
1204 aWeights.ChangeValue(7, 48) = +1.03003663316235050000;
1205 aPoles.ChangeValue(7, 48) = gp_Pnt(-125.86988610286646000000, +0.00000000000000501775, -81.59643931580511400000);
1206 aWeights.ChangeValue(7, 49) = +1.03002002524069390000;
1207 aPoles.ChangeValue(7, 49) = gp_Pnt(-129.08600965998806000000, +0.00000000000004872530, -80.17785297868806500000);
1208 aWeights.ChangeValue(7, 50) = +1.03000192732158440000;
1209 aPoles.ChangeValue(7, 50) = gp_Pnt(-132.28232849510800000000, +0.00000000000003627431, -78.71561001568775900000);
1210 aWeights.ChangeValue(7, 51) = +1.02996526567106140000;
1211 aPoles.ChangeValue(7, 51) = gp_Pnt(-138.40719443250111000000, +0.00000000000004030865, -75.81195871455292900000);
1212 aWeights.ChangeValue(7, 52) = +1.02994403451619650000;
1213 aPoles.ChangeValue(7, 52) = gp_Pnt(-141.33856968181306000000, +0.00000000000003444592, -74.37651555974527200000);
1214 aWeights.ChangeValue(7, 53) = +1.02992866105480000000;
1215 aPoles.ChangeValue(7, 53) = gp_Pnt(-144.25171811139330000000, +0.00000000000003429445, -72.90395453557894700000);
1216 aWeights.ChangeValue(7, 54) = +1.02989968743351530000;
1217 aPoles.ChangeValue(7, 54) = gp_Pnt(-147.14603336223070000000, +0.00000000000004355038, -71.39457006641885100000);
1218 aWeights.ChangeValue(7, 55) = +1.02988222474475720000;
1219 aPoles.ChangeValue(7, 55) = gp_Pnt(-150.02095857157173000000, +0.00000000000003217269, -69.84863841933133700000);
1220 aWeights.ChangeValue(7, 56) = +1.02985386954430420000;
1221 aPoles.ChangeValue(7, 56) = gp_Pnt(-152.87595706513403000000, +0.00000000000003648661, -68.26644064265008200000);
1222 aWeights.ChangeValue(7, 57) = +1.02982704006085530000;
1223 aPoles.ChangeValue(7, 57) = gp_Pnt(-155.71041601974636000000, +0.00000000000003591181, -66.64830754728993200000);
1224 aWeights.ChangeValue(7, 58) = +1.02976639514271140000;
1225 aPoles.ChangeValue(7, 58) = gp_Pnt(-161.55369960091491000000, +0.00000000000003646415, -63.21332070345936700000);
1226 aWeights.ChangeValue(7, 59) = +1.02972545417744080000;
1227 aPoles.ChangeValue(7, 59) = gp_Pnt(-164.55974256681068000000, +0.00000000000003294676, -61.39167299907511900000);
1228 aWeights.ChangeValue(7, 60) = +1.02970377642180270000;
1229 aPoles.ChangeValue(7, 60) = gp_Pnt(-167.53873683551103000000, +0.00000000000002190344, -59.52621075357659900000);
1230 aWeights.ChangeValue(7, 61) = +1.02963665582099750000;
1231 aPoles.ChangeValue(7, 61) = gp_Pnt(-170.49570646978711000000, +0.00000000000009010479, -57.62531748377598000000);
1232 aWeights.ChangeValue(7, 62) = +1.02961756328110620000;
1233 aPoles.ChangeValue(7, 62) = gp_Pnt(-173.42176702363508000000, -0.00000000000003499440, -55.67944052993496500000);
1234 aWeights.ChangeValue(7, 63) = +1.02954937293567860000;
1235 aPoles.ChangeValue(7, 63) = gp_Pnt(-176.32284460610933000000, +0.00000000000007636921, -53.69521656711459900000);
1236 aWeights.ChangeValue(7, 64) = +1.02950097342681770000;
1237 aPoles.ChangeValue(7, 64) = gp_Pnt(-179.19569709355173000000, +0.00000000000003273955, -51.67161593723249500000);
1238 aWeights.ChangeValue(7, 65) = +1.02943612532291810000;
1239 aPoles.ChangeValue(7, 65) = gp_Pnt(-182.04053139917158000000, +0.00000000000003996803, -49.60917258111981500000);
1240 aWeights.ChangeValue(7, 66) = +1.02937840445762090000;
1241 aPoles.ChangeValue(7, 66) = gp_Pnt(-184.68250151172640000000, +0.00000000000004112926, -47.69381589112448700000);
1242 aWeights.ChangeValue(7, 67) = +1.02929786839945800000;
1243 aPoles.ChangeValue(7, 67) = gp_Pnt(-187.30004443981446000000, +0.00000000000003629801, -45.74517623046489900000);
1244 aWeights.ChangeValue(7, 68) = +1.02927785532615720000;
1245 aPoles.ChangeValue(7, 68) = gp_Pnt(-189.89358418563035000000, +0.00000000000003708012, -43.76295173174737800000);
1246 aWeights.ChangeValue(7, 69) = +1.02909457173661250000;
1247 aPoles.ChangeValue(7, 69) = gp_Pnt(-192.46070903458983000000, +0.00000000000005500515, -41.74904085552218200000);
1248 aWeights.ChangeValue(7, 70) = +1.02915656102268340000;
1249 aPoles.ChangeValue(7, 70) = gp_Pnt(-195.00353322314638000000, +0.00000000000002645256, -39.70148425813464900000);
1250 aWeights.ChangeValue(7, 71) = +1.02891246604057510000;
1251 aPoles.ChangeValue(7, 71) = gp_Pnt(-197.51895024482548000000, +0.00000000000005006422, -37.62251287581096900000);
1252 aWeights.ChangeValue(7, 72) = +1.02884001996279940000;
1253 aPoles.ChangeValue(7, 72) = gp_Pnt(-200.00717902020989000000, +0.00000000000003866246, -35.51147139839754600000);
1254 aWeights.ChangeValue(7, 73) = +1.02870418206103280000;
1255 aPoles.ChangeValue(7, 73) = gp_Pnt(-202.46745722827831000000, +0.00000000000003996803, -33.36845405838467800000);
1256 aWeights.ChangeValue(7, 74) = +1.02860417892808040000;
1257 aPoles.ChangeValue(7, 74) = gp_Pnt(-204.92874075079348000000, +0.00000000000003952569, -31.22492832365916000000);
1258 aWeights.ChangeValue(7, 75) = +1.02826579045574770000;
1259 aPoles.ChangeValue(7, 75) = gp_Pnt(-207.35951843182116000000, +0.00000000000002864861, -29.04902036970887700000);
1260 aWeights.ChangeValue(7, 76) = +1.02871793966685040000;
1261 aPoles.ChangeValue(7, 76) = gp_Pnt(-209.76815931164757000000, +0.00000000000007786791, -26.84449461829588300000);
1262 aWeights.ChangeValue(7, 77) = +1.02728787827248790000;
1263 aPoles.ChangeValue(7, 77) = gp_Pnt(-212.13952611955784000000, -0.00000000000002645359, -24.59453985262025100000);
1264 aWeights.ChangeValue(7, 78) = +1.02767535385751650000;
1265 aPoles.ChangeValue(7, 78) = gp_Pnt(-214.48523983715771000000, +0.00000000000011316462, -22.34028621398329100000);
1266 aWeights.ChangeValue(7, 79) = +1.02745809923196680000;
1267 aPoles.ChangeValue(7, 79) = gp_Pnt(-216.79261871005519000000, -0.00000000000002978790, -20.02558452892611700000);
1268 aWeights.ChangeValue(7, 80) = +1.02725110106353260000;
1269 aPoles.ChangeValue(7, 80) = gp_Pnt(-219.08116944862113000000, +0.00000000000005732296, -17.69632354506026700000);
1270 aWeights.ChangeValue(7, 81) = +1.02619749797986360000;
1271 aPoles.ChangeValue(7, 81) = gp_Pnt(-221.32510969435936000000, +0.00000000000004618528, -15.33078661161192400000);
1272 }
1273 ////
1274
1275 const Handle(Geom_Surface) aS1 = new Geom_BSplineSurface(aPoles, aWeights, aUKnots, aVKnots, aUMult, aVMult, aUDegree, aVDegree);
1276
1277 char buff[1024];
1278
1279 Sprintf(buff, "%s_1", theArgVal[1]);
1280 DrawTrSurf::Set(buff, aS1);
1281 theDI << buff << " ";
1282
1283 Sprintf(buff, "%s_2", theArgVal[1]);
1284 DrawTrSurf::Set(buff, aS2);
1285 theDI << buff << "\n";
1286
1287 return 0;
1288}
1289
4db4247a 1290namespace AllocTest
1291{
1292 // The test is based of occupying of all available virtual memory.
1293 // Obviously it has no sense on 64-bit platforms.
1294
9fd2d2c3 1295 enum AllocTestStatus
4db4247a 1296 {
1297 NotApplicable = 0x1,
1298 OUMCatchOK = 0x2,
1299 OUMCatchFail = 0x4
1300 };
1301
1302 template<int> int test()
1303 {
1304 // non-32-bit implementation
1305 return NotApplicable;
1306 }
1307
1308 template<> int test<4>()
1309 {
1310 // 32-bit implementation
1311 NCollection_List<Standard_Address> aList;
1312 const Standard_Integer aBlockSizes[] = {100000, 10000, 10};
1313 int aStatus = 0;
1314
1315 // start populate memory with blocks of large size, then
1316 // smaller ones and so on according to content of the array aBlockSizes
1317 for (size_t i=0; i < sizeof(aBlockSizes)/sizeof(int); i++)
1318 {
1319 try
1320 {
1321 for (;;)
1322 aList.Append(Standard::Allocate(aBlockSizes[i]));
1323 }
a738b534 1324 catch (Standard_Failure const&)
4db4247a 1325 {
1326 aStatus |= OUMCatchOK;
1327 }
1328 catch (...)
1329 {
1330 aStatus |= OUMCatchFail;
1331 break;
1332 }
1333 }
1334 // release all allocated blocks
1335 for (NCollection_List<Standard_Address>::Iterator it(aList); it.More(); it.Next())
1336 {
1337 Standard::Free(it.Value());
1338 }
1339 return aStatus;
1340 }
1341}
1342
1343//=======================================================================
1344//function : OCC24836
1345//purpose :
1346//=======================================================================
1347static Standard_Integer OCC24836 (Draw_Interpretor& theDI, Standard_Integer n, const char** a)
1348{
1349 if (n != 1)
1350 {
1351 theDI << "Usage : " << a[0] << "\n";
1352 return 1;
1353 }
1354
1355 int aStatus = AllocTest::test<sizeof(size_t)>();
1356
1357 if (aStatus & AllocTest::NotApplicable)
1358 theDI << "This test case is not applicable for 64-bit and higher platforms\n";
1359 if (aStatus & AllocTest::OUMCatchOK)
1360 theDI << "out-of-memory has been caught: OK\n";
1361 if (aStatus & AllocTest::OUMCatchFail)
1362 theDI << "Error: out-of-memory is not always caught\n";
1363 return 0;
1364}
1365
8447359f 1366
1367//=======================================================================
1368//function : OCC27021
1369//purpose : Tests performance of obtaining geometry (points) via topological
1370// exploring or fetching the geometry.
1371//=======================================================================
1372
1373// Fetch via topology
1374static std::pair<gp_Pnt, gp_Pnt> getVerticesA(const TopoDS_Edge& theEdge)
1375{
1376 std::pair<gp_Pnt, gp_Pnt> result;
1377
1378 static TopoDS_Vertex aFirst, aLast;
1379 TopExp::Vertices(theEdge, aFirst, aLast, Standard_True);
1380
1381 result.first = BRep_Tool::Pnt(aFirst);
1382 result.second = BRep_Tool::Pnt(aLast);
1383
1384 return result;
1385}
1386
1387//Geometrical way
1388static std::pair<gp_Pnt, gp_Pnt> getVerticesB(const TopoDS_Edge& theEdge)
1389{
1390 Standard_Real first;
1391 Standard_Real last;
1392
1393 Handle(Geom_Curve) curve = BRep_Tool::Curve(theEdge, first, last);
1394
1395 std::pair<gp_Pnt, gp_Pnt> result;
1396
1397 if (theEdge.Orientation() == TopAbs_REVERSED)
1398 {
1399 curve->D0(first, result.second);
1400 curve->D0(last, result.first);
1401 }
1402 else
1403 {
1404 curve->D0(first, result.first);
1405 curve->D0(last, result.second);
1406 }
1407 return result;
1408}
1409
1410
1411
1412static Standard_Integer OCC27021(Draw_Interpretor& theDI,
1413 Standard_Integer theNArg,
1414 const char ** theArgVal)
1415{
1416 if (theNArg != 2)
1417 {
1418 cout << "Use: " << theArgVal[0] << " shape" << endl;
1419 return 1;
1420 }
1421
1422 TopoDS_Shape shape (DBRep::Get(theArgVal[1]));
1423
1424 TopTools_IndexedMapOfShape shape_faces;
1425 TopExp::MapShapes(shape, TopAbs_FACE, shape_faces);
1426
1427 // Pick a single face which shows the problem.
1428 TopoDS_Face face = TopoDS::Face(shape_faces(10));
1429 TopTools_IndexedMapOfShape face_edges;
1430 TopExp::MapShapes(face, TopAbs_EDGE, face_edges);
1431 TopoDS_Edge edge = TopoDS::Edge(face_edges(2));
1432
1433 Standard_Integer iterations = 100000000;
1434
1435 std::pair<gp_Pnt, gp_Pnt> vertices;
1436 clock_t t = clock();
1437
c520fb2a 1438 theDI << "\nRetrieving " << iterations << " vertices using approach A)...\n";
8447359f 1439 for (int i = 0; i < iterations; ++i)
1440 {
1441 vertices = getVerticesA(edge);
1442 }
c520fb2a 1443 theDI << "COUNTER RetrievingVertA" << ": " << (clock() - t) / (double)CLOCKS_PER_SEC << "\n";
8447359f 1444 t = clock();
1445
c520fb2a 1446 theDI << "\nRetrieving " << iterations << " vertices using approach B)...\n";
8447359f 1447 for (int i = 0; i < iterations; ++i)
1448 {
1449 vertices = getVerticesB(edge);
1450 }
c520fb2a 1451 theDI << "COUNTER RetrievingVertB" << ": " << (clock() - t) / (double)CLOCKS_PER_SEC << "\n";
8447359f 1452
1453 return 0;
1454}
1455
b0cef606 1456//=======================================================================
1457//function : OCC27235
1458//purpose : check presentation in GDT document
1459//=======================================================================
1460static Standard_Integer OCC27235 (Draw_Interpretor& theDI, Standard_Integer n, const char** a)
1461{
1462 if (n < 2) {
1463 theDI<<"Use: OCC27235 Doc";
1464 return 1;
1465 }
1466
1467 Handle(TDocStd_Document) Doc;
1468 DDocStd::GetDocument(a[1], Doc);
1469 if ( Doc.IsNull() ) { theDI << a[1] << " is not a document\n"; return 1; }
1470 Handle(XCAFDoc_DimTolTool) aDimTolTool= XCAFDoc_DocumentTool::DimTolTool(Doc->Main());
1471 Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main());
1472 TopoDS_Compound aPresentations;
1473 BRep_Builder B;
1474 B.MakeCompound(aPresentations);
1475
1476 TDF_LabelSequence aLabels;
1477 aShapeTool->GetShapes(aLabels);
1478 for ( Standard_Integer i=1; i <= aLabels.Length(); i++ )
1479 {
1480 aShapeTool->GetSubShapes(aLabels.Value(i), aLabels);
1481 }
1482
1483 TDF_LabelSequence aGDTs;
1484 aDimTolTool->GetDimensionLabels(aGDTs);
1485 for (Standard_Integer i = 1; i <= aGDTs.Length(); i++) {
1486 Handle(XCAFDoc_Dimension) aDimAttr;
1487 if (!aGDTs.Value(i).FindAttribute(XCAFDoc_Dimension::GetID(),aDimAttr))
1488 continue;
1489 Handle(XCAFDimTolObjects_DimensionObject) anObject = aDimAttr->GetObject();
1490 if (anObject.IsNull())
1491 continue;
1492 TopoDS_Shape aShape = anObject->GetPresentation();
1493 if (!aShape.IsNull())
1494 B.Add(aPresentations, aShape);
1495 }
1496
1497 aGDTs.Clear();
1498 aDimTolTool->GetGeomToleranceLabels(aGDTs);
1499 for (Standard_Integer i = 1; i <= aGDTs.Length(); i++) {
1500 Handle(XCAFDoc_GeomTolerance) aGTAttr;
1501 if (!aGDTs.Value(i).FindAttribute(XCAFDoc_GeomTolerance::GetID(),aGTAttr))
1502 continue;
1503 Handle(XCAFDimTolObjects_GeomToleranceObject) anObject = aGTAttr->GetObject();
1504 if (anObject.IsNull())
1505 continue;
1506 TopoDS_Shape aShape = anObject->GetPresentation();
1507 if (!aShape.IsNull())
1508 B.Add(aPresentations, aShape);
1509 }
1510
1511 for ( Standard_Integer i=1; i <= aLabels.Length(); i++ )
1512 {
1513 TDF_LabelSequence aDatL;
1514 if(aDimTolTool->GetRefDatumLabel(aLabels.Value(i), aDatL))
1515 {
1516 for(Standard_Integer j = aDatL.Lower(); j <= aDatL.Upper(); j++)
1517 {
1518 Handle(XCAFDoc_Datum) aDat;
1519 if(!aDatL.Value(j).FindAttribute(XCAFDoc_Datum::GetID(), aDat))
1520 continue;
1521 Handle(XCAFDimTolObjects_DatumObject) anObject = aDat->GetObject();
1522 if (anObject.IsNull())
1523 continue;
1524 TopoDS_Shape aShape = anObject->GetPresentation();
1525 if (!aShape.IsNull())
1526 B.Add(aPresentations, aShape);
1527 }
1528 }
1529 }
1530
1531 GProp_GProps aG;
1532 BRepGProp::LinearProperties(aPresentations, aG);
1533 gp_Pnt aPnt = aG.CentreOfMass();
1534 theDI << "Centre of mass: " << aPnt.X() << " " << aPnt.Y() << " " << aPnt.Z() << "\n";
1535 theDI << "Mass: " << aG.Mass() << "\n";
1536
1537 return 0;
1538}
1539
02fd709b 1540//=======================================================================
1541//function : OCC24836
1542//purpose :
1543//=======================================================================
1544static Standard_Integer OCC26930(Draw_Interpretor& theDI,
1545 Standard_Integer theNArg,
1546 const char ** theArgVal)
1547{
1548 if (theNArg != 5)
1549 {
1550 cout << "Use: " << theArgVal[0] <<" surface curve start end" << endl;
1551 return 1;
1552 }
1553
1554
1555
1556
1557
1558 Handle(Geom_Surface) aSurface = DrawTrSurf::GetSurface(theArgVal[1]);
1559 Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(theArgVal[2]);
1560 Standard_Real aStart = Draw::Atof(theArgVal[3]);
1561 Standard_Real anEnd = Draw::Atof(theArgVal[4]);
1562
1563 //project
1564 Handle (Geom2d_Curve) aPCurve;
1565
1566 ShapeConstruct_ProjectCurveOnSurface aProj;
1567 aProj.Init(aSurface, Precision::Confusion());
1568 {
1569 try {
1570 Handle (Geom_Curve) aTmpCurve = aCurve; //to use reference in Perform()
1571 aProj.Perform (aTmpCurve, aStart, anEnd, aPCurve);
1572 } catch (const Standard_Failure&) {
1573 }
1574 }
1575
1576 //check results
1577 if (aPCurve.IsNull()) {
1578 theDI << "Error: pcurve is null\n";
1579 }
1580 else {
1581 if (aPCurve->IsKind(STANDARD_TYPE(Geom2d_Line))) {
1582 theDI << "Pcurve is line: OK\n";
1583 }
1584 else {
1585 theDI << "Error: PCurve is not line\n";
1586 }
1587 }
1588
1589 return 0;
1590}
8447359f 1591
e5260e1d 1592//=======================================================================
5ae6e53d 1593//function : OCC27341
1594//purpose : check exact HLR algorighm's work
1595//=======================================================================
1596static Standard_Integer OCC27341 (Draw_Interpretor& , Standard_Integer n, const char** a)
1597{
1598 if (n != 4)
1599 {
1600 cout << "Use: OCC27341 res shape axo/top/bottom/front/back/left/right" << endl;
1601 return 1;
1602 }
1603
1604 TopoDS_Shape aShape = DBRep::Get(a[2]);
1605 if (aShape.IsNull())
1606 return 1;
1607
1608 gp_Pnt anOrigin(0.,0.,0.);
1609 gp_Dir aNormal(0.57735026918962573, -0.57735026918962573, 0.57735026918962573);
1610 gp_Ax2 anAxes(anOrigin, aNormal);
1611 gp_Dir aDX = anAxes.XDirection();
1612
1613 HLRAppli_ReflectLines Reflector(aShape);
1614
1615 if (strcmp(a[3],"axo") == 0)
1616 {
1617 aNormal.SetCoord(0.57735026918962573, -0.57735026918962573, 0.57735026918962573);
1618 aDX.SetCoord(-0.40824829046386307, 0.40824829046386307, 0.81649658092772615);
1619 }
1620 else if (strcmp(a[3],"top") == 0)
1621 {
1622 aNormal.SetCoord(0,0,1);
1623 aDX.SetCoord(0,1,0);
1624 }
1625 else if (strcmp(a[3],"bottom") == 0)
1626 {
1627 aNormal.SetCoord(0,0,-1);
1628 aDX.SetCoord(0,-1,0);
1629 }
1630 else if (strcmp(a[3],"front") == 0)
1631 {
1632 aNormal.SetCoord(0,-1,0);
1633 aDX.SetCoord(0,0,1);
1634 }
1635 else if (strcmp(a[3],"back") == 0)
1636 {
1637 aNormal.SetCoord(0,1,0);
1638 aDX.SetCoord(0,0,1);
1639 }
1640 else if (strcmp(a[3],"left") == 0)
1641 {
1642 aNormal.SetCoord(-1,0,0);
1643 aDX.SetCoord(0,0,1);
1644 }
1645 else if (strcmp(a[3],"right") == 0)
1646 {
1647 aNormal.SetCoord(1,0,0);
1648 aDX.SetCoord(0,0,1);
1649 }
1650
1651 Reflector.SetAxes(aNormal.X(), aNormal.Y(), aNormal.Z(),
1652 anOrigin.X(), anOrigin.Y(), anOrigin.Z(),
1653 aDX.X(), aDX.Y(), aDX.Z());
1654
1655 Reflector.Perform();
1656
1657 TopoDS_Compound Result;
1658 BRep_Builder BB;
1659 BB.MakeCompound(Result);
1660
1661 TopoDS_Shape SharpEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Sharp, Standard_True, Standard_False);
1662 if (!SharpEdges.IsNull())
1663 BB.Add(Result, SharpEdges);
1664 TopoDS_Shape OutLines = Reflector.GetCompoundOf3dEdges(HLRBRep_OutLine, Standard_True, Standard_False);
1665 if (!OutLines.IsNull())
1666 BB.Add(Result, OutLines);
1667 TopoDS_Shape SmoothEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Rg1Line, Standard_True, Standard_False);
1668 if (!SmoothEdges.IsNull())
1669 BB.Add(Result, SmoothEdges);
1670
1671 DBRep::Set(a[1], Result);
1672
1673 return 0;
1674}
1675
1676//=======================================================================
e5260e1d 1677//function : OCC27466
1678//purpose :
1679//=======================================================================
1680static Standard_Integer OCC27466(Draw_Interpretor& theDI,
1681 Standard_Integer theNArg,
1682 const char ** theArgVal)
1683{
1684 if (theNArg != 4)
1685 {
1686 cout << "Use: " << theArgVal[0] << " face point start_pnt2d" << endl;
1687 return 1;
1688 }
1689
1690 TopoDS_Face aFace = TopoDS::Face(DBRep::Get(theArgVal[1], TopAbs_FACE, Standard_True));
1691 if (aFace.IsNull())
1692 return 1;
1693 gp_Pnt aPnt;
1694 if (!DrawTrSurf::GetPoint(theArgVal[2], aPnt))
1695 return 1;
1696 gp_Pnt2d aUV;
1697 if (!DrawTrSurf::GetPoint2d(theArgVal[3], aUV))
1698 return 1;
1699 BRepAdaptor_Surface aSurf(aFace);
1700
1701 Standard_Real aTolU = Precision::PConfusion();
1702 Standard_Real aTolV = Precision::PConfusion();
1703
1704 Extrema_GenLocateExtPS anExtrema(aSurf, aTolU, aTolV);
1705 anExtrema.Perform(aPnt, aUV.X(), aUV.Y(), Standard_True);
1706
1707 if (!anExtrema.IsDone())
1708 {
1709 theDI << "Error: Extrema is not done";
1710 }
1711 else
1712 {
1713 Standard_Real aSqDist = anExtrema.SquareDistance();
1714 gp_Pnt aResPnt = anExtrema.Point().Value();
1715 Standard_Real u, v;
1716 anExtrema.Point().Parameter(u, v);
1717 gp_Pnt2d aResUV(u, v);
1718 DrawTrSurf::Set((TCollection_AsciiString(theArgVal[2]) + "_res").ToCString(), aResPnt);
1719 DrawTrSurf::Set((TCollection_AsciiString(theArgVal[3]) + "_res").ToCString(), aResUV);
1720 theDI << theArgVal[2] << "_res and " << theArgVal[3] << "_res are created, dist=" << sqrt(aSqDist);
1721 }
1722 return 0;
1723}
1724
c1609fbe 1725#include <GCE2d_MakeParabola.hxx>
1726#include <gp_Ax22d.hxx>
1727#include <Geom2d_Parabola.hxx>
1728#include <gp_Parab2d.hxx>
1729
1730namespace Parab2d_Bug26747
1731{
1732 //Directrix and X-axe direction
1733 gp_Ax2d Axes;
1734
1735 //Focus
1736 gp_Pnt2d FocusPoint;
1737
1738 //Focal length
1739 Standard_Real FocalLength;
1740
1741 //Coordiantes of the vertex
1742 Standard_Real VertX, VertY;
1743
1744 //Parameter
1745 Standard_Real Parameter;
1746
1747 //Coefficients
1748 Standard_Real Coeffs[6];
1749}
1750
1751//========================================================================
1752//function : OCC26747_CheckParabola
1753//purpose : Checks if created parabola is correct
1754//========================================================================
1755static void OCC26747_CheckParabola(Draw_Interpretor& theDI,
1756 const char *theName,
1757 const Standard_Boolean theSense = Standard_True)
1758{
1759 const Standard_Real aCompareTol = 1.0e-12;
1760
1761 // Directrix, Focus
1762 GCE2d_MakeParabola aPrb(Parab2d_Bug26747::Axes, Parab2d_Bug26747::FocusPoint, theSense);
1763
1764 DrawTrSurf::Set(theName, aPrb.Value());
1765
1766 gp_Pnt2d aVert(aPrb.Value()->Parab2d().Location());
1767
1768 theDI << "Focal Length: " << aPrb.Value()->Parab2d().Focal() << "\n";
1769 theDI << "Vertex (" << aVert.X() << ", " << aVert.Y() << ")\n";
1770 theDI << "Parameter = " << aPrb.Value()->Parab2d().Parameter() << "\n";
1771
1772 Standard_Real aF[6] = {RealLast(), RealLast(), RealLast(),
1773 RealLast(), RealLast(), RealLast()};
1774 aPrb.Value()->Parab2d().Coefficients(aF[0], aF[1], aF[2], aF[3], aF[4], aF[5]);
1775 theDI << "A = " << aF[0] << ", B = " << aF[1] << ", C = " << aF[2] <<
1776 ", D = " << aF[3] << ", E = " << aF[4] << ", F = " << aF[5] << "\n";
1777
1778 if(Abs(aPrb.Value()->Parab2d().Focal() -
1779 Parab2d_Bug26747::FocalLength) > aCompareTol)
1780 theDI << "Error in focal length computation!\n";
1781
1782 if( (Abs(aVert.X() - Parab2d_Bug26747::VertX) > aCompareTol) ||
1783 (Abs(aVert.Y() - Parab2d_Bug26747::VertY) > aCompareTol))
1784 theDI << "Error in vertex computation!\n";
1785
1786 if(Abs(aPrb.Value()->Parab2d().Parameter() -
1787 Parab2d_Bug26747::Parameter) > aCompareTol)
1788 theDI << "Error in parameter computation!\n";
1789
1790 for(int i = 0; i < 6; i++)
1791 {
1792 if(Abs(aF[i] - Parab2d_Bug26747::Coeffs[i]) > aCompareTol)
1793 {
1794 theDI << "Error in " << i << "-th coefficient computation!\n";
1795 }
1796 }
1797}
1798
1799//========================================================================
1800//function : OCC26747_1
1801//purpose : Creates a 2D-parabola for testing
1802//========================================================================
1803static Standard_Integer OCC26747_1(Draw_Interpretor& theDI,
1804 Standard_Integer theNArg,
1805 const char ** theArgVal)
1806{
1807 if(theNArg < 2)
1808 {
1809 theDI << "Use: OCC26747_1 result\n";
1810 return 1;
1811 }
1812
1813 //Expected parabola:
1814
1815 // ^ Y
1816 // |
1817 // |
1818 // |
1819 // |
1820 // | o
1821 // | A o F
1822 // | o x
1823 // | o
1824 // | o
1825 // |
1826 // ---------------------------> X
1827
1828 // where
1829 // Y-axe is the directrix of the parabola,
1830 // A(0.5, 3.0) is a Vertex of the parabola,
1831 // F(1.0, 3.0) is the focus of the parabola,
1832 // Focal length is 0.5,
1833 // Parameter of the parabola is 1.
1834 // Equation: (y-3)^2=2*p*(x-0.5), i.e. (y-3)^2=2*(x-0.5)
1835 // A * X^2 + B * Y^2 + 2*C*X*Y + 2*D*X + 2*E*Y + F = 0.
1836 // OR
1837 // 0 * X^2 + 1 * Y^2 + 2*0*X*Y + 2*(-1)*X + 2*(-3)*Y + 10 = 0.
1838
1839 Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 3.0), gp_Dir2d(0.0, 1.0));
1840 Parab2d_Bug26747::FocusPoint.SetCoord(1.0, 3.0);
1841
1842 Parab2d_Bug26747::FocalLength = 0.5;
1843
1844 Parab2d_Bug26747::VertX = 0.5;
1845 Parab2d_Bug26747::VertY = 3.0;
1846
1847 Parab2d_Bug26747::Parameter = 1.0;
1848
1849 Parab2d_Bug26747::Coeffs[0] = 0.0;
1850 Parab2d_Bug26747::Coeffs[1] = 1.0;
1851 Parab2d_Bug26747::Coeffs[2] = 0.0;
1852 Parab2d_Bug26747::Coeffs[3] = -1.0;
1853 Parab2d_Bug26747::Coeffs[4] = -3.0;
1854 Parab2d_Bug26747::Coeffs[5] = 10.0;
1855
1856 OCC26747_CheckParabola(theDI, theArgVal[1]);
1857
1858 return 0;
1859}
1860
1861//=======================================================================
1862//function : OCC26747_2
1863//purpose : Creates a 2D-parabola for testing
1864//=======================================================================
1865static Standard_Integer OCC26747_2(Draw_Interpretor& theDI,
1866 Standard_Integer theNArg,
1867 const char ** theArgVal)
1868{
1869 if(theNArg < 2)
1870 {
1871 theDI << "Use: OCC26747_2 result\n";
1872 return 1;
1873 }
1874
1875 //Expected parabola:
1876
1877 // ^ Y
1878 // |
1879 // o |
1880 // o |
1881 // F x o A |
1882 // o |
1883 // o |
1884 // |
1885 // <------------------------
1886 // X
1887
1888 // where (in UCS - User Coordinate System, - which
1889 // is shown in the picture):
1890 // Y-axe is the directrix of the parabola,
1891 // A(0.5, 3.0) is a Vertex of the parabola,
1892 // F(1.0, 3.0) is the focus of the parabola.
1893 //
1894 // In WCS (World Coordinate System) these points have coordinates:
1895 // A(-0.5, 3.0), F(-1.0, 3.0).
1896 //
1897 // Focal length is 0.5,
1898 // Parameter of the parabola is 1.
1899 // Equation (in WCS): (y-3)^2=2*p*(-x-0.5), i.e. (y-3)^2=2*(-x-0.5)
1900 // A * X^2 + B * (Y^2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
1901 // 0 * X^2 + 1 * (Y^2) + 2*0*(X*Y) + 2*1*X + 2*(-3)*Y + 10 = 0.
1902
1903
1904 Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(0.0, 1.0));
1905 Parab2d_Bug26747::FocusPoint.SetCoord(-1.0, 3.0);
1906
1907 Parab2d_Bug26747::FocalLength = 0.5;
1908
1909 Parab2d_Bug26747::VertX = -0.5;
1910 Parab2d_Bug26747::VertY = 3.0;
1911
1912 Parab2d_Bug26747::Parameter = 1.0;
1913
1914 Parab2d_Bug26747::Coeffs[0] = 0.0;
1915 Parab2d_Bug26747::Coeffs[1] = 1.0;
1916 Parab2d_Bug26747::Coeffs[2] = 0.0;
1917 Parab2d_Bug26747::Coeffs[3] = 1.0;
1918 Parab2d_Bug26747::Coeffs[4] = -3.0;
1919 Parab2d_Bug26747::Coeffs[5] = 10.0;
1920
1921 OCC26747_CheckParabola(theDI, theArgVal[1], Standard_False);
1922
1923 return 0;
1924}
1925
1926//=======================================================================
1927//function : OCC26747_3
1928//purpose : Creates a 2D-parabola for testing
1929//=======================================================================
1930static Standard_Integer OCC26747_3(Draw_Interpretor& theDI,
1931 Standard_Integer theNArg,
1932 const char ** theArgVal)
1933{
1934 if(theNArg < 2)
1935 {
1936 theDI << "Use: OCC26747_2 result\n";
1937 return 1;
1938 }
1939
1940 //Expected parabola:
1941
1942 // ^ Y
1943 // |
1944 // o |
1945 // o |
1946 // F x o A
1947 // o |
1948 // o |
1949 // |
1950 // <------------------
1951 // X
1952
1953 // where (in UCS - User Coordinate System, - which
1954 // is shown in the picture):
1955 // Y-axe is the directrix of the parabola,
1956 // A(0.0, 3.0) is a Vertex of the parabola,
1957 // F(0.0, 3.0) is the focus of the parabola (the Focus
1958 // matches with the Apex).
1959 //
1960 // In WCS (World Coordinate System) these points have coordinates:
1961 // A(0.0, 3.0), F(0.0, 3.0).
1962 //
1963 // Focal length is 0.0,
1964 // Parameter of the parabola is 0.0.
1965 // Equation (in WCS): (y-3)^2=2*p*(-x-0.0), i.e. (y-3)^2=0 (looks like a line y=3)
1966 // A * X^2 + B * (Y^2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
1967 // 0 * X^2 + 1 * (Y^2) + 2*0*(X*Y) + 2*0*X + 2*(-3)*Y + 9 = 0.
1968
1969 Parab2d_Bug26747::Axes = gp_Ax2d(gp_Pnt2d(0.0, 0.0), gp_Dir2d(0.0, 1.0));
1970 Parab2d_Bug26747::FocusPoint.SetCoord(0.0, 3.0);
1971
1972 Parab2d_Bug26747::FocalLength = 0.0;
1973
1974 Parab2d_Bug26747::VertX = 0.0;
1975 Parab2d_Bug26747::VertY = 3.0;
1976
1977 Parab2d_Bug26747::Parameter = 0.0;
1978
1979 Parab2d_Bug26747::Coeffs[0] = 0.0;
1980 Parab2d_Bug26747::Coeffs[1] = 1.0;
1981 Parab2d_Bug26747::Coeffs[2] = 0.0;
1982 Parab2d_Bug26747::Coeffs[3] = 0.0;
1983 Parab2d_Bug26747::Coeffs[4] = -3.0;
1984 Parab2d_Bug26747::Coeffs[5] = 9.0;
1985
1986 OCC26747_CheckParabola(theDI, theArgVal[1], Standard_False);
1987
1988 return 0;
1989}
1990
8009d070 1991#include "Geom2d_BezierCurve.hxx"
1992#include "Geom2dGcc_QualifiedCurve.hxx"
1993#include "Geom2dAdaptor_Curve.hxx"
1994#include "Geom2dAPI_ProjectPointOnCurve.hxx"
1995#include "Geom2dGcc_Circ2d2TanOn.hxx"
1996//=======================================================================
1997//function : OCC27357
1998//purpose :
1999//=======================================================================
2000static Standard_Integer OCC27357(Draw_Interpretor& theDI,
2001 Standard_Integer,
2002 const char **)
2003{
2004 TColgp_Array1OfPnt2d aPoles(1,3);
2005 aPoles.SetValue(1, gp_Pnt2d(0.,0.));
2006 aPoles.SetValue(2, gp_Pnt2d(0.,1.));
2007 aPoles.SetValue(3, gp_Pnt2d(6.,0.));
2008
2009 Handle(Geom2d_BezierCurve) aCurve1 = new Geom2d_BezierCurve(aPoles);
2010 aPoles.SetValue(2, gp_Pnt2d(0.,1.5));
2011 Handle(Geom2d_BezierCurve) aCurve2 = new Geom2d_BezierCurve(aPoles);
2012 NCollection_List<Standard_Integer> aDuumyList;
2013 int nP = 100;
2014 for(int i = 0 ; i < nP ; i++){
2015 Standard_Real u = i / (nP-1.);
2016 gp_Pnt2d aP1;
2017 gp_Vec2d aTangent;
2018 aCurve1->D1(u,aP1,aTangent);
2019 gp_Vec2d aNormal(-aTangent.Y(),aTangent.X());
2020 Handle(Geom2d_Line) normalLine=new Geom2d_Line(aP1, gp_Dir2d(aNormal));
2021 Geom2dGcc_QualifiedCurve qualifiedC1(Geom2dAdaptor_Curve(aCurve1),GccEnt_unqualified);
2022 Geom2dGcc_QualifiedCurve qualifiedC2(Geom2dAdaptor_Curve(aCurve2),GccEnt_unqualified);
2023
2024 try
2025 {
2026 Geom2dAPI_ProjectPointOnCurve projPc1(aP1, aCurve1);
2027 double g1 = projPc1.LowerDistanceParameter();
2028 Geom2dAPI_ProjectPointOnCurve projPc3(aP1, normalLine);
2029 double g3 = projPc3.LowerDistanceParameter();
2030 Geom2dGcc_Circ2d2TanOn aCircleBuilder(qualifiedC1,qualifiedC2,
2031 Geom2dAdaptor_Curve(normalLine),1e-9,g1,g1,g3);
2032 aDuumyList.Append(aCircleBuilder.NbSolutions());
2033 }
a738b534 2034 catch(Standard_Failure const&)
8009d070 2035 {
2036 theDI << "Exception was caught\n";
2037 }
2038 }
2039 return 0;
2040}
05607219 2041#include <Standard_ErrorHandler.hxx>
2042#include <TColGeom_SequenceOfCurve.hxx>
2043#include <GeomFill_NSections.hxx>
2044#include <Geom_TrimmedCurve.hxx>
2045#include <TopExp_Explorer.hxx>
2046#include <BRepBuilderAPI_MakeFace.hxx>
2047//=======================================================================
2048//function : OCC26270
2049//purpose :
2050//=======================================================================
2051static Standard_Integer OCC26270(Draw_Interpretor& theDI,
2052 Standard_Integer theNArg,
2053 const char **theArgVal)
2054{
2055 if (theNArg != 3)
2056 {
2057 theDI << "Usage :" << theArgVal[0] << " shape result\n";
2058 return 0;
2059 }
2060 TopoDS_Shape aShape = DBRep::Get(theArgVal[1]);
2061 TopExp_Explorer anExp(aShape, TopAbs_EDGE);
2062 TColGeom_SequenceOfCurve aCurveSeq;
2063 for (; anExp.More(); anExp.Next())
2064 {
2065 Standard_Real f, l;
2066 Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(anExp.Current()), f, l);
2067 if (!aCurve.IsNull())
2068 {
2069 aCurve = new Geom_TrimmedCurve(aCurve, f, l);
2070 aCurveSeq.Append(aCurve);
2071 }
2072 }
2073 if (aCurveSeq.Length() > 1)
2074 {
2075 try
2076 {
2077 OCC_CATCH_SIGNALS
2078 GeomFill_NSections aBSurface(aCurveSeq);
2079 Handle(Geom_BSplineSurface) aRes = aBSurface.BSplineSurface();
2080 if (!aRes.IsNull())
2081 {
2082 BRepBuilderAPI_MakeFace b_face1(aRes, Precision::Confusion());
2083 TopoDS_Face bsp_face1 = b_face1.Face();
2084 DBRep::Set(theArgVal[2], bsp_face1);
2085 }
2086 }
a738b534 2087 catch (Standard_Failure const&)
05607219 2088 {
2089 theDI << "ERROR: Exception in GeomFill_NSections\n";
2090 }
2091 }
2092 return 0;
2093}
2094
07ef8bdf 2095#include "BRepBuilderAPI_MakeWire.hxx"
2096#include "BRepBuilderAPI_MakeEdge.hxx"
2097static Standard_Integer OCC27552(Draw_Interpretor&,
2098 Standard_Integer,
2099 const char ** )
2100{
2101 BRep_Builder BB;
2102 TopoDS_Vertex V1, V2, V3;
2103 TopoDS_Edge E1, E2;
2104 BB.MakeVertex(V1, gp_Pnt(0,0,0), 0.1);
2105 BB.MakeVertex(V2, gp_Pnt(5,0,0), 0.1);
2106 BB.MakeVertex(V3, gp_Pnt(10,0,0), 0.1);
2107 E1 = BRepBuilderAPI_MakeEdge(V1, V2).Edge();
2108 E2 = BRepBuilderAPI_MakeEdge(V2, V3).Edge();
2109 BRepBuilderAPI_MakeWire MW;
2110 MW.Add(E1);
2111 MW.Add(E2);
2112 TopoDS_Vertex V4, V5, V6, V7;
2113 TopoDS_Edge E3, E4;
2114 BB.MakeVertex(V4, gp_Pnt(10,0+0.05,0), 0.07);
2115 BB.MakeVertex(V5, gp_Pnt(10,0-0.05,0), 0.07);
2116 BB.MakeVertex(V6, gp_Pnt(10,0+2,0), 0.07);
2117 BB.MakeVertex(V7, gp_Pnt(10,0-2,0), 0.07);
2118 E3 = BRepBuilderAPI_MakeEdge(V4, V6).Edge();
2119 E4 = BRepBuilderAPI_MakeEdge(V5, V7).Edge();
2120 TopTools_ListOfShape LLE;
2121 LLE.Append(E3);
2122 LLE.Append(E4);
2123 MW.Add(LLE);
2124 TopoDS_Shape W = MW.Wire();
2125 DBRep::Set("outw", W);
2126
2127 return 0;
2128}
8009d070 2129
84bd2552 2130#include <NCollection_IncAllocator.hxx>
2131static Standard_Integer OCC27875(Draw_Interpretor& theDI,
2132 Standard_Integer theNArg,
2133 const char ** theArgVal)
2134{
2135 if (theNArg < 2)
2136 {
2137 theDI << "Use: OCC27875 curve\n";
2138 }
2139
2140 TColGeom_SequenceOfCurve aNC(new NCollection_IncAllocator());
2141
2142 const Handle(Geom_Curve) aC = Handle(Geom_Curve)::DownCast(DrawTrSurf::Get(theArgVal[1]));
2143
2144 aNC.Append(aC);
2145
2146 GeomFill_NSections aNS(aNC);
2147
2148 if (aNS.BSplineSurface().IsNull())
2149 {
2150 theDI << "GeomFill_NSections is not done.\n";
2151 }
2152
2153 return 0;
2154}
2155
b3d20c7f 2156
0c63f2f8 2157#include <TDF_Tool.hxx>
2158#include <XCAFDoc_View.hxx>
2159#include <XCAFDoc_ViewTool.hxx>
2160#include <XCAFView_Object.hxx>
2161#include <XCAFView_ProjectionType.hxx>
2162static Standard_Integer OCC28389(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
2163{
2164 if (argc < 20) {
2165 di << "Use: OCC28389 Doc label nb_shapes nb_GDT nb_planes name type pp_x pp_y pp_z vd_x vd_y vd_z ud_x ud_y ud_z zoom width height";
2166 return 1;
2167 }
2168 Handle(TDocStd_Document) aDoc;
2169 DDocStd::GetDocument(argv[1], aDoc);
2170 if (aDoc.IsNull()) {
2171 di << "Error: Wrong document";
2172 return 1;
2173 }
2174 Handle(XCAFDoc_ViewTool) aViewTool = XCAFDoc_DocumentTool::ViewTool(aDoc->Main());
2175
2176 TDF_Label aLabel;
2177 TDF_Tool::Label(aDoc->GetData(), argv[2], aLabel);
2178 if (aLabel.IsNull()) {
2179 di << "Error: Wrong label";
2180 return 1;
2181 }
2182 Handle(XCAFDoc_View) aView;
2183 if (!aLabel.FindAttribute(XCAFDoc_View::GetID(), aView)) {
2184 di << "Error: Wrong label";
2185 return 1;
2186 }
2187 Handle(XCAFView_Object) anObj = aView->GetObject();
2188 if (anObj.IsNull()) {
2189 di << "Error: Wrong label";
2190 return 1;
2191 }
2192
2193 Standard_Boolean isOK = Standard_True;
2194 // check links
2195 Standard_Integer nbShapes = Draw::Atoi(argv[3]);
2196 Standard_Integer nbGDTs = Draw::Atoi(argv[4]);
2197 Standard_Integer nbPlanes = Draw::Atoi(argv[5]);
2198 TDF_LabelSequence aSequence;
2199 aViewTool->GetRefShapeLabel(aLabel, aSequence);
2200 if (aSequence.Length() != nbShapes)
2201 isOK = Standard_False;
2202 aSequence.Clear();
2203 aViewTool->GetRefGDTLabel(aLabel, aSequence);
2204 if (aSequence.Length() != nbGDTs)
2205 isOK = Standard_False;
2206 aSequence.Clear();
2207 aViewTool->GetRefClippingPlaneLabel(aLabel, aSequence);
2208 if (aSequence.Length() != nbPlanes)
2209 isOK = Standard_False;
2210 if (!isOK) {
2211 di << "Error: Wrong references";
2212 return 1;
2213 }
2214
2215 if (anObj->Name()->IsDifferent(new TCollection_HAsciiString(argv[6]))) {
2216 di << "Error: Wrong name";
2217 return 1;
2218 }
2219
2220 XCAFView_ProjectionType aType = XCAFView_ProjectionType_NoCamera;
2221 if (argv[7][0] == 'p')
2222 aType = XCAFView_ProjectionType_Parallel;
2223 else if (argv[7][0] == 'c')
2224 aType = XCAFView_ProjectionType_Central;
2225
2226 if (anObj->Type()!= aType) {
2227 di << "Error: Wrong type";
2228 return 1;
2229 }
2230
2231 gp_Pnt aPP(Draw::Atof(argv[8]), Draw::Atof(argv[9]), Draw::Atof(argv[10]));
2232 if (aPP.Distance(anObj->ProjectionPoint()) > Precision::Confusion()) {
2233 di << "Error: Wrong projection point";
2234 return 1;
2235 }
2236
2237 gp_Dir aVD(Draw::Atof(argv[11]), Draw::Atof(argv[12]), Draw::Atof(argv[13]));
2238 if (!aVD.IsEqual(anObj->ViewDirection(), Precision::Angular())) {
2239 di << "Error: Wrong view direction";
2240 return 1;
2241 }
2242
2243 gp_Dir aUD(Draw::Atof(argv[14]), Draw::Atof(argv[15]), Draw::Atof(argv[16]));
2244 if (!aUD.IsEqual(anObj->UpDirection(), Precision::Angular())) {
2245 di << "Error: Wrong up direction";
2246 return 1;
2247 }
2248
2249 if (fabs(anObj->ZoomFactor() - Draw::Atof(argv[17])) > Precision::Confusion()) {
2250 di << "Error: Wrong zoom factor";
2251 return 1;
2252 }
2253
2254 if (fabs(anObj->WindowHorizontalSize() - Draw::Atof(argv[18])) > Precision::Confusion())
2255 isOK = Standard_False;
2256 if (fabs(anObj->WindowVerticalSize() - Draw::Atof(argv[19])) > Precision::Confusion())
2257 isOK = Standard_False;
2258 if (!isOK) {
2259 di << "Error: Wrong Window size";
2260 return 1;
2261 }
2262
2263 di << argv[2] << " OK";
2264 return 0;
2265}
2266
353e6fa0 2267#include <TColgp_HArray1OfPnt2d.hxx>
2268#include <TColgp_Array1OfVec2d.hxx>
2269#include <TColStd_HArray1OfBoolean.hxx>
2270#include <Geom2d_BSplineCurve.hxx>
2271#include <Geom2dAPI_Interpolate.hxx>
2272#include <GeomAPI.hxx>
2273#include <BRepBuilderAPI_MakeEdge2d.hxx>
2274
2275static Standard_Integer OCC28594(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
2276{
2277 if (argc != 3)
2278 {
2279 di << "Usage :" << argv[0] << " curve_with_scale curve_without_scale\n";
2280 return 0;
2281 }
2282 Handle(TColgp_HArray1OfPnt2d) points_2d = new TColgp_HArray1OfPnt2d(1, 6);
2283 (*points_2d)(1) = gp_Pnt2d(-30.4, 8);
2284 (*points_2d)(2) = gp_Pnt2d(-16.689912, 17.498217);
2285 (*points_2d)(3) = gp_Pnt2d(-23.803064, 24.748543);
2286 (*points_2d)(4) = gp_Pnt2d(-16.907466, 32.919615);
2287 (*points_2d)(5) = gp_Pnt2d(-8.543829, 26.549421);
2288 (*points_2d)(6) = gp_Pnt2d(0, 39.200000);
2289
2290 TColgp_Array1OfVec2d tangent_2d(1, 6);
2291 (tangent_2d)(1) = gp_Vec2d(0.3, 0.4);
2292 (tangent_2d)(2) = gp_Vec2d(0, 0);
2293 (tangent_2d)(3) = gp_Vec2d(0, 0);
2294 (tangent_2d)(4) = gp_Vec2d(0, 0);
2295 (tangent_2d)(5) = gp_Vec2d(0, 0);
2296 (tangent_2d)(6) = gp_Vec2d(1, 0);
2297
2298 Handle(TColStd_HArray1OfBoolean) tangent_flags = new TColStd_HArray1OfBoolean(1, 6);
2299 (*tangent_flags)(1) = true;
2300 (*tangent_flags)(2) = false;
2301 (*tangent_flags)(3) = false;
2302 (*tangent_flags)(4) = false;
2303 (*tangent_flags)(5) = false;
2304 (*tangent_flags)(6) = true;
2305
2306 Geom2dAPI_Interpolate interp_2d_with_scale(points_2d, Standard_False, Precision::Confusion());
2307 interp_2d_with_scale.Load(tangent_2d, tangent_flags);
2308 interp_2d_with_scale.Perform();
2309 Handle(Geom2d_BSplineCurve) curve_2d_with_scale = interp_2d_with_scale.Curve();
2310
2311 Geom2dAPI_Interpolate interp_2d_without_scale(points_2d, Standard_False, Precision::Confusion());
2312 interp_2d_without_scale.Load(tangent_2d, tangent_flags, Standard_False);
2313 interp_2d_without_scale.Perform();
2314 Handle(Geom2d_BSplineCurve) curve_2d_without_scale = interp_2d_without_scale.Curve();
2315
2316 DrawTrSurf::Set(argv[1], curve_2d_with_scale);
2317 DrawTrSurf::Set(argv[2], curve_2d_without_scale);
2318 return 0;
2319}
84bd2552 2320
1fae7cda 2321static Standard_Integer OCC28784(Draw_Interpretor&, Standard_Integer argc, const char** argv)
2322{
2323 if (argc < 3)
2324 return 1;
2325
2326 TopoDS_Shape aShape = DBRep::Get(argv[2]);
2327 if (aShape.IsNull())
2328 return 1;
2329
2330 gp_Ax2 aPlane (gp::Origin(), gp::DX(), -gp::DZ());
2331 HLRAlgo_Projector aProjector(aPlane);
2332
2333 Handle(HLRBRep_PolyAlgo) aHLR = new HLRBRep_PolyAlgo(aShape);
2334 aHLR->Projector(aProjector);
2335 aHLR->Update();
2336
2337 HLRBRep_PolyHLRToShape aHLRtoShape;
2338 aHLRtoShape.Update(aHLR);
2339
2340 TopoDS_Shape aHidden = aHLRtoShape.HCompound();
2341
2342 DBRep::Set(argv[1], aHidden);
2343
2344 return 0;
2345}
2346
66cfcd0f 2347static Standard_Integer OCC28829 (Draw_Interpretor&, Standard_Integer, const char**)
2348{
2349 // do something that causes FPE exception
2350 std::cout << "sqrt(-1) = " << sqrt (-1.) << std::endl;
2351 return 0;
2352}
2353
a5460e9d 2354#include <NCollection_Buffer.hxx>
2355#include <DDocStd_DrawDocument.hxx>
2356#include <OSD_OpenFile.hxx>
2357#include <Standard_ArrayStreamBuffer.hxx>
2358#include <TDataStd_Name.hxx>
2359#include <TDocStd_Application.hxx>
2360
2361#ifdef max
2362 #undef max
2363#endif
2364
2365static Standard_Integer OCC28887 (Draw_Interpretor&, Standard_Integer theNbArgs, const char** theArgVec)
2366{
2367 if (theNbArgs < 3)
2368 {
2369 std::cout << "Syntax error: wrong number of arguments!\n";
2370 return 1;
2371 }
2372
2373 const TCollection_AsciiString aFilePath (theArgVec[1]);
2374 const TCollection_AsciiString aName (theArgVec[2]);
2375 Handle(NCollection_Buffer) aBuffer;
2376 {
2377 std::ifstream aFile;
2378 OSD_OpenStream (aFile, aFilePath.ToCString(), std::ios::binary | std::ios::in);
2379 if (!aFile.is_open())
2380 {
2381 std::cout << "Error: input file '" << aFilePath << "' cannot be read\n";
2382 return 1;
2383 }
2384 aFile.seekg (0, std::ios_base::end);
2385 const int64_t aFileLength = int64_t (aFile.tellg());
2386 if (aFileLength > int64_t (std::numeric_limits<ptrdiff_t>::max())
2387 || aFileLength < 1)
2388 {
2389 std::cout << "Error: input file '" << aFilePath << "' is too large\n";
2390 return 1;
2391 }
2392 aFile.seekg (0, std::ios_base::beg);
2393
2394 aBuffer = new NCollection_Buffer (NCollection_BaseAllocator::CommonBaseAllocator());
2395 if (!aBuffer->Allocate (size_t(aFileLength)))
2396 {
2397 std::cout << "Error: memory allocation (" << aFileLength << ") has failed\n";
2398 return 1;
2399 }
2400
2401 aFile.read ((char* )aBuffer->ChangeData(), aBuffer->Size());
2402 if (!aFile.good())
2403 {
2404 std::cout << "Error: input file '" << aFilePath << "' reading failure\n";
2405 return 1;
2406 }
2407 }
2408
2409 Standard_ArrayStreamBuffer aStreamBuffer ((const char* )aBuffer->ChangeData(), aBuffer->Size());
2410 std::istream aStream (&aStreamBuffer);
2411 // just play with seeking
2412 aStream.seekg (0, std::ios_base::end);
2413 aStream.seekg (0, std::ios_base::beg);
2414 if (aFilePath.EndsWith (".brep")
2415 || aFilePath.EndsWith (".rle"))
2416 {
2417 TopoDS_Shape aShape;
2418 BRep_Builder aBuilder;
2419 BRepTools::Read (aShape, aStream, aBuilder);
2420 DBRep::Set (aName.ToCString(), aShape);
2421 }
2422 else
2423 {
2424 Handle(TDocStd_Document) aDoc;
2425 Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
2426 Standard_CString aNameVar = aName.ToCString();
2427 if (DDocStd::GetDocument (aNameVar, aDoc, Standard_False))
2428 {
2429 std::cout << "Error: document with name " << aName << " already exists\n";
2430 return 1;
2431 }
2432
2433 if (anApp->Open (aStream, aDoc) != PCDM_RS_OK)
2434 {
2435 std::cout << "Error: cannot open XDE document\n";
2436 return 1;
2437 }
2438
2439 Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc);
2440 TDataStd_Name::Set (aDoc->GetData()->Root(), aName.ToCString());
2441 Draw::Set (aName.ToCString(), aDrawDoc);
2442 }
2443
2444 return 0;
2445}
2446
2a9be0e2 2447static Standard_Integer OCC28131 (Draw_Interpretor&, Standard_Integer theNbArgs, const char** theArgVec)
2448{
2449 if (theNbArgs != 2)
2450 {
2451 std::cerr << "Error: wrong number of arguments" << std::endl;
2452 return 1;
2453 }
2454
2455 double height = 8.5;
2456 gp_Pnt JiZhunXian2_v0 = gp_Pnt(-17.6, 0.0, 0.0);
2457 gp_Pnt JiZhunXian2_v1 = gp_Pnt(0, 32.8, 0.0);
2458
2459 // Outline
2460 TColgp_Array1OfPnt outer_e_bzr_geom_v(1, 4);
2461 {
2462 outer_e_bzr_geom_v(1) = JiZhunXian2_v0;
2463 outer_e_bzr_geom_v(4) = JiZhunXian2_v1;
2464
2465 Standard_Real ratio1 = 5.4 / 13.2;
2466 outer_e_bzr_geom_v(2) = gp_Pnt(outer_e_bzr_geom_v(1).X(), ratio1*outer_e_bzr_geom_v(4).Y(), 0);
2467 Standard_Real ratio2 = 6.0 / 6.8;
2468 outer_e_bzr_geom_v(3) = gp_Pnt(ratio2*outer_e_bzr_geom_v(1).X(), outer_e_bzr_geom_v(4).Y(), 0);
2469 }
2470
2471 Handle(Geom_BezierCurve) outer_e_bzr_geom = new Geom_BezierCurve(outer_e_bzr_geom_v);
2472 Handle(Geom_BSplineCurve) outer_e_bsp_geom = GeomConvert::CurveToBSplineCurve(outer_e_bzr_geom);
2473 TopoDS_Edge outer_e = BRepBuilderAPI_MakeEdge(outer_e_bsp_geom);
2474
2475 Handle(Geom_BSplineCurve) curve1;
2476 {
2477 Handle(TColgp_HArray1OfPnt2d) harray = new TColgp_HArray1OfPnt2d(1, 2); // sizing harray
2478 harray->SetValue(1, gp_Pnt2d(-JiZhunXian2_v1.Y(), 0));
2479 harray->SetValue(2, gp_Pnt2d(0, height + height / 2));
2480
2481 Geom2dAPI_Interpolate anInterpolation(harray, Standard_False, 1e-6);
2482
2483 gp_Vec2d vtangent1(0, 1);
2484 gp_Vec2d vtangent2(1, 0);
2485 anInterpolation.Load(vtangent1, vtangent2);
2486 anInterpolation.Perform();
2487
2488 Handle(Geom2d_BSplineCurve) c = anInterpolation.Curve();
2489
2490 gp_Pln pln(gp_Ax3(gp_Pnt(), gp_Dir(1, 0, 0), gp_Dir(0, -1, 0)));
2491
2492 Handle(Geom_BSplineCurve) c3d = Handle(Geom_BSplineCurve)::DownCast(GeomAPI::To3d(c, pln));
2493 curve1 = c3d;
2494 }
2495
2496 Handle(Geom_BSplineCurve) curve2;
2497 {
2498 Handle(TColgp_HArray1OfPnt2d) harray = new TColgp_HArray1OfPnt2d(1, 3); // sizing harray
2499 harray->SetValue(1, gp_Pnt2d(-JiZhunXian2_v0.X(), 0));
2500 harray->SetValue(2, gp_Pnt2d(-JiZhunXian2_v0.X() - 2.6, height));
2501 harray->SetValue(3, gp_Pnt2d(0, height + height / 2));
2502
2503 Geom2dAPI_Interpolate anInterpolation(harray, Standard_False, 1e-6);
2504 anInterpolation.Perform();
2505
2506 Handle(Geom2d_BSplineCurve) c = anInterpolation.Curve();
2507 gp_Pln pln(gp_Ax3(gp_Pnt(), gp_Dir(0, -1, 0), gp_Dir(-1, 0, 0)));
2508 Handle(Geom_BSplineCurve) c3d = Handle(Geom_BSplineCurve)::DownCast(GeomAPI::To3d(c, pln));
2509 curve2 = c3d;
2510 }
2511
2512 //////////////////////////////////////
2513 GeomFill_BSplineCurves fill2;
2514 fill2.Init(outer_e_bsp_geom, curve1, curve2, GeomFill_CoonsStyle);
2515
2516 const Handle(Geom_BSplineSurface)& surf_geom = fill2.Surface();
2517
2518 TopoDS_Shape filled_face = BRepBuilderAPI_MakeFace(surf_geom, 0);
2519
2520 DBRep::Set (theArgVec[1], filled_face);
2521
2522/*
2523 ///////////////////////////////////////////////////////////////////////
2524 TopoDS_Solid first_solid;
2525 {
2526 BRepOffset_MakeOffset myOffsetShape(filled_face, -offset_thick, 1e-4,
2527 BRepOffset_Skin, //Mode
2528 Standard_False, //Intersection
2529 Standard_False, //SelfInter
2530 GeomAbs_Intersection, //Join
2531 Standard_True, //Thickening
2532 Standard_False //RemoveIntEdges
2533 ); //RemoveInvalidFaces
2534 first_solid = TopoDS::Solid(myOffsetShape.Shape());
2535 }
2536*/
2537 return 0;
2538}
18d8e3e7 2539#include <math_NewtonFunctionRoot.hxx>
2540#include <math_TrigonometricFunctionRoots.hxx>
2541#include <math_TrigonometricEquationFunction.hxx>
2542#include <gp_Elips2d.hxx>
2543#include <Geom2d_Ellipse.hxx>
2544#include <Geom2dAPI_InterCurveCurve.hxx>
2545static Standard_Integer OCC29289(Draw_Interpretor&, Standard_Integer , const char** )
2546{
2547 gp_Elips2d e1(gp_Ax2d(gp_Pnt2d(0., 0.), gp_Dir2d(1., 0)), 2., 1.);
2548 Handle(Geom2d_Ellipse) Ge1 = new Geom2d_Ellipse(e1);
2549 gp_Elips2d e2(gp_Ax2d(gp_Pnt2d(0.5, 0.5), gp_Dir2d(1., 1.)), 2., 1.);
2550 Handle(Geom2d_Ellipse) Ge2 = new Geom2d_Ellipse(e2);
2551
2552 Standard_Integer err = 0;
2553 Geom2dAPI_InterCurveCurve Intersector;
2554 Intersector.Init(Ge1, Ge2, 1.e-7);
2555 if (Intersector.NbPoints() == 0)
2556 {
2557 std::cout << "Error: intersector is not done \n";
2558 err = 1;
2559 }
2560
2561
2562 Standard_Real A, B, C, D, E;
2563 A = 1.875;
2564 B = -.75;
2565 C = -.5;
2566 D = -.25;
2567 E = -.25;
2568 math_TrigonometricEquationFunction MyF(A, B, C, D, E);
2569 Standard_Real X, Tol1, Eps, Teta, TetaNewton;
2570 Tol1 = 1.e-15;
2571 Eps = 1.5e-12;
2572 Standard_Integer Nit[] = { 5, 6, 7, 6 };
2573
2574 Standard_Real TetaPrev = 0.;
2575 Standard_Integer i;
2576 for (i = 1; i <= Intersector.NbPoints(); i++) {
2577 Teta = Intersector.Intersector().Point(i).ParamOnFirst();
2578 X = Teta - 0.1 * (Teta - TetaPrev);
2579 TetaPrev = Teta;
2580 math_NewtonFunctionRoot Resol(MyF, X, Tol1, Eps, Nit[i-1]);
2581 if (Resol.IsDone()) {
2582 TetaNewton = Resol.Root();
2583 if (Abs(Teta - TetaNewton) > 1.e-7)
2584 {
2585 std::cout << "Error: Newton root is wrong for " << Teta << " \n";
2586 err = 1;
2587 }
2588 }
2589 else
2590 {
2591 std::cout << "Error: Newton is not done for " << Teta << " \n";
2592 err = 1;
2593 }
2594 }
2595
2596 return err;
2597}
2a9be0e2 2598
4a5eefb9 2599//===============================================================================================
2600Standard_Boolean IsSameGuid (const Standard_GUID& aGuidNull, const Standard_GUID& aGuid2)
2601{
2602 Standard_Boolean isSame (Standard_False);
2603 if(Standard_GUID::IsEqual(aGuidNull, aGuid2)) {
2604 aGuid2.ShallowDump(cout);
2605 isSame = Standard_True;
2606 } else {
2607 aGuid2.ShallowDump(cout);
2608 cout <<endl;
2609 }
2610 return isSame;
2611}
2612
2613#include <TDataStd_AsciiString.hxx>
2614#include <TDataStd_BooleanArray.hxx>
2615#include <TDataStd_BooleanList.hxx>
2616#include <TDataStd_ByteArray.hxx>
2617#include <TDataStd_ExtStringArray.hxx>
2618#include <TDataStd_ExtStringList.hxx>
2619#include <TDataStd_Integer.hxx>
2620#include <TDataStd_IntegerArray.hxx>
2621#include <TDataStd_IntegerList.hxx>
2622#include <TDataStd_Name.hxx>
2623#include <TDataStd_Real.hxx>
2624#include <TDataStd_RealArray.hxx>
2625#include <TDataStd_RealList.hxx>
2626#include <TDataStd_ReferenceArray.hxx>
2627#include <TDataStd_ReferenceList.hxx>
2628
2629#define QCOMPARE(val1, val2) \
2630 di << "Checking " #val1 " == " #val2 << \
2631 ((val1) == (val2) ? ": OK\n" : ": Error\n")
2632
2633static Standard_Integer OCC29371 (Draw_Interpretor& di, Standard_Integer n, const char** a)
2634{
2635 if (n != 1)
2636 {
2637 std::cout << "Usage : " << a[0] << "\n";
2638 return 1;
2639 }
2640
2641 Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
2642 Handle(TDocStd_Document) aDoc;
2643 anApp->NewDocument ("BinOcaf", aDoc);
2644 TDF_Label aLab = aDoc->Main();
2645 Standard_GUID aNullGuid("00000000-0000-0000-0000-000000000000");
2646 Standard_Boolean IsNullGuid(Standard_False);
2647
2648 try {
2649 //1. Set TDataStd_AsciiString
2650 Handle(TDataStd_AsciiString) aStrAtt = new TDataStd_AsciiString();
2651 aLab.AddAttribute(aStrAtt);
2652 if(!aStrAtt.IsNull()) {
2653 Standard_GUID aGuid = aStrAtt->ID();
2654 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2655 }
2656
2657 //2. Set TDataStd_BooleanArray
2658 Handle(TDataStd_BooleanArray) aBArAtt = new TDataStd_BooleanArray();
2659 aLab.AddAttribute(aBArAtt);
2660 if(!aBArAtt.IsNull()) {
2661 Standard_GUID aGuid = aBArAtt->ID();
2662 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2663 }
2664
2665 //3. Set TDataStd_BooleanList
2666 Handle(TDataStd_BooleanList) aBListAtt = new TDataStd_BooleanList();
2667 aLab.AddAttribute(aBListAtt);
2668 if(!aBListAtt.IsNull()) {
2669 Standard_GUID aGuid = aBListAtt->ID();
2670 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2671 }
2672
2673 //4. Set TDataStd_ByteArray
2674 Handle(TDataStd_ByteArray) aByteArAtt = new TDataStd_ByteArray();
2675 aLab.AddAttribute(aByteArAtt);
2676 if(!aByteArAtt.IsNull()) {
2677 Standard_GUID aGuid = aByteArAtt->ID();
2678 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2679 }
2680
2681 //5. Set TDataStd_ExtStringArray
2682 Handle(TDataStd_ExtStringArray) anExtStrArAtt = new TDataStd_ExtStringArray();
2683 aLab.AddAttribute(anExtStrArAtt);
2684 if(!anExtStrArAtt.IsNull()) {
2685 Standard_GUID aGuid = anExtStrArAtt->ID();
2686 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2687 }
2688
2689 //6. Set TDataStd_ExtStringList
2690 Handle(TDataStd_ExtStringList) anExtStrListAtt = new TDataStd_ExtStringList();
2691 aLab.AddAttribute(anExtStrListAtt);
2692 if(!anExtStrListAtt.IsNull()) {
2693 Standard_GUID aGuid = anExtStrListAtt->ID();
2694 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2695 }
2696
2697 //7. Set TDataStd_Integer
2698 Handle(TDataStd_Integer) anIntAtt = new TDataStd_Integer();
2699 aLab.AddAttribute(anIntAtt);
2700 if(!anIntAtt.IsNull()) {
2701 Standard_GUID aGuid = anIntAtt->ID();
2702 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2703 }
2704
2705 //8. Set TDataStd_IntegerArray
2706 Handle(TDataStd_IntegerArray) anIntArrAtt = new TDataStd_IntegerArray();
2707 aLab.AddAttribute(anIntArrAtt);
2708 if(!anIntArrAtt.IsNull()) {
2709 Standard_GUID aGuid = anIntArrAtt->ID();
2710 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2711 }
2712
2713 //9. Set TDataStd_IntegerList
2714 Handle(TDataStd_IntegerList) anIntListAtt = new TDataStd_IntegerList();
2715 aLab.AddAttribute(anIntListAtt);
2716 if(!anIntListAtt.IsNull()) {
2717 Standard_GUID aGuid = anIntListAtt->ID();
2718 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2719 }
2720
2721 //10. Set TDataStd_Name
2722 Handle(TDataStd_Name) aNameAtt = new TDataStd_Name();
2723 aLab.AddAttribute(aNameAtt);
2724 if(!aNameAtt.IsNull()) {
2725 Standard_GUID aGuid = aNameAtt->ID();
2726 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2727 }
2728
2729 //11. Set TDataStd_Real
2730 Handle(TDataStd_Real) aRealAtt = new TDataStd_Real();
2731 aLab.AddAttribute(aRealAtt);
2732 if(!aRealAtt.IsNull()) {
2733 Standard_GUID aGuid = aRealAtt->ID();
2734 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2735 }
2736
2737 //12. Set TDataStd_RealArray
2738 Handle(TDataStd_RealArray) aRealArrAtt = new TDataStd_RealArray();
2739 aLab.AddAttribute(aRealArrAtt);
2740 if(!aRealArrAtt.IsNull()) {
2741 Standard_GUID aGuid = aRealArrAtt->ID();
2742 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2743 }
2744
2745 //13. Set TDataStd_RealList
2746 Handle(TDataStd_RealList) aRealListAtt = new TDataStd_RealList();
2747 aLab.AddAttribute(aRealListAtt);
2748 if(!aRealListAtt.IsNull()) {
2749 Standard_GUID aGuid = aRealListAtt->ID();
2750 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2751 }
2752
2753 //14. Set TDataStd_ReferenceArray
2754 Handle(TDataStd_ReferenceArray) aRefArrAtt = new TDataStd_ReferenceArray();
2755 aLab.AddAttribute(aRefArrAtt);
2756 if(!aRefArrAtt.IsNull()) {
2757 Standard_GUID aGuid = aRefArrAtt->ID();
2758 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2759 }
2760
2761 //15. Set TDataStd_ReferenceList
2762 Handle(TDataStd_ReferenceList) aRefListAtt = new TDataStd_ReferenceList();
2763 aLab.AddAttribute(aRefListAtt);
2764 if(!aRefListAtt.IsNull()) {
2765 Standard_GUID aGuid = aRefListAtt->ID();
2766 IsNullGuid = IsSameGuid(aNullGuid, aGuid);
2767 }
2768 } catch (...)
2769 {
2770 IsNullGuid = Standard_True;
2771 }
2772 QCOMPARE (IsNullGuid, Standard_False);
2773 anApp->Close(aDoc);
2774 return 0;
2775}
2776
229add78 2777#include <NCollection_DoubleMap.hxx>
2778#include <NCollection_IndexedMap.hxx>
2779#include <NCollection_DataMap.hxx>
2780#include <NCollection_IndexedDataMap.hxx>
2781#include <OSD_MemInfo.hxx>
2782
2783// check that copying of empty maps does not allocate extra memory
2784template<typename T> void AllocDummyArr (Draw_Interpretor& theDI, int theN1, int theN2)
2785{
2786 NCollection_Array1<T> aMapArr1(0, theN1), aMapArr2(0, theN2);
2787
2788 OSD_MemInfo aMemTool;
2789 Standard_Size aMem0 = aMemTool.Value (OSD_MemInfo::MemHeapUsage);
2790
2791 for (int i = 1; i < theN1; i++)
2792 aMapArr1(i) = aMapArr1(i-1);
2793 for (int i = 1; i < theN2; i++)
2794 aMapArr2(i) = aMapArr2(0);
2795
2796 aMemTool.Update();
2797 Standard_Size aMem1 = aMemTool.Value (OSD_MemInfo::MemHeapUsage);
2798
2799 theDI << "Heap usage before copy = " << (int)aMem0 << ", after = " << (int)aMem1 << "\n";
2800
2801 if (aMem1 > aMem0)
2802 theDI << "Error: memory increased by " << (int)(aMem1 - aMem0) << " bytes\n";
2803};
2804
2805static Standard_Integer OCC29064 (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
2806{
2807 if (theArgc < 2)
2808 {
2809 cout << "Error: give argument indicating type of map (map, doublemap, datamap, indexedmap, indexeddatamap)" << endl;
2810 return 1;
2811 }
2812
2813 const int nbm1 = 10000, nbm2 = 10000;
2814 if (strcasecmp (theArgv[1], "map") == 0)
2815 AllocDummyArr<NCollection_Map<int> > (theDI, nbm1, nbm2);
2816 else if (strcasecmp (theArgv[1], "doublemap") == 0)
2817 AllocDummyArr<NCollection_DoubleMap<int, int> > (theDI, nbm1, nbm2);
2818 else if (strcasecmp (theArgv[1], "datamap") == 0)
2819 AllocDummyArr<NCollection_DataMap<int, int> > (theDI, nbm1, nbm2);
2820 else if (strcasecmp (theArgv[1], "indexedmap") == 0)
2821 AllocDummyArr<NCollection_IndexedMap<int> > (theDI, nbm1, nbm2);
2822 else if (strcasecmp (theArgv[1], "indexeddatamap") == 0)
2823 AllocDummyArr<NCollection_IndexedDataMap<int, int> > (theDI, nbm1, nbm2);
2824 else
2825 {
2826 cout << "Error: unrecognized argument " << theArgv[1] << endl;
2827 return 1;
2828 }
2829 return 0;
2830}
2831
f24150b8 2832#include <BRepOffsetAPI_MakePipeShell.hxx>
2833#include <GC_MakeArcOfCircle.hxx>
2834#include <BRepAdaptor_CompCurve.hxx>
2835#include <gp_Circ.hxx>
2836//=======================================================================
2837//function : OCC29430
2838//purpose :
2839//=======================================================================
2840static Standard_Integer OCC29430(Draw_Interpretor& theDI,
2841 Standard_Integer /*theNArg*/,
2842 const char** theArgVal)
2843{
2844 const Standard_Real r45 = M_PI / 4.0, r225 = 3.0*M_PI / 4.0;
2845
2846 GC_MakeArcOfCircle arcMaker(gp_Circ(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0.0, 0.0, 1.0), gp_Dir(1.0, 0.0, 0.0)), 1.0), r45, r225, Standard_True);
2847 BRepBuilderAPI_MakeEdge edgeMaker(arcMaker.Value());
2848 BRepBuilderAPI_MakeWire wireMaker(edgeMaker.Edge());
2849 const TopoDS_Wire circle = wireMaker.Wire();
2850
2851 DBRep::Set(theArgVal[1], circle);
2852
2853 BRepAdaptor_CompCurve curve(circle);
2854 theDI << "Curve.FirstParameter() = " << curve.FirstParameter() << "\n";
2855 theDI << "Curve.LastParameter() = " << curve.LastParameter() << "\n";
2856 theDI << "Curve.Period() = " << (curve.IsPeriodic()? curve.Period() : 0.0) << "\n";
2857 const gp_Pnt aStartPt = curve.Value(curve.FirstParameter());
2858 const gp_Pnt anEndPt = curve.Value(curve.LastParameter());
2859
2860 DrawTrSurf::Set(theArgVal[2], aStartPt);
2861 DrawTrSurf::Set(theArgVal[3], anEndPt);
2862
2863 return 0;
2864}
2865
f46c2b39 2866#include <STEPCAFControl_Reader.hxx>
2867
2868//=======================================================================
2869//function : OCC29531
2870//purpose :
2871//=======================================================================
2872static Standard_Integer OCC29531(Draw_Interpretor&, Standard_Integer, const char** theArgV)
2873{
2874 Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
2875 Handle(TDocStd_Document) aDoc;
2876 anApp->NewDocument("BinOcaf", aDoc);
2877 aDoc->SetUndoLimit(1);
2878
2879 STEPCAFControl_Reader Reader;
2880 Reader.ReadFile(theArgV[1]);
2881 Reader.Transfer(aDoc);
2882 TDF_Label aShL, aDL;
2883 TDF_Tool::Label(aDoc->GetData(), "0:1:1:2:672", aShL);
2884 TDF_Tool::Label(aDoc->GetData(), "0:1:4:10", aDL);
2885
2886 aDoc->OpenCommand();
2887
2888 Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(aDoc->Main());
2889 aDimTolTool->SetDimension(aShL, aDL);
2890
2891 aDoc->CommitCommand();
2892
2893 aDoc->Undo();
2894 aDoc->Redo();
2895 return 0;
2896}
2897
d9d3107d 2898//=======================================================================
3306fdd9 2899//function : OCC29807
2900//purpose :
2901//=======================================================================
2902#include <GeomAdaptor_HSurface.hxx>
2903#include <IntPatch_PointLine.hxx>
2904#include <IntSurf_PntOn2S.hxx>
2905static Standard_Integer OCC29807(Draw_Interpretor& theDI, Standard_Integer theNArg, const char** theArgV)
2906{
2907 if (theNArg != 7)
2908 {
2909 theDI << "Use: " << theArgV[0] << "surface1 surface2 u1 v1 u2 v2\n";
2910 return 1;
2911 }
2912
2913 const Handle(Geom_Surface) aS1 = DrawTrSurf::GetSurface(theArgV[1]);
2914 const Handle(Geom_Surface) aS2 = DrawTrSurf::GetSurface(theArgV[2]);
2915
2916 if (aS1.IsNull() || aS2.IsNull())
2917 {
2918 theDI << "Error. Null surface is not supported.\n";
2919 return 1;
2920 }
2921
2922 const Standard_Real aU1 = Draw::Atof(theArgV[3]);
2923 const Standard_Real aV1 = Draw::Atof(theArgV[4]);
2924 const Standard_Real aU2 = Draw::Atof(theArgV[5]);
2925 const Standard_Real aV2 = Draw::Atof(theArgV[6]);
2926
2927 const Handle(GeomAdaptor_HSurface) anAS1 = new GeomAdaptor_HSurface(aS1);
2928 const Handle(GeomAdaptor_HSurface) anAS2 = new GeomAdaptor_HSurface(aS2);
2929
2930 const gp_Pnt aP1 = anAS1->Value(aU1, aV1);
2931 const gp_Pnt aP2 = anAS2->Value(aU2, aV2);
2932
2933 if (aP1.SquareDistance(aP2) > Precision::SquareConfusion())
2934 {
2935 theDI << "Error. True intersection point must be specified. "
2936 "Please check parameters: u1 v1 u2 v2.\n";
2937 return 1;
2938 }
2939
2940 IntSurf_PntOn2S aPOn2S;
2941 aPOn2S.SetValue(0.5*(aP1.XYZ() + aP2.XYZ()), aU1, aV1, aU2, aV2);
2942
2943 const Standard_Real aCurvatureRadius = IntPatch_PointLine::CurvatureRadiusOfIntersLine(anAS1, anAS2, aPOn2S);
2944 theDI << "Radius of curvature is " << aCurvatureRadius << "\n";
2945 return 0;
2946}
2947
2948//=======================================================================
d9d3107d 2949//function : OCC29925
2950//purpose : check safety of functions like IsSpace(), LowerCase(), etc. for all chars
2951//=======================================================================
2952static Standard_Integer OCC29925 (Draw_Interpretor& theDI, Standard_Integer, const char**)
2953{
2954 // iterate by all valid ASCII chars (including extended)
2955 for (int i = 0; i < 256; i++)
2956 {
2957 Standard_Character c = (char)(unsigned char)i;
2958// if (c != i) theDI << c << " != " << i << "\n";
2959 const char* anOp = "";
2960 try {
2961 anOp = "IsAlphabetic";
2962 IsAlphabetic (c);
2963 anOp = "IsDigit";
2964 IsDigit (c);
2965 anOp = "IsXDigit";
2966 IsXDigit (c);
2967 anOp = "IsAlphanumeric";
2968 IsAlphanumeric (c);
2969 anOp = "IsControl";
2970 IsControl (c);
2971 anOp = "IsGraphic";
2972 IsGraphic (c);
2973 anOp = "IsLowerCase";
2974 IsLowerCase (c);
2975 anOp = "IsPrintable";
2976 IsPrintable (c);
2977 anOp = "IsPunctuation";
2978 IsPunctuation (c);
2979 anOp = "IsSpace";
2980 IsSpace (c);
2981 anOp = "IsUpperCase";
2982 IsUpperCase (c);
2983 anOp = "LowerCase";
2984 LowerCase (c);
2985 anOp = "UpperCase";
2986 UpperCase (c);
2987 }
2988 catch (const Handle(Standard_Failure)& e)
2989 {
2990 theDI << anOp << "() fails for " << c << " (" << e->DynamicType()->Name() << ")\n";
2991 }
2992 }
2993
2994 return 0;
2995}
2996
1f26f80b 2997//=======================================================================
2998//function : OCC29311
2999//purpose : check performance of OBB calculations
3000//=======================================================================
3001static Standard_Integer OCC29311 (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
3002{
3003 if (theArgc < 4)
3004 {
3005 std::cerr << "Use: " << theArgv[0] << " shape counter_name nb_iterations" << std::endl;
3006 return 1;
3007 }
3008
3009 TopoDS_Shape aShape = DBRep::Get (theArgv[1]);
3010 Standard_Integer aNbIter = Draw::Atoi (theArgv[3]);
3011
3012 Bnd_OBB anOBB;
3013 OSD_Timer aTimer;
3014 aTimer.Start ();
3015 for (Standard_Integer aN = aNbIter; aN > 0; --aN)
3016 {
3017 anOBB.SetVoid ();
3018 BRepBndLib::AddOBB (aShape, anOBB, Standard_False, Standard_False, Standard_False);
3019 }
3020 aTimer.Stop ();
3021
3022 theDI << "COUNTER " << theArgv[2] << ": " << aTimer.ElapsedTime() << "\n";
3023
3024 return 0;
3025}
3026
405b6fc5 3027//=======================================================================
3028//function : OCC30391
3029//purpose :
3030//=======================================================================
3031#include <BRepOffset_Tool.hxx>
3032static Standard_Integer OCC30391(Draw_Interpretor& theDI,
3033 Standard_Integer theNArg,
3034 const char** theArgV)
3035{
3036 if (theNArg < 7)
3037 {
3038 theDI << "Use: " << theArgV[0] << "result face LenBeforeUfirst LenAfterUlast LenBeforeVfirst LenAfterVlast\n";
3039 return 1;
3040 }
3041
3042 TopoDS_Shape aShape = DBRep::Get(theArgV[2], TopAbs_FACE);
3043 if (aShape.IsNull())
3044 return 1;
3045
3046 const TopoDS_Face& aFace = TopoDS::Face(aShape);
3047
3048 Standard_Real aLenBeforeUfirst = atof(theArgV[3]);
3049 Standard_Real aLenAfterUlast = atof(theArgV[4]);
3050 Standard_Real aLenBeforeVfirst = atof(theArgV[5]);
3051 Standard_Real aLenAfterVlast = atof(theArgV[6]);
3052
3053 TopoDS_Face Result;
3054 BRepOffset_Tool::EnLargeFace(aFace, Result,
3055 Standard_True,Standard_True,Standard_True,Standard_True,Standard_True,1,
3056 aLenBeforeUfirst, aLenAfterUlast,
3057 aLenBeforeVfirst, aLenAfterVlast);
3058
3059 DBRep::Set(theArgV[1], Result);
3060 return 0;
3061}
3062
43c8661e 3063//=======================================================================
3064//function : QAStartsWith string startstring
3065//=======================================================================
3066static Standard_Integer QAStartsWith(Draw_Interpretor& di, Standard_Integer n, const char** a)
3067{
3068 if (n == 3)
3069 {
3070 TCollection_ExtendedString str = a[1];
3071 TCollection_ExtendedString startstr = a[2];
3072 if (str.StartsWith(startstr))
3073 di << "Yes";
3074 else
3075 di << "No";
3076 return 0;
3077 }
3078 std::cerr << "Syntax error\n";
3079 return 1;
3080}
3081
3082//=======================================================================
3083//function : QAEndsWith string endstring
3084//=======================================================================
3085static Standard_Integer QAEndsWith(Draw_Interpretor& di, Standard_Integer n, const char** a)
3086{
3087 if (n == 3)
3088 {
3089 TCollection_ExtendedString str = a[1];
3090 TCollection_ExtendedString endstr = a[2];
3091 if (str.EndsWith(endstr))
3092 di << "Yes";
3093 else
3094 di << "No";
3095 return 0;
3096 }
3097 std::cerr << "Syntax error\n";
3098 return 1;
3099}
3100
ba7f665d 3101//Class is used in OCC30435
3102#include <AppCont_Function.hxx>
3103#include <Adaptor3d_HCurve.hxx>
3104class CurveEvaluator : public AppCont_Function
3105
3106{
3107
3108public:
3109 Handle(Adaptor3d_HCurve) myCurve;
3110
3111 CurveEvaluator(const Handle(Adaptor3d_HCurve)& C)
3112 : myCurve(C)
3113 {
3114 myNbPnt = 1;
3115 myNbPnt2d = 0;
3116 }
3117
3118 Standard_Real FirstParameter() const
3119 {
3120 return myCurve->FirstParameter();
3121 }
3122
3123 Standard_Real LastParameter() const
3124 {
3125 return myCurve->LastParameter();
3126 }
3127
3128 Standard_Boolean Value(const Standard_Real theT,
3129 NCollection_Array1<gp_Pnt2d>& /*thePnt2d*/,
3130 NCollection_Array1<gp_Pnt>& thePnt) const
3131 {
3132 thePnt(1) = myCurve->Value(theT);
3133 return Standard_True;
3134 }
3135
3136 Standard_Boolean D1(const Standard_Real theT,
3137 NCollection_Array1<gp_Vec2d>& /*theVec2d*/,
3138 NCollection_Array1<gp_Vec>& theVec) const
3139 {
3140 gp_Pnt aDummyPnt;
3141 myCurve->D1(theT, aDummyPnt, theVec(1));
3142 return Standard_True;
3143 }
3144};
3145
3146#include <GeomAdaptor_HCurve.hxx>
3147#include <Approx_FitAndDivide.hxx>
3148#include <Convert_CompBezierCurvesToBSplineCurve.hxx>
3149static Standard_Integer OCC30435(Draw_Interpretor& di, Standard_Integer, const char** a)
3150{
3151
3152 Handle(Geom_Curve) GC;
3153 GC = DrawTrSurf::GetCurve(a[2]);
3154 if (GC.IsNull())
3155 return 1;
3156
3157 Standard_Integer Dmin = 3;
3158 Standard_Integer Dmax = 12;
3159 Standard_Real Tol3d = 1.e-7;
3160 Standard_Boolean inverse = Standard_True;
3161
3162
3163 Standard_Integer inv = atoi(a[3]);
3164 if (inv > 0)
3165 {
3166 inverse = Standard_True;
3167 }
3168 else
3169 {
3170 inverse = Standard_False;
3171 }
3172
3173 Standard_Integer maxit = atoi(a[4]);
3174
3175 Handle(GeomAdaptor_HCurve) aGAC = new GeomAdaptor_HCurve(GC);
3176
3177 CurveEvaluator aCE(aGAC);
3178
3179 Approx_FitAndDivide anAppro(Dmin, Dmax, Tol3d, 0., Standard_True);
3180 anAppro.SetInvOrder(inverse);
3181 Standard_Integer i;
3182 for (i = 1; i <= maxit; ++i)
3183 anAppro.Perform(aCE);
3184
3185 if (!anAppro.IsAllApproximated())
3186 {
3187 di << "Approximation failed \n";
3188 return 1;
3189 }
3190 Standard_Integer NbCurves = anAppro.NbMultiCurves();
3191
3192 Convert_CompBezierCurvesToBSplineCurve Conv;
3193
3194 Standard_Real tol3d, tol2d, tolreached = 0.;
3195 for (i = 1; i <= NbCurves; i++) {
3196 anAppro.Error(i, tol3d, tol2d);
3197 tolreached = Max(tolreached, tol3d);
3198 AppParCurves_MultiCurve MC = anAppro.Value(i);
3199 TColgp_Array1OfPnt Poles(1, MC.Degree() + 1);
3200 MC.Curve(1, Poles);
3201 Conv.AddCurve(Poles);
3202 }
3203 Conv.Perform();
3204 Standard_Integer NbPoles = Conv.NbPoles();
3205 Standard_Integer NbKnots = Conv.NbKnots();
3206
3207 TColgp_Array1OfPnt NewPoles(1, NbPoles);
3208 TColStd_Array1OfReal NewKnots(1, NbKnots);
3209 TColStd_Array1OfInteger NewMults(1, NbKnots);
3210
3211 Conv.KnotsAndMults(NewKnots, NewMults);
3212 Conv.Poles(NewPoles);
3213
3214 BSplCLib::Reparametrize(GC->FirstParameter(),
3215 GC->LastParameter(),
3216 NewKnots);
3217 Handle(Geom_BSplineCurve) TheCurve = new Geom_BSplineCurve(NewPoles, NewKnots, NewMults, Conv.Degree());
3218
3219 DrawTrSurf::Set(a[1], TheCurve);
3220 di << a[1] << ": tolreached = " << tolreached << "\n";
3221
3222 return 0;
3223
3224}
3225
cca36b6b 3226//=======================================================================
3227//function : OCC30708_1
3228//purpose : Tests initialization of the TopoDS_Iterator with null shape
3229//=======================================================================
3230static Standard_Integer OCC30708_1 (Draw_Interpretor& di, Standard_Integer, const char**)
3231{
3232 TopoDS_Iterator it;
3233 try
3234 {
3235 OCC_CATCH_SIGNALS
3236
3237 TopoDS_Shape empty;
3238 it.Initialize (empty);
3239
3240 }
3241 catch (Standard_Failure)
3242 {
3243 di << "Cannot initialize TopoDS_Iterator with null shape\n";
3244 return 0;
3245 }
3246
3247 if (it.More())
3248 di << "Incorrect Iterator initialization: method More() returns true on null shape\n";
3249
3250 return 0;
3251}
3252
3253//=======================================================================
3254//function : OCC30708_2
3255//purpose : Tests initialization of the BRepLib_MakeWire with null wire
3256//=======================================================================
3257static Standard_Integer OCC30708_2 (Draw_Interpretor& di, Standard_Integer, const char**)
3258{
3259 try
3260 {
3261 OCC_CATCH_SIGNALS
3262
3263 TopoDS_Wire empty;
3264 BRepLib_MakeWire aWBuilder (empty);
3265 }
3266 catch (Standard_Failure)
3267 {
3268 di << "Cannot initialize BRepLib_MakeWire with null wire\n";
3269 }
3270
3271 return 0;
3272}
ba7f665d 3273
6f5db508 3274//=======================================================================
3275//function : OCC30869
3276//purpose :
3277//=======================================================================
3278static Standard_Integer OCC30869 (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
3279{
3280 if (theArgc != 2)
3281 {
3282 theDI.PrintHelp (theArgv[0]);
3283 return 1;
3284 }
3285
3286 TopoDS_Shape aWire = DBRep::Get (theArgv[1]);
3287 if (aWire.IsNull() || aWire.ShapeType() != TopAbs_WIRE)
3288 {
3289 theDI << theArgv[1] << " is not a wire.\n";
3290 return 1;
3291 }
3292
3293 BRepAdaptor_CompCurve aBACC (TopoDS::Wire (aWire));
3294
3295 Standard_Real aFirst = aBACC.FirstParameter();
3296 Standard_Real aLast = aBACC.LastParameter();
3297
3298 gp_Pnt aPFirst, aPLast;
3299 gp_Vec aVFirst, aVLast;
3300
3301 aBACC.D1 (aFirst, aPFirst, aVFirst);
3302 aBACC.D1 (aLast, aPLast, aVLast);
3303
3304 if (aVFirst.SquareMagnitude() > gp::Resolution())
3305 aVFirst.Normalize();
3306 if (aVLast.SquareMagnitude() > gp::Resolution())
3307 aVLast.Normalize();
3308
3309 theDI << aFirst << ": point " << aPFirst.X() << " "
3310 << aPFirst.Y() << " "
3311 << aPFirst.Z()
3312 << ", tangent " << aVFirst.X() << " "
3313 << aVFirst.Y() << " "
3314 << aVFirst.Z() << "\n";
3315
3316 theDI << aLast << ": point " << aPLast.X() << " "
3317 << aPLast.Y() << " "
3318 << aPLast.Z()
3319 << ", tangent " << aVLast.X() << " "
3320 << aVLast.Y() << " "
3321 << aVLast.Z() << "\n";
3322
3323 return 0;
3324}
3325
4e14c88f 3326void QABugs::Commands_20(Draw_Interpretor& theCommands) {
3327 const char *group = "QABugs";
3328
3329 theCommands.Add ("OCC26675_1", "OCC26675_1 result", __FILE__, SurfaceGenOCC26675_1, group);
4db4247a 3330 theCommands.Add ("OCC24836", "OCC24836", __FILE__, OCC24836, group);
8447359f 3331 theCommands.Add("OCC27021", "OCC27021", __FILE__, OCC27021, group);
b0cef606 3332 theCommands.Add("OCC27235", "OCC27235", __FILE__, OCC27235, group);
02fd709b 3333 theCommands.Add("OCC26930", "OCC26930", __FILE__, OCC26930, group);
e5260e1d 3334 theCommands.Add("OCC27466", "OCC27466", __FILE__, OCC27466, group);
5ae6e53d 3335 theCommands.Add("OCC27341",
3336 "OCC27341 res shape axo/top/bottom/front/back/left/right",
3337 __FILE__, OCC27341, group);
c1609fbe 3338 theCommands.Add ("OCC26747_1", "OCC26747_1 result", __FILE__, OCC26747_1, group);
3339 theCommands.Add ("OCC26747_2", "OCC26747_2 result", __FILE__, OCC26747_2, group);
3340 theCommands.Add ("OCC26747_3", "OCC26747_3 result", __FILE__, OCC26747_3, group);
8009d070 3341 theCommands.Add ("OCC27357", "OCC27357", __FILE__, OCC27357, group);
05607219 3342 theCommands.Add("OCC26270", "OCC26270 shape result", __FILE__, OCC26270, group);
07ef8bdf 3343 theCommands.Add ("OCC27552", "OCC27552", __FILE__, OCC27552, group);
84bd2552 3344 theCommands.Add("OCC27875", "OCC27875 curve", __FILE__, OCC27875, group);
0c63f2f8 3345 theCommands.Add("OCC28389", "OCC28389", __FILE__, OCC28389, group);
353e6fa0 3346 theCommands.Add("OCC28594", "OCC28594", __FILE__, OCC28594, group);
1fae7cda 3347 theCommands.Add("OCC28784", "OCC28784 result shape", __FILE__, OCC28784, group);
66cfcd0f 3348 theCommands.Add("OCC28829", "OCC28829: perform invalid FPE operation", __FILE__, OCC28829, group);
a5460e9d 3349 theCommands.Add("OCC28887",
3350 "OCC28887 filePath result"
3351 "\n\t\t: Check interface for reading BRep from memory.",
3352 __FILE__, OCC28887, group);
2a9be0e2 3353 theCommands.Add("OCC28131", "OCC28131 name: creates face problematic for offset", __FILE__, OCC28131, group);
18d8e3e7 3354 theCommands.Add("OCC29289", "OCC29289 : searching trigonometric root by Newton iterations", __FILE__, OCC29289, group);
4a5eefb9 3355 theCommands.Add ("OCC29371", "OCC29371", __FILE__, OCC29371, group);
f24150b8 3356 theCommands.Add("OCC29430", "OCC29430 <result wire> "
3357 "<result first point> <result last point>",
3358 __FILE__, OCC29430, group);
f46c2b39 3359 theCommands.Add("OCC29531", "OCC29531 <step file name>", __FILE__, OCC29531, group);
f24150b8 3360
229add78 3361 theCommands.Add ("OCC29064", "OCC29064: test memory usage by copying empty maps", __FILE__, OCC29064, group);
d9d3107d 3362 theCommands.Add ("OCC29925", "OCC29925: check safety of character classification functions", __FILE__, OCC29925, group);
3306fdd9 3363 theCommands.Add("OCC29807", "OCC29807 surface1 surface2 u1 v1 u2 v2", __FILE__, OCC29807, group);
1f26f80b 3364 theCommands.Add("OCC29311", "OCC29311 shape counter nbiter: check performance of OBB calculation", __FILE__, OCC29311, group);
405b6fc5 3365 theCommands.Add("OCC30391", "OCC30391 result face LenBeforeUfirst LenAfterUlast LenBeforeVfirst LenAfterVlast", __FILE__, OCC30391, group);
ba7f665d 3366 theCommands.Add("OCC30435", "OCC30435 result curve inverse nbit", __FILE__, OCC30435, group);
3306fdd9 3367
43c8661e 3368 theCommands.Add("QAStartsWith",
3369 "QAStartsWith string startstring",
3370 __FILE__, QAStartsWith, group);
3371
3372 theCommands.Add("QAEndsWith",
3373 "QAEndsWith string endstring",
3374 __FILE__, QAEndsWith, group);
3375
cca36b6b 3376 theCommands.Add ("OCC30708_1", "Tests initialization of the TopoDS_Iterator with null shape",
3377 __FILE__, OCC30708_1, group);
3378
3379 theCommands.Add ("OCC30708_2", "Tests initialization of the BRepLib_MakeWire with null shape",
3380 __FILE__, OCC30708_2, group);
3381
6f5db508 3382 theCommands.Add ("OCC30869", "Prints bounding points of the given wire and tangent vectors at these points.\n"
3383 "Usage: OCC30869 wire",
3384 __FILE__, OCC30869, group);
3385
4e14c88f 3386 return;
3387}