b311480e |
1 | // Created on: 2002-05-21 |
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 | |
7fd59977 |
20 | |
21 | |
1cd84fee |
22 | #include <QABugs.hxx> |
7fd59977 |
23 | |
24 | #include <Draw_Interpretor.hxx> |
25 | #include <DBRep.hxx> |
26 | #include <DrawTrSurf.hxx> |
27 | #include <AIS_InteractiveContext.hxx> |
28 | #include <ViewerTest.hxx> |
29 | #include <AIS_Shape.hxx> |
30 | #include <TopoDS_Shape.hxx> |
31 | |
32 | #include <gp_Pnt2d.hxx> |
33 | #include <GCE2d_MakeSegment.hxx> |
34 | #include <Geom2d_TrimmedCurve.hxx> |
35 | #include <DrawTrSurf.hxx> |
36 | |
37 | #include <PCollection_HAsciiString.hxx> |
38 | |
39 | //static Standard_Integer OCC230 (Draw_Interpretor& /*di*/, Standard_Integer /*argc*/, const char ** /*argv*/) |
40 | static Standard_Integer OCC230 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) |
41 | { |
42 | if ( argc != 4) { |
43 | di << "ERROR OCC230: Usage : " << argv[0] << " TrimmedCurve Pnt2d Pnt2d" << "\n"; |
44 | return 1; |
45 | } |
46 | |
47 | gp_Pnt2d P1, P2; |
48 | if ( !DrawTrSurf::GetPoint2d(argv[2],P1)) { |
49 | di << "ERROR OCC230: " << argv[2] << " is not Pnt2d" << "\n"; |
50 | return 1; |
51 | } |
52 | if ( !DrawTrSurf::GetPoint2d(argv[3],P2)) { |
53 | di << "ERROR OCC230: " << argv[3] << " is not Pnt2d" << "\n"; |
54 | return 1; |
55 | } |
56 | |
57 | GCE2d_MakeSegment MakeSegment(P1,P2); |
58 | Handle(Geom2d_TrimmedCurve) TrimmedCurve = MakeSegment.Value(); |
59 | DrawTrSurf::Set(argv[1], TrimmedCurve); |
60 | return 0; |
61 | } |
62 | |
63 | static Standard_Integer OCC142 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/) |
64 | { |
65 | for(Standard_Integer i= 0;i <= 20;i++){ |
66 | Handle(PCollection_HAsciiString) pstr = new PCollection_HAsciiString("TEST"); |
67 | pstr->Clear(); |
68 | } |
69 | di << "OCC142: OK" << "\n"; |
70 | return 0; |
71 | } |
72 | |
1cd84fee |
73 | void QABugs::Commands_19(Draw_Interpretor& theCommands) { |
74 | char *group = "QABugs"; |
7fd59977 |
75 | |
76 | theCommands.Add ("OCC230", "OCC230 TrimmedCurve Pnt2d Pnt2d", __FILE__, OCC230, group); |
77 | theCommands.Add ("OCC142", "OCC142", __FILE__, OCC142, group); |
78 | |
79 | return; |
80 | } |