0023384: Translate sub-shape names between XDE document and STEP

Sub-shapes naming translation between XDE and STEP implemented as an optional mode of Reader/Writer.
New static variables are now available: write.stepcaf.subshapes.name for Writer and read.stepcaf.subshapes.name for Reader (both have 0 values by default).
XOpen command implemented in scope of XDEDRAW asset.

Added test case bugs xde CR23384
This commit is contained in:
apn
2012-09-07 13:03:39 +04:00
committed by ssv
parent 9fe1ada847
commit 02a0b964f2
6 changed files with 459 additions and 7 deletions

View File

@@ -21,6 +21,7 @@
#include <STEPCAFControl_Controller.ixx>
#include <STEPCAFControl_ActorWrite.hxx>
#include <XSAlgo.hxx>
#include <Interface_Static.hxx>
//=======================================================================
//function : STEPCAFControl_Controller
@@ -45,9 +46,30 @@ Standard_Boolean STEPCAFControl_Controller::Init ()
inic = Standard_True;
// self-registering
Handle(STEPCAFControl_Controller) STEPCTL = new STEPCAFControl_Controller;
// do XSAlgo::Init, cause it does not called before.
// do XSAlgo::Init, cause it does not called before.
XSAlgo::Init();
// do something to avoid warnings...
STEPCTL->AutoRecord();
//-----------------------------------------------------------
// Few variables for advanced control of translation process
//-----------------------------------------------------------
// Indicates whether to write sub-shape names to 'Name' attributes of
// STEP Representation Items
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", 'e', "");
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "enum 0");
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval Off"); // 0
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval On"); // 1
Interface_Static::SetIVal("write.stepcaf.subshapes.name", 0); // Disabled by default
// Indicates whether to read sub-shape names from 'Name' attributes of
// STEP Representation Items
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", 'e', "");
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "enum 0");
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On"); // 1
Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
return Standard_True;
}