1 // Created on: 2002-06-17
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 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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
18 #include <Draw_Interpretor.hxx>
19 #include <TopLoc_Location.hxx>
20 #include <TopoDS_Face.hxx>
23 #include <Geom_Surface.hxx>
24 #include <BRep_Tool.hxx>
25 #include <GeomInt_IntSS.hxx>
26 #include <BRepBuilderAPI_MakeEdge.hxx>
27 #include <Standard_ErrorHandler.hxx>
28 #include <Graphic3d_ClipPlane.hxx>
29 #include <ViewerTest.hxx>
30 #include <AIS_Shape.hxx>
34 static int BUC60623(Draw_Interpretor& di, Standard_Integer argc, const char ** a)
38 di << "Usage : " << a[0] << " result Shape1 Shape2\n";
44 TopoDS_Face F1 = TopoDS::Face(DBRep::Get(a[2],TopAbs_FACE));
45 TopoDS_Face F2 = TopoDS::Face(DBRep::Get(a[3],TopAbs_FACE));
46 Handle(Geom_Surface) GSF1 = BRep_Tool::Surface(F1, L1);
47 Handle(Geom_Surface) GSF2 = BRep_Tool::Surface(F2, L2);
49 Inter.Perform(GSF1,GSF2, BRep_Tool::Tolerance(F1));
50 if (!Inter.IsDone()) {
51 di << "Intersection not done\n";
54 Standard_Integer nbsol = Inter.NbLines();
56 di << "The number of solutions is zero!" << "\n";
59 Handle(Geom_Curve) Sol = Inter.Line(1);
61 DBRep::Set(a[1], BRepBuilderAPI_MakeEdge(Sol));
63 } else di << "The first solution is Null!" << "\n";
69 #include<BRepBuilderAPI_MakeVertex.hxx>
70 #include<TCollection_ExtendedString.hxx>
71 #include<AIS_InteractiveContext.hxx>
72 #include<AIS_LengthDimension.hxx>
74 static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, const char ** a)
77 Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
78 if(myAIScontext.IsNull()) {
79 di << "use 'vinit' command before " << a[0] << "\n";
82 myAIScontext->EraseAll (Standard_False);
84 TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(gp_Pnt(0,0,0));
85 TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(gp_Pnt(10,10,0));
87 Handle(AIS_Shape) Ve1 = new AIS_Shape(V1);
88 Handle(AIS_Shape) Ve2 = new AIS_Shape(V2);
90 myAIScontext->Display (Ve1, Standard_False);
91 myAIScontext->Display (Ve2, Standard_False);
93 Handle(Geom_Plane) Plane1 = new Geom_Plane(gp_Pnt(0,0,0),gp_Dir(0,0,1));
94 TCollection_ExtendedString Ext1("Dim1");
95 Handle(AIS_LengthDimension) Dim1 = new AIS_LengthDimension(V1,V2,Plane1->Pln());
96 Dim1->SetCustomValue (Draw::Atof(a[2]));
98 Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
99 anAspect->MakeArrows3d (Standard_False);
100 anAspect->MakeText3d (Standard_True);
101 anAspect->MakeTextShaded (Standard_True);
102 anAspect->TextAspect()->SetHeight (2.5);
103 anAspect->ArrowAspect()->SetLength (1.0);
104 Dim1->SetDimensionAspect (anAspect);
106 myAIScontext->SetDisplayMode (Dim1, Draw::Atoi(a[1]), Standard_False);
107 myAIScontext->Display (Dim1, Standard_True);
111 #include<TopoDS_Wire.hxx>
112 #include <BRepTools.hxx>
114 static Standard_Integer BUC60652(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
117 di << "Usage : BUC60652 fase" << "\n";
120 TopoDS_Shape shape = DBRep::Get( argv[1] );
121 TopoDS_Face face = TopoDS::Face( shape );
122 TopoDS_Wire ow = BRepTools::OuterWire( face );
123 DBRep::Set( "w", ow );
127 #include <TopoDS_Solid.hxx>
128 #include <BRepPrimAPI_MakeBox.hxx>
129 #include <BRepPrimAPI_MakeSphere.hxx>
131 #include <BRepAlgoAPI_Fuse.hxx>
133 #include <V3d_View.hxx>
134 #include <gce_MakePln.hxx>
136 #include <Bnd_BoundSortBox.hxx>
137 #include <BRepBndLib.hxx>
138 #include <Bnd_HArray1OfBox.hxx>
139 #include <TopExp_Explorer.hxx>
141 static Standard_Integer BUC60729 (Draw_Interpretor& /*di*/,Standard_Integer /*argc*/, const char ** /*argv*/ )
144 TopoDS_Shape aShape = BRepPrimAPI_MakeBox(1,1,1).Solid();
146 BRepBndLib::Add(aShape , aMainBox );
148 Standard_Integer siMaxNbrBox = 6;
149 Bnd_BoundSortBox m_BoundSortBox;
150 m_BoundSortBox.Initialize( aMainBox, siMaxNbrBox );
151 TopExp_Explorer aExplorer(aShape,TopAbs_FACE);
155 // Bnd_Box __emptyBox; // Box is void !
156 // Handle(Bnd_HArray1OfBox) __aSetOfBox = new Bnd_HArray1OfBox( 1, siMaxNbrBox, __emptyBox );
158 for (i=1,aExplorer.ReInit(); aExplorer.More(); aExplorer.Next(),i++ )
160 const TopoDS_Shape& aFace = aExplorer.Current();
162 BRepBndLib::Add( aFace, aBox );
163 m_BoundSortBox.Add( aBox, i );
164 // __aSetOfBox->SetValue( i, aBox );
166 // m_BoundSortBox.Initialize( aMainBox, siMaxNbrBox );
171 static Standard_Integer BUC60724(Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/ )
173 TCollection_AsciiString as1("");
174 TCollection_AsciiString as2('\0');
175 if(as1.ToCString() == NULL || as1.Length() != 0 || as1.ToCString()[0] != '\0')
176 di << "Error : the first string is not zero string : " << as1.ToCString() << "\n";
178 if(as2.ToCString() == NULL || as2.Length() != 0 || as2.ToCString()[0] != '\0')
179 di << "Error : the second string is not zero string : " << as2.ToCString() << "\n";
184 #include <UnitsAPI.hxx>
186 static Standard_Integer BUC60727(Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/ )
188 di <<"Program Test\n";
189 UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); //length is mm
190 di <<"AnyToLS (3,mm) = " << UnitsAPI::AnyToLS(3.,"mm") << "\n"; // result was WRONG.
195 #include <gp_Circ.hxx>
196 #include <Geom_Circle.hxx>
197 #include <GeomAPI.hxx>
198 #include <Geom2d_CartesianPoint.hxx>
199 #include <Geom2dGcc_QualifiedCurve.hxx>
200 #include <Geom2dGcc_Circ2d2TanRad.hxx>
201 #include <Geom2d_Circle.hxx>
202 #include <ProjLib.hxx>
204 static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** argv )
206 Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
207 if(aContext.IsNull()) {
208 di << "use 'vinit' command before " << argv[0] << "\n";
212 gp_Pnt pt3d(0, 20, 150);
213 gp_Ax2 anAx2(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0), gp_Dir(0, 0, 1));
214 gp_Circ circ(anAx2, 50.0);
215 Handle(Geom_Circle) gcir = new Geom_Circle(circ);
216 Handle(Geom_Plane) pln = new Geom_Plane(gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)));
217 Handle(Geom2d_Curve) gcir1 = GeomAPI::To2d(gcir, pln->Pln());
218 TopoDS_Shape sh1 = BRepBuilderAPI_MakeEdge(gcir1, pln).Shape();
219 Handle(AIS_Shape) ais1 = new AIS_Shape(sh1);
220 aContext->SetColor (ais1, Quantity_NOC_INDIANRED, Standard_False);
221 aContext->Display (ais1, Standard_False);
222 DBRep::Set("sh0",sh1);
224 // local_get_2Dpointfrom3Dpoint(pt3d, pln->Pln(), thepoint);
225 thepoint = ProjLib::Project(pln->Pln(),pt3d);
226 Handle(Geom2d_CartesianPoint) ThePoint = new Geom2d_CartesianPoint(thepoint);
227 Geom2dAdaptor_Curve acur1(gcir1) ;
228 Geom2dGcc_QualifiedCurve qcur1(acur1, GccEnt_outside) ;
229 Geom2dGcc_Circ2d2TanRad cirtanrad(qcur1, ThePoint, 200.0, 0.0001);
230 printf("\n No. of solutions = %d\n", cirtanrad.NbSolutions());
231 Handle(Geom2d_Circle) gccc;
232 if( cirtanrad.NbSolutions() ) {
233 for( int i = 1; i<=cirtanrad.NbSolutions(); i++) {
234 gp_Circ2d ccc = cirtanrad.ThisSolution(i);
235 gccc = new Geom2d_Circle(ccc);
236 TopoDS_Shape sh = BRepBuilderAPI_MakeEdge(gccc, pln).Shape();
237 Standard_Character aStr[5];
238 Sprintf(aStr,"sh%d",i);
240 Handle(AIS_Shape) ais = new AIS_Shape(sh);
242 aContext->SetColor (ais, Quantity_NOC_GREEN, Standard_False);
244 aContext->SetColor (ais, Quantity_NOC_HOTPINK, Standard_False);
245 aContext->Display (ais, Standard_False);
246 Standard_Real ParSol1, ParSol2, ParArg1, ParArg2;
247 gp_Pnt2d PntSol1, PntSol2;
248 cirtanrad.Tangency1(i, ParSol1, ParArg1, PntSol1);
249 printf("%f\t%f\t\t%f\t%f\n",ParSol1, ParArg1,PntSol1.X(),PntSol1.Y());
250 cirtanrad.Tangency2(i, ParSol2, ParArg2, PntSol2);
251 printf("%f\t%f\t\t%f\t%f\n",ParSol2, ParArg2,PntSol2.X(),PntSol2.Y());
254 aContext->UpdateCurrentViewer();
258 #include <TColgp_Array2OfPnt.hxx>
259 #include <Geom_BezierSurface.hxx>
260 #include <BRepBuilderAPI_MakeFace.hxx>
261 #include <BRepBuilderAPI_MakeWire.hxx>
262 #include <Geom_OffsetSurface.hxx>
263 #include <BRepFilletAPI_MakeFillet2d.hxx>
264 #include <GeomProjLib.hxx>
265 #include <Geom_TrimmedCurve.hxx>
267 static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
271 TopoDS_Edge aEdge = TopoDS::Edge(DBRep::Get(argv[2],TopAbs_EDGE));
272 TopoDS_Face aFace = TopoDS::Face(DBRep::Get(argv[3],TopAbs_FACE));
273 Standard_Real f = 0.0, l = 0.0;
274 Handle(Geom_Curve) GC = BRep_Tool::Curve(aEdge,f,l);
275 Handle(Geom_Surface) GS = BRep_Tool::Surface(aFace, L1);
276 GC = new Geom_TrimmedCurve(GC, f, l);
277 Handle(Geom_Curve) projCurve = GeomProjLib::Project(GC,GS);
278 BRepBuilderAPI_MakeWire *myWire;
279 myWire = new BRepBuilderAPI_MakeWire();
280 myWire->Add((BRepBuilderAPI_MakeEdge(projCurve)).Edge());
281 DBRep::Set(argv[1],myWire->Wire());
285 Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
286 if(aContext.IsNull()) {
287 di << "use 'vinit' command before " << argv[0] << "\n";
291 //step 1. creating a Bezier Surface and a patch
295 Handle(AIS_Shape) ais1;
296 Handle(AIS_Shape) ais2;
297 Handle(Geom_BezierSurface) BZ1;
298 TColgp_Array2OfPnt array1(1,3,1,3);
299 array1.SetValue(1,1,gp_Pnt(0,100,0));
300 array1.SetValue(1,2,gp_Pnt(200,100,0));
301 array1.SetValue(1,3,gp_Pnt(400,100,0));
302 array1.SetValue(2,1,gp_Pnt(0,200,100));
303 array1.SetValue(2,2,gp_Pnt(200,200,100));
304 array1.SetValue(2,3,gp_Pnt(400,200,100));
305 array1.SetValue(3,1,gp_Pnt(0,300,0));
306 array1.SetValue(3,2,gp_Pnt(200,300,0));
307 array1.SetValue(3,3,gp_Pnt(400,300,0));
308 BZ1 = new Geom_BezierSurface(array1);
309 BRepBuilderAPI_MakeFace bzf1( BZ1, Precision::Confusion() );
310 TopoDS_Face F1= bzf1.Face();
311 ais1 = new AIS_Shape(F1);
313 aContext->SetMaterial(ais1,Graphic3d_NOM_ALUMINIUM,Standard_False);
314 aContext->Display (ais1, Standard_False);
319 shell.Closed (BRep_Tool::IsClosed (shell));
322 gp_Dir D(0, 0, 1.0f);
323 BRepBuilderAPI_MakeWire mkw;
324 gp_Pnt p1 = gp_Pnt(150., 150.0, 260.);
325 gp_Pnt p2 = gp_Pnt(350., 150., 260.);
326 BRepBuilderAPI_MakeEdge* E1 = new BRepBuilderAPI_MakeEdge(p1,p2);
328 p1 = gp_Pnt(350., 150., 260.);
329 p2 = gp_Pnt(350., 250., 260.);
330 BRepBuilderAPI_MakeEdge* E2 = new BRepBuilderAPI_MakeEdge(p1,p2);
332 p1 = gp_Pnt(350., 250., 260.);
333 p2 = gp_Pnt(300., 250.0, 260.);
334 BRepBuilderAPI_MakeEdge* E3 = new BRepBuilderAPI_MakeEdge(p1,p2);
336 p1 = gp_Pnt(300., 250.0, 260.);
337 p2 = gp_Pnt(200., 200.0, 260.);
338 BRepBuilderAPI_MakeEdge* E4 = new BRepBuilderAPI_MakeEdge(p1,p2);
340 p1 = gp_Pnt(200., 200.0, 260.);
341 p2 = gp_Pnt(150., 200.0, 260.);
342 BRepBuilderAPI_MakeEdge* E5 = new BRepBuilderAPI_MakeEdge(p1,p2);
344 p1 = gp_Pnt(150., 200.0, 260.);
345 p2 = gp_Pnt(150., 150.0, 260.);
346 BRepBuilderAPI_MakeEdge* E6 = new BRepBuilderAPI_MakeEdge(p1,p2);
348 FP = BRepBuilderAPI_MakeFace(mkw.Wire());
349 ais2 = new AIS_Shape( FP );
350 aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False);
351 aContext->Display (ais2, Standard_False);
355 //step 2. offseting the surface.
356 Handle(Geom_OffsetSurface) offsurf;
357 offsurf = new Geom_OffsetSurface(BZ1, -100);
358 BRepBuilderAPI_MakeFace bzf2( offsurf, Precision::Confusion() );
359 TopoDS_Face F2= bzf2.Face();
360 Handle(AIS_Shape) ais22 = new AIS_Shape(F2);
361 aContext->Display (ais22, Standard_False);
364 //step 3. filleting the patch.
365 //( I want to project wire of this patch on offseted surface above)
366 BRepFilletAPI_MakeFillet2d fillet( FP );
368 Ex.Init(FP, TopAbs_VERTEX);
369 TopoDS_Vertex v1 = TopoDS::Vertex(Ex.Current());
370 fillet.AddFillet(v1, 20);
371 di << "\nError is " << fillet.Status() << "\n";
372 // printf("\nError is %d ", fillet.Status());
374 TopoDS_Vertex V2 = TopoDS::Vertex(Ex.Current());
375 fillet.AddFillet(V2, 20);
376 di << "\nError is " << fillet.Status() << "\n";
377 // printf("\nError is %d ", fillet.Status());
379 FP1 = fillet.Shape();
380 ais2 = new AIS_Shape( FP1 );
381 aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False);
382 aContext->Display (ais2, Standard_False);
384 DBRep::Set("FP1",FP1);
386 //step 4. Projecting the wire of this patch on offsetted surface.
387 // TopExp_Explorer Ex;
388 BRepBuilderAPI_MakeWire *myWire;
389 myWire = new BRepBuilderAPI_MakeWire();
390 for (Ex.Init( FP1, TopAbs_EDGE); Ex.More(); Ex.Next())
392 TopoDS_Edge e1 = TopoDS::Edge(Ex.Current());
393 Standard_Real f = 0.0, l = 0.0;
394 Handle(Geom_Curve) newBSplin = BRep_Tool::Curve(e1, f, l);
395 newBSplin = new Geom_TrimmedCurve(newBSplin, f, l);
396 Handle(Geom_Curve) projCurve = GeomProjLib::Project(newBSplin,offsurf);
397 myWire->Add((BRepBuilderAPI_MakeEdge(projCurve)).Edge());
399 Handle(AIS_Shape) ais33 = new AIS_Shape( myWire->Wire() );
400 aContext->Display (ais33, Standard_True);
402 DBRep::Set("Wire",myWire->Wire());
407 #include<GeomAPI_ExtremaCurveCurve.hxx>
409 static int BUC60825(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
413 printf("Usage: %s edge1 edge2",argv[0]);
417 TopoDS_Edge E1 = TopoDS::Edge(DBRep::Get(argv[1])),
418 E2 = TopoDS::Edge(DBRep::Get(argv[2]));
420 Standard_Real fp , lp;
422 Handle(Geom_Curve) C1 = BRep_Tool::Curve(E1 , fp , lp),
423 C2 = BRep_Tool::Curve(E2 , fp , lp);
425 GeomAPI_ExtremaCurveCurve aExt(C1 , C2);
427 di << "NB RESULTS : " << aExt.NbExtrema() << "\n";
432 #include <BRepBuilderAPI_MakePolygon.hxx>
433 #include <BRepOffsetAPI_ThruSections.hxx>
435 static int OCC10006(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
438 di << "Usage : " << argv[0] << "\n";
442 double bottompoints1[12] = { 10, -10, 0, 100, -10, 0, 100, -100, 0, 10, -100, 0};
443 double toppoints1[12] = { 0, 0, 10, 100, 0, 10, 100, -100, 10, 0, -100, 10};
444 double bottompoints2[12] = { 0, 0, 10.00, 100, 0, 10.00, 100, -100, 10.00, 0, -100, 10.00};
445 double toppoints2[12] = { 0, 0, 250, 100, 0, 250, 100, -100, 250, 0, -100, 250};
446 BRepBuilderAPI_MakePolygon bottompolygon1, toppolygon1, bottompolygon2, toppolygon2;
448 for (int i=0;i<4;i++) {
449 tmppnt.SetCoord(bottompoints1[3*i], bottompoints1[3*i+1], bottompoints1[3*i+2]);
450 bottompolygon1.Add(tmppnt);
451 tmppnt.SetCoord(toppoints1[3*i], toppoints1[3*i+1], toppoints1[3*i+2]);
452 toppolygon1.Add(tmppnt);
453 tmppnt.SetCoord(bottompoints2[3*i], bottompoints2[3*i+1], bottompoints2[3*i+2]);
454 bottompolygon2.Add(tmppnt);
455 tmppnt.SetCoord(toppoints2[3*i], toppoints2[3*i+1], toppoints2[3*i+2]);
456 toppolygon2.Add(tmppnt);
458 bottompolygon1.Close();
459 DBRep::Set("B1",bottompolygon1.Shape());
461 DBRep::Set("T1",toppolygon1.Shape());
462 bottompolygon2.Close();
463 DBRep::Set("B2",bottompolygon2.Shape());
465 DBRep::Set("T2",toppolygon2.Shape());
466 BRepOffsetAPI_ThruSections loft1(Standard_True, Standard_True);
467 loft1.AddWire(bottompolygon1.Wire());
468 loft1.AddWire(toppolygon1.Wire());
470 BRepOffsetAPI_ThruSections loft2(Standard_True, Standard_True);
471 loft2.AddWire(bottompolygon2.Wire());
472 loft2.AddWire(toppolygon2.Wire());
474 if (loft1.Shape().IsNull() || loft2.Shape().IsNull())
476 DBRep::Set("TS1",loft1.Shape());
477 DBRep::Set("TS2",loft2.Shape());
479 di << "BRepAlgoAPI_Fuse result(loft1.Shape(), loft2.Shape())\n";
480 BRepAlgoAPI_Fuse result(loft1.Shape(), loft2.Shape());
481 DBRep::Set("F", result.Shape());
486 #include <Geom_RectangularTrimmedSurface.hxx>
487 #include <GC_MakeTrimmedCone.hxx>
489 static Standard_Integer BUC60856(Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** argv )
491 Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
492 if(aContext.IsNull()) {
493 di << "use 'vinit' command before " << argv[0] << "\n";
500 P1(0,0,20), P2(0,0,45);
501 Handle(Geom_RectangularTrimmedSurface) S = GC_MakeTrimmedCone (P1, P2, R1, R2).Value();
502 TopoDS_Shape myshape = BRepBuilderAPI_MakeFace(S, Precision::Confusion()).Shape();
503 Handle(AIS_Shape) ais1 = new AIS_Shape(myshape);
504 aContext->Display (ais1, Standard_False);
505 aContext->SetColor (ais1, Quantity_NOC_BLUE1, Standard_False);
507 Handle(Geom_RectangularTrimmedSurface) S2 = GC_MakeTrimmedCone (P1, P2,R1, 0).Value();
508 TopoDS_Shape myshape2 = BRepBuilderAPI_MakeFace(S2, Precision::Confusion()).Shape();
509 Handle(AIS_Shape) ais2 = new AIS_Shape(myshape2);
510 aContext->Display (ais2, Standard_False);
511 aContext->SetColor (ais2, Quantity_NOC_RED, Standard_False);
515 //==========================================================================
516 //function : CoordLoad
517 // chargement d une face dans l explorer.
518 //==========================================================================
519 static Standard_Integer coordload (Draw_Interpretor& theDi,
520 Standard_Integer theArgsNb,
521 const char** theArgVec)
528 std::ifstream aFile (theArgVec[2], ios::in);
531 theDi << "unable to open " << theArgVec[2] << " for input\n";
536 memset (aLine, 0, 40);
537 aFile.getline (aLine, 80);
539 gp_Pnt aPnt (0.0, 0.0, 0.0);
541 aPnt.SetY (Draw::Atof (&aLine[20]));
543 aPnt.SetX (Draw::Atof (aLine));
544 TopoDS_Vertex aVert1 = BRepBuilderAPI_MakeVertex (aPnt);
545 BRepBuilderAPI_MakeWire aMakeWire;
548 memset (aLine, 0, 40);
549 aFile.getline (aLine, 80);
556 aPnt.SetY (Draw::Atof (&aLine[20]));
558 aPnt.SetX (Draw::Atof (aLine));
559 TopoDS_Vertex aVert2 = BRepBuilderAPI_MakeVertex (aPnt);
560 aMakeWire.Add (BRepBuilderAPI_MakeEdge (aVert1, aVert2));
565 if (!aMakeWire.IsDone())
567 DBRep::Set (theArgVec[1], TopoDS_Face());
571 BRepBuilderAPI_MakeFace aMakeFace (aMakeWire.Wire());
572 DBRep::Set (theArgVec[1], aMakeFace.IsDone() ? aMakeFace.Face() : TopoDS_Face());
576 static Standard_Integer TestMem (Draw_Interpretor& /*di*/,
577 Standard_Integer /*nb*/,
578 const char ** /*arg*/)
580 TCollection_ExtendedString aString(1024*1024, 'A');
584 static Standard_Integer BUC60876_ (Draw_Interpretor& di,
585 Standard_Integer argc,
588 Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
589 if(aContext.IsNull()) {
590 di << "use 'vinit' command before " << argv[0] << "\n";
593 if((argc != 2) && (argc != 3)) {
594 di<< "usage : " << argv[0] << " shape [mode==1]\n";
597 TopoDS_Shape aShape = DBRep::Get(argv[1]);
598 Handle(AIS_InteractiveObject) anIO = new AIS_Shape(aShape);
599 // Handle(AIS_InteractiveObject) anIOa = ViewerTest::GetAISShapeFromName(argv[1]);
600 anIO->SetHilightMode((argc == 3) ? Draw::Atoi(argv[2]) : 1);
601 aContext->Display (anIO, Standard_True);
605 //=======================================================================
606 //function : buc60773
608 //=======================================================================
610 #include<TCollection_HAsciiString.hxx>
612 static Standard_Integer BUC60773 (Draw_Interpretor& /*di*/, Standard_Integer /*n*/, const char ** /*a*/)
614 Handle(TCollection_HAsciiString) hAscii = new TCollection_HAsciiString();
615 Standard_CString aStr = hAscii->ToCString();
616 TCollection_AsciiString aAscii(aStr);
621 #include<BRepPrimAPI_MakeCylinder.hxx>
622 #include<BRepPrimAPI_MakeCone.hxx>
624 static int TestCMD(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
628 di << "Usage : " << argv[0] << "\n";
632 //Cylindre 36.085182 20.0 8.431413 88.04671 20.0 38.931416 10.0
634 Standard_Real x11 = 36.085182;
635 Standard_Real y11 = 20.0;
636 Standard_Real z11 = 8.431413;
637 Standard_Real x12 = 88.04671;
638 Standard_Real y12 = 20.0;
639 Standard_Real z12 = 38.931416;
640 Standard_Real radius = 10.0;
642 gp_Pnt base1(x11, y11, z11);
643 gp_Dir vect1(x12-x11, y12-y11, z12-z11);
644 gp_Ax2 axis1(base1, vect1);
645 Standard_Real height1 = sqrt( ((x12-x11)*(x12-x11)) + ((y12-y11)*(y12-y11)) + ((z12-z11)*(z12-z11)) );
646 BRepPrimAPI_MakeCylinder cylinder(axis1, radius, height1);
648 TopoDS_Shape SCyl = cylinder.Shape();
649 DBRep::Set("cyl", SCyl);
652 //Cone 70.7262 20.0 28.431412 105.36722 20.0 48.431416 6.0 3.0
653 Standard_Real x21 = 70.7262;
654 Standard_Real y21 = 20.0;
655 Standard_Real z21 = 28.431412;
656 Standard_Real x22 = 105.36722;
657 Standard_Real y22 = 20.0;
658 Standard_Real z22 = 48.431416;
659 Standard_Real radius1 = 6.0;
660 Standard_Real radius2 = 3.0;
662 gp_Pnt base2(x21, y21, z21);
663 gp_Dir vect2(x22-x21, y22-y21, z22-z21);
664 gp_Ax2 axis2(base2, vect2);
665 Standard_Real height2 = sqrt( ((x22-x21)*(x22-x21)) + ((y22-y21)*(y22-y21)) + ((z22-z21)*(z22-z21)) );
666 BRepPrimAPI_MakeCone cone(axis2, radius1, radius2, height2);
668 TopoDS_Shape SCon = cone.Shape();
669 DBRep::Set("con", SCon);
671 di << "BRepAlgoAPI_Fuse SFuse(SCyl, SCon)\n";
672 BRepAlgoAPI_Fuse SFuse(SCyl, SCon);
673 if (!SFuse.IsDone()) {
674 di << "Error: Boolean fuse operation failed !\n";
677 const TopoDS_Shape& fuse = SFuse.Shape();
678 DBRep::Set("fus", fuse);
683 #include <NCollection_DataMap.hxx>
684 #include <TColStd_HSequenceOfAsciiString.hxx>
685 #include <TopExp.hxx>
686 #include <TopoDS_Iterator.hxx>
688 //---------------------------------------------------------------------------------------
690 static Standard_Integer statface (Draw_Interpretor& di,Standard_Integer /*argc*/, const char ** argv )
693 TopoDS_Shape aShape = DBRep::Get(argv[1]);
696 di<<"Invalid input shape\n";
699 NCollection_DataMap<TCollection_AsciiString, Standard_Integer> aMap;
700 Handle(TColStd_HSequenceOfAsciiString) aSequence = new TColStd_HSequenceOfAsciiString;
701 Standard_CString aString;
702 Standard_Integer l=0;
703 TopExp_Explorer expl;
704 Standard_Real f3d,l3d;
705 for(expl.Init(aShape,TopAbs_FACE);expl.More();expl.Next())
708 TopoDS_Face aFace = TopoDS::Face (expl.Current());
709 Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace);
710 aString = aSurface->DynamicType()->Name();
712 if (aMap.IsBound(aString))
713 aMap.ChangeFind(aString)++;
715 aMap.Bind(aString, 1);
716 aSequence->Append(aString);
720 for(expl.Init(aShape,TopAbs_FACE);expl.More();expl.Next())
722 TopoDS_Face aFace = TopoDS::Face (expl.Current());
723 TopoDS_Iterator anIt(aFace);
724 TopoDS_Wire aWire = TopoDS::Wire (anIt.Value());
725 TopoDS_Iterator it (aWire);
726 for (; it.More(); it.Next()) {
727 TopoDS_Edge Edge = TopoDS::Edge (it.Value());
728 Handle(Geom2d_Curve) aCurve2d = BRep_Tool::CurveOnSurface(Edge,aFace,f3d,l3d);
729 aString = aCurve2d->DynamicType()->Name();
730 if(aMap.IsBound(aString))
731 aMap.ChangeFind(aString)++;
733 aMap.Bind(aString, 1);
734 aSequence->Append(aString);
740 for (exp.Init(aShape,TopAbs_EDGE); exp.More(); exp.Next())
742 TopoDS_Edge Edge = TopoDS::Edge (exp.Current());
743 Handle(Geom_Curve) aCurve3d = BRep_Tool::Curve (Edge,f3d,l3d);
744 if(aCurve3d.IsNull())
748 aString = aCurve3d->DynamicType()->Name();
749 if (aMap.IsBound(aString))
751 aMap.ChangeFind(aString)++;
753 aMap.Bind(aString, 1);
754 aSequence->Append(aString);
761 for (Standard_Integer i = 1; i <= aSequence->Length(); i++) {
762 di << aMap.Find(aSequence->Value(i)) << " -- " << aSequence->Value(i).ToCString() << "\n";
766 di<<"Degenerated edges :\n";
767 di<<l<<" -- Degenerated edges \n";
773 #include <BRepBuilderAPI_Transform.hxx>
775 static Standard_Integer BUC60841(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
778 di << "Usage : " << argv[0] << "\n";
782 gp_Ax2 Ax2 = gp_Ax2(gp_Pnt(0, 621, 78), gp_Dir(0, 1,0));
783 BRepPrimAPI_MakeCylinder cyl(Ax2, 260, 150);
784 //BRepPrimAPI_MakeCylinder cyl(gp_Ax2(gp_Pnt(0, 621, 78), gp_Dir(0, 1,0)), 260, 150);
786 TopoDS_Shape sh1 = cyl.Shape();
787 DBRep::Set("sh1",sh1);
788 gp_Trsf trsf1, trsf2;
789 trsf1.SetTranslation(gp_Pnt(0.000000,700.000000,-170.000000),
790 gp_Pnt(0.000000,700.000000,-95.000000));
791 trsf2.SetRotation(gp_Ax1(gp_Pnt(0.000000,700.000000,-170.000000),
792 gp_Dir(0.000000,0.000000,1.000000)), 0.436111);
793 BRepBuilderAPI_Transform trans1(sh1, trsf1);
794 TopoDS_Shape sh2 = trans1.Shape();
795 DBRep::Set("sh2",sh2);
797 di << "BRepAlgoAPI_Fuse fuse1(sh1, sh2)\n";
798 BRepAlgoAPI_Fuse fuse1(sh1, sh2);
799 TopoDS_Shape fsh1 = fuse1.Shape();
800 DBRep::Set("fsh1",fsh1);
802 BRepBuilderAPI_Transform trans2(fsh1, trsf2);
803 TopoDS_Shape sh3 = trans2.Shape();
804 DBRep::Set("sh3",sh3);
806 di << "BRepAlgoAPI_Fuse fuse2(fsh1,sh3)\n";
807 BRepAlgoAPI_Fuse fuse2(fsh1, sh3);
808 const TopoDS_Shape& fsh2 = fuse2.Shape();
809 DBRep::Set("fsh2",fsh2);
811 Handle(AIS_Shape) aisp1 = new AIS_Shape(fsh2);
815 #include <ShapeBuild_Edge.hxx>
817 static Standard_Integer BUC60874(Draw_Interpretor& /*di*/, Standard_Integer /*argc*/, const char ** argv )
819 TopoDS_Edge e = TopoDS::Edge(DBRep::Get(argv[1],TopAbs_EDGE));
820 ShapeBuild_Edge().BuildCurve3d(e);
826 #include<TDF_Label.hxx>
827 #include<TDataStd_TreeNode.hxx>
829 #include<DDocStd.hxx>
833 #include<TDocStd_Modified.hxx>
834 #include<TDF_ListIteratorOfDeltaList.hxx>
835 #include<TDocStd_Document.hxx>
836 #include<TDocStd_Application.hxx>
837 #include<TDF_Delta.hxx>
838 #include<TDataXtd_Constraint.hxx>
839 #include<TPrsStd_AISPresentation.hxx>
840 #include<TPrsStd_AISViewer.hxx>
841 #include<TNaming_Builder.hxx>
842 #include<TNaming_Naming.hxx>
843 #include<TNaming_NamedShape.hxx>
845 static int BUC60817(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
847 di << "Usage : " << argv[0] << " D\n";
853 if (!DDF::GetDF(argv[1],DF)) {di<<2;return 0;}
856 Handle(TDataStd_TreeNode) TN1,TN2;
858 DDF::AddLabel(DF,"0:2",L1);
859 TN1 = TDataStd_TreeNode::Set(L1);
861 DDF::AddLabel(DF,"0:3",L2);
862 TN2 = TDataStd_TreeNode::Set(L2);
865 if(!(TN2->IsDescendant(TN1))) {di<<3;return 0;}
866 if((TN1->IsDescendant(TN2))) {di<<4;return 0;}
872 static int BUC60831_1(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
874 di << "Usage : " << argv[0] << " D\n";
880 if (!DDF::GetDF(argv[1],DF)) {di<<-2;return 0;}
883 DDF::FindLabel(DF,"0:1",L,Standard_False);
884 Handle(TDocStd_Modified) MDF;
885 if (!L.Root().FindAttribute (TDocStd_Modified::GetID(), MDF)) {
886 MDF = new TDocStd_Modified();
887 L.Root().AddAttribute(MDF);
894 static int BUC60831_2(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
896 di << "Usage : " << argv[0] << " D Label\n";
902 if (!DDF::GetDF(argv[1],DF)) {di<<2;return 0;}
905 DDF::FindLabel(DF,argv[2],L,Standard_False);
907 TDocStd_Modified::Add(L);
913 static int BUC60836(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
915 di << "Usage : " << argv[0] << " D\n";
921 Handle(TDF_Data) aDF;
922 if (!DDF::GetDF(argv[1],aDF)) {di<<2;return 0;}
924 Handle(TDocStd_Document) aDocument;
925 if (!DDocStd::GetDocument(argv[1], aDocument)) {di<<3;return 0;}
928 Handle(TDataStd_TreeNode) TN;
930 aDocument->NewCommand();
931 DDF::AddLabel(aDF,"0:2",L);
932 TN = TDataStd_TreeNode::Set(L);
934 aDocument->NewCommand();
935 DDF::AddLabel(aDF,"0:3",L);
936 TN = TDataStd_TreeNode::Set(L);
938 aDocument->NewCommand();
939 DDF::AddLabel(aDF,"0:4",L);
940 TN = TDataStd_TreeNode::Set(L);
941 aDocument->NewCommand();
944 Us = aDocument->GetUndos();
945 Rs = aDocument->GetUndos();
948 char Names[10][5]={"n1","n2","n3","n4","n5","n6","n7","n8","n9","n10"};
950 TDF_ListIteratorOfDeltaList IDL;
951 for(IDL.Initialize(Us),i=1;IDL.More();IDL.Next(),i++){
952 Handle(TDF_Delta) D = IDL.Value();
953 TCollection_ExtendedString S(Names[i-1]);
955 // cout<<" U"<<i<<"="<<D->Name()<<endl;
961 Us = aDocument->GetUndos();
962 Rs = aDocument->GetRedos();
964 for(IDL.Initialize(Us),i=1;IDL.More();IDL.Next(),i++){
965 Handle(TDF_Delta) D = IDL.Value();
966 // cout<<" U"<<i<<"="<<D->Name()<<endl;
969 TCollection_ExtendedString n2name ("n2");
970 for(IDL.Initialize(Rs),i=1;IDL.More();IDL.Next(),i++){
971 Handle(TDF_Delta) D = IDL.Value();
972 if ( i == 1 && ! D->Name().IsEqual (n2name) )
983 static int BUC60847(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
985 di << "Usage : " << argv[0] << " D Shape\n";
990 Handle(TDF_Data) aDF;
991 if (!DDF::GetDF(argv[1],aDF)) {di<<2;return 0;}
993 TopoDS_Shape s = DBRep::Get(argv[2]);
994 if (s.IsNull()) { di <<"shape not found\n"; di<<3;return 0;}
996 DDF::AddLabel(aDF, "0:2", L);
997 TNaming_Builder SI (L);
1000 Handle(TNaming_NamedShape) NS = new TNaming_NamedShape;
1004 // if (!NS->IsEmpty()) {di<<3;return 0;}
1005 if (NS->IsEmpty()) {di<<4;return 0;}
1010 static int BUC60862(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
1012 di << "Usage : " << argv[0] << " D Shape\n";
1017 Handle(TDF_Data) aDF;
1018 if (!DDF::GetDF(argv[1],aDF)) {di<<2;return 0;}
1020 TopoDS_Shape s = DBRep::Get(argv[2]);
1021 if (s.IsNull()) { di <<"shape not found\n"; di<<3;return 0;}
1023 DDF::AddLabel(aDF, "0:2", L);
1024 TNaming_Builder SI (L);
1027 Handle(TNaming_NamedShape) NS = new TNaming_NamedShape;
1031 if (NS->IsEmpty()) {di<<4;return 0;}
1036 static int BUC60867(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
1038 TCollection_ExtendedString path (argv[1]);
1039 Handle(TDocStd_Application) A = DDocStd::GetApplication();
1040 Handle(TDocStd_Document) D;
1041 Standard_Integer insession = A->IsInSession(path);
1042 if (insession > 0) {
1043 di <<"document " << insession << " is already in session\n";
1047 PCDM_ReaderStatus Result = A->Open(path,D);
1048 if(Result==PCDM_RS_OK){
1057 static int BUC60910(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
1059 di << "Usage : " << argv[0] << " D\n";
1064 Handle(TDF_Data) aDF;
1065 if (!DDF::GetDF(argv[1],aDF)) {di<<2;return 0;}
1068 DDF::AddLabel(aDF, "0:2", L);
1070 Handle(TPrsStd_AISPresentation) AISP =
1071 TPrsStd_AISPresentation::Set(L,TDataXtd_Constraint::GetID());
1073 if (AISP->HasOwnMode()) {di<<3;return 0;}
1075 Standard_Integer Mode = AISP->Mode();
1076 if (Mode!=3) {di<<4;return 0;}
1077 if (!AISP->HasOwnMode()) {di<<5;return 0;}
1079 if (AISP->HasOwnMode()) {di<<6;return 0;}
1084 static int BUC60925(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
1086 di << "Usage : " << argv[0] << " D\n";
1091 Handle(TDF_Data) aDF;
1092 if (!DDF::GetDF(argv[1],aDF)) {di<<2;return 0;}
1095 DDF::AddLabel(aDF, "0:2", L);
1099 Handle(TNaming_NamedShape) NS = new TNaming_NamedShape;
1100 // Handle(TNaming_Name) NN = new TNaming_Name;
1103 NN.Type(TNaming_IDENTITY);
1105 Standard_Boolean Res = NN.Solve(L,LM);
1107 if (Res!=Standard_False) {di<<3;return 0;}
1112 static int BUC60932(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
1114 di << "Usage : " << argv[0] << " D\n";
1120 Handle(TDocStd_Document) aDocument;
1121 if (!DDocStd::GetDocument(argv[1], aDocument)) {di<<2;return 0;}
1123 if(!aDocument->InitDeltaCompaction()) {di<<3;return 0;}
1124 if(!aDocument->PerformDeltaCompaction()) {di<<4;return 0;}
1130 //=======================================================================
1131 //function : AISWidth
1132 //purpose : AISWidth (DOC,entry,[width])
1133 // abv: testing command for checking bug BUC60917 in TPrsStd_AISPresentation
1134 //=======================================================================
1136 static int AISWidth(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
1139 Handle(TDocStd_Document) D;
1140 if (!DDocStd::GetDocument(argv[1],D)) {di<<(-1);return 0;}
1142 if (!DDF::FindLabel(D->GetData(),argv[2],L)) {di<<(-2);return 0;}
1144 Handle(TPrsStd_AISViewer) viewer;
1145 if( !TPrsStd_AISViewer::Find(L, viewer) ) {di<<(-3);return 0;}
1147 Handle(TPrsStd_AISPresentation) prs;
1148 if(L.FindAttribute( TPrsStd_AISPresentation::GetID(), prs) ) {
1150 prs->SetWidth(Draw::Atof(argv[3]));
1151 TPrsStd_AISViewer::Update(L);
1154 if (prs->HasOwnWidth()){
1155 // cout << "Width = " << prs->Width() << endl;
1159 di << "AISWidth: Warning : Width wasn't set\n";
1166 di << "AISWidth : Error" << "\n";
1171 //=======================================================================
1172 //function : BUC60921 ( & BUC60954 )
1173 //purpose : Test memory allocation of OCAF in Undo/Redo operations
1174 //=======================================================================
1176 static Standard_Integer BUC60921 (Draw_Interpretor& di,
1177 Standard_Integer nb,
1181 Handle(TDocStd_Document) D;
1182 if (!DDocStd::GetDocument(arg[1],D)) {di<<1;return 0;}
1184 DDF::AddLabel(D->GetData(),arg[2],L);
1188 BRepTools::Read ( S, arg[3], B );
1190 TNaming_Builder tnBuild(L);
1191 tnBuild.Generated(S);
1192 // di << "File " << arg[3] << " added";
1196 di << "BUC60921 Doc label brep_file: directly read brep file and put shape to the label" << "\n";
1201 #include<IGESControl_Reader.hxx>
1202 #include<BRepPrimAPI_MakeHalfSpace.hxx>
1204 static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, const char ** a)
1207 di << "Usage : " << a[0] << " file.igs\n";
1211 Handle(AIS_InteractiveContext) myContext = ViewerTest::GetAISContext();
1213 if(myContext.IsNull()) {
1214 di << "use 'vinit' command before " << a[0] << "\n";
1218 // IGESControlStd_Reader reader;
1219 IGESControl_Reader reader;
1220 reader.ReadFile(a[1]);
1221 reader.TransferRoots();
1222 TopoDS_Shape shape = reader.OneShape();
1223 printf("\n iges1 shape type = %d", shape.ShapeType() );
1224 TopTools_IndexedMapOfShape list;
1225 TopExp::MapShapes(shape, TopAbs_FACE, list);
1226 printf("\n No. of faces = %d", list.Extent());
1229 BRep_Builder builder;
1230 builder.MakeShell(shell);
1231 for(int i=1;i<=list.Extent(); i++) {
1232 TopoDS_Face face = TopoDS::Face(list.FindKey(i));
1233 builder.Add(shell, face);
1235 shell.Closed (BRep_Tool::IsClosed (shell));
1237 BRepPrimAPI_MakeHalfSpace half(shell, gp_Pnt(0, 0, 20));
1238 TopoDS_Solid sol = half.Solid();
1239 gp_Ax2 anAx2(gp_Pnt(-800.0, 0.0, 0), gp_Dir(0, 0, -1));
1240 BRepPrimAPI_MakeCylinder cyl(anAx2, 50, 300);
1241 TopoDS_Shape sh = cyl.Shape();
1243 di << "BRepAlgoAPI_Fuse fuse(sol, sh)\n";
1244 BRepAlgoAPI_Fuse fuse(sol, sh);
1247 Handle(AIS_Shape) res = new AIS_Shape(sh);
1248 myContext->Display (res, Standard_True);
1252 void QABugs::Commands_3(Draw_Interpretor& theCommands) {
1253 const char *group = "QABugs";
1255 theCommands.Add("BUC60623","BUC60623 result Shape1 Shape2",__FILE__,BUC60623,group);
1256 theCommands.Add("BUC60632","BUC60632 mode length",__FILE__,BUC60632,group);
1257 theCommands.Add("BUC60652","BUC60652 face",__FILE__,BUC60652,group);
1259 theCommands.Add("BUC60729","BUC60729",__FILE__,BUC60729,group);
1260 theCommands.Add("BUC60724","BUC60724",__FILE__,BUC60724,group);
1261 theCommands.Add("BUC60727","BUC60727",__FILE__,BUC60727,group);
1262 theCommands.Add("BUC60792","BUC60792",__FILE__,BUC60792,group);
1263 theCommands.Add("BUC60811","BUC60811",__FILE__,BUC60811,group);
1265 theCommands.Add("BUC60825","BUC60825",__FILE__,BUC60825,group);
1267 theCommands.Add("OCC10006","OCC10006",__FILE__,OCC10006,group);
1269 theCommands.Add("BUC60856","BUC60856",__FILE__,BUC60856,group);
1271 theCommands.Add("coordload","load coord from file",__FILE__,coordload);
1273 theCommands.Add("TestMem","TestMem",__FILE__,TestMem,group);
1274 theCommands.Add("BUC60945","BUC60945",__FILE__,TestMem,group);
1275 theCommands.Add("BUC60876","BUC60876 shape",__FILE__,BUC60876_,group);
1276 theCommands.Add("BUC60773","BUC60773",__FILE__,BUC60773,group);
1278 theCommands.Add("TestCMD","TestCMD",__FILE__,TestCMD,group);
1280 theCommands.Add("statface","statface face",__FILE__,statface,group);
1282 theCommands.Add("BUC60841","BUC60841",__FILE__,BUC60841,group);
1284 theCommands.Add("BUC60874","BUC60874",__FILE__,BUC60874,group);
1286 theCommands.Add("BUC60817","BUC60817 D",__FILE__,BUC60817,group);
1287 theCommands.Add("BUC60831_1","BUC60831_1 D",__FILE__,BUC60831_1,group);
1288 theCommands.Add("BUC60831_2","BUC60831_2 D Label",__FILE__,BUC60831_2,group);
1289 theCommands.Add("BUC60836","BUC60836 D",__FILE__,BUC60836,group);
1290 theCommands.Add("BUC60847","BUC60847 D Shape",__FILE__,BUC60847,group);
1291 theCommands.Add("BUC60862","BUC60862 D Shape",__FILE__,BUC60862,group);
1292 theCommands.Add("BUC60867","BUC60867",__FILE__,BUC60867,group);
1293 theCommands.Add("BUC60910","BUC60910 D",__FILE__,BUC60910,group);
1294 theCommands.Add("BUC60925","BUC60925 D",__FILE__,BUC60925,group);
1295 theCommands.Add("BUC60932","BUC60932 D",__FILE__,BUC60932,group);
1296 theCommands.Add("AISWidth","AISWidth (DOC,entry,[width])",__FILE__,AISWidth,group);
1297 theCommands.Add("BUC60921","BUC60921 Doc label brep_file",__FILE__,BUC60921,group);
1299 theCommands.Add("BUC60951","BUC60951 file.igs",__FILE__,BUC60951_, group );