0022627: Change OCCT memory management defaults
[occt.git] / src / QAYasaki / QAYasaki.cxx
CommitLineData
7fd59977 1// File: QAYasaki.cxx
2// Created: Tue May 21 11:10:31 2002
3// Author: QA Admin
4// <qa@russox>
5
6
7#include <QAYasaki.hxx>
8
9#include <Draw_Interpretor.hxx>
10#include <DBRep.hxx>
11#include <DrawTrSurf.hxx>
12#include <AIS_InteractiveContext.hxx>
13#include <ViewerTest.hxx>
14#include <AIS_Shape.hxx>
15#include <TopoDS_Shape.hxx>
16
17#include <gp_Pnt2d.hxx>
18#include <GCE2d_MakeSegment.hxx>
19#include <Geom2d_TrimmedCurve.hxx>
20#include <DrawTrSurf.hxx>
21
22#include <PCollection_HAsciiString.hxx>
23
24//static Standard_Integer OCC230 (Draw_Interpretor& /*di*/, Standard_Integer /*argc*/, const char ** /*argv*/)
25static Standard_Integer OCC230 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
26{
27 if ( argc != 4) {
28 di << "ERROR OCC230: Usage : " << argv[0] << " TrimmedCurve Pnt2d Pnt2d" << "\n";
29 return 1;
30 }
31
32 gp_Pnt2d P1, P2;
33 if ( !DrawTrSurf::GetPoint2d(argv[2],P1)) {
34 di << "ERROR OCC230: " << argv[2] << " is not Pnt2d" << "\n";
35 return 1;
36 }
37 if ( !DrawTrSurf::GetPoint2d(argv[3],P2)) {
38 di << "ERROR OCC230: " << argv[3] << " is not Pnt2d" << "\n";
39 return 1;
40 }
41
42 GCE2d_MakeSegment MakeSegment(P1,P2);
43 Handle(Geom2d_TrimmedCurve) TrimmedCurve = MakeSegment.Value();
44 DrawTrSurf::Set(argv[1], TrimmedCurve);
45 return 0;
46}
47
48static Standard_Integer OCC142 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/)
49{
50 for(Standard_Integer i= 0;i <= 20;i++){
51 Handle(PCollection_HAsciiString) pstr = new PCollection_HAsciiString("TEST");
52 pstr->Clear();
53 }
54 di << "OCC142: OK" << "\n";
55 return 0;
56}
57
58void QAYasaki::Commands(Draw_Interpretor& theCommands) {
59 char *group = "QAYasaki";
60
61 theCommands.Add ("OCC230", "OCC230 TrimmedCurve Pnt2d Pnt2d", __FILE__, OCC230, group);
62 theCommands.Add ("OCC142", "OCC142", __FILE__, OCC142, group);
63
64 return;
65}