0024428: Implementation of LGPL license
[occt.git] / src / Interface / Interface_StaticStandards.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and / or modify it
6 // under the terms of the GNU Lesser General Public version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 //#74 rln 10.03.99 S4135: new parameters, values and default values
15 //    gka 10.04.99 S4136: eliminate parameter 'lastpreci'
16 //S4181 pdn 23.04.99: adding new parameter handling writing of elementary surfaces
17 #include <Interface_Static.hxx>
18 #include <Message_MsgFile.hxx>
19 #include <TCollection_ExtendedString.hxx>
20 //tatouage de la librairie
21 #include <Precision.hxx>
22 #include <stdio.h>
23
24
25 static int deja = 0;
26
27 void  Interface_Static::Standards ()
28 {
29   if (deja) return;  deja = 1;
30
31 //   read precision
32   //#74 rln 10.03.99 S4135: new values and default value
33   Interface_Static::Init ("XSTEP","read.precision.mode",'e',"");
34   Interface_Static::Init ("XSTEP","read.precision.mode",'&',"ematch 0");
35   Interface_Static::Init ("XSTEP","read.precision.mode",'&',"eval File");
36   Interface_Static::Init ("XSTEP","read.precision.mode",'&',"eval User");
37   Interface_Static::SetIVal ("read.precision.mode",0);
38
39   Interface_Static::Init ("XSTEP","read.precision.val",'r',"1.e-03");
40
41   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'e',"");
42   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"ematch 0");
43   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"eval Preferred");
44   Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"eval Forced");
45   Interface_Static::SetIVal ("read.maxprecision.mode",0);
46
47   Interface_Static::Init ("XSTEP","read.maxprecision.val",'r',"1.");
48
49 //   encode regularity
50 //  negatif ou nul : ne rien faire. positif : on y va
51   Interface_Static::Init ("XSTEP","read.encoderegularity.angle",'r',"0.01");
52
53 //   compute surface curves
54 //  0 : par defaut. 2 : ne garder que le 2D. 3 : ne garder que le 3D
55   //gka S4054
56   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", 'e',"");
57   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"ematch -3");
58   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 3DUse_Forced");
59   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 2DUse_Forced");
60   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval ?");
61   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval Default");
62   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval ?");
63   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 2DUse_Preferred");
64   Interface_Static::Init("XSTEP"  ,"read.surfacecurve.mode", '&',"eval 3DUse_Preferred");
65   Interface_Static::SetIVal ("read.surfacecurve.mode",0);
66
67 //   write precision
68   Interface_Static::Init ("XSTEP","write.precision.mode",'e',"");
69   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"ematch -1");
70   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Min");
71   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Average");
72   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Max");
73   Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval User");
74   Interface_Static::SetIVal ("write.precision.mode",0);
75
76   Interface_Static::Init ("XSTEP","write.precision.val",'r',"1.e-03");
77
78   // Write surface curves
79   // 0: write (defaut), 1: do not write, 2: write except for analytical surfaces
80   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", 'e',"");
81   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"ematch 0");
82   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"eval Off");
83   Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"eval On");
84 //  Interface_Static::Init("XSTEP"  ,"write.surfacecurve.mode", '&',"eval NoAnalytic");
85   Interface_Static::SetIVal ("write.surfacecurve.mode",1);
86
87 //  lastpreci : pour recuperer la derniere valeur codee (cf XSControl)
88 //    (0 pour dire : pas codee)
89 //:S4136  Interface_Static::Init("std"    ,"lastpreci", 'r',"0.");
90
91
92 //  ****  MESSAGERIE DE BASE  ****
93
94 //  Chargement "manuel" au cas ou les fichiers, env, etc sont KO
95
96   Message_MsgFile::AddMsg ("XSTEP_1","Beginning of IGES file memory loading.");
97   Message_MsgFile::AddMsg ("XSTEP_2","File opening error");
98   Message_MsgFile::AddMsg ("XSTEP_3","Reason : No such file or directory");
99   Message_MsgFile::AddMsg ("XSTEP_4","Reason : Not enough space");
100   Message_MsgFile::AddMsg ("XSTEP_5","Reason : Permission denied");
101   Message_MsgFile::AddMsg ("XSTEP_6","Reason : Too many open files");
102   Message_MsgFile::AddMsg ("XSTEP_7","Reason : Undetermined");
103   Message_MsgFile::AddMsg ("XSTEP_8","End of loading IGES file to memory (Elapsed time : %s).");
104
105   Message_MsgFile::AddMsg ("XSTEP_11","Internal error during the file header reading. The process continues");
106   Message_MsgFile::AddMsg ("XSTEP_13","Internal error during the reading of the entity %d");
107   Message_MsgFile::AddMsg ("XSTEP_14","Internal error during the reading of the entity %d (parameter %d)");
108   Message_MsgFile::AddMsg ("XSTEP_15","Total number of loaded entities : %d.");
109   Message_MsgFile::AddMsg ("XSTEP_16","Beginning of the model loading");
110   Message_MsgFile::AddMsg ("XSTEP_17","End of the model loading");
111   Message_MsgFile::AddMsg ("XSTEP_21","Number of ignored Null Entities : %d");
112   Message_MsgFile::AddMsg ("XSTEP_22","Entity %s : unknown");
113   Message_MsgFile::AddMsg ("XSTEP_23","Entity %s, Type %s : recovered");
114   Message_MsgFile::AddMsg ("XSTEP_24","Report : %d unknown entities");
115   Message_MsgFile::AddMsg ("XSTEP_25","Number of fail in memory loading : %d.");
116   Message_MsgFile::AddMsg ("XSTEP_26","Number of warning in memory loading : %d.");
117
118 //  Chargement du vrai fichier langue
119   Message_MsgFile::LoadFromEnv ("CSF_XSMessage","XSTEP");
120 }