7fd59977 |
1 | // File: XSAlgo.cxx |
2 | // Created: Wed Jan 19 17:51:01 2000 |
3 | // Author: data exchange team |
4 | // <det@nnov> |
5 | |
6 | |
7 | #include <XSAlgo.ixx> |
8 | #include <ShapeAlgo.hxx> |
9 | #include <ShapeProcess_OperLibrary.hxx> |
10 | #include <Interface_Static.hxx> |
11 | |
12 | static Handle(XSAlgo_AlgoContainer) theContainer; |
13 | |
14 | //======================================================================= |
15 | //function : Init |
16 | //purpose : |
17 | //======================================================================= |
18 | |
19 | void XSAlgo::Init() |
20 | { |
21 | static Standard_Boolean init = Standard_False; |
22 | if (init) return; |
23 | init = Standard_True; |
24 | ShapeAlgo::Init(); |
25 | theContainer = new XSAlgo_AlgoContainer; |
26 | |
27 | // init parameters |
28 | Interface_Static::Standards(); |
29 | |
30 | //#74 rln 10.03.99 S4135: adding new parameter for handling use of BRepLib::SameParameter |
31 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", 'e',""); |
32 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"ematch 0"); |
33 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval Off"); |
34 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval On"); |
35 | Interface_Static::SetIVal ("read.stdsameparameter.mode",0); |
36 | |
37 | // unit: supposed to be cascade unit (target unit for reading) |
38 | Interface_Static::Init("XSTEP","xstep.cascade.unit", 'e',""); |
39 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"enum 1"); |
40 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval INCH"); // 1 |
41 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MM"); // 2 |
42 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval ??"); // 3 |
43 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval FT"); // 4 |
44 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MI"); // 5 |
45 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval M"); // 6 |
46 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval KM"); // 7 |
47 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MIL"); // 8 |
48 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UM"); // 9 |
49 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval CM"); //10 |
50 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UIN"); //11 |
51 | Interface_Static::SetCVal ("xstep.cascade.unit","MM"); |
52 | |
53 | // unit : pour depannage / test de non regression 0 MM 1 M(ancien) |
54 | Interface_Static::Init("XSTEP" ,"read.scale.unit", 'e',""); |
55 | Interface_Static::Init("XSTEP","read.scale.unit",'&',"ematch 0"); |
56 | Interface_Static::Init("XSTEP","read.scale.unit",'&',"eval MM"); |
57 | Interface_Static::Init("XSTEP","read.scale.unit",'&',"eval M"); |
58 | Interface_Static::SetIVal ("read.scale.unit",0); |
59 | |
60 | // init Standard Shape Processing operators |
61 | ShapeProcess_OperLibrary::Init(); |
62 | } |
63 | |
64 | //======================================================================= |
65 | //function : SetAlgoContainer |
66 | //purpose : |
67 | //======================================================================= |
68 | |
69 | void XSAlgo::SetAlgoContainer(const Handle(XSAlgo_AlgoContainer)& aContainer) |
70 | { |
71 | theContainer = aContainer; |
72 | } |
73 | |
74 | //======================================================================= |
75 | //function : AlgoContainer |
76 | //purpose : |
77 | //======================================================================= |
78 | |
79 | Handle(XSAlgo_AlgoContainer) XSAlgo::AlgoContainer() |
80 | { |
81 | return theContainer; |
82 | } |