1 // Created on: 2002-05-21
2 // Created by: QA Admin
3 // Copyright (c) 2002-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and / or modify it
8 // under the terms of the GNU Lesser General Public 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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
18 #include <Draw_Interpretor.hxx>
20 #include <DrawTrSurf.hxx>
21 #include <AIS_InteractiveContext.hxx>
22 #include <ViewerTest.hxx>
23 #include <AIS_Shape.hxx>
24 #include <TopoDS_Shape.hxx>
26 #include <gp_Pnt2d.hxx>
28 #include <GCE2d_MakeSegment.hxx>
29 #include <Geom2d_TrimmedCurve.hxx>
30 #include <DrawTrSurf.hxx>
32 #include <Precision.hxx>
34 #include <PCollection_HAsciiString.hxx>
39 #include <OSD_PerfMeter.hxx>
40 #include <OSD_Timer.hxx>
41 #include <BRepPrimAPI_MakeBox.hxx>
42 #include <BRepPrimAPI_MakeSphere.hxx>
43 #include <BRepAlgo_Cut.hxx>
44 #include <NCollection_Map.hxx>
45 #include <NCollection_Handle.hxx>
46 #include <TCollection_HAsciiString.hxx>
48 #include <Standard_Version.hxx>
50 #define QCOMPARE(val1, val2) \
51 di << "Checking " #val1 " == " #val2 << \
52 ((val1) == (val2) ? ": OK\n" : ": Error\n")
54 static Standard_Integer OCC230 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
57 di << "ERROR OCC230: Usage : " << argv[0] << " TrimmedCurve Pnt2d Pnt2d" << "\n";
62 if ( !DrawTrSurf::GetPoint2d(argv[2],P1)) {
63 di << "ERROR OCC230: " << argv[2] << " is not Pnt2d" << "\n";
66 if ( !DrawTrSurf::GetPoint2d(argv[3],P2)) {
67 di << "ERROR OCC230: " << argv[3] << " is not Pnt2d" << "\n";
71 GCE2d_MakeSegment MakeSegment(P1,P2);
72 Handle(Geom2d_TrimmedCurve) TrimmedCurve = MakeSegment.Value();
73 DrawTrSurf::Set(argv[1], TrimmedCurve);
77 static Standard_Integer OCC142 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/)
79 for(Standard_Integer i= 0;i <= 20;i++){
80 Handle(PCollection_HAsciiString) pstr = new PCollection_HAsciiString("TEST");
83 di << "OCC142: OK" << "\n";
87 static Standard_Integer OCC23361 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/)
92 t1.SetRotation(gp_Ax1(p, gp_Dir(0, 1, 0)), -0.49328285294022267);
93 t2.SetRotation(gp_Ax1(p, gp_Dir(0, 0, 1)), 0.87538474718473880);
95 gp_Trsf tComp = t2 * t1;
98 gp_Pnt p2 = p1.Transformed(tComp);
99 gp_Pnt p3 = p1.Transformed(t1);
102 // points must be equal
103 if ( ! p2.IsEqual(p3, Precision::Confusion()) )
104 di << "ERROR OCC23361: equivalent transformations does not produce equal points" << "\n";
106 di << "OCC23361: OK" << "\n";
111 static Standard_Integer OCC23237 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/)
113 OSD_PerfMeter aPM("TestMeter",0);
116 // run some operation in cycle for about 2 seconds to have good values of times to compare
118 printf("OSD_PerfMeter test.\nRunning Boolean operation on solids in loop.\n");
119 for (; aTM.ElapsedTime() < 2.; count++)
124 // do some operation that will take considerable time compared with time of starting / stopping timers
125 BRepPrimAPI_MakeBox aBox (10., 10., 10.);
126 BRepPrimAPI_MakeSphere aSphere (10.);
127 BRepAlgo_Cut aCutter (aBox.Shape(), aSphere.Shape());
134 Standard_Real aPerfMeter_CPUtime = 0., aTimer_ElapsedTime = aTM.ElapsedTime();
136 perf_get_meter("TestMeter", &aNbEnters, &aPerfMeter_CPUtime);
138 Standard_Real aTimeDiff = (fabs(aTimer_ElapsedTime - aPerfMeter_CPUtime) / aTimer_ElapsedTime);
140 printf("\nMeasurement results (%d cycles):\n", count);
141 printf("\nOSD_PerfMeter CPU time: %lf\nOSD_Timer elapsed time: %lf\n", aPerfMeter_CPUtime, aTimer_ElapsedTime);
142 printf("Time delta is: %.3lf %%\n", aTimeDiff * 100);
145 di << "OCC23237: Error: too much difference between CPU and elapsed times";
146 else if (aNbEnters != count)
147 di << "OCC23237: Error: counter reported by PerfMeter (" << aNbEnters << ") does not correspond to actual number of cycles";
149 di << "OCC23237: OK";
156 #include <Standard_Atomic.hxx>
157 #include <tbb/blocked_range.h>
158 #include <tbb/parallel_for.h>
160 class IncrementerDecrementer
163 IncrementerDecrementer (Standard_Integer* theVal, Standard_Boolean thePositive) : myVal (theVal), myPositive (thePositive)
165 void operator() (const tbb::blocked_range<size_t>& r) const
168 for (size_t i = r.begin(); i != r.end(); ++i)
169 Standard_Atomic_Increment (myVal);
171 for (size_t i = r.begin(); i != r.end(); ++i)
172 Standard_Atomic_Decrement (myVal);
175 Standard_Integer* myVal;
176 Standard_Boolean myPositive;
181 static Standard_Integer OCC22980 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/)
185 //check returned value
186 QCOMPARE (Standard_Atomic_Decrement (&aSum), -1);
187 QCOMPARE (Standard_Atomic_Increment (&aSum), 0);
188 QCOMPARE (Standard_Atomic_Increment (&aSum), 1);
189 QCOMPARE (Standard_Atomic_Increment (&aSum), 2);
190 // QCOMPARE (Standard_Atomic_DecrementTest (&aSum), 0);
191 // QCOMPARE (Standard_Atomic_DecrementTest (&aSum), 1);
195 const int N = 1 << 24; //big enough to ensure concurrency
198 tbb::parallel_for (tbb::blocked_range<size_t> (0, N), IncrementerDecrementer (&aSum, true));
202 tbb::parallel_for (tbb::blocked_range<size_t> (0, N), IncrementerDecrementer (&aSum, false));
210 static Standard_Integer OCC22980 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char **argv)
212 di << "Test skipped: command " << argv[0] << " requires TBB library\n";
216 #endif /* HAVE_TBB */
218 #include <TDocStd_Application.hxx>
219 #include <XCAFApp_Application.hxx>
220 #include <TDocStd_Document.hxx>
221 #include <XCAFDoc_ShapeTool.hxx>
222 #include <XCAFDoc_DocumentTool.hxx>
223 #include <TDF_Label.hxx>
224 #include <TDataStd_Name.hxx>
226 static Standard_Integer OCC23595 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/)
228 const Handle(TDocStd_Application)& anApp = XCAFApp_Application::GetApplication();
229 Handle(TDocStd_Document) aDoc;
230 anApp->NewDocument ("XmlXCAF", aDoc);
231 QCOMPARE (!aDoc.IsNull(), Standard_True);
233 Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main());
235 //check default value
236 Standard_Boolean aValue = XCAFDoc_ShapeTool::AutoNaming();
237 QCOMPARE (aValue, Standard_True);
240 XCAFDoc_ShapeTool::SetAutoNaming (Standard_True);
241 TopoDS_Shape aShape = BRepPrimAPI_MakeBox (100., 200., 300.).Shape();
242 TDF_Label aLabel = aShTool->AddShape (aShape);
243 Handle(TDataStd_Name) anAttr;
244 QCOMPARE (aLabel.FindAttribute (TDataStd_Name::GetID(), anAttr), Standard_True);
247 XCAFDoc_ShapeTool::SetAutoNaming (Standard_False);
248 aShape = BRepPrimAPI_MakeBox (300., 200., 100.).Shape();
249 aLabel = aShTool->AddShape (aShape);
250 QCOMPARE (!aLabel.FindAttribute (TDataStd_Name::GetID(), anAttr), Standard_True);
253 XCAFDoc_ShapeTool::SetAutoNaming (aValue);
258 #include <ExprIntrp_GenExp.hxx>
259 Standard_Integer OCC22611 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
263 di << "Usage : " << argv[0] << " string nb\n";
267 TCollection_AsciiString aToken = argv[1];
268 Standard_Integer aNb = atoi(argv[2]);
270 Handle(ExprIntrp_GenExp) aGen = ExprIntrp_GenExp::Create();
271 for (Standard_Integer i=0; i < aNb; i++)
273 aGen->Process(aToken);
274 Handle(Expr_GeneralExpression) aExpr = aGen->Expression();
280 Standard_Integer OCC22595 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/)
284 << " {" << M0(1,1) << "} {" << M0(1,2) << "} {" << M0(1,3) <<"}"
285 << " {" << M0(2,1) << "} {" << M0(2,2) << "} {" << M0(2,3) <<"}"
286 << " {" << M0(1,1) << "} {" << M0(1,2) << "} {" << M0(1,3) <<"}";
290 #include <TopoDS_Face.hxx>
291 #include <TopoDS_Face.hxx>
292 #include <TopoDS.hxx>
293 #include <BRepBuilderAPI_Transform.hxx>
294 #include <BRepExtrema_DistShapeShape.hxx>
295 #include <BRepTools.hxx>
297 static Standard_Boolean OCC23774Test(const TopoDS_Face& grossPlateFace, const TopoDS_Shape& originalWire, Draw_Interpretor& di)
299 BRepExtrema_DistShapeShape distShapeShape(grossPlateFace,originalWire,Extrema_ExtFlag_MIN);
300 if(!distShapeShape.IsDone()) {
301 di <<"Distance ShapeShape is Not Done\n";
302 return Standard_False;
305 if(distShapeShape.Value() > 0.01) {
306 di << "Wrong Dist = " <<distShapeShape.Value() << "\n";
307 return Standard_False;
309 di << "Dist0 = " <<distShapeShape.Value() <<"\n";
311 //////////////////////////////////////////////////////////////////////////
313 const gp_Pnt2d axis1P1(1474.8199035519228,1249.9995745636970);
314 const gp_Pnt2d axis1P2(1474.8199035519228,1250.9995745636970);
316 gp_Vec2d mirrorVector1(axis1P1,axis1P2);
319 mirror1.SetMirror(gp_Ax2d(axis1P1,mirrorVector1));
321 BRepBuilderAPI_Transform transformer1(mirror1);
322 transformer1.Perform(originalWire);
323 if(!transformer1.IsDone()) {
324 di << "Not Done1 " << "\n";
325 return Standard_False;
327 const TopoDS_Shape& step1ModifiedShape = transformer1.ModifiedShape(originalWire);
329 BRepExtrema_DistShapeShape distShapeShape1(grossPlateFace,step1ModifiedShape,Extrema_ExtFlag_MIN);
330 if(!distShapeShape1.IsDone())
331 return Standard_False;
332 if(distShapeShape1.Value() > 0.01) {
333 di << "Dist = " <<distShapeShape1.Value() <<"\n";
334 return Standard_False;
336 di << "Dist1 = " <<distShapeShape1.Value() <<"\n";
338 //////////////////////////////////////////////////////////////////////////
340 transformer1.Perform(step1ModifiedShape);
341 if(!transformer1.IsDone()) {
342 di << "Not Done1 \n";
343 return Standard_False;
345 const TopoDS_Shape& step2ModifiedShape = transformer1.ModifiedShape(step1ModifiedShape);
347 //This is identity matrix for values but for type is gp_Rotation ?!
348 gp_Trsf2d mirror11 = mirror1;
349 mirror11.PreMultiply(mirror1);
351 BRepExtrema_DistShapeShape distShapeShape2(grossPlateFace,step2ModifiedShape);//,Extrema_ExtFlag_MIN);
352 if(!distShapeShape2.IsDone())
353 return Standard_False;
355 //This last test case give error (the value is 1008.8822038689706)
356 if(distShapeShape2.Value() > 0.01) {
357 di << "Wrong Dist2 = " <<distShapeShape2.Value() <<"\n";
358 Standard_Integer N = distShapeShape2.NbSolution();
359 di << "Nb = " <<N <<"\n";
360 for (Standard_Integer i=1;i <= N;i++)
361 di <<"Sol(" <<i<<") = " <<distShapeShape2.PointOnShape1(i).Distance(distShapeShape2.PointOnShape2(i)) <<"\n";
362 return Standard_False;
364 di << "Distance2 = " <<distShapeShape2.Value() <<"\n";
366 return Standard_True;
368 static Standard_Integer OCC23774(Draw_Interpretor& di, Standard_Integer n, const char** a)
372 di <<"OCC23774: invalid number of input parameters\n";
376 const char *ns1 = (a[1]), *ns2 = (a[2]);
377 TopoDS_Shape S1(DBRep::Get(ns1)), S2(DBRep::Get(ns2));
378 if (S1.IsNull() || S2.IsNull()) {
379 di <<"OCC23774: Null input shapes\n";
382 const TopoDS_Face& aFace = TopoDS::Face(S1);
383 if(!OCC23774Test(aFace, S2, di))
384 di << "Something is wrong\n";
389 #include <GeomConvert_ApproxSurface.hxx>
390 #include <Geom_BSplineSurface.hxx>
392 #include <OSD_Thread.hxx>
393 static void GeomConvertTest (Draw_Interpretor& di, Standard_Integer theTargetNbUPoles, Standard_CString theFileName)
395 Handle(Geom_Surface) aSurf = DrawTrSurf::GetSurface(theFileName);
396 GeomConvert_ApproxSurface aGAS (aSurf, 1e-4, GeomAbs_C1, GeomAbs_C1, 9, 9, 100, 1);
397 if (!aGAS.IsDone()) {
398 di << "ApproxSurface is not done!" << "\n";
401 const Handle(Geom_BSplineSurface)& aBSurf = aGAS.Surface();
402 if (aBSurf.IsNull()) {
403 di << "BSplineSurface is not created!" << "\n";
406 di << "Number of UPoles:" << aBSurf->NbUPoles() << "\n";
407 QCOMPARE (aBSurf->NbUPoles(), theTargetNbUPoles);
411 Draw_Interpretor* di;
412 Standard_Integer nbupoles;
413 Standard_CString filename;
416 Standard_EXPORT Standard_Address convert(Standard_Address data)
418 aData* info = (aData*) data;
419 GeomConvertTest(*(info->di),info->nbupoles,info->filename);
423 static Standard_Integer OCC23952sweep (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
426 di << "Usage: " << argv[0] << " invalid number of arguments" << "\n";
429 struct aData aStorage;
431 aStorage.nbupoles = Draw::Atoi(argv[1]);
432 aStorage.filename = argv[2];
434 OSD_Thread aThread1(convert);
435 aThread1.Run(&aStorage);
436 GeomConvertTest(di,aStorage.nbupoles,aStorage.filename);
437 cout << "result of thread: " << aThread1.Wait() << endl;
442 #include <GeomInt_IntSS.hxx>
443 static void GeomIntSSTest (Draw_Interpretor& di, Standard_Integer theNbSol, Standard_CString theFileName1, Standard_CString theFileName2)
445 Handle(Geom_Surface) aSurf1 = DrawTrSurf::GetSurface(theFileName1);
446 Handle(Geom_Surface) aSurf2 = DrawTrSurf::GetSurface(theFileName2);
447 GeomInt_IntSS anInter;
448 anInter.Perform(aSurf1, aSurf2, Precision::Confusion(), Standard_True);
449 if (!anInter.IsDone()) {
450 di << "An intersection is not done!" << "\n";
454 di << "Number of Lines:" << anInter.NbLines() << "\n";
455 QCOMPARE (anInter.NbLines(), theNbSol);
459 Draw_Interpretor* di;
460 Standard_Integer nbsol;
461 Standard_CString filename1;
462 Standard_CString filename2;
464 Standard_EXPORT Standard_Address convert_inter(Standard_Address data)
466 aNewData* info = (aNewData*) data;
467 GeomIntSSTest(*(info->di),info->nbsol,info->filename1,info->filename2);
471 static Standard_Integer OCC23952intersect (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
474 di << "Usage: " << argv[0] << " invalid number of arguments" << "\n";
477 struct aNewData aStorage;
479 aStorage.nbsol = Draw::Atoi(argv[1]);
480 aStorage.filename1 = argv[2];
481 aStorage.filename2 = argv[3];
483 OSD_Thread aThread1(convert_inter);
484 aThread1.Run(&aStorage);
485 GeomIntSSTest(di,aStorage.nbsol,aStorage.filename1,aStorage.filename2);
486 cout << "result of thread: " << aThread1.Wait() << endl;
491 #include <Geom_SurfaceOfRevolution.hxx>
492 static Standard_Integer OCC23683 (Draw_Interpretor& di, Standard_Integer argc,const char ** argv)
495 di<<"Usage: " << argv[0] << " invalid number of arguments"<<"\n";
499 Standard_Integer ucontinuity = 1;
500 Standard_Integer vcontinuity = 1;
501 Standard_Boolean iscnu = false;
502 Standard_Boolean iscnv = false;
504 Handle(Geom_Surface) aSurf = DrawTrSurf::GetSurface(argv[1]);
506 QCOMPARE (aSurf->IsCNu (ucontinuity), iscnu);
507 QCOMPARE (aSurf->IsCNv (vcontinuity), iscnv);
512 #include <gp_Ax1.hxx>
513 #include <gp_Ax22d.hxx>
514 #include <Geom_Plane.hxx>
515 #include <Geom2d_Circle.hxx>
516 #include <Geom2d_TrimmedCurve.hxx>
517 #include <BRepBuilderAPI_MakeEdge.hxx>
518 #include <BRepPrimAPI_MakeRevol.hxx>
519 #include <Geom2d_OffsetCurve.hxx>
521 static int test_offset(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
523 // Check the command arguments
526 di << "Error: " << argv[0] << " - invalid number of arguments" << "\n";
527 di << "Usage: type help " << argv[0] << "\n";
528 return 1; // TCL_ERROR
531 gp_Ax1 RotoAx( gp::Origin(), gp::DZ() );
532 gp_Ax22d Ax2( gp::Origin2d(), gp::DY2d(), gp::DX2d() );
533 Handle(Geom_Surface) Plane = new Geom_Plane( gp::YOZ() );
535 di << "<<<< Preparing sample surface of revolution based on trimmed curve >>>>" << "\n";
536 di << "-----------------------------------------------------------------------" << "\n";
538 Handle(Geom2d_Circle) C2d1 = new Geom2d_Circle(Ax2, 1.0);
539 Handle(Geom2d_TrimmedCurve) C2d1Trimmed = new Geom2d_TrimmedCurve(C2d1, 0.0, M_PI/2.0);
540 TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(C2d1Trimmed, Plane);
542 DBRep::Set("e1", E1);
544 BRepPrimAPI_MakeRevol aRevolBuilder1(E1, RotoAx);
545 TopoDS_Face F1 = TopoDS::Face( aRevolBuilder1.Shape() );
547 DBRep::Set("f1", F1);
549 di << "Result: f1" << "\n";
551 di << "<<<< Preparing sample surface of revolution based on offset curve >>>>" << "\n";
552 di << "-----------------------------------------------------------------------" << "\n";
554 Handle(Geom2d_OffsetCurve) C2d2Offset = new Geom2d_OffsetCurve(C2d1Trimmed, -0.5);
555 TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(C2d2Offset, Plane);
557 DBRep::Set("e2", E2);
559 BRepPrimAPI_MakeRevol aRevolBuilder2(E2, RotoAx);
560 TopoDS_Face F2 = TopoDS::Face( aRevolBuilder2.Shape() );
562 DBRep::Set("f2", F2);
564 di << "Result: f2" << "\n";
569 #include <Geom_Curve.hxx>
570 #include <Geom_Surface.hxx>
571 #include <Precision.hxx>
572 #include <ShapeConstruct_ProjectCurveOnSurface.hxx>
573 //=======================================================================
574 //function : OCC24008
576 //=======================================================================
577 static Standard_Integer OCC24008 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
580 di << "Usage: " << argv[0] << " invalid number of arguments" << "\n";
583 Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(argv[1]);
584 Handle(Geom_Surface) aSurf = DrawTrSurf::GetSurface(argv[2]);
585 if (aCurve.IsNull()) {
586 di << "Curve was not read" << "\n";
589 if (aSurf.IsNull()) {
590 di << "Surface was not read" << "\n";
593 ShapeConstruct_ProjectCurveOnSurface aProj;
594 aProj.Init (aSurf, Precision::Confusion());
596 Handle(Geom2d_Curve) aPCurve;
597 aProj.Perform (aCurve, aCurve->FirstParameter(), aCurve->LastParameter(), aPCurve);
598 if (aPCurve.IsNull()) {
599 di << "PCurve was not created" << "\n";
603 di << "Exception was caught" << "\n";
608 #include <GeomAdaptor_Surface.hxx>
610 //=======================================================================
611 //function : OCC23945
613 //=======================================================================
615 static Standard_Integer OCC23945 (Draw_Interpretor& /*di*/,Standard_Integer n, const char** a)
619 Handle(Geom_Surface) aS = DrawTrSurf::GetSurface(a[1]);
620 if (aS.IsNull()) return 1;
622 GeomAdaptor_Surface GS(aS);
624 Standard_Real U = Draw::Atof(a[2]);
625 Standard_Real V = Draw::Atof(a[3]);
627 Standard_Boolean DrawPoint = ( n%3 == 2);
635 GS.D2(U,V,P,DU,DV,D2U,D2V,D2UV);
636 Draw::Set(a[13],D2U.X());
637 Draw::Set(a[14],D2U.Y());
638 Draw::Set(a[15],D2U.Z());
639 Draw::Set(a[16],D2V.X());
640 Draw::Set(a[17],D2V.Y());
641 Draw::Set(a[18],D2V.Z());
642 Draw::Set(a[19],D2UV.X());
643 Draw::Set(a[20],D2UV.Y());
644 Draw::Set(a[21],D2UV.Z());
649 Draw::Set(a[7],DU.X());
650 Draw::Set(a[8],DU.Y());
651 Draw::Set(a[9],DU.Z());
652 Draw::Set(a[10],DV.X());
653 Draw::Set(a[11],DV.Y());
654 Draw::Set(a[12],DV.Z());
660 Draw::Set(a[4],P.X());
661 Draw::Set(a[5],P.Y());
662 Draw::Set(a[6],P.Z());
665 DrawTrSurf::Set(a[n],P);
671 #include <Voxel_BoolDS.hxx>
672 #include <Voxel_FastConverter.hxx>
673 #include <Voxel_BooleanOperation.hxx>
674 static Standard_Integer OCC24019 (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
677 di << "Error: " << argv[0] << " - invalid number of arguments" << "\n";
681 TCollection_AsciiString aFileName = argv[1];
683 BRep_Builder aBuilder;
685 if (!BRepTools::Read(aShape, aFileName.ToCString(), aBuilder)) {
686 di << "Error: Could not read a shape!" << "\n";
690 TopoDS_Solid aShape1 = BRepPrimAPI_MakeSphere(gp_Pnt(20,25,35), 7);
692 Standard_Real deflection = 0.005;
693 Standard_Integer nbThreads = 1;
694 Standard_Integer nbx = 200, nby = 200, nbz = 200;
695 Voxel_BoolDS theVoxels(0,0,0, 50, 50, 50, nbx, nby, nbz);
696 Voxel_BoolDS theVoxels1(0,0,0, 50, 50, 50, nbx, nby, nbz);
698 Standard_Integer progress = 0;
699 Voxel_FastConverter fcp(aShape, theVoxels, deflection, nbx, nby, nbz, nbThreads);
700 fcp.ConvertUsingSAT(progress, 1);
703 Voxel_FastConverter fcp1(aShape1, theVoxels1, deflection, nbx, nby, nbz, nbThreads);
704 fcp1.ConvertUsingSAT(progress, 1);
705 fcp1.FillInVolume(1);
707 Voxel_BooleanOperation op;
708 Standard_Boolean result = op.Cut(theVoxels1, theVoxels);
710 di << "Error: invalid boolean operation" << "\n";
712 di << "OK: boolean operation is ok" << "\n";
718 //=======================================================================
719 //function : OCC11758
721 //=======================================================================
722 static Standard_Integer OCC11758 (Draw_Interpretor& di, Standard_Integer n, const char**)
724 if (n != 1) return 1;
726 const char* theStr = "0123456789";
727 Standard_Integer i, j;
728 for ( i = 0; i < 5; ++i ) {
729 // TCollection_AsciiString(const Standard_CString astring)
730 TCollection_AsciiString a(theStr+i);
731 // IsEqual (const Standard_CString other)const
732 //assert( a == theStr+i );
733 QCOMPARE ( a , theStr+i );
735 //TCollection_AsciiString(const Standard_CString astring,const Standard_Integer aLen )
736 TCollection_AsciiString b(theStr+i, 3);
737 //assert( b.Length() == 3 );
738 //assert( strncmp( b.ToCString(), theStr+i, 3 ) == 0 );
739 //assert( strlen( b.ToCString() ) == 3 );
740 QCOMPARE ( b.Length() , 3 );
741 QCOMPARE ( strncmp( b.ToCString() , theStr+i, 3 ) , 0 );
742 QCOMPARE ( b.Length() , 3 );
744 //TCollection_AsciiString(const Standard_Integer aValue)
745 TCollection_AsciiString c(i);
746 //assert( c.IsIntegerValue() );
747 //assert( c.IntegerValue() == i );
748 QCOMPARE ( c.IsIntegerValue() , Standard_True );
749 QCOMPARE ( c.IntegerValue() , i );
751 //TCollection_AsciiString(const Standard_Real aValue)
752 TCollection_AsciiString d( 0.1*i );
753 //assert( d.IsRealValue() );
754 //assert( TCollection_AsciiString(3.3) == "3.3");
755 QCOMPARE ( d.IsRealValue() , Standard_True );
756 QCOMPARE ( TCollection_AsciiString(3.3) , "3.3" );
758 //TCollection_AsciiString(const TCollection_AsciiString& astring)
759 TCollection_AsciiString e(d);
761 //assert( e.Length() == d.Length() );
762 //assert( strcmp( e.ToCString(), d.ToCString() ) == 0 );
764 QCOMPARE ( e.Length() , d.Length() );
765 QCOMPARE ( strcmp( e.ToCString(), d.ToCString() ) , 0 );
767 // TCollection_AsciiString(const TCollection_AsciiString& astring ,
768 // const Standard_Character other )
769 TCollection_AsciiString f(e,'\a');
770 //assert( f.Length() == e.Length() + 1 );
771 //assert( strncmp( f.ToCString(), e.ToCString(), e.Length() ) == 0 );
772 //assert( f.Value( f.Length() ) == '\a');
773 QCOMPARE ( f.Length() , e.Length() + 1 );
774 QCOMPARE ( strncmp( f.ToCString(), e.ToCString(), e.Length() ) , 0 );
775 QCOMPARE ( f.Value( f.Length() ) , '\a' );
777 // TCollection_AsciiString(const TCollection_AsciiString& astring ,
778 // const Standard_CString other )
779 TCollection_AsciiString g(f, theStr);
780 //assert( g.Length() == f.Length() + strlen( theStr ));
781 //assert( strncmp( g.ToCString(), f.ToCString(), f.Length() ) == 0 );
782 //assert( g.Search( theStr ) == f.Length() + 1 );
783 QCOMPARE ( g.Length() , f.Length() + (Standard_Integer)strlen( theStr ) );
784 QCOMPARE ( strncmp( g.ToCString(), f.ToCString(), f.Length() ) , 0 );
785 QCOMPARE ( g.Search( theStr ) , f.Length() + 1 );
787 // TCollection_AsciiString(const TCollection_AsciiString& astring ,
788 // const TCollection_AsciiString& other )
789 TCollection_AsciiString h(d,a);
790 //assert( h.Length() == d.Length() + a.Length() );
791 //assert( strncmp( h.ToCString(), d.ToCString(), d.Length() ) == 0 );
792 //assert( strncmp( h.ToCString() + d.Length(), a.ToCString(), a.Length() ) == 0 );
793 QCOMPARE ( h.Length() , d.Length() + a.Length() );
794 QCOMPARE ( strncmp( h.ToCString(), d.ToCString(), d.Length() ) , 0 );
795 QCOMPARE ( strncmp( h.ToCString() + d.Length(), a.ToCString(), a.Length() ) , 0 );
797 // AssignCat(const Standard_CString other)
798 c.AssignCat( a.ToCString() );
799 //assert( c.Length() == 1 + a.Length() );
800 //assert( c.Search( a ) == 2 );
801 QCOMPARE ( c.Length() , 1 + a.Length() );
802 QCOMPARE ( c.Search( a ) , 2 );
804 // AssignCat(const TCollection_AsciiString& other)
805 Standard_Integer dl = d.Length();
807 //assert( d.Length() == dl + a.Length() );
808 //assert( d.Search( a ) == dl + 1 );
809 QCOMPARE ( d.Length() , dl + a.Length() );
810 QCOMPARE ( d.Search( a ) , dl + 1 );
813 TCollection_AsciiString capitalize("aBC");
814 capitalize.Capitalize();
815 //assert( capitalize == "Abc" );
816 QCOMPARE ( capitalize , "Abc" );
818 // Copy(const Standard_CString fromwhere)
820 //assert( d == theStr+i );
821 QCOMPARE ( d , theStr+i );
823 // Copy(const TCollection_AsciiString& fromwhere)
825 // IsEqual (const TCollection_AsciiString& other)const
829 // Insert(const Standard_Integer where, const Standard_CString what)
831 d.Insert( 2, theStr );
832 //assert( d.Length() == dl + strlen( theStr ));
833 //assert( strncmp( d.ToCString() + 1, theStr, strlen( theStr )) == 0 );
834 QCOMPARE ( d.Length() , dl + (Standard_Integer)strlen( theStr ) );
835 QCOMPARE ( strncmp( d.ToCString() + 1, theStr, strlen( theStr )) , 0 );
837 //Insert(const Standard_Integer where,const Standard_Character what)
839 d.Insert( i+1, 'i' );
840 //assert( d.Length() == strlen( theStr ) + 1 );
841 //assert( d.Value( i+1 ) == 'i');
842 //assert( strcmp( d.ToCString() + i + 1, theStr+i ) == 0 );
843 QCOMPARE ( d.Length() , (Standard_Integer)strlen( theStr ) + 1 );
844 QCOMPARE ( d.Value( i+1 ) , 'i' );
845 QCOMPARE ( strcmp( d.ToCString() + i + 1, theStr+i ) , 0 );
847 //Insert(const Standard_Integer where,const TCollection_AsciiString& what)
849 d.Insert( i+1, TCollection_AsciiString( "i" ));
850 //assert( d.Length() == strlen( theStr ) + 1 );
851 //assert( d.Value( i+1 ) == 'i');
852 //assert( strcmp( d.ToCString() + i + 1, theStr+i ) == 0 );
853 QCOMPARE ( d.Length() , (Standard_Integer)strlen( theStr ) + 1 );
854 QCOMPARE ( d.Value( i+1 ) , 'i' );
855 QCOMPARE ( strcmp( d.ToCString() + i + 1, theStr+i ) , 0 );
857 // IsDifferent (const Standard_CString other)const
858 //assert( d.IsDifferent( theStr ));
859 //assert( d.IsDifferent( "theStr" ));
860 //assert( d.IsDifferent( "" ));
861 //assert( !d.IsDifferent( d.ToCString() ));
862 QCOMPARE ( d.IsDifferent( theStr ) , Standard_True );
863 QCOMPARE ( d.IsDifferent( "theStr" ) , Standard_True );
864 QCOMPARE ( d.IsDifferent( "" ) , Standard_True );
865 QCOMPARE ( !d.IsDifferent( d.ToCString() ) , Standard_True );
867 // IsDifferent (const TCollection_AsciiString& other)const
868 //assert( d.IsDifferent( TCollection_AsciiString() ));
869 //assert( d.IsDifferent( a ));
870 //assert( d.IsDifferent( h ));
871 //assert( !d.IsDifferent( d ));
872 QCOMPARE ( d.IsDifferent( TCollection_AsciiString() ) , Standard_True );
873 QCOMPARE ( d.IsDifferent( a ) , Standard_True );
874 QCOMPARE ( d.IsDifferent( h ) , Standard_True );
875 QCOMPARE ( !d.IsDifferent( d ) , Standard_True );
877 // IsLess (const Standard_CString other)const
878 //assert( TCollection_AsciiString ("0"). IsLess("1"));
879 //assert( TCollection_AsciiString ("0"). IsLess("00"));
880 //assert( TCollection_AsciiString (""). IsLess("0"));
881 //assert( !TCollection_AsciiString("1"). IsLess("0"));
882 //assert( !TCollection_AsciiString("00").IsLess("0"));
883 //assert( !TCollection_AsciiString("0"). IsLess(""));
884 //assert( TCollection_AsciiString (theStr+i).IsLess(theStr+i+1));
885 QCOMPARE ( TCollection_AsciiString ("0"). IsLess("1") , Standard_True );
886 QCOMPARE ( TCollection_AsciiString ("0"). IsLess("00") , Standard_True );
887 QCOMPARE ( TCollection_AsciiString (""). IsLess("0") , Standard_True );
888 QCOMPARE ( !TCollection_AsciiString("1"). IsLess("0"), Standard_True );
889 QCOMPARE ( !TCollection_AsciiString("00").IsLess("0") , Standard_True );
890 QCOMPARE ( !TCollection_AsciiString("0"). IsLess("") , Standard_True );
891 QCOMPARE ( TCollection_AsciiString (theStr+i).IsLess(theStr+i+1) , Standard_True );
893 // IsLess (const TCollection_AsciiString& other)const
894 //assert( TCollection_AsciiString ("0"). IsLess(TCollection_AsciiString("1" )));
895 //assert( TCollection_AsciiString ("0"). IsLess(TCollection_AsciiString("00")));
896 //assert( TCollection_AsciiString (""). IsLess(TCollection_AsciiString("0" )));
897 //assert( !TCollection_AsciiString("1"). IsLess(TCollection_AsciiString("0" )));
898 //assert( !TCollection_AsciiString("00").IsLess(TCollection_AsciiString("0" )));
899 //assert( !TCollection_AsciiString("0"). IsLess(TCollection_AsciiString("" )));
900 //assert( TCollection_AsciiString (theStr+i).IsLess(TCollection_AsciiString(theStr+i+1)));
901 QCOMPARE ( TCollection_AsciiString ("0"). IsLess(TCollection_AsciiString("1" )) , Standard_True );
902 QCOMPARE ( TCollection_AsciiString ("0"). IsLess(TCollection_AsciiString("00")) , Standard_True );
903 QCOMPARE ( TCollection_AsciiString (""). IsLess(TCollection_AsciiString("0" )) , Standard_True );
904 QCOMPARE ( !TCollection_AsciiString("1"). IsLess(TCollection_AsciiString("0" )) , Standard_True );
905 QCOMPARE ( !TCollection_AsciiString("00").IsLess(TCollection_AsciiString("0" )) , Standard_True );
906 QCOMPARE ( !TCollection_AsciiString("0"). IsLess(TCollection_AsciiString("" )) , Standard_True );
907 QCOMPARE ( TCollection_AsciiString (theStr+i).IsLess(TCollection_AsciiString(theStr+i+1)) , Standard_True );
909 // IsGreater (const Standard_CString other)const
910 //assert( !TCollection_AsciiString("0"). IsGreater("1"));
911 //assert( !TCollection_AsciiString("0"). IsGreater("00"));
912 //assert( !TCollection_AsciiString(""). IsGreater("0"));
913 //assert( TCollection_AsciiString ("1"). IsGreater("0"));
914 //assert( TCollection_AsciiString ("00").IsGreater("0"));
915 //assert( TCollection_AsciiString ("0"). IsGreater(""));
916 //assert( TCollection_AsciiString (theStr+i+1).IsGreater(theStr+i));
917 QCOMPARE ( !TCollection_AsciiString("0"). IsGreater("1") , Standard_True );
918 QCOMPARE ( !TCollection_AsciiString("0"). IsGreater("00") , Standard_True );
919 QCOMPARE ( !TCollection_AsciiString(""). IsGreater("0") , Standard_True );
920 QCOMPARE ( TCollection_AsciiString ("1"). IsGreater("0") , Standard_True );
921 QCOMPARE ( TCollection_AsciiString ("00").IsGreater("0") , Standard_True );
922 QCOMPARE ( TCollection_AsciiString ("0"). IsGreater("") , Standard_True );
923 QCOMPARE ( TCollection_AsciiString (theStr+i+1).IsGreater(theStr+i) , Standard_True );
925 // IsGreater (const TCollection_AsciiString& other)const
926 //assert( !TCollection_AsciiString("0"). IsGreater(TCollection_AsciiString("1" )));
927 //assert( !TCollection_AsciiString("0"). IsGreater(TCollection_AsciiString("00")));
928 //assert( !TCollection_AsciiString(""). IsGreater(TCollection_AsciiString("0" )));
929 //assert( TCollection_AsciiString ("1"). IsGreater(TCollection_AsciiString("0" )));
930 //assert( TCollection_AsciiString ("00").IsGreater(TCollection_AsciiString("0" )));
931 //assert( TCollection_AsciiString ("0"). IsGreater(TCollection_AsciiString("" )));
932 //assert( TCollection_AsciiString (theStr+i+1).IsGreater(TCollection_AsciiString(theStr+i)));
933 QCOMPARE ( !TCollection_AsciiString("0"). IsGreater(TCollection_AsciiString("1" )) , Standard_True );
934 QCOMPARE ( !TCollection_AsciiString("0"). IsGreater(TCollection_AsciiString("00")) , Standard_True );
935 QCOMPARE ( !TCollection_AsciiString(""). IsGreater(TCollection_AsciiString("0" )) , Standard_True );
936 QCOMPARE ( TCollection_AsciiString ("1"). IsGreater(TCollection_AsciiString("0" )) , Standard_True );
937 QCOMPARE ( TCollection_AsciiString ("00").IsGreater(TCollection_AsciiString("0" )) , Standard_True );
938 QCOMPARE ( TCollection_AsciiString ("0"). IsGreater(TCollection_AsciiString("" )) , Standard_True );
939 QCOMPARE ( TCollection_AsciiString (theStr+i+1).IsGreater(TCollection_AsciiString(theStr+i)) , Standard_True );
941 // void Read(Standard_IStream& astream)
942 std::istringstream is( theStr );
944 //assert( e == theStr );
945 QCOMPARE ( e , theStr );
947 // Standard_Integer SearchFromEnd (const Standard_CString what)const
948 //assert( e.SearchFromEnd( theStr + i ) == i + 1 );
949 QCOMPARE ( e.SearchFromEnd( theStr + i ) , i + 1 );
951 // SetValue(const Standard_Integer where, const Standard_CString what)
952 e.SetValue( i+1, "what");
953 //assert( e.Search( "what" ) == i+1 );
954 //assert( e.Length() == strlen( theStr ));
955 QCOMPARE ( e.Search( "what" ) , i+1 );
956 QCOMPARE ( e.Length() , (Standard_Integer)strlen( theStr ) );
958 // TCollection_AsciiString Split (const Standard_Integer where)
961 //assert( d.Length() + e.Length() == strlen( theStr ));
962 QCOMPARE ( d.Length() + e.Length() , (Standard_Integer)strlen( theStr ) );
964 // TCollection_AsciiString SubString (const Standard_Integer FromIndex,
965 // const Standard_Integer ToIndex) const
967 d = e.SubString( (unsigned int)i+1, (unsigned int)i+3 );
968 //assert( d.Length() == 3 );
969 //assert( d.Value(1) == theStr[ i ]);
970 QCOMPARE ( d.Length() , 3 );
971 QCOMPARE ( d.Value(1) , theStr[ i ] );
973 // TCollection_AsciiString Token (const Standard_CString separators,
974 // const Standard_Integer whichone) const
976 for ( j = 0; j < i; ++j ) {
977 e += TCollection_AsciiString( theStr[j] ) + " ";
978 //assert( e.Token(" ", j+1 ) == TCollection_AsciiString( theStr+j, 1 ));
979 QCOMPARE ( e.Token(" ", j+1 ) , TCollection_AsciiString( theStr+j, 1 ) );
982 for ( i = 0; i < 5; ++i )
984 // TCollection_ExtendedString (const Standard_CString astring,
985 // const Standard_Boolean isMultiByte)
986 const TCollection_ExtendedString a( theStr+i );
987 //assert( TCollection_AsciiString( a ) == theStr+i );
988 QCOMPARE ( TCollection_AsciiString( a ) , theStr+i );
990 //TCollection_ExtendedString (const Standard_ExtString astring)
991 const TCollection_ExtendedString b( a.ToExtString() );
995 // TCollection_ExtendedString (const Standard_Integer length,
996 // const Standard_ExtCharacter filler )
997 const TCollection_ExtendedString c( i, 1 );
998 //assert( c.Length() == i );
999 QCOMPARE ( c.Length() , i );
1000 if ( c.Length() > 0 ) {
1001 //assert( c.Value( i ) == 1 );
1002 QCOMPARE ( c.Value( i ) , 1 );
1005 // TCollection_ExtendedString (const Standard_Integer aValue)
1006 TCollection_ExtendedString d( i );
1007 const TCollection_AsciiString da( d );
1008 //assert( da.IsIntegerValue() );
1009 //assert( da.IntegerValue() == i );
1010 QCOMPARE ( da.IsIntegerValue() , Standard_True );
1011 QCOMPARE ( da.IntegerValue(), i );
1013 // TCollection_ExtendedString (const Standard_Real aValue)
1014 const TCollection_ExtendedString e( 0.1 * i );
1015 const TCollection_AsciiString ea( e );
1016 //assert( ea.IsRealValue() );
1017 //assert( Abs( ea.RealValue() - 0.1 * i ) < 1e-10 );
1018 QCOMPARE ( ea.IsRealValue() , Standard_True );
1019 QCOMPARE ( Abs( ea.RealValue() - 0.1 * i ) < 1e-10 , Standard_True );
1021 // TCollection_ExtendedString (const TCollection_ExtendedString& astring)
1022 const TCollection_ExtendedString f(e);
1023 //assert( f.Length() == e.Length());
1025 QCOMPARE ( f.Length() , e.Length() );
1028 // TCollection_ExtendedString (const TCollection_AsciiString& astring)
1029 const TCollection_ExtendedString g( ea );
1030 //assert( g.Length() == ea.Length() );
1031 //assert( TCollection_AsciiString( g ) == ea );
1032 QCOMPARE ( g.Length() , ea.Length() );
1033 QCOMPARE ( TCollection_AsciiString( g ) , ea );
1035 // AssignCat (const TCollection_ExtendedString& other)
1036 const TCollection_ExtendedString sep(",");
1039 //assert( d.Length() == 2 + g.Length() );
1040 //assert( d.Token( sep.ToExtString(), 1 ) == TCollection_ExtendedString( i ));
1041 //assert( d.Token( sep.ToExtString(), 2 ) == g );
1042 QCOMPARE ( d.Length() , 2 + g.Length() );
1043 QCOMPARE ( d.Token( sep.ToExtString(), 1 ) , TCollection_ExtendedString( i ) );
1044 QCOMPARE ( d.Token( sep.ToExtString(), 2 ) , g );
1046 // TCollection_ExtendedString Cat (const TCollection_ExtendedString& other) const
1047 const TCollection_ExtendedString cat = a.Cat( sep );
1048 //assert( cat.Length() == a.Length() + sep.Length() );
1049 //assert( cat.Search( a ) == 1 );
1050 //assert( cat.Search( sep ) == a.Length() + 1 );
1051 QCOMPARE ( cat.Length() , a.Length() + sep.Length() );
1052 QCOMPARE ( cat.Search( a ) , 1 );
1053 QCOMPARE ( cat.Search( sep ) , a.Length() + 1 );
1055 // Copy (const TCollection_ExtendedString& fromwhere)
1057 //assert( d.Length() == cat.Length() );
1058 //assert( d == cat );
1059 QCOMPARE ( d.Length() , cat.Length() );
1060 QCOMPARE ( d , cat );
1062 // IsEqual (const Standard_ExtString other) const
1063 //assert( d.IsEqual( d.ToExtString() ));
1064 QCOMPARE ( d.IsEqual( d.ToExtString() ) , Standard_True );
1066 // IsDifferent (const Standard_ExtString other ) const
1067 //assert( d.IsDifferent( a.ToExtString() ));
1068 QCOMPARE ( d.IsDifferent( a.ToExtString() ) , Standard_True );
1070 // IsDifferent (const TCollection_ExtendedString& other) const
1071 //assert( d.IsDifferent( a ));
1072 QCOMPARE ( d.IsDifferent( a ) , Standard_True );
1074 // IsLess (const Standard_ExtString other) const
1075 const TCollection_ExtendedString l0("0"), l1("1"), l00("00"), l, ls(theStr+i), ls1(theStr+i+1);
1076 //assert( l0. IsLess( l1.ToExtString() ));
1077 //assert( l0. IsLess( l00.ToExtString() ));
1078 //assert( l. IsLess( l0.ToExtString() ));
1079 //assert( ! l1. IsLess( l0.ToExtString() ));
1080 //assert( ! l00.IsLess( l0.ToExtString() ));
1081 //assert( ! l0. IsLess( l.ToExtString() ));
1082 //assert( ls.IsLess( ls1.ToExtString() ));
1083 QCOMPARE ( l0. IsLess( l1.ToExtString() ) , Standard_True );
1084 QCOMPARE ( l0. IsLess( l00.ToExtString() ) , Standard_True );
1085 QCOMPARE ( l. IsLess( l0.ToExtString() ) , Standard_True );
1086 QCOMPARE ( ! l1. IsLess( l0.ToExtString() ) , Standard_True );
1087 QCOMPARE ( ! l00.IsLess( l0.ToExtString() ) , Standard_True );
1088 QCOMPARE ( ! l0. IsLess( l.ToExtString() ) , Standard_True );
1089 QCOMPARE ( ls.IsLess( ls1.ToExtString() ) , Standard_True );
1091 // IsLess (const TCollection_ExtendedString& other) const
1092 //assert( l0. IsLess( l1 ));
1093 //assert( l0. IsLess( l00 ));
1094 //assert( l. IsLess( l0 ));
1095 //assert( ! l1. IsLess( l0 ));
1096 //assert( ! l00.IsLess( l0 ));
1097 //assert( ! l0. IsLess( l ));
1098 //assert( ls.IsLess( ls1 ));
1099 QCOMPARE ( l0. IsLess( l1 ) , Standard_True );
1100 QCOMPARE ( l0. IsLess( l00 ) , Standard_True );
1101 QCOMPARE ( l. IsLess( l0 ) , Standard_True );
1102 QCOMPARE ( ! l1. IsLess( l0 ) , Standard_True );
1103 QCOMPARE ( ! l00.IsLess( l0 ) , Standard_True );
1104 QCOMPARE ( ! l0. IsLess( l ) , Standard_True );
1105 QCOMPARE ( ls.IsLess( ls1 ) , Standard_True );
1107 // IsGreater (const Standard_ExtString other) const
1108 //assert( ! l0.IsGreater( l1.ToExtString() ));
1109 //assert( ! l0.IsGreater( l00.ToExtString() ));
1110 //assert( ! l. IsGreater( l0.ToExtString() ));
1111 //assert( l1. IsGreater( l0.ToExtString() ));
1112 //assert( l00.IsGreater( l0.ToExtString() ));
1113 //assert( l0. IsGreater( l.ToExtString() ));
1114 //assert( ls1.IsGreater( ls.ToExtString() ));
1115 QCOMPARE ( ! l0.IsGreater( l1.ToExtString() ) , Standard_True );
1116 QCOMPARE ( ! l0.IsGreater( l00.ToExtString() ) , Standard_True );
1117 QCOMPARE ( ! l. IsGreater( l0.ToExtString() ) , Standard_True );
1118 QCOMPARE ( l1. IsGreater( l0.ToExtString() ) , Standard_True );
1119 QCOMPARE ( l00.IsGreater( l0.ToExtString() ) , Standard_True );
1120 QCOMPARE ( l0. IsGreater( l.ToExtString() ) , Standard_True );
1121 QCOMPARE ( ls1.IsGreater( ls.ToExtString() ) ,Standard_True );
1123 // IsGreater (const TCollection_ExtendedString& other) const
1124 //assert( ! l0.IsGreater( l1));
1125 //assert( ! l0.IsGreater( l00));
1126 //assert( ! l. IsGreater( l0));
1127 //assert( l1. IsGreater( l0));
1128 //assert( l00.IsGreater( l0));
1129 //assert( l0. IsGreater( l));
1130 //assert( ls1.IsGreater( ls));
1131 QCOMPARE ( ! l0.IsGreater( l1) , Standard_True );
1132 QCOMPARE ( ! l0.IsGreater( l00) , Standard_True );
1133 QCOMPARE ( ! l. IsGreater( l0) , Standard_True );
1134 QCOMPARE ( l1. IsGreater( l0) , Standard_True );
1135 QCOMPARE ( l00.IsGreater( l0) , Standard_True );
1136 QCOMPARE ( l0. IsGreater( l) , Standard_True );
1137 QCOMPARE ( ls1.IsGreater( ls) , Standard_True );
1139 // ==========================
1140 //TCollection_HAsciiString::
1141 // ==========================
1143 // IsDifferent(const Handle(TCollection_HAsciiString)& S)
1144 Handle(TCollection_HAsciiString) ha1 = new TCollection_HAsciiString( theStr+i );
1145 Handle(TCollection_HAsciiString) ha2 = new TCollection_HAsciiString( theStr+i+1 );
1146 //assert( ha1->IsDifferent( ha2 ));
1147 //assert( !ha1->IsDifferent( ha1 ));
1148 QCOMPARE ( ha1->IsDifferent( ha2 ) , Standard_True );
1149 QCOMPARE ( !ha1->IsDifferent( ha1 ) , Standard_True );
1151 // IsSameString (const Handle(TCollection_HAsciiString)& S)
1152 //assert( !ha1->IsSameString( ha2 ));
1153 //assert( ha1->IsSameString( ha1 ));
1154 QCOMPARE ( !ha1->IsSameString( ha2 ) , Standard_True );
1155 QCOMPARE ( ha1->IsSameString( ha1 ) , Standard_True );
1157 // IsSameState (const Handle(TCollection_HAsciiString)& other) const
1158 //assert( !ha1->IsSameState( ha2 ));
1159 //assert( ha1->IsSameState( ha1 ));
1160 QCOMPARE ( !ha1->IsSameState( ha2 ) , Standard_True );
1161 QCOMPARE ( ha1->IsSameState( ha1 ) , Standard_True );
1163 // IsSameString (const Handle(TCollection_HAsciiString)& S ,
1164 // const Standard_Boolean CaseSensitive) const
1165 //assert( !ha1->IsSameString( ha2, true ));
1166 //assert( ha1->IsSameString( ha1, true ));
1167 //assert( !ha1->IsSameString( ha2, false ));
1168 //assert( ha1->IsSameString( ha1, false ));
1169 QCOMPARE ( !ha1->IsSameString( ha2, Standard_True ) , Standard_True );
1170 QCOMPARE ( ha1->IsSameString( ha1, Standard_True ) , Standard_True );
1171 QCOMPARE ( !ha1->IsSameString( ha2, Standard_False ) , Standard_True );
1172 QCOMPARE ( ha1->IsSameString( ha1, Standard_False ) , Standard_True );
1174 ha1->SetValue( 1, "AbC0000000");
1175 ha2->SetValue( 1, "aBc0000000");
1176 //assert( !ha1->IsSameString( ha2, true ));
1177 //assert( ha1->IsSameString( ha2, false ));
1178 QCOMPARE ( !ha1->IsSameString( ha2, Standard_True ) , Standard_True );
1179 QCOMPARE ( ha1->IsSameString( ha2, Standard_False ), Standard_True );
1184 #include <Geom_CylindricalSurface.hxx>
1185 #include <IntTools_FaceFace.hxx>
1186 #include <IntTools_Curve.hxx>
1187 #include <IntTools_PntOn2Faces.hxx>
1189 static Standard_Integer OCC24005 (Draw_Interpretor& theDI, Standard_Integer theNArg, const char** theArgv)
1193 theDI << "Wrong a number of arguments!\n";
1197 Handle_Geom_Plane plane(new Geom_Plane(
1198 gp_Ax3( gp_Pnt(-72.948737453424499, 754.30437716359393, 259.52151854671678),
1199 gp_Dir(6.2471473085930200e-007, -0.99999999999980493, 0.00000000000000000),
1200 gp_Dir(0.99999999999980493, 6.2471473085930200e-007, 0.00000000000000000))));
1201 Handle(Geom_CylindricalSurface) cylinder(
1202 new Geom_CylindricalSurface(
1203 gp_Ax3(gp_Pnt(-6.4812490053250649, 753.39408794522092, 279.16400974257465),
1204 gp_Dir(1.0000000000000000, 0.0, 0.00000000000000000),
1205 gp_Dir(0.0, 1.0000000000000000, 0.00000000000000000)),
1206 19.712534607908712));
1208 DrawTrSurf::Set("pln", plane);
1210 DrawTrSurf::Set("cyl", cylinder);
1213 BRep_Builder builder;
1214 TopoDS_Face face1, face2;
1215 builder.MakeFace(face1, plane, Precision::Confusion());
1216 builder.MakeFace(face2, cylinder, Precision::Confusion());
1217 IntTools_FaceFace anInters;
1218 anInters.SetParameters(false, true, true, Precision::Confusion());
1219 anInters.Perform(face1, face2);
1221 if (!anInters.IsDone())
1223 theDI<<"No intersections found!"<<"\n";
1228 //Handle(Geom_Curve) aResult;
1231 const IntTools_SequenceOfCurves& aCvsX=anInters.Lines();
1232 const IntTools_SequenceOfPntOn2Faces& aPntsX=anInters.Points();
1235 Standard_Integer aNbCurves, aNbPoints;
1237 aNbCurves=aCvsX.Length();
1238 aNbPoints=aPntsX.Length();
1242 for (Standard_Integer i=1; i<=aNbCurves; ++i)
1244 Sprintf(buf, "%s_%d",theArgv[1],i);
1245 theDI << buf << " ";
1247 const IntTools_Curve& aIC = aCvsX(i);
1248 const Handle(Geom_Curve)& aC3D= aIC.Curve();
1249 DrawTrSurf::Set(buf,aC3D);
1252 else if (aNbCurves == 1)
1254 const IntTools_Curve& aIC = aCvsX(1);
1255 const Handle(Geom_Curve)& aC3D= aIC.Curve();
1256 Sprintf(buf, "%s",theArgv[1]);
1257 theDI << buf << " ";
1258 DrawTrSurf::Set(buf,aC3D);
1261 for (Standard_Integer i = 1; i<=aNbPoints; ++i)
1263 const IntTools_PntOn2Faces& aPi=aPntsX(i);
1264 const gp_Pnt& aP=aPi.P1().Pnt();
1266 Sprintf(buf,"%s_p_%d",theArgv[1],i);
1267 theDI << buf << " ";
1268 DrawTrSurf::Set(buf, aP);
1274 #include <BRepAlgo_NormalProjection.hxx>
1275 static Standard_Integer OCC24012 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
1278 di << "Usage : " << argv[0] << " should be 2 arguments (face and edge)";
1282 Handle(AIS_InteractiveContext) myAISContext = ViewerTest::GetAISContext();
1283 if(myAISContext.IsNull()) {
1284 di << "use 'vinit' command before " << argv[0] << "\n";
1288 TopoDS_Face m_Face1 = TopoDS::Face(DBRep::Get(argv[1]));
1289 TopoDS_Edge m_Edge = TopoDS::Edge(DBRep::Get(argv[2]));
1291 BRepAlgo_NormalProjection anormpro(m_Face1);
1292 anormpro.Add(m_Edge);
1293 anormpro.SetDefaultParams();
1295 //anormpro.Compute3d();
1296 //anormpro.SetLimit();
1300 if (anormpro.IsDone())
1302 TopoDS_Shape rshape = anormpro.Projection();
1303 Handle(AIS_InteractiveObject) myShape = new AIS_Shape (rshape);
1304 myAISContext->SetColor(myShape, Quantity_Color(Quantity_NOC_YELLOW));
1305 myAISContext->Display(myShape, Standard_True);
1311 #include <Voxel_FastConverter.hxx>
1312 static Standard_Integer OCC24051 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
1315 di << "Usage : " << argv[0] << " should be one argument (command name only)";
1319 TopoDS_Shape shape = BRepPrimAPI_MakeBox(gp_Pnt(5, 10, 10), 10, 20, 30).Shape();
1320 Standard_Integer progress = 0;
1321 Standard_Real deflection = 0.005;
1322 Standard_Integer nbx = 200, nby = 200, nbz = 200;
1323 Voxel_BoolDS theVoxels(-50,-50,-30, 100, 100, 100, nbx, nby, nbz);
1324 Voxel_BoolDS theVoxels1(-50,-50,-30, 100, 100, 100, nbx, nby, nbz);
1325 Standard_Integer nbThreads = 5;
1326 Voxel_FastConverter fcp(shape, theVoxels, deflection, nbx, nby, nbz, nbThreads, Standard_True);
1329 #pragma omp parallel for
1330 for(int i = 0; i < nbThreads; i++)
1331 fcp.ConvertUsingSAT(progress, i+1);
1334 fcp.ConvertUsingSAT(progress);
1339 #include <Extrema_FuncExtPS.hxx>
1340 #include <math_FunctionSetRoot.hxx>
1341 #include <math_Vector.hxx>
1342 #include <BRepBuilderAPI_MakeVertex.hxx>
1343 static Standard_Integer OCC24137 (Draw_Interpretor& theDI, Standard_Integer theNArg, const char** theArgv)
1345 Standard_Integer anArgIter = 1;
1348 theDI <<"Usage: " << theArgv[0] << " face vertex U V [N]"<<"\n";
1353 Standard_CString aFaceName = theArgv[anArgIter++];
1354 Standard_CString aVertName = theArgv[anArgIter++];
1355 const TopoDS_Shape aShapeF = DBRep::Get (aFaceName);
1356 const TopoDS_Shape aShapeV = DBRep::Get (aVertName);
1357 const Standard_Real aUFrom = Atof (theArgv[anArgIter++]);
1358 const Standard_Real aVFrom = Atof (theArgv[anArgIter++]);
1359 const Standard_Integer aNbIts = (anArgIter < theNArg) ? atol (theArgv[anArgIter++]) : 100;
1360 if (aShapeF.IsNull() || aShapeF.ShapeType() != TopAbs_FACE)
1362 std::cout << "Error: " << aFaceName << " shape is null / not a face" << std::endl;
1365 if (aShapeV.IsNull() || aShapeV.ShapeType() != TopAbs_VERTEX)
1367 std::cout << "Error: " << aVertName << " shape is null / not a vertex" << std::endl;
1370 const TopoDS_Face aFace = TopoDS::Face (aShapeF);
1371 const TopoDS_Vertex aVert = TopoDS::Vertex (aShapeV);
1372 GeomAdaptor_Surface aSurf (BRep_Tool::Surface (aFace));
1374 gp_Pnt aPnt = BRep_Tool::Pnt (aVert), aRes;
1376 Extrema_FuncExtPS anExtFunc;
1377 math_FunctionSetRoot aRoot (anExtFunc, aNbIts);
1379 math_Vector aTolUV (1, 2), aUVinf (1, 2), aUVsup (1, 2), aFromUV (1, 2);
1380 aTolUV (1) = Precision::Confusion(); aTolUV (2) = Precision::Confusion();
1381 aUVinf (1) = -Precision::Infinite(); aUVinf (2) = -Precision::Infinite();
1382 aUVsup (1) = Precision::Infinite(); aUVsup (2) = Precision::Infinite();
1383 aFromUV(1) = aUFrom; aFromUV(2) = aVFrom;
1385 anExtFunc.Initialize (aSurf);
1386 anExtFunc.SetPoint (aPnt);
1387 aRoot.SetTolerance (aTolUV);
1388 aRoot.Perform (anExtFunc, aFromUV, aUVinf, aUVsup);
1389 if (!aRoot.IsDone())
1391 std::cerr << "No results!\n";
1395 theDI << aRoot.Root()(1) << " " << aRoot.Root()(2) << "\n";
1397 aSurf.D0 (aRoot.Root()(1), aRoot.Root()(2), aRes);
1398 DBRep::Set ("result", BRepBuilderAPI_MakeVertex (aRes));
1402 //! Check boolean operations on NCollection_Map
1403 static Standard_Integer OCC24271 (Draw_Interpretor& di,
1404 Standard_Integer /*theArgNb*/,
1405 const char** /*theArgVec*/)
1408 const Standard_Integer aLeftLower = 1;
1409 const Standard_Integer aLeftUpper = 10;
1410 const Standard_Integer aRightLower = 5;
1411 const Standard_Integer aRightUpper = 15;
1414 NCollection_Map<Standard_Integer> aMapLeft;
1415 for (Standard_Integer aKeyIter = aLeftLower; aKeyIter <= aLeftUpper; ++aKeyIter)
1417 aMapLeft.Add (aKeyIter);
1420 NCollection_Map<Standard_Integer> aMapRight;
1421 for (Standard_Integer aKeyIter = aRightLower; aKeyIter <= aRightUpper; ++aKeyIter)
1423 aMapRight.Add (aKeyIter);
1426 QCOMPARE (aMapLeft .Contains (aMapRight), Standard_False);
1427 QCOMPARE (aMapRight.Contains (aMapLeft), Standard_False);
1429 // validate Union operation
1430 NCollection_Map<Standard_Integer> aMapUnion;
1431 aMapUnion.Union (aMapLeft, aMapRight);
1432 QCOMPARE (aMapUnion.Extent(), aRightUpper - aLeftLower + 1);
1433 for (Standard_Integer aKeyIter = aLeftLower; aKeyIter <= aRightUpper; ++aKeyIter)
1435 QCOMPARE (aMapUnion.Contains (aKeyIter), Standard_True);
1438 // validate Intersection operation
1439 NCollection_Map<Standard_Integer> aMapSect;
1440 aMapSect.Intersection (aMapLeft, aMapRight);
1441 QCOMPARE (aMapSect.Extent(), aLeftUpper - aRightLower + 1);
1442 for (Standard_Integer aKeyIter = aRightLower; aKeyIter <= aLeftUpper; ++aKeyIter)
1444 QCOMPARE (aMapSect.Contains (aKeyIter), Standard_True);
1446 QCOMPARE (aMapLeft .Contains (aMapSect), Standard_True);
1447 QCOMPARE (aMapRight.Contains (aMapSect), Standard_True);
1449 // validate Substruction operation
1450 NCollection_Map<Standard_Integer> aMapSubsLR;
1451 aMapSubsLR.Subtraction (aMapLeft, aMapRight);
1452 QCOMPARE (aMapSubsLR.Extent(), aRightLower - aLeftLower);
1453 for (Standard_Integer aKeyIter = aLeftLower; aKeyIter < aRightLower; ++aKeyIter)
1455 QCOMPARE (aMapSubsLR.Contains (aKeyIter), Standard_True);
1458 NCollection_Map<Standard_Integer> aMapSubsRL;
1459 aMapSubsRL.Subtraction (aMapRight, aMapLeft);
1460 QCOMPARE (aMapSubsRL.Extent(), aRightUpper - aLeftUpper);
1461 for (Standard_Integer aKeyIter = aLeftUpper + 1; aKeyIter < aRightUpper; ++aKeyIter)
1463 QCOMPARE (aMapSubsRL.Contains (aKeyIter), Standard_True);
1466 // validate Difference operation
1467 NCollection_Map<Standard_Integer> aMapDiff;
1468 aMapDiff.Difference (aMapLeft, aMapRight);
1469 QCOMPARE (aMapDiff.Extent(), aRightLower - aLeftLower + aRightUpper - aLeftUpper);
1470 for (Standard_Integer aKeyIter = aLeftLower; aKeyIter < aRightLower; ++aKeyIter)
1472 QCOMPARE (aMapDiff.Contains (aKeyIter), Standard_True);
1474 for (Standard_Integer aKeyIter = aLeftUpper + 1; aKeyIter < aRightUpper; ++aKeyIter)
1476 QCOMPARE (aMapDiff.Contains (aKeyIter), Standard_True);
1479 // validate Exchange operation
1480 NCollection_Map<Standard_Integer> aMapSwap;
1481 aMapSwap.Exchange (aMapSect);
1482 for (Standard_Integer aKeyIter = aRightLower; aKeyIter <= aLeftUpper; ++aKeyIter)
1484 QCOMPARE (aMapSwap.Contains (aKeyIter), Standard_True);
1486 QCOMPARE (aMapSect.IsEmpty(), Standard_True);
1490 NCollection_Map<Standard_Integer> aMapCopy (aMapSwap);
1491 QCOMPARE (aMapCopy.IsEqual (aMapSwap), Standard_True);
1492 aMapCopy.Remove (34);
1494 QCOMPARE (aMapCopy.IsEqual (aMapSwap), Standard_False);
1499 #include <ShapeFix_EdgeProjAux.hxx>
1500 static Standard_Integer OCC24370 (Draw_Interpretor& di, Standard_Integer argc,const char ** argv)
1503 di<<"Usage: " << argv[0] << " invalid number of arguments"<<"\n";
1507 TopoDS_Shape aSh = DBRep::Get(argv[1]);
1509 di << argv[0] << " Error: Null input edge\n";
1512 const TopoDS_Edge& anEdge = TopoDS::Edge (aSh);
1514 Handle(Geom2d_Curve) aC = DrawTrSurf::GetCurve2d(argv[2]);
1516 di << argv[0] << " Error: Null input curve\n";
1520 Handle(Geom_Surface) aS = DrawTrSurf::GetSurface(argv[3]);
1522 di << argv[0] << " Error: Null input surface\n";
1526 Standard_Real prec = Draw::Atof(argv[4]);
1531 aB.MakeFace (aFace, aS, Precision::Confusion());
1532 aB.UpdateEdge (anEdge, aC, aFace, Precision::Confusion());
1533 aB.Range (anEdge, aFace, aC->FirstParameter(), aC->LastParameter());
1536 ShapeFix_EdgeProjAux aProj (aFace, anEdge);
1537 aProj.Compute (prec);
1539 Standard_Boolean isfirstdone = aProj.IsFirstDone();
1540 Standard_Boolean islastdone = aProj.IsLastDone();
1542 Standard_Real first = 0.;
1543 Standard_Real last = 0.;
1544 Standard_Integer isfirstdoneInteger = 0;
1545 Standard_Integer islastdoneInteger = 0;
1549 first = aProj.FirstParam();
1550 isfirstdoneInteger = 1;
1554 last= aProj.LastParam();
1555 islastdoneInteger = 1;
1558 di << isfirstdoneInteger << " "<< islastdoneInteger << " "<< first << " "<< last << " \n";
1563 template<typename T, typename HT>
1564 static void DoIsNull(Draw_Interpretor& di)
1567 // QVERIFY (aHandle.IsNull());
1568 QCOMPARE (aHandle.IsNull(), Standard_True);
1569 const T* p = aHandle.Access();
1570 #if OCC_VERSION_HEX > 0x060700
1573 QCOMPARE (!p, Standard_True);
1574 QCOMPARE (p == 0, Standard_True);
1578 //QVERIFY (!aHandle.IsNull());
1579 QCOMPARE (!aHandle.IsNull(), Standard_True);
1580 p = aHandle.Access();
1583 QCOMPARE (p != NULL, Standard_True);
1584 QCOMPARE (p != 0, Standard_True);
1587 //=======================================================================
1588 //function : OCC24533
1590 //=======================================================================
1591 static Standard_Integer OCC24533 (Draw_Interpretor& di, Standard_Integer n, const char**)
1593 if (n != 1) return 1;
1595 DoIsNull<Standard_Transient, Handle_Standard_Transient>(di);
1596 DoIsNull<Standard_Persistent, Handle_Standard_Persistent>(di);
1601 // Dummy class to test interface for compilation issues
1602 class QABugs_HandleClass : public Standard_Transient
1605 Standard_Integer HandleProc (Draw_Interpretor& , Standard_Integer , const char** theArgVec)
1607 std::cerr << "QABugs_HandleClass[" << this << "] " << theArgVec[0] << "\n";
1610 DEFINE_STANDARD_RTTI(QABugs_HandleClass) // Type definition
1612 DEFINE_STANDARD_HANDLE (QABugs_HandleClass, Standard_Transient)
1613 IMPLEMENT_STANDARD_HANDLE (QABugs_HandleClass, Standard_Transient)
1614 IMPLEMENT_STANDARD_RTTIEXT(QABugs_HandleClass, Standard_Transient)
1616 // Dummy class to test interface for compilation issues
1617 struct QABugs_NHandleClass
1619 Standard_Integer NHandleProc (Draw_Interpretor& , Standard_Integer , const char** theArgVec)
1621 std::cerr << "QABugs_NHandleClass[" << this << "] " << "" << theArgVec[0] << "\n";
1626 void QABugs::Commands_19(Draw_Interpretor& theCommands) {
1627 const char *group = "QABugs";
1629 Handle(QABugs_HandleClass) aClassPtr = new QABugs_HandleClass();
1630 theCommands.Add ("OCC24202_1", "Test Handle-based procedure",
1631 __FILE__, aClassPtr, &QABugs_HandleClass::HandleProc, group);
1632 NCollection_Handle<QABugs_NHandleClass> aNClassPtr = new QABugs_NHandleClass();
1633 theCommands.Add ("OCC24202_2", "Test NCollection_Handle-based procedure",
1634 __FILE__, aNClassPtr, &QABugs_NHandleClass::NHandleProc, group);
1636 theCommands.Add ("OCC230", "OCC230 TrimmedCurve Pnt2d Pnt2d", __FILE__, OCC230, group);
1637 theCommands.Add ("OCC142", "OCC142", __FILE__, OCC142, group);
1638 theCommands.Add ("OCC23361", "OCC23361", __FILE__, OCC23361, group);
1639 theCommands.Add ("OCC23237", "OCC23237", __FILE__, OCC23237, group);
1640 theCommands.Add ("OCC22980", "OCC22980", __FILE__, OCC22980, group);
1641 theCommands.Add ("OCC23595", "OCC23595", __FILE__, OCC23595, group);
1642 theCommands.Add ("OCC22611", "OCC22611 string nb", __FILE__, OCC22611, group);
1643 theCommands.Add ("OCC22595", "OCC22595", __FILE__, OCC22595, group);
1644 theCommands.Add ("OCC23774", "OCC23774 shape1 shape2", __FILE__, OCC23774, group);
1645 theCommands.Add ("OCC23683", "OCC23683 shape", __FILE__, OCC23683, group);
1646 theCommands.Add ("OCC23952sweep", "OCC23952sweep nbupoles shape", __FILE__, OCC23952sweep, group);
1647 theCommands.Add ("OCC23952intersect", "OCC23952intersect nbsol shape1 shape2", __FILE__, OCC23952intersect, group);
1648 theCommands.Add ("test_offset", "test_offset", __FILE__, test_offset, group);
1649 theCommands.Add ("OCC23945", "OCC23945 surfname U V X Y Z [DUX DUY DUZ DVX DVY DVZ [D2UX D2UY D2UZ D2VX D2VY D2VZ D2UVX D2UVY D2UVZ]]", __FILE__, OCC23945,group);
1650 theCommands.Add ("OCC24008", "OCC24008 curve surface", __FILE__, OCC24008, group);
1651 theCommands.Add ("OCC24019", "OCC24019 aShape", __FILE__, OCC24019, group);
1652 theCommands.Add ("OCC11758", "OCC11758", __FILE__, OCC11758, group);
1653 theCommands.Add ("OCC24005", "OCC24005 result", __FILE__, OCC24005, group);
1654 theCommands.Add ("OCC24137", "OCC24137 face vertex U V [N]", __FILE__, OCC24137, group);
1655 theCommands.Add ("OCC24271", "Boolean operations on NCollection_Map", __FILE__, OCC24271, group);
1656 theCommands.Add ("OCC24370", "OCC24370 edge pcurve surface prec", __FILE__, OCC24370, group);
1657 theCommands.Add ("OCC24533", "OCC24533", __FILE__, OCC24533, group);
1658 theCommands.Add ("OCC24012", "OCC24012 face edge", __FILE__, OCC24012, group);
1659 theCommands.Add ("OCC24051", "OCC24051", __FILE__, OCC24051, group);