3 // model of main program Draw
6 #include <Draw_Appli.hxx>
8 // main passes main to Draw
10 main(int argc, char** argv)
12 Draw_Appli(argc,argv);
15 //*******************************
17 // Remove unused includes
18 // to avoid overloading the link
20 //********************************
22 #include <GeometryTest.hxx>
24 // only is one makes the topology
25 #include <BRepTest.hxx>
27 // for the commands using topology
31 // example of user command
33 static Standard_Integer macommande (Draw_Interpretor& di,
34 Standard_Integer n, char** a)
36 if (n < 2) return 1; // error if not enough arguments
38 TopoDS_Shape S = DBRep::Get(a[1]);
40 cout << a[1] << " is not a shape" << endl;
44 // .... do what you like with S .....
46 //... to return a chain to TCL, place it in di
54 // definition of commands
56 void Draw_InitAppli(Draw_Interpretor& theCommands)
58 Draw::Commands(theCommands);
61 GeometryTest::AllCommands(theCommands); // see GeometryTest.cdl for details
64 BRepTest::AllCommands(theCommands); // see BRepTest.cdl for details
69 theCommands.Add("macommande","macommande and its help",macommande);