0026762: Static parameter "read.scale.unit" is not used
[occt.git] / src / XSAlgo / XSAlgo.cxx
CommitLineData
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
42cf5bc1 16
17#include <Interface_Static.hxx>
7fd59977 18#include <ShapeAlgo.hxx>
19#include <ShapeProcess_OperLibrary.hxx>
42cf5bc1 20#include <XSAlgo.hxx>
21#include <XSAlgo_AlgoContainer.hxx>
7fd59977 22
23static Handle(XSAlgo_AlgoContainer) theContainer;
24
25//=======================================================================
26//function : Init
27//purpose :
28//=======================================================================
29
30 void XSAlgo::Init()
31{
32 static Standard_Boolean init = Standard_False;
33 if (init) return;
34 init = Standard_True;
35 ShapeAlgo::Init();
36 theContainer = new XSAlgo_AlgoContainer;
37
38 // init parameters
39 Interface_Static::Standards();
40
41 //#74 rln 10.03.99 S4135: adding new parameter for handling use of BRepLib::SameParameter
42 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", 'e',"");
43 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"ematch 0");
44 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval Off");
45 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval On");
46 Interface_Static::SetIVal ("read.stdsameparameter.mode",0);
47
48 // unit: supposed to be cascade unit (target unit for reading)
49 Interface_Static::Init("XSTEP","xstep.cascade.unit", 'e',"");
50 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"enum 1");
51 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval INCH"); // 1
52 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MM"); // 2
53 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval ??"); // 3
54 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval FT"); // 4
55 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MI"); // 5
56 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval M"); // 6
57 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval KM"); // 7
58 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MIL"); // 8
59 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UM"); // 9
60 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval CM"); //10
61 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UIN"); //11
62 Interface_Static::SetCVal ("xstep.cascade.unit","MM");
63
7fd59977 64 // init Standard Shape Processing operators
65 ShapeProcess_OperLibrary::Init();
66}
67
68//=======================================================================
69//function : SetAlgoContainer
70//purpose :
71//=======================================================================
72
73 void XSAlgo::SetAlgoContainer(const Handle(XSAlgo_AlgoContainer)& aContainer)
74{
75 theContainer = aContainer;
76}
77
78//=======================================================================
79//function : AlgoContainer
80//purpose :
81//=======================================================================
82
83 Handle(XSAlgo_AlgoContainer) XSAlgo::AlgoContainer()
84{
85 return theContainer;
86}