Open CASCADE Technology 7.8.0
|
MAQUETTE DESSIN MODELISATION. More...
#include <Draw.hxx>
Static Public Member Functions | |
static void | Load (Draw_Interpretor &theDI, const TCollection_AsciiString &theKey, const TCollection_AsciiString &theResourceFileName, const TCollection_AsciiString &theDefaultsDirectory, const TCollection_AsciiString &theUserDefaultsDirectory, const Standard_Boolean theIsVerbose=Standard_False) |
(Re)Load a Draw Harness plugin. | |
Tcl variables management tools | |
static void | Set (const Standard_CString Name, const Handle< Draw_Drawable3D > &D, const Standard_Boolean Disp) |
Sets a variable. Display it if <Disp> is true. | |
static void | Set (const Standard_CString Name, const Handle< Draw_Drawable3D > &D) |
Sets a variable, a null handle clear the vartiable. Automatic display is context driven. | |
static void | Set (const Standard_CString Name, const Standard_Real val) |
Sets a numeric variable. | |
static Draw_Interpretor & | GetInterpretor () |
Returns main DRAW interpretor. | |
static Handle< Draw_Drawable3D > | Get (Standard_CString &theName) |
Returns a variable value. The name "." does a graphic selection; in this case theName will be is overwritten with the name of the variable. | |
static Handle< Draw_Drawable3D > | GetExisting (const Standard_CString &theName) |
Returns a variable value. | |
static Standard_Boolean | Get (const Standard_CString Name, Standard_Real &val) |
Gets a numeric variable. Returns True if the variable exist. | |
static void | Set (const Standard_CString Name, const Standard_CString val) |
Sets a TCL string variable. | |
static const NCollection_Map< Handle< Draw_Drawable3D > > & | Drawables () |
Returns a map of Draw_Drawable3D variables. | |
argument parsing tools | |
static Standard_Real | Atof (const Standard_CString Name) |
Converts numeric expression, that can involve DRAW variables, to real value. | |
static bool | ParseReal (const Standard_CString theExpressionString, Standard_Real &theParsedRealValue) |
Converts the numeric expression, that can involve DRAW variables, to a real value. | |
static Standard_Integer | Atoi (const Standard_CString Name) |
Converts numeric expression, that can involve DRAW variables, to integer value. Implemented as cast of Atof() to integer. | |
static bool | ParseInteger (const Standard_CString theExpressionString, Standard_Integer &theParsedIntegerValue) |
Converts the numeric expression, that can involve DRAW variables, to an integer value. | |
static Standard_Integer | ParseColor (const Standard_Integer theArgNb, const char *const *const theArgVec, Quantity_ColorRGBA &theColor) |
Parses RGB(A) color argument(s) specified within theArgVec[0], theArgVec[1], theArgVec[2] and theArgVec[3]. Handles either color specified by name (single argument) or by RGB(A) components (3-4 arguments) in range 0..1. The result is stored in theColor on success. | |
static Standard_Integer | ParseColor (const Standard_Integer theArgNb, const char *const *const theArgVec, Quantity_Color &theColor) |
Parses RGB color argument(s). | |
static Standard_Boolean | ParseOnOff (Standard_CString theArg, Standard_Boolean &theIsOn) |
Parses boolean argument. Handles either flag specified by 0|1 or on|off. | |
static Standard_Boolean | ParseOnOffIterator (Standard_Integer theArgsNb, const char **theArgVec, Standard_Integer &theArgIter) |
Parses boolean argument at specified iterator position with optional on/off coming next. | |
static Standard_Boolean | ParseOnOffNoIterator (Standard_Integer theArgsNb, const char **theArgVec, Standard_Integer &theArgIter) |
Parses boolean argument at specified iterator position with optional on/off coming next. Similar to ParseOnOffIterator() but also reverses returned value if argument name starts with "no" prefix. E.g. if nominal argument is "cmd -usefeature [on|off|1|0]=on", then "-nousefeature" argument will return FALSE. | |
static void | LastPick (Standard_Integer &view, Standard_Integer &X, Standard_Integer &Y, Standard_Integer &button) |
Returns last graphic selection description. | |
static void | Repaint () |
Asks to repaint the screen after the current command. | |
static void | SetProgressBar (const Handle< Draw_ProgressIndicator > &theProgress) |
sets progress indicator | |
static Handle< Draw_ProgressIndicator > | GetProgressBar () |
gets progress indicator | |
methods loading standard command sets | |
static void | Commands (Draw_Interpretor &I) |
Defines all Draw commands. | |
static void | BasicCommands (Draw_Interpretor &I) |
Defines Draw basic commands. | |
static void | MessageCommands (Draw_Interpretor &I) |
Defines Draw message commands. | |
static void | VariableCommands (Draw_Interpretor &I) |
Defines Draw variables handling commands. | |
static void | GraphicCommands (Draw_Interpretor &I) |
Defines Draw variables handling commands. | |
static void | PloadCommands (Draw_Interpretor &I) |
Defines Loads Draw plugins commands. | |
static void | UnitCommands (Draw_Interpretor &I) |
Defines Draw unit commands. | |
static Handle< Draw_Drawable3D > | getDrawable (Standard_CString &theName, Standard_Boolean theToAllowPick) |
Returns a variable value. | |
static Standard_Integer | parseColor (Standard_Integer theArgNb, const char *const *theArgVec, Quantity_ColorRGBA &theColor, bool theToParseAlpha) |
Parses RGB(A) color argument(s) specified within theArgVec[0], theArgVec[1], theArgVec[2] and theArgVec[3]. Handles either color specified by name (single argument) or by RGB(A) components (3-4 arguments) in range 0..1. The result is stored in theColor on success. Returns number of handled arguments (1, 2, 3 or 4) or 0 on syntax error. | |
MAQUETTE DESSIN MODELISATION.
|
static |
Converts numeric expression, that can involve DRAW variables, to real value.
|
static |
Converts numeric expression, that can involve DRAW variables, to integer value. Implemented as cast of Atof() to integer.
|
static |
Defines Draw basic commands.
|
static |
Defines all Draw commands.
|
static |
Returns a map of Draw_Drawable3D variables.
|
static |
Gets a numeric variable. Returns True if the variable exist.
|
inlinestatic |
Returns a variable value. The name "." does a graphic selection; in this case theName will be is overwritten with the name of the variable.
|
staticprotected |
Returns a variable value.
theName | [in] [out] variable name, or "." to activate picking |
theToAllowPick | [in] when TRUE, "." name will activate picking |
|
inlinestatic |
Returns a variable value.
|
static |
Returns main DRAW interpretor.
|
static |
gets progress indicator
|
static |
Defines Draw variables handling commands.
|
static |
Returns last graphic selection description.
|
static |
(Re)Load a Draw Harness plugin.
theDI | [in] [out] Tcl interpretor to append loaded commands |
theKey | [in] plugin code name to be resolved in resource file |
theResourceFileName | [in] description file name |
theDefaultsDirectory | [in] default folder for looking description file |
theUserDefaultsDirectory | [in] user folder for looking description file |
theIsVerbose | [in] print verbose messages |
|
static |
Defines Draw message commands.
|
inlinestatic |
Parses RGB color argument(s).
theArgNb | [in] number of available arguments in theArgVec (array limits) |
theArgVec | [in] argument list |
theColor | [out] retrieved color |
|
inlinestatic |
Parses RGB(A) color argument(s) specified within theArgVec[0], theArgVec[1], theArgVec[2] and theArgVec[3]. Handles either color specified by name (single argument) or by RGB(A) components (3-4 arguments) in range 0..1. The result is stored in theColor on success.
Usage code sample for command argument in form "cmd -color {ColorName|R G B [A]|ColorHex}":
theArgNb | [in] number of available arguments in theArgVec (array limits) |
theArgVec | [in] argument list |
theColor | [out] retrieved color |
|
staticprotected |
Parses RGB(A) color argument(s) specified within theArgVec[0], theArgVec[1], theArgVec[2] and theArgVec[3]. Handles either color specified by name (single argument) or by RGB(A) components (3-4 arguments) in range 0..1. The result is stored in theColor on success. Returns number of handled arguments (1, 2, 3 or 4) or 0 on syntax error.
|
static |
Converts the numeric expression, that can involve DRAW variables, to an integer value.
theExpressionString | the strings that contains the expression involving DRAW variables to be parsed |
theParsedIntegerValue | an integer value that is a result of parsing |
|
static |
Parses boolean argument. Handles either flag specified by 0|1 or on|off.
Usage code sample for command argument in form "cmd -usefeature [on|off|1|0]=on":
theArg | [in] argument value |
theIsOn | [out] decoded Boolean flag |
|
static |
Parses boolean argument at specified iterator position with optional on/off coming next.
Usage code sample for command argument in form "cmd -usefeature [on|off|1|0]=on":
theArgsNb | [in] overall number of arguments |
theArgVec | [in] vector of arguments |
theArgIter | [in] [out] argument position to parse |
|
static |
Parses boolean argument at specified iterator position with optional on/off coming next. Similar to ParseOnOffIterator() but also reverses returned value if argument name starts with "no" prefix. E.g. if nominal argument is "cmd -usefeature [on|off|1|0]=on", then "-nousefeature" argument will return FALSE.
theArgsNb | [in] overall number of arguments |
theArgVec | [in] vector of arguments |
theArgIter | [in] [out] argument position to parse |
|
static |
Converts the numeric expression, that can involve DRAW variables, to a real value.
theExpressionString | the strings that contains the expression involving DRAW variables to be parsed |
theParsedRealValue | a real value that is a result of parsing |
|
static |
Defines Loads Draw plugins commands.
|
static |
Asks to repaint the screen after the current command.
|
static |
Sets a variable, a null handle clear the vartiable. Automatic display is context driven.
|
static |
Sets a variable. Display it if <Disp> is true.
|
static |
Sets a TCL string variable.
|
static |
Sets a numeric variable.
|
static |
sets progress indicator
|
static |
Defines Draw unit commands.
|
static |
Defines Draw variables handling commands.