b311480e |
1 | // Created on: 2002-04-09 |
2 | // Created by: QA Admin |
973c2be1 |
3 | // Copyright (c) 2002-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
1cd84fee |
16 | #include <QABugs.hxx> |
7fd59977 |
17 | |
91322f44 |
18 | #include <Draw.hxx> |
7fd59977 |
19 | #include <Draw_Interpretor.hxx> |
20 | #include <DBRep.hxx> |
21 | #include <DrawTrSurf.hxx> |
22 | #include <AIS_InteractiveContext.hxx> |
23 | #include <ViewerTest.hxx> |
24 | #include <AIS_Shape.hxx> |
25 | #include <TopoDS_Shape.hxx> |
26 | |
1cd84fee |
27 | #include <QABugs_PresentableObject.hxx> |
7fd59977 |
28 | |
1cd84fee |
29 | Handle(QABugs_PresentableObject) theObject1=NULL; |
30 | Handle(QABugs_PresentableObject) theObject2=NULL; |
7fd59977 |
31 | |
32 | static Standard_Integer BUC60720 (Draw_Interpretor& di,Standard_Integer argc,const char ** argv ) |
33 | { |
34 | Handle(AIS_InteractiveContext) myAISContext = ViewerTest::GetAISContext(); |
35 | if(myAISContext.IsNull()) { |
36 | di << "use 'vinit' command before " << argv[0] << "\n"; |
37 | return -1; |
38 | } |
39 | |
40 | if(argc != 2) { |
41 | di << "Usage : " << argv[0] << " 0/1" << "\n"; |
42 | } |
43 | |
91322f44 |
44 | if(Draw::Atoi(argv[1]) == 0) { |
7fd59977 |
45 | if ( theObject1.IsNull() ) |
46 | { |
1cd84fee |
47 | theObject1 = new QABugs_PresentableObject(); |
7fd59977 |
48 | theObject1->SetDisplayMode(0); |
49 | myAISContext->Display(theObject1); |
50 | } |
91322f44 |
51 | } else if(Draw::Atoi(argv[1]) == 1) { |
7fd59977 |
52 | if ( theObject2.IsNull() ) |
53 | { |
1cd84fee |
54 | theObject2 = new QABugs_PresentableObject(); |
7fd59977 |
55 | theObject2->SetDisplayMode(1); |
56 | myAISContext->Display(theObject2); |
57 | } |
58 | } else { |
59 | di << "Usage : " << argv[0] << " 0/1" << "\n"; |
60 | return -1; |
61 | } |
62 | return 0; |
63 | } |
64 | |
1cd84fee |
65 | void QABugs::Commands_15(Draw_Interpretor& theCommands) |
7fd59977 |
66 | { |
1365140b |
67 | const char *group = "QABugs"; |
7fd59977 |
68 | theCommands.Add("BUC60720","BUC60720 0/1",__FILE__,BUC60720,group); |
69 | } |