b311480e |
1 | // Created on: 2000-01-19 |
2 | // Created by: data exchange team |
973c2be1 |
3 | // Copyright (c) 2000-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | #include <XSAlgo.ixx> |
17 | #include <ShapeAlgo.hxx> |
18 | #include <ShapeProcess_OperLibrary.hxx> |
19 | #include <Interface_Static.hxx> |
20 | |
21 | static Handle(XSAlgo_AlgoContainer) theContainer; |
22 | |
23 | //======================================================================= |
24 | //function : Init |
25 | //purpose : |
26 | //======================================================================= |
27 | |
28 | void XSAlgo::Init() |
29 | { |
30 | static Standard_Boolean init = Standard_False; |
31 | if (init) return; |
32 | init = Standard_True; |
33 | ShapeAlgo::Init(); |
34 | theContainer = new XSAlgo_AlgoContainer; |
35 | |
36 | // init parameters |
37 | Interface_Static::Standards(); |
38 | |
39 | //#74 rln 10.03.99 S4135: adding new parameter for handling use of BRepLib::SameParameter |
40 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", 'e',""); |
41 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"ematch 0"); |
42 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval Off"); |
43 | Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval On"); |
44 | Interface_Static::SetIVal ("read.stdsameparameter.mode",0); |
45 | |
46 | // unit: supposed to be cascade unit (target unit for reading) |
47 | Interface_Static::Init("XSTEP","xstep.cascade.unit", 'e',""); |
48 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"enum 1"); |
49 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval INCH"); // 1 |
50 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MM"); // 2 |
51 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval ??"); // 3 |
52 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval FT"); // 4 |
53 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MI"); // 5 |
54 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval M"); // 6 |
55 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval KM"); // 7 |
56 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MIL"); // 8 |
57 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UM"); // 9 |
58 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval CM"); //10 |
59 | Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UIN"); //11 |
60 | Interface_Static::SetCVal ("xstep.cascade.unit","MM"); |
61 | |
62 | // unit : pour depannage / test de non regression 0 MM 1 M(ancien) |
63 | Interface_Static::Init("XSTEP" ,"read.scale.unit", 'e',""); |
64 | Interface_Static::Init("XSTEP","read.scale.unit",'&',"ematch 0"); |
65 | Interface_Static::Init("XSTEP","read.scale.unit",'&',"eval MM"); |
66 | Interface_Static::Init("XSTEP","read.scale.unit",'&',"eval M"); |
67 | Interface_Static::SetIVal ("read.scale.unit",0); |
68 | |
69 | // init Standard Shape Processing operators |
70 | ShapeProcess_OperLibrary::Init(); |
71 | } |
72 | |
73 | //======================================================================= |
74 | //function : SetAlgoContainer |
75 | //purpose : |
76 | //======================================================================= |
77 | |
78 | void XSAlgo::SetAlgoContainer(const Handle(XSAlgo_AlgoContainer)& aContainer) |
79 | { |
80 | theContainer = aContainer; |
81 | } |
82 | |
83 | //======================================================================= |
84 | //function : AlgoContainer |
85 | //purpose : |
86 | //======================================================================= |
87 | |
88 | Handle(XSAlgo_AlgoContainer) XSAlgo::AlgoContainer() |
89 | { |
90 | return theContainer; |
91 | } |