theCommands.Add("mkoffset",
"mkoffset result face/compound of wires nboffset stepoffset [jointype(a/i) [alt]]",__FILE__,
- mkoffset);
+ mkoffset,g);
theCommands.Add("openoffset",
"openoffset result face/wire nboffset stepoffset [jointype(a/i)]",__FILE__,
- openoffset);
+ openoffset,g);
theCommands.Add("mkedge",
"mkedge edge curve [surface] [pfirst plast] [vfirst [pfirst] vlast [plast]] ",__FILE__,
edgeintersector,g);
theCommands.Add("build3d",
- "build3d S [tol]",
+ "build3d S [tol]",__FILE__,
build3d, g);
theCommands.Add("reducepcurves",
- "reducepcurves shape1 shape2 ...",
+ "reducepcurves shape1 shape2 ...",__FILE__,
reducepcurves, g);
theCommands.Add("concatC0wire",
theCommands.Add("offsetparameter",
"offsetparameter Tol Inter(c/p) JoinType(a/i/t) [RemoveInternalEdges(r/k)]",
- __FILE__, offsetparameter);
+ __FILE__, offsetparameter, g);
theCommands.Add("offsetload",
"offsetload shape offset bouchon1 bouchon2 ...",
theCommands.Add("featprism",
"Defines the arguments for a prism : featprism shape element skface Dirx Diry Dirz Fuse(0/1/2) Modify(0/1)",
- __FILE__, DEFIN);
+ __FILE__, DEFIN, g);
theCommands.Add("featrevol",
"Defines the arguments for a revol : featrevol shape element skface Ox Oy Oz Dx Dy Dz Fuse(0/1/2) Modify(0/1)",
- __FILE__, DEFIN);
+ __FILE__, DEFIN, g);
theCommands.Add("featpipe",
"Defines the arguments for a pipe : featpipe shape element skface spine Fuse(0/1/2) Modify(0/1)",
- __FILE__, DEFIN);
+ __FILE__, DEFIN, g);
theCommands.Add("featdprism",
"Defines the arguments for a drafted prism : featdprism shape face skface angle Fuse(0/1/2) Modify(0/1)",
- __FILE__, DEFIN);
+ __FILE__, DEFIN, g);
theCommands.Add("featlf",
"Defines the arguments for a linear rib or slot : featlf shape wire plane DirX DirY DirZ DirX DirY DirZ Fuse(0/1/2) Modify(0/1)",
- __FILE__, DEFIN);
+ __FILE__, DEFIN, g);
theCommands.Add("featrf",
"Defines the arguments for a rib or slot of revolution : featrf shape wire plane X Y Z DirX DirY DirZ Size Size Fuse(0/1/2) Modify(0/1)",
- __FILE__, DEFIN);
+ __FILE__, DEFIN, g);
theCommands.Add("addslide",
" Adds sliding elements : addslide prism/revol/pipe edge face [edge face...]",
- __FILE__, ADD);
+ __FILE__, ADD, g);
theCommands.Add("featperform",
" Performs the prism revol dprism linform or pipe :featperform prism/revol/pipe/dprism/lf result [[Ffrom] Funtil]",
- __FILE__, PERF);
+ __FILE__, PERF, g);
theCommands.Add("featperformval",
" Performs the prism revol dprism or linform with a value :featperformval prism/revol/dprism/lf result value",
- __FILE__, PERF);
+ __FILE__, PERF, g);
theCommands.Add("endedges",
" Return top and bottom edges of dprism :endedges dprism shapetop shapebottom First/LastShape (1/2)",
- __FILE__, BOSS);
+ __FILE__, BOSS, g);
theCommands.Add("fillet",
" Perform fillet on compounds of edges :fillet result object rad1 comp1 rad2 comp2 ...",
- __FILE__, BOSS);
+ __FILE__, BOSS, g);
theCommands.Add("bossage",
" Perform fillet on top and bottom edges of dprism :bossage dprism result radtop radbottom First/LastShape (1/2)",
- __FILE__, BOSS);
+ __FILE__, BOSS, g);
theCommands.Add("offsetshapesimple",
"offsetshapesimple result shape offsetvalue [solid] [tolerance=1e-7]",
- __FILE__, ComputeSimpleOffset);
+ __FILE__, ComputeSimpleOffset, g);
}
theCommands.Add("rollingball",
"rollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]",
__FILE__,
- rollingball);
+ rollingball, g);
theCommands.Add("brollingball",
"brollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]",
__FILE__,
- rollingball);
+ rollingball, g);
theCommands.Add("trollingball",
"trollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]",
__FILE__,
- rollingball);
+ rollingball, g);
}
"setflags shape_name flag1[flag2...]\n sets flags for shape(free, modified, checked, orientable, closed, infinite, convex, locked), for example <setflags a free> or <setflags a -free> if necessary unflag ",
__FILE__,setFlags,g);
-// theCommands.Add("dumpmmgt",
-// "dump le contenu du gestionnaire de memoire",__FILE__,dumpmmgt,g);
theCommands.Add("purgemmgt",
"returns the free memory from the system to the memory manager",
__FILE__,purgemmgt,g);
"\n\t\t +|-t : switch on/off output to tcl of Progress Indicator"
"\n\t\t +|-c : switch on/off output to cout of Progress Indicator"
"\n\t\t +|-g : switch on/off graphical mode of Progress Indicator",
- XProgress,"DE: General");
+ __FILE__, XProgress,"DE: General");
theCommands.Add("writebrep",
"writebrep shape filename [-binary {0|1}]=0 [-version Version]=4"
"\n\t\t: [-triangles {0|1}]=1 [-normals {0|1}]=0"
{
Standard_ASSERT_RAISE (myInterp != NULL, "Attempt to add command to Null interpretor");
- Standard_PCharacter aName = (Standard_PCharacter )theCommandName;
- Standard_PCharacter aHelp = (Standard_PCharacter )theHelp;
- Standard_PCharacter aGroup = (Standard_PCharacter )theGroup;
- Tcl_CreateCommand (myInterp, aName, CommandCmd, (ClientData )theCallback, CommandDelete);
+ Tcl_CreateCommand (myInterp, theCommandName, CommandCmd, (ClientData )theCallback, CommandDelete);
// add the help
- Tcl_SetVar2 (myInterp, "Draw_Helps", aName, aHelp, TCL_GLOBAL_ONLY);
- Tcl_SetVar2 (myInterp, "Draw_Groups", aGroup, aName,
+ Tcl_SetVar2 (myInterp, "Draw_Helps", theCommandName, theHelp, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2 (myInterp, "Draw_Groups", theGroup, theCommandName,
TCL_GLOBAL_ONLY | TCL_APPEND_VALUE | TCL_LIST_ELEMENT);
// add path to source file (keep not more than two last subdirectories)
TCollection_AsciiString aSrcPath;
aPath.SystemName (aSrcPath);
if (aSrcPath.Value(1) == '/')
+ {
aSrcPath.Remove(1);
- Tcl_SetVar2 (myInterp, "Draw_Files", aName, aSrcPath.ToCString(), TCL_GLOBAL_ONLY);
+ }
+ Tcl_SetVar2 (myInterp, "Draw_Files", theCommandName, aSrcPath.ToCString(), TCL_GLOBAL_ONLY);
}
//=======================================================================
theCommands.Add("projonplane",
"projonplane r C3d Plane [dx dy dz] [0/1]",
- projonplane);
+ __FILE__,
+ projonplane, g);
theCommands.Add("bisec",
"bisec result line/circle/point line/circle/point",
theCommands.Add("BUC60856","BUC60856",__FILE__,BUC60856,group);
- theCommands.Add("coordload","load coord from file",__FILE__,coordload);
+ theCommands.Add("coordload","load coord from file",__FILE__,coordload,group);
theCommands.Add("TestMem","TestMem",__FILE__,TestMem,group);
theCommands.Add("BUC60945","BUC60945",__FILE__,TestMem,group);
"\n\t\t: -highmode Sets hilight mode for objects."
"\n\t\t: -redisplay Recomputes presentation of objects."
"\n\t\t: -noecho Avoid printing of command results."
- "\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shape."
+ "\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shape.",
__FILE__, VDisplay2, group);
theCommands.Add ("vnbdisplayed",
theCommands.Add("vtexrepeat",
"vtexrepeat name RepeatU RepeatV"
"\n\t\t: Alias for vtexture name -setRepeat RepeatU RepeatV.",
- VTexture,group);
+ __FILE__, VTexture, group);
theCommands.Add("vtexdefault",
"vtexdefault name"
"\n\t\t: Alias for vtexture name -default.",
- VTexture,group);
+ __FILE__, VTexture, group);
theCommands.Add("vstate",
"vstate [-entities] [-hasSelected] [name1] ... [nameN]"
theCommands.Add("vtypes",
"vtypes : list of known types and signatures in AIS - To be Used in vpickobject command for selection with filters",
- VIOTypes,group);
+ __FILE__, VIOTypes, group);
theCommands.Add("vselfilter",
"vselfilter [-contextfilter {AND|OR}]"
"\n\t\t: for example '+Z' will show front of the model,"
"\n\t\t: '-X-Y+Z' will define left axonometrical view."
"\n\t\t: -frame define camera Up and Right directions (regardless Up convention);"
- "\n\t\t: for example '+X+Z' will show front of the model with Z-up."
+ "\n\t\t: for example '+X+Z' will show front of the model with Z-up.",
__FILE__,VViewProj,group);
theCommands.Add("vtop" ,
"vtop or <T> : Top view. Orientation +X+Y" ,
__FILE__,VViewProj,group);
theCommands.Add("vpick" ,
"vpick : vpick X Y Z [shape subshape] ( all variables as string )",
- VPick,group);
+ __FILE__, VPick, group);
theCommands.Add("vfit",
"vfit or <F> [-selected] [-noupdate]"
"\n\t\t: [-selected] fits the scene according to bounding box of currently selected objects",
di.Add("XGetGDTAffectedPlane", "XGetGDTAffectedPlane Doc GDT_Label Plane"
"Returns affected plane into Plane",
__FILE__, getGDTAffectedPlane, g);
- di.Add("XGetGDTSemanticName", "XGetGDTSemanticName Doc GDT_Label"
+ di.Add("XGetGDTSemanticName", "XGetGDTSemanticName Doc GDT_Label",
__FILE__, getGDTSemanticName, g);
di.Add("XSetGDTSemanticName", "XSetGDTSemanticName Doc GDT_Label Name"
XSDRAW::RemoveCommand("exit");
// if (!getenv("WBHOSTTOP")) XSDRAW::RemoveCommand("xsnew");
- Handle(TColStd_HSequenceOfAsciiString) list =
- IFSelect_Activator::Commands(0);
- TCollection_AsciiString com;
- Standard_Integer i, nb = list->Length();
- for (i = 1; i <= nb; i ++) {
- Handle(IFSelect_Activator) act;
- Standard_Integer nact, num = -1;
- char help[200];
- com = list->Value(i);
+ Handle(TColStd_HSequenceOfAsciiString) list = IFSelect_Activator::Commands (0);
+ for (TColStd_HSequenceOfAsciiString::Iterator aCmdIter (*list); aCmdIter.More(); aCmdIter.Next())
+ {
+ Standard_Integer num = -1;
+ const TCollection_AsciiString& aCmd = aCmdIter.Value();
if (!theolds.IsEmpty())
- theolds.Find(com, num);
- if (num == 0) continue;
- if (!IFSelect_Activator::Select(com.ToCString(),nact,act))
- Sprintf (help,"type : xhelp %s for help",com.ToCString());
- else if (!act.IsNull()) strcpy(help,act->Help(nact));
- if (num < 0) theCommands.Add (com.ToCString(),help,XSTEPDRAWRUN,act->Group());
- else theCommands.Add (thenews->Value(num).ToCString(),help,XSTEPDRAWRUN,act->Group());
+ {
+ theolds.Find (aCmd, num);
+ }
+ if (num == 0)
+ {
+ continue;
+ }
+
+ Standard_Integer nact = 0;
+ Handle(IFSelect_Activator) anAct;
+ TCollection_AsciiString aHelp;
+ if (!IFSelect_Activator::Select (aCmd.ToCString(), nact, anAct))
+ {
+ aHelp = TCollection_AsciiString("type : xhelp ") + aCmd + " for help";
+ }
+ else if (!anAct.IsNull())
+ {
+ aHelp = anAct->Help (nact);
+ }
+
+ const TCollection_AsciiString& aCmdName = num < 0 ? aCmd : thenews->Value (num);
+ theCommands.Add (aCmdName.ToCString(), aHelp.ToCString(), "", XSTEPDRAWRUN, anAct->Group());
}
}