|
Open CASCADE Technology
6.7.1
|
Basic package to work functions of X-STEP (IFSelect & Co)
under control of DRAW
Works with some "static" data : a SessionPilot (used to run)
with its WorkSession and Model and TransferReader, a
FinderProcess
More...
#include <XSDRAW.hxx>
Static Public Member Functions | |
| static void | ChangeCommand (const Standard_CString oldname, const Standard_CString newname) |
| Takes variables to/from the DRAW session //! Implements ProgressIndicator for DRAW //! Changes the name under which a command of xstep is known by Draw. This allows to avoid collisions To be called before LoadDraw or any other xstep initialisation More... | |
| static void | RemoveCommand (const Standard_CString oldname) |
| Removes a command from the interpretation list of Draw To be called before LoadDraw or any other xstep initialisation More... | |
| static Standard_Boolean | LoadSession () |
| Defines the basic context to work with a X-STEP Session : it performs the basic inits, also records the Controller If the Controller is not yet set, it must be set after (call to SetController) LoadSession is called by LoadDraw Returns True the first time, False if already called More... | |
| static void | LoadDraw (Draw_Interpretor &theCommands) |
Defines the context for using a X-STEP Session under DRAW <br>
Once the various INITs have been done, a call to LoadDraw <br>
records the defined commands for the X-STEP SessionPilot, <br>
into the DRAW interpretation list. <br>
"Set" commands are accessed under command xset <br>
SDS>xset name command ... <br>
Other commands can be accessed directly or under command xstep <br>
SDS>command ... and SDS>xstep command ... are equivalent <br>
| |
| static Standard_Integer | Execute (const Standard_CString command, const Standard_CString var="") |
| Allows to execute a xstep-draw command from C++ program Fixed form : Execute("command args..."); Form with a variable text part : add s for the variable : Execute ("command args %s args..",var) [var is a CString] Returns the same value as returned by call from DRAW More... | |
| static Handle_IFSelect_SessionPilot | Pilot () |
| Returns the SessionPilot (can be used for direct call) More... | |
| static Handle_XSControl_WorkSession | Session () |
| Returns the WorkSession defined in AddDraw (through Pilot) It is from XSControl, it brings functionnalities for Transfers More... | |
| static void | SetController (const Handle< XSControl_Controller > &control) |
| Defines a Controller for the command "xinit" and applies it (i.e. calls its method Customise) More... | |
| static Handle_XSControl_Controller | Controller () |
| Returns the Controller, a Null Handle if not yet defined More... | |
| static Standard_Boolean | SetNorm (const Standard_CString normname, const Standard_CString profile="") |
| Sets a norm by its name (controller recorded as <normname> ) Returns True if done, False if this norm is unknown If <profile> is given, also sets the norm to <profile> (if <profile> is undefined for <normname>, it is ignored) More... | |
| static Handle_Interface_Protocol | Protocol () |
| Returns the actually defined Protocol More... | |
| static Handle_Interface_InterfaceModel | Model () |
| Returns the Model of the Session (it is Session()->Model() ) More... | |
| static void | SetModel (const Handle< Interface_InterfaceModel > &model, const Standard_CString file="") |
| Sets a Model in session (it is Session()->SetModel(model) ) If <file> is defined, SetLoadedFile is also done More... | |
| static Handle_Interface_InterfaceModel | NewModel () |
| Produces a new model (from the Controller), can be Null Does not set it in the session More... | |
| static Handle_Standard_Transient | Entity (const Standard_Integer num) |
| Returns the entity n0 <num> of the Model of the Session (it is StartingEntity) Null Handle if <num> is not suitable More... | |
| static Standard_Integer | Number (const Handle< Standard_Transient > &ent) |
| Returns the number of an entity in the Model (StartingNumber) 0 if <ent> unknown in the model, or null More... | |
| static void | SetTransferProcess (const Handle< Standard_Transient > &TP) |
| Sets a TransferProcess in order to analyse it (see Activator) It can be either a FinderProcess or a TransientProcess, in that case a new TransferReader is created on it More... | |
| static Handle_Transfer_TransientProcess | TransientProcess () |
| Returns the TransferProcess : TransientProcess detained by the TransferReader More... | |
| static Handle_Transfer_FinderProcess | FinderProcess () |
| Returns the FinderProcess, detained by the TransferWriter More... | |
| static void | InitTransferReader (const Standard_Integer mode) |
| Initialises a TransferReader, according to mode : 0 nullifies it, 1 clears it (not nullify) 2 sets it with TransientProcess & Model 3 idem plus roots of TransientProcess Remark : called with 0 at least at each SetModel/NewModel More... | |
| static Handle_XSControl_TransferReader | TransferReader () |
| Returns the current TransferReader, can be null It detains the TransientProcess More... | |
| static Handle_Standard_Transient | GetEntity (const Standard_CString name="") |
| Takes the name of an entity, either as argument, or (if <name> is empty) on keybord, and returns the entity name can be a label or a number (in alphanumeric), it is searched by NumberFromLabel from WorkSession. If <name> doesn't match en entity, a Null Handle is returned More... | |
| static Standard_Integer | GetEntityNumber (const Standard_CString name="") |
| Same as GetEntity, but returns the number in the model of the entity. Returns 0 for null handle More... | |
| static Handle_TColStd_HSequenceOfTransient | GetList (const Standard_CString first="", const Standard_CString second="") |
| Evaluates and returns a list of entity, from : keyboard if <first> and <second> are empty, see below first if second is empty : can be a number/label of an entity or the name of a selection to be evaluated (standard) first : name of a selection, evaluated from a list defined by second In case of failure, returns a Null Handle More... | |
| static Standard_Boolean | FileAndVar (const Standard_CString file, const Standard_CString var, const Standard_CString def, TCollection_AsciiString &resfile, TCollection_AsciiString &resvar) |
Analyses given file name and variable name, with a default <br>
name for variables. Returns resulting file name and variable <br>
name plus status "file to read"(True) or "already read"(False) <br>
In the latter case, empty resfile means no file available <br>
| |
| static Standard_Integer | MoreShapes (Handle< TopTools_HSequenceOfShape > &list, const Standard_CString name) |
Analyses a name as designating Shapes from DRAW variables or <br>
XSTEP transfer (last Transfer on Reading). <name> can be : <br>
"*" : all the root shapes produced by last Transfer (Read) <br>
i.e. considers roots of the TransientProcess <br>
a name : a name of a variable DRAW <br>
If null, it is firstly created. Then it is | |
Basic package to work functions of X-STEP (IFSelect & Co)
under control of DRAW
Works with some "static" data : a SessionPilot (used to run)
with its WorkSession and Model and TransferReader, a
FinderProcess
|
static |
Takes variables to/from the DRAW session
//! Implements ProgressIndicator for DRAW
//! Changes the name under which a command of xstep is known by
Draw. This allows to avoid collisions
To be called before LoadDraw or any other xstep initialisation
|
static |
Returns the Controller, a Null Handle if not yet defined
|
static |
Returns the entity n0 <num> of the Model of the Session
(it is StartingEntity)
Null Handle if <num> is not suitable
|
static |
Allows to execute a xstep-draw command from C++ program
Fixed form : Execute("command args...");
Form with a variable text part : add s for the variable :
Execute ("command args %s args..",var) [var is a CString]
Returns the same value as returned by call from DRAW
|
static |
Analyses given file name and variable name, with a default <br>
name for variables. Returns resulting file name and variable <br>
name plus status "file to read"(True) or "already read"(False) <br>
In the latter case, empty resfile means no file available <br>
If <file> is null or empty or equates ".", considers Session
and returned status is False
Else, returns resfile = file and status is True
If is neither null nor empty, resvar = var
Else, the root part of <resfile> is considered, if defined
Else, <def> is taken
|
static |
Returns the FinderProcess, detained by the TransferWriter
|
static |
Takes the name of an entity, either as argument, or (if <name>
is empty) on keybord, and returns the entity
name can be a label or a number (in alphanumeric), it is
searched by NumberFromLabel from WorkSession.
If <name> doesn't match en entity, a Null Handle is returned
|
static |
Same as GetEntity, but returns the number in the model of the
entity. Returns 0 for null handle
|
static |
Evaluates and returns a list of entity, from :
keyboard if <first> and <second> are empty, see below
first if second is empty : can be a number/label of an entity
or the name of a selection to be evaluated (standard)
first : name of a selection, evaluated from a list defined by
second
In case of failure, returns a Null Handle
|
static |
Initialises a TransferReader, according to mode :
0 nullifies it, 1 clears it (not nullify)
2 sets it with TransientProcess & Model
3 idem plus roots of TransientProcess
Remark : called with 0 at least at each SetModel/NewModel
|
static |
Defines the context for using a X-STEP Session under DRAW <br>
Once the various INITs have been done, a call to LoadDraw <br>
records the defined commands for the X-STEP SessionPilot, <br>
into the DRAW interpretation list. <br>
"Set" commands are accessed under command xset <br>
SDS>xset name command ... <br>
Other commands can be accessed directly or under command xstep <br>
SDS>command ... and SDS>xstep command ... are equivalent <br>
Only the command xinit is accessed directly only :
SDS>xinit (from the already defined Controller)
SDS>xinit iges (first defines the Controller as for "iges")
It also records the function to be called by DRAW (not
declared because specific).
And it defines the context variables, i.e. a WorkSession, then
it calls SetController with the currently defined Controller
Remark : at least, the standard commands are recorded
See also Controller : it is part of the Context, but it must
be precised separately
|
static |
Defines the basic context to work with a X-STEP Session :
it performs the basic inits, also records the Controller
If the Controller is not yet set, it must be set after
(call to SetController)
LoadSession is called by LoadDraw
Returns True the first time, False if already called
|
static |
|
static |
Analyses a name as designating Shapes from DRAW variables or <br>
XSTEP transfer (last Transfer on Reading). <name> can be : <br>
"*" : all the root shapes produced by last Transfer (Read) <br>
i.e. considers roots of the TransientProcess <br>
a name : a name of a variable DRAW <br>
Returns the count of designated Shapes. Their list is put in
If
null, it is firstly created. Then it is
completed (Append without Clear) by the Shapes found
Returns 0 if no Shape could be found
|
static |
Produces a new model (from the Controller), can be Null
Does not set it in the session
|
static |
Returns the number of an entity in the Model (StartingNumber)
0 if <ent> unknown in the model, or null
|
static |
Returns the SessionPilot (can be used for direct call)
|
static |
Returns the actually defined Protocol
|
static |
Removes a command from the interpretation list of Draw
To be called before LoadDraw or any other xstep initialisation
|
static |
Returns the WorkSession defined in AddDraw (through Pilot)
It is from XSControl, it brings functionnalities for Transfers
|
static |
Defines a Controller for the command "xinit" and applies it
(i.e. calls its method Customise)
|
static |
Sets a Model in session (it is Session()->SetModel(model) )
If <file> is defined, SetLoadedFile is also done
|
static |
Sets a norm by its name (controller recorded as <normname> )
Returns True if done, False if this norm is unknown
If <profile> is given, also sets the norm to <profile>
(if <profile> is undefined for <normname>, it is ignored)
|
static |
Sets a TransferProcess in order to analyse it (see Activator)
It can be either a FinderProcess or a TransientProcess, in
that case a new TransferReader is created on it
|
static |
Returns the current TransferReader, can be null
It detains the TransientProcess
|
static |
Returns the TransferProcess : TransientProcess detained by
the TransferReader
1.8.5