0024157: Parallelization of assembly part of BO
[occt.git] / src / QABugs / QABugs_15.cxx
1 // Created on: 2002-04-09
2 // Created by: QA Admin
3 // Copyright (c) 2002-2012 OPEN CASCADE SAS
4 //
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
9 //
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 //
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
19
20 #include <QABugs.hxx>
21
22 #include <Draw.hxx>
23 #include <Draw_Interpretor.hxx>
24 #include <DBRep.hxx>
25 #include <DrawTrSurf.hxx>
26 #include <AIS_InteractiveContext.hxx>
27 #include <ViewerTest.hxx>
28 #include <AIS_Shape.hxx>
29 #include <TopoDS_Shape.hxx>
30
31 #include <QABugs_PresentableObject.hxx>
32
33 Handle(QABugs_PresentableObject) theObject1=NULL;
34 Handle(QABugs_PresentableObject) theObject2=NULL;
35
36 static Standard_Integer BUC60720 (Draw_Interpretor& di,Standard_Integer argc,const char ** argv )
37 {
38   Handle(AIS_InteractiveContext) myAISContext = ViewerTest::GetAISContext();
39   if(myAISContext.IsNull()) { 
40     di << "use 'vinit' command before " << argv[0] << "\n";
41     return -1;
42   }
43
44   if(argc != 2) {
45     di << "Usage : " << argv[0] << " 0/1" << "\n";
46   }
47
48   if(Draw::Atoi(argv[1]) == 0) {
49     if ( theObject1.IsNull() )
50       {
51         theObject1 = new QABugs_PresentableObject();
52         theObject1->SetDisplayMode(0);
53         myAISContext->Display(theObject1);
54       }
55   } else if(Draw::Atoi(argv[1]) == 1) {
56     if ( theObject2.IsNull() )
57       {
58         theObject2 = new QABugs_PresentableObject();
59         theObject2->SetDisplayMode(1);
60         myAISContext->Display(theObject2);
61       }
62   } else {
63     di << "Usage : " << argv[0] << " 0/1" << "\n";
64     return -1;
65   }
66   return 0;
67 }
68
69 void QABugs::Commands_15(Draw_Interpretor& theCommands)
70 {
71   const char *group = "QABugs";
72   theCommands.Add("BUC60720","BUC60720 0/1",__FILE__,BUC60720,group);
73 }