973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
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. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | #include <Interface_Static.hxx> |
ee5befae |
15 | |
7fd59977 |
16 | #include <Message_MsgFile.hxx> |
17 | #include <TCollection_ExtendedString.hxx> |
7fd59977 |
18 | #include <Precision.hxx> |
ee5befae |
19 | |
7fd59977 |
20 | #include <stdio.h> |
21 | |
ee5befae |
22 | #include "../XSMessage/XSMessage_XSTEP_us.pxx" |
7fd59977 |
23 | |
c48e2889 |
24 | static int THE_Interface_Static_deja = 0; |
7fd59977 |
25 | |
26 | void Interface_Static::Standards () |
27 | { |
c48e2889 |
28 | if (THE_Interface_Static_deja) |
29 | { |
30 | return; |
31 | } |
32 | |
33 | THE_Interface_Static_deja = 1; |
7fd59977 |
34 | |
35 | // read precision |
36 | //#74 rln 10.03.99 S4135: new values and default value |
37 | Interface_Static::Init ("XSTEP","read.precision.mode",'e',""); |
38 | Interface_Static::Init ("XSTEP","read.precision.mode",'&',"ematch 0"); |
39 | Interface_Static::Init ("XSTEP","read.precision.mode",'&',"eval File"); |
40 | Interface_Static::Init ("XSTEP","read.precision.mode",'&',"eval User"); |
41 | Interface_Static::SetIVal ("read.precision.mode",0); |
42 | |
43 | Interface_Static::Init ("XSTEP","read.precision.val",'r',"1.e-03"); |
44 | |
45 | Interface_Static::Init ("XSTEP","read.maxprecision.mode",'e',""); |
46 | Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"ematch 0"); |
47 | Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"eval Preferred"); |
48 | Interface_Static::Init ("XSTEP","read.maxprecision.mode",'&',"eval Forced"); |
49 | Interface_Static::SetIVal ("read.maxprecision.mode",0); |
50 | |
51 | Interface_Static::Init ("XSTEP","read.maxprecision.val",'r',"1."); |
52 | |
53 | // encode regularity |
54 | // negatif ou nul : ne rien faire. positif : on y va |
55 | Interface_Static::Init ("XSTEP","read.encoderegularity.angle",'r',"0.01"); |
56 | |
57 | // compute surface curves |
58 | // 0 : par defaut. 2 : ne garder que le 2D. 3 : ne garder que le 3D |
59 | //gka S4054 |
60 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", 'e',""); |
61 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"ematch -3"); |
62 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"eval 3DUse_Forced"); |
63 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"eval 2DUse_Forced"); |
64 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"eval ?"); |
65 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"eval Default"); |
66 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"eval ?"); |
67 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"eval 2DUse_Preferred"); |
68 | Interface_Static::Init("XSTEP" ,"read.surfacecurve.mode", '&',"eval 3DUse_Preferred"); |
69 | Interface_Static::SetIVal ("read.surfacecurve.mode",0); |
70 | |
71 | // write precision |
72 | Interface_Static::Init ("XSTEP","write.precision.mode",'e',""); |
73 | Interface_Static::Init ("XSTEP","write.precision.mode",'&',"ematch -1"); |
74 | Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Min"); |
75 | Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Average"); |
76 | Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval Max"); |
77 | Interface_Static::Init ("XSTEP","write.precision.mode",'&',"eval User"); |
78 | Interface_Static::SetIVal ("write.precision.mode",0); |
79 | |
80 | Interface_Static::Init ("XSTEP","write.precision.val",'r',"1.e-03"); |
81 | |
82 | // Write surface curves |
83 | // 0: write (defaut), 1: do not write, 2: write except for analytical surfaces |
84 | Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", 'e',""); |
85 | Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"ematch 0"); |
86 | Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval Off"); |
87 | Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval On"); |
88 | // Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval NoAnalytic"); |
89 | Interface_Static::SetIVal ("write.surfacecurve.mode",1); |
90 | |
91 | // lastpreci : pour recuperer la derniere valeur codee (cf XSControl) |
92 | // (0 pour dire : pas codee) |
93 | //:S4136 Interface_Static::Init("std" ,"lastpreci", 'r',"0."); |
94 | |
ee5befae |
95 | // load messages if needed |
96 | if (!Message_MsgFile::HasMsg ("XSTEP_1")) |
97 | { |
98 | if (!Message_MsgFile::LoadFromEnv ("CSF_XSMessage", "XSTEP")) |
99 | { |
100 | Message_MsgFile::LoadFromString (XSMessage_XSTEP_us, sizeof(XSMessage_XSTEP_us) - 1); |
101 | } |
102 | if (!Message_MsgFile::HasMsg ("XSTEP_1")) |
103 | { |
9775fa61 |
104 | throw Standard_ProgramError("Critical Error - message resources for Interface_Static are invalid or undefined!"); |
ee5befae |
105 | } |
106 | } |
7fd59977 |
107 | } |