#include <SWDRAW_ShapeTool.hxx>
#include <SWDRAW_ShapeAnalysis.hxx>
-#include <SWDRAW_ShapeBuild.hxx>
-#include <SWDRAW_ShapeConstruct.hxx>
#include <SWDRAW_ShapeCustom.hxx>
#include <SWDRAW_ShapeExtend.hxx>
#include <SWDRAW_ShapeFix.hxx>
#include <SWDRAW_ShapeProcess.hxx>
#include <SWDRAW_ShapeProcessAPI.hxx>
-// tovrml
-#include <TopoDS_Shape.hxx>
-#include <SWDRAW_ToVRML.hxx>
//#72 rln 09.03.99 Packaging of SWDRAW
#include <ShapeProcess_OperLibrary.hxx>
//#72 rln 09.03.99 Packaging of SWDRAW
//=======================================================================
-//function : tovrml
-//purpose :
-//=======================================================================
-
-static Standard_Integer tovrml(Draw_Interpretor& /*di*/, Standard_Integer n, const char** a)
-{
- if (n < 3) return 1;
- SWDRAW_ToVRML avrml;
- TopoDS_Shape sh = DBRep::Get (a[1]);
- const char* filename = a[2];
- if (!avrml.Write (sh,filename)) return 1;
- return 0;
-}
-
-//=======================================================================
//function : LocSet
//purpose :
//=======================================================================
}
//=======================================================================
-//function : NSPApply
-//purpose : CKY , 12 JUL 2001
-//=======================================================================
-
-static Standard_Integer NSPApply (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
-{
- if ( argc < 6) {
- di<<"NSPApply result(new shape) shape(initial shape) rscfile sequence tol [maxtol, default=1]"<<"\n";
- return 1;
- }
- TopoDS_Shape shape = DBRep::Get ( argv[2] );
- if (shape.IsNull()) {
- di << "No shape named \"" << argv[1] << "\" found" << "\n";
- return 1;
- }
- TopoDS_Shape newshape;
- Standard_Real tol = Draw::Atof(argv[5]);
- Standard_Real maxtol = 1.;
- if (argc > 6) maxtol = Draw::Atof(argv[6]);
-
- XSAlgo::AlgoContainer()->PrepareForTransfer();
- Handle(Standard_Transient) info; // reserved for special uses
- Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di, 1);
- newshape = XSAlgo::AlgoContainer()->ProcessShape
- ( shape, tol, maxtol, argv[3] , argv[4] , info, aProgress);
-// WHAT IS MISSING HERE IS MERGING with starting transfer map
-
- if (newshape.IsNull()) {
- di<<"No result produced"<<"\n";
- }
- else
- DBRep::Set ( argv[1], newshape );
- return 0;
-}
-
-//=======================================================================
//function : Init
//purpose :
//=======================================================================
SWDRAW_ShapeTool::InitCommands (theCommands);
SWDRAW_ShapeAnalysis::InitCommands (theCommands);
- SWDRAW_ShapeBuild::InitCommands (theCommands);
- SWDRAW_ShapeConstruct::InitCommands (theCommands);
SWDRAW_ShapeCustom::InitCommands (theCommands);
SWDRAW_ShapeExtend::InitCommands (theCommands);
SWDRAW_ShapeFix::InitCommands (theCommands);
theCommands.Add("LocSet", "a [b [c]]: set loc b->a; use no args to get help",__FILE__,LocSet,"essai");
theCommands.Add("LocDump", "a: dump location of a",__FILE__,LocDump,"essai");
- //tovrml
- theCommands.Add("tovrml", "shape filename",__FILE__, tovrml, "essai");
-
// register operators for ShapeProcessing
ShapeProcess_OperLibrary::Init();
- // new shape processing
- theCommands.Add ("NSPApply","NSPApply result shape rscfilename sequence tol [maxtol, default=1]",
- __FILE__,NSPApply,"essai");
}
//=======================================================================