0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / XSAlgo / XSAlgo.cxx
CommitLineData
b311480e 1// Created on: 2000-01-19
2// Created by: data exchange team
3// Copyright (c) 2000-2012 OPEN CASCADE SAS
4//
5// The content of this file is subject to the Open CASCADE Technology Public
6// License Version 6.5 (the "License"). You may not use the content of this file
7// except in compliance with the License. Please obtain a copy of the License
8// at http://www.opencascade.org and read it completely before using this file.
9//
10// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12//
13// The Original Code and all software distributed under the License is
14// distributed on an "AS IS" basis, without warranty of any kind, and the
15// Initial Developer hereby disclaims all such warranties, including without
16// limitation, any warranties of merchantability, fitness for a particular
17// purpose or non-infringement. Please see the License for the specific terms
18// and conditions governing the rights and limitations under the License.
19
7fd59977 20
21
22#include <XSAlgo.ixx>
23#include <ShapeAlgo.hxx>
24#include <ShapeProcess_OperLibrary.hxx>
25#include <Interface_Static.hxx>
26
27static Handle(XSAlgo_AlgoContainer) theContainer;
28
29//=======================================================================
30//function : Init
31//purpose :
32//=======================================================================
33
34 void XSAlgo::Init()
35{
36 static Standard_Boolean init = Standard_False;
37 if (init) return;
38 init = Standard_True;
39 ShapeAlgo::Init();
40 theContainer = new XSAlgo_AlgoContainer;
41
42 // init parameters
43 Interface_Static::Standards();
44
45 //#74 rln 10.03.99 S4135: adding new parameter for handling use of BRepLib::SameParameter
46 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", 'e',"");
47 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"ematch 0");
48 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval Off");
49 Interface_Static::Init("XSTEP" ,"read.stdsameparameter.mode", '&',"eval On");
50 Interface_Static::SetIVal ("read.stdsameparameter.mode",0);
51
52 // unit: supposed to be cascade unit (target unit for reading)
53 Interface_Static::Init("XSTEP","xstep.cascade.unit", 'e',"");
54 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"enum 1");
55 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval INCH"); // 1
56 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MM"); // 2
57 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval ??"); // 3
58 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval FT"); // 4
59 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MI"); // 5
60 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval M"); // 6
61 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval KM"); // 7
62 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval MIL"); // 8
63 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UM"); // 9
64 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval CM"); //10
65 Interface_Static::Init ("XSTEP","xstep.cascade.unit",'&',"eval UIN"); //11
66 Interface_Static::SetCVal ("xstep.cascade.unit","MM");
67
68 // unit : pour depannage / test de non regression 0 MM 1 M(ancien)
69 Interface_Static::Init("XSTEP" ,"read.scale.unit", 'e',"");
70 Interface_Static::Init("XSTEP","read.scale.unit",'&',"ematch 0");
71 Interface_Static::Init("XSTEP","read.scale.unit",'&',"eval MM");
72 Interface_Static::Init("XSTEP","read.scale.unit",'&',"eval M");
73 Interface_Static::SetIVal ("read.scale.unit",0);
74
75 // init Standard Shape Processing operators
76 ShapeProcess_OperLibrary::Init();
77}
78
79//=======================================================================
80//function : SetAlgoContainer
81//purpose :
82//=======================================================================
83
84 void XSAlgo::SetAlgoContainer(const Handle(XSAlgo_AlgoContainer)& aContainer)
85{
86 theContainer = aContainer;
87}
88
89//=======================================================================
90//function : AlgoContainer
91//purpose :
92//=======================================================================
93
94 Handle(XSAlgo_AlgoContainer) XSAlgo::AlgoContainer()
95{
96 return theContainer;
97}