b349335c121f6203943a79b96b5815e74e0a5b7f
[occt.git] / src / STEPControl / STEPControl_Controller.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 under
6 // the terms of the GNU Lesser General Public License 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 //:j4 gka 16.03.99 S4134
15 //    gka 05.04.99 S4136: parameters definitions changed
16
17 #include <APIHeaderSection_EditHeader.hxx>
18 #include <APIHeaderSection_MakeHeader.hxx>
19 #include <HeaderSection.hxx>
20 #include <IFSelect_EditForm.hxx>
21 #include <IFSelect_SelectModelRoots.hxx>
22 #include <IFSelect_SelectSignature.hxx>
23 #include <IFSelect_SignAncestor.hxx>
24 #include <IFSelect_SignCounter.hxx>
25 #include <Interface_InterfaceModel.hxx>
26 #include <Interface_Macros.hxx>
27 #include <Interface_Static.hxx>
28 #include <MoniTool_Option.hxx>
29 #include <MoniTool_Profile.hxx>
30 #include <RWHeaderSection.hxx>
31 #include <RWStepAP214.hxx>
32 #include <Standard_Type.hxx>
33 #include <Standard_Version.hxx>
34 #include <STEPControl_ActorRead.hxx>
35 #include <STEPControl_ActorWrite.hxx>
36 #include <STEPControl_Controller.hxx>
37 #include <StepData_FileProtocol.hxx>
38 #include <StepData_StepModel.hxx>
39 #include <STEPEdit.hxx>
40 #include <STEPEdit_EditContext.hxx>
41 #include <STEPEdit_EditSDR.hxx>
42 #include <StepSelect_StepType.hxx>
43 #include <StepSelect_WorkLibrary.hxx>
44 #include <STEPSelections_SelectAssembly.hxx>
45 #include <STEPSelections_SelectDerived.hxx>
46 #include <STEPSelections_SelectFaces.hxx>
47 #include <STEPSelections_SelectForTransfer.hxx>
48 #include <STEPSelections_SelectGSCurves.hxx>
49 #include <STEPSelections_SelectInstances.hxx>
50 #include <TCollection_HAsciiString.hxx>
51 #include <TopoDS_Shape.hxx>
52 #include <Transfer_ActorOfTransientProcess.hxx>
53 #include <Transfer_FinderProcess.hxx>
54 #include <XSAlgo.hxx>
55 #include <XSControl_WorkSession.hxx>
56
57 IMPLEMENT_STANDARD_RTTIEXT(STEPControl_Controller,XSControl_Controller)
58
59 //#include <StepAP214.hxx>
60 //  Pour NewModel et Write : definition de produit (temporaire ...)
61 STEPControl_Controller::STEPControl_Controller ()
62      : XSControl_Controller ("STEP", "step")
63 {
64   static Standard_Boolean init = Standard_False;
65   if (!init) {
66     RWHeaderSection::Init();  RWStepAP214::Init();
67
68     Interface_Static::Init ("step","write.step.product.name",'t',"Open CASCADE STEP translator " OCC_VERSION_STRING);
69     Interface_Static::Init ("step","write.step.assembly",'e',"");
70     Interface_Static::Init ("step","write.step.assembly",'&',"enum 0");
71     Interface_Static::Init ("step","write.step.assembly",'&',"eval Off");
72     Interface_Static::Init ("step","write.step.assembly",'&',"eval On");
73     Interface_Static::Init ("step","write.step.assembly",'&',"eval Auto");
74     Interface_Static::SetCVal("write.step.assembly","Auto"); 
75
76     Interface_Static::Init("step","step.angleunit.mode", 'e',"");
77     Interface_Static::Init("step","step.angleunit.mode", '&',"enum 0");
78     Interface_Static::Init("step","step.angleunit.mode", '&',"eval File");
79     Interface_Static::Init("step","step.angleunit.mode", '&',"eval Rad");
80     Interface_Static::Init("step","step.angleunit.mode", '&',"eval Deg");
81     Interface_Static::SetCVal("step.angleunit.mode","File"); 
82
83     Interface_Static::Init("step","write.step.schema", 'e',"");  
84     Interface_Static::Init("step","write.step.schema",'&',"enum 1");
85     Interface_Static::Init("step","write.step.schema",'&',"eval AP214CD");
86     Interface_Static::Init("step","write.step.schema",'&',"eval AP214DIS");
87     Interface_Static::Init("step","write.step.schema",'&',"eval AP203");
88     Interface_Static::Init("step","write.step.schema",'&',"eval AP214IS");
89     Interface_Static::Init("step","write.step.schema",'&',"eval AP242DIS");
90     Interface_Static::SetCVal("write.step.schema","AP214IS"); 
91
92     // Type of Product Definition for reading
93     // Note: the numbers should be consistent with function FindShapeReprType()
94     // in STEPControl_ActorRead.cxx
95     Interface_Static::Init("step","read.step.shape.repr",'e',"");
96     Interface_Static::Init("step","read.step.shape.repr",'&',"enum 1");
97     Interface_Static::Init("step","read.step.shape.repr",'&',"eval All");   // 1
98     Interface_Static::Init("step","read.step.shape.repr",'&',"eval ABSR");  // 2
99     Interface_Static::Init("step","read.step.shape.repr",'&',"eval MSSR");  // 3
100     Interface_Static::Init("step","read.step.shape.repr",'&',"eval GBSSR"); // 4
101     Interface_Static::Init("step","read.step.shape.repr",'&',"eval FBSR");  // 5
102     Interface_Static::Init("step","read.step.shape.repr",'&',"eval EBWSR"); // 6
103     Interface_Static::Init("step","read.step.shape.repr",'&',"eval GBWSR"); // 7
104     Interface_Static::SetCVal("read.step.shape.repr","All");
105
106     // Mode for reading shapes attached to main SDR by SRR
107     // (hybrid model representation in AP203 since 1998)
108     Interface_Static::Init("step","read.step.shape.relationship",'e',"");
109     Interface_Static::Init("step","read.step.shape.relationship",'&',"enum 0");
110     Interface_Static::Init("step","read.step.shape.relationship",'&',"eval OFF");
111     Interface_Static::Init("step","read.step.shape.relationship",'&',"eval ON");
112     Interface_Static::SetCVal("read.step.shape.relationship","ON");
113
114     // Mode for reading shapes attached to Product by ShapeAspect 
115     // (hybrid model representation in AP203 before 1998)
116     Interface_Static::Init("step","read.step.shape.aspect",'e',"");
117     Interface_Static::Init("step","read.step.shape.aspect",'&',"enum 0");
118     Interface_Static::Init("step","read.step.shape.aspect",'&',"eval OFF");
119     Interface_Static::Init("step","read.step.shape.aspect",'&',"eval ON");
120     Interface_Static::SetCVal("read.step.shape.aspect","ON");
121
122     // Mode for reading SDR and ShapeRepr if it is necessary
123     Interface_Static::Init("step","read.step.product.mode",'e',"");
124     Interface_Static::Init("step","read.step.product.mode",'&',"enum 0");
125     Interface_Static::Init("step","read.step.product.mode",'&',"eval OFF");
126     Interface_Static::Init("step","read.step.product.mode",'&',"eval ON");
127     Interface_Static::SetCVal("read.step.product.mode","ON");
128
129     // Order of reading ShapeDefinitionRepresentation in ProductDefinition
130     Interface_Static::Init("step","read.step.product.context",'e',"");
131     Interface_Static::Init("step","read.step.product.context",'&',"enum 1");
132     Interface_Static::Init("step","read.step.product.context",'&',"eval all");     // 1
133     Interface_Static::Init("step","read.step.product.context",'&',"eval design");  // 2
134     Interface_Static::Init("step","read.step.product.context",'&',"eval analysis");// 3
135     Interface_Static::SetCVal("read.step.product.context","all");
136
137     // What we try to read in ProductDefinition
138     Interface_Static::Init("step","read.step.assembly.level",'e',"");
139     Interface_Static::Init("step","read.step.assembly.level",'&',"enum 1");
140     Interface_Static::Init("step","read.step.assembly.level",'&',"eval all");      // 1
141     Interface_Static::Init("step","read.step.assembly.level",'&',"eval assembly"); // 2
142     Interface_Static::Init("step","read.step.assembly.level",'&',"eval structure");// 3
143     Interface_Static::Init("step","read.step.assembly.level",'&',"eval shape");    // 4
144     Interface_Static::SetCVal("read.step.assembly.level","all");
145
146     // unit: supposed to be cascade unit (target unit for reading)
147     Interface_Static::Init("step","write.step.unit", 'e',"");
148     Interface_Static::Init("step","write.step.unit",'&',"enum 1");
149     Interface_Static::Init("step","write.step.unit",'&',"eval INCH");  // 1
150     Interface_Static::Init("step","write.step.unit",'&',"eval MM");    // 2
151     Interface_Static::Init("step","write.step.unit",'&',"eval ??");    // 3
152     Interface_Static::Init("step","write.step.unit",'&',"eval FT");    // 4
153     Interface_Static::Init("step","write.step.unit",'&',"eval MI");    // 5
154     Interface_Static::Init("step","write.step.unit",'&',"eval M");     // 6
155     Interface_Static::Init("step","write.step.unit",'&',"eval KM");    // 7
156     Interface_Static::Init("step","write.step.unit",'&',"eval MIL");   // 8
157     Interface_Static::Init("step","write.step.unit",'&',"eval UM");    // 9
158     Interface_Static::Init("step","write.step.unit",'&',"eval CM");    //10
159     Interface_Static::Init("step","write.step.unit",'&',"eval UIN");   //11
160     Interface_Static::SetCVal ("write.step.unit","MM");
161
162     // Non-manifold topology reading: OFF by default (ssv; 26.11.2010)
163     Interface_Static::Init ("step","read.step.nonmanifold",'e',"");
164     Interface_Static::Init ("step","read.step.nonmanifold",'&',"enum 0");
165     Interface_Static::Init ("step","read.step.nonmanifold",'&',"eval Off");
166     Interface_Static::Init ("step","read.step.nonmanifold",'&',"eval On");
167     Interface_Static::SetIVal("read.step.nonmanifold",0); 
168
169     // Non-manifold topology writing: OFF by default (ssv; 26.11.2010)
170     Interface_Static::Init ("step","write.step.nonmanifold",'e',"");
171     Interface_Static::Init ("step","write.step.nonmanifold",'&',"enum 0");
172     Interface_Static::Init ("step","write.step.nonmanifold",'&',"eval Off");
173     Interface_Static::Init ("step","write.step.nonmanifold",'&',"eval On");
174     Interface_Static::SetIVal("write.step.nonmanifold",0); 
175
176     // I-Deas-like STEP processing: OFF by default (ssv; 22.11.2010)
177     Interface_Static::Init ("step","read.step.ideas",'e',"");
178     Interface_Static::Init ("step","read.step.ideas",'&',"enum 0");
179     Interface_Static::Init ("step","read.step.ideas",'&',"eval Off");
180     Interface_Static::Init ("step","read.step.ideas",'&',"eval On");
181     Interface_Static::SetIVal("read.step.ideas",0); 
182
183     //Parameter to write all free vertices in one SDR (name and style of vertex are lost) (default) 
184     //or each vertex in its own SDR (name and style of vertex are exported). (ika; 21.07.2014) 
185     Interface_Static::Init ("step","write.step.vertex.mode",'e',"");
186     Interface_Static::Init ("step","write.step.vertex.mode",'&',"enum 0");
187     Interface_Static::Init ("step","write.step.vertex.mode",'&',"eval One Compound");
188     Interface_Static::Init ("step","write.step.vertex.mode",'&',"eval Single Vertex");
189     Interface_Static::SetIVal("write.step.vertex.mode",0);
190   
191     // abv 15.11.00: ShapeProcessing
192     Interface_Static::Init ("XSTEP","write.step.resource.name",'t',"STEP");
193     Interface_Static::Init ("XSTEP","read.step.resource.name",'t',"STEP");
194     Interface_Static::Init ("XSTEP","write.step.sequence",'t',"ToSTEP");
195     Interface_Static::Init ("XSTEP","read.step.sequence",'t',"FromSTEP");
196
197     init = Standard_True;
198   }
199
200   Handle(STEPControl_ActorWrite) ActWrite = new STEPControl_ActorWrite;
201   ActWrite->SetGroupMode (Interface_Static::IVal("write.step.assembly"));
202   theAdaptorWrite = ActWrite;
203
204   Handle(StepSelect_WorkLibrary) swl = new StepSelect_WorkLibrary;
205   swl->SetDumpLabel(1);
206   theAdaptorLibrary  = swl;
207   theAdaptorProtocol =  STEPEdit::Protocol();
208 //  theAdaptorProtocol =  StepAP214::Protocol();
209   theAdaptorRead     = new STEPControl_ActorRead;  // par ex pour Recognize
210
211   SetModeWrite (0,4);
212   SetModeWriteHelp (0,"As Is");
213   SetModeWriteHelp (1,"Faceted Brep");
214   SetModeWriteHelp (2,"Shell Based");
215   SetModeWriteHelp (3,"Manifold Solid");
216   SetModeWriteHelp (4,"Wireframe");
217   TraceStatic ("read.surfacecurve.mode",5);
218
219 //   ---  SELECTIONS, SIGNATURES, COMPTEURS, EDITEURS
220
221   DeclareAndCast(IFSelect_Selection,xmr,SessionItem("xst-model-roots"));
222   if (!xmr.IsNull()) {
223     Handle(IFSelect_Signature) sty = STEPEdit::SignType();
224     AddSessionItem (sty,"step-type");
225     Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter
226       (sty,Standard_False,Standard_True);
227     AddSessionItem (tys,"step-types");
228     theSignType = sty;
229
230     
231     //pdn S4133 18.02.99
232     Handle(IFSelect_SignAncestor)sta =  new IFSelect_SignAncestor();
233     AddSessionItem (sta,"xst-derived");
234     Handle(STEPSelections_SelectDerived) stdvar = new STEPSelections_SelectDerived();
235     stdvar->SetProtocol(STEPEdit::Protocol());
236     AddSessionItem (stdvar,"step-derived");
237     
238     Handle(IFSelect_SelectSignature) selsdr = STEPEdit::NewSelectSDR();
239     selsdr->SetInput (xmr);
240     AddSessionItem (selsdr,"step-shape-def-repr");
241     Handle(IFSelect_SelectSignature) selrrs = STEPEdit::NewSelectPlacedItem();
242 //    selrrs->SetInput (xmr);  deja prete avec ModelAll
243     AddSessionItem (selrrs,"step-placed-items");
244     Handle(IFSelect_SelectSignature) selsr = STEPEdit::NewSelectShapeRepr();
245 //    input deja pret avec ModelAll
246     AddSessionItem (selsr,"step-shape-repr");
247   }
248   
249   //pdn
250   Handle(STEPSelections_SelectFaces) stfaces = new STEPSelections_SelectFaces;
251   stfaces->SetInput (xmr);
252   AddSessionItem (stfaces,"step-faces");
253   
254   Handle(STEPSelections_SelectInstances) stinst = new STEPSelections_SelectInstances;
255   AddSessionItem (stinst,"step-instances");
256   
257   Handle(STEPSelections_SelectGSCurves) stcurves = new STEPSelections_SelectGSCurves;
258   stcurves->SetInput (xmr);
259   AddSessionItem (stcurves,"step-GS-curves");
260   
261   Handle(STEPSelections_SelectAssembly) assembly = new STEPSelections_SelectAssembly;
262   assembly->SetInput (xmr);
263   AddSessionItem (assembly,"step-assembly");
264   
265   Handle(APIHeaderSection_EditHeader) edhead = new APIHeaderSection_EditHeader;
266   Handle(IFSelect_EditForm) edheadf = new IFSelect_EditForm (edhead,Standard_False,Standard_True,"Step Header");
267   AddSessionItem (edhead,"step-header-edit");
268   AddSessionItem (edheadf,"step-header");
269
270   Handle(STEPEdit_EditContext) edctx = new STEPEdit_EditContext;
271   Handle(IFSelect_EditForm) edctxf = new IFSelect_EditForm (edctx,Standard_False,Standard_True,"STEP Product Definition Context");
272   AddSessionItem (edctx,"step-context-edit");
273   AddSessionItem (edctxf,"step-context");
274
275
276   Handle(STEPEdit_EditSDR) edsdr = new STEPEdit_EditSDR;
277   Handle(IFSelect_EditForm) edsdrf = new IFSelect_EditForm (edsdr,Standard_False,Standard_True,"STEP Product Data (SDR)");
278   AddSessionItem (edsdr,"step-SDR-edit");
279   AddSessionItem (edsdrf,"step-SDR-data");
280
281 //    ####    PROFILE    ####
282
283 //  ActorRead : on ajoute le cas Shape possible, a part du default
284 //  ainsi, on l a tjrs sous la main
285   Handle(MoniTool_Option) optacrd = Profile()->Option("tr-read");
286   optacrd->Add ("shape",theAdaptorRead);
287
288 //  ActorWrite : on ajoute les cas possibles (NB : shape == default)
289 //  On garde a part les cas shape compound (= shape traitee globale ou en
290 //   assembly), peuvent etre utiles. Tandis que les autres cas sont
291 //   susceptibles d etre remplaces si on fait du Model-Editor
292   Handle(MoniTool_Option) optacwr = Profile()->Option("tr-write");
293   Handle(STEPControl_ActorWrite) ActWSh = new STEPControl_ActorWrite;
294   ActWSh->SetGroupMode(0);
295   optacwr->Add ("shape",ActWSh);
296   Handle(STEPControl_ActorWrite) ActWA1 = new STEPControl_ActorWrite;
297   ActWA1->SetGroupMode(1);
298   optacwr->Add ("compound",ActWA1);
299   optacwr->Add ("assembly",ActWA1);
300   optacwr->Add ("SRWT",ActWA1);
301
302   Profile()->AddConf ("Shape");
303   Profile()->AddSwitch ("Shape","tr-write","shape");
304
305   Profile()->AddConf ("Assembly");
306   Profile()->AddSwitch ("Assembly","tr-write","SRWT");
307 }
308
309 Handle(Interface_InterfaceModel)  STEPControl_Controller::NewModel () const
310 {
311   return STEPEdit::NewModel();
312 }
313
314 Handle(Transfer_ActorOfTransientProcess)  STEPControl_Controller::ActorRead
315        (const Handle(Interface_InterfaceModel)& ) const
316 {
317   return theAdaptorRead;
318 }    // new Cc1ToTopoDSAct_Actor ??
319
320 //  ####    PROVISOIRE ???   ####
321
322 IFSelect_ReturnStatus  STEPControl_Controller::TransferWriteShape
323   (const TopoDS_Shape& shape,
324    const Handle(Transfer_FinderProcess)& FP,
325    const Handle(Interface_InterfaceModel)& model,
326    const Standard_Integer modeshape) const
327 {
328   if (modeshape < 0 || modeshape > 4) return IFSelect_RetError;
329   Handle(STEPControl_ActorWrite) ActWrite =
330     Handle(STEPControl_ActorWrite)::DownCast(theAdaptorWrite);
331 //    A PRESENT ON PASSE PAR LE PROFILE
332   if (!ActWrite.IsNull()) 
333     ActWrite->SetGroupMode (Interface_Static::IVal("write.step.assembly"));
334
335   return XSControl_Controller::TransferWriteShape (shape,FP,model,modeshape);
336 }
337
338 Standard_Boolean STEPControl_Controller::Init ()
339 {
340   static Standard_Boolean inic = Standard_False;
341   if (!inic) {
342     Handle(STEPControl_Controller) STEPCTL = new STEPControl_Controller;
343     STEPCTL->AutoRecord();  // avec les noms donnes a la construction
344     XSAlgo::Init();                                                                                                        
345     inic = Standard_True;
346   }
347   return Standard_True;
348 }
349 //=======================================================================
350 //function : Customise
351 //purpose  : 
352 //=======================================================================
353
354  void STEPControl_Controller::Customise(Handle(XSControl_WorkSession)& WS) 
355 {
356   XSControl_Controller::Customise(WS);
357   Handle(IFSelect_SelectModelRoots) slr;
358   Handle(Standard_Transient) slr1 = WS->NamedItem("xst-model-roots");
359   if(!slr1.IsNull())
360     slr = Handle(IFSelect_SelectModelRoots)::DownCast(slr1);
361   else  {
362     slr = new IFSelect_SelectModelRoots;
363     WS->AddNamedItem ("xst-model-roots",slr);
364   }
365   
366   
367   Handle(STEPSelections_SelectForTransfer) st1= new STEPSelections_SelectForTransfer;
368   st1->SetReader (WS->TransferReader());
369   WS->AddNamedItem ("xst-transferrable-roots",st1);
370   
371   
372    //DeclareAndCast(IFSelect_Selection,xmr,SessionItem("xst-model-roots"));
373   if (!slr.IsNull()) {
374     Handle(IFSelect_Signature) sty = STEPEdit::SignType();
375     WS->AddNamedItem ("step-type",sty);
376     
377     Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter
378       (sty,Standard_False,Standard_True);
379     WS->AddNamedItem ("step-types",tys);
380     theSignType = sty;
381
382     
383     //pdn S4133 18.02.99
384     Handle(IFSelect_SignAncestor)sta =  new IFSelect_SignAncestor();
385     WS->AddNamedItem ("xst-derived",sta);
386     Handle(STEPSelections_SelectDerived) stdvar = new STEPSelections_SelectDerived();
387     stdvar->SetProtocol(STEPEdit::Protocol());
388     WS->AddNamedItem ("step-derived",stdvar);
389     
390     Handle(IFSelect_SelectSignature) selsdr = STEPEdit::NewSelectSDR();
391     selsdr->SetInput (slr);
392     WS->AddNamedItem ("step-shape-def-repr",selsdr);
393     Handle(IFSelect_SelectSignature) selrrs = STEPEdit::NewSelectPlacedItem();
394 //    selrrs->SetInput (slr);  deja prete avec ModelAll
395     WS->AddNamedItem ("step-placed-items",selrrs);
396     Handle(IFSelect_SelectSignature) selsr = STEPEdit::NewSelectShapeRepr();
397 //    input deja pret avec ModelAll
398     WS->AddNamedItem ("step-shape-repr",selsr);
399   }
400   
401   //pdn
402   Handle(STEPSelections_SelectFaces) stfaces = new STEPSelections_SelectFaces;
403   stfaces->SetInput (slr);
404   WS->AddNamedItem ("step-faces",stfaces);
405   
406   Handle(STEPSelections_SelectInstances) stinst = new STEPSelections_SelectInstances;
407   WS->AddNamedItem ("step-instances",stinst);
408   
409   Handle(STEPSelections_SelectGSCurves) stcurves = new STEPSelections_SelectGSCurves;
410   stcurves->SetInput (slr);
411   WS->AddNamedItem ("step-GS-curves",stcurves);
412   
413   Handle(STEPSelections_SelectAssembly) assembly = new STEPSelections_SelectAssembly;
414   assembly->SetInput (slr);
415   WS->AddNamedItem ("step-assembly",assembly);
416   
417   Handle(APIHeaderSection_EditHeader) edhead = new APIHeaderSection_EditHeader;
418   Handle(IFSelect_EditForm) edheadf = new IFSelect_EditForm (edhead,Standard_False,Standard_True,"Step Header");
419   WS->AddNamedItem ("step-header-edit",edhead);
420   WS->AddNamedItem ("step-header",edheadf);
421
422   Handle(STEPEdit_EditContext) edctx = new STEPEdit_EditContext;
423   Handle(IFSelect_EditForm) edctxf = new IFSelect_EditForm (edctx,Standard_False,Standard_True,"STEP Product Definition Context");
424   WS->AddNamedItem ("step-context-edit",edctx);
425   WS->AddNamedItem ("step-context",edctxf);
426
427
428   Handle(STEPEdit_EditSDR) edsdr = new STEPEdit_EditSDR;
429   Handle(IFSelect_EditForm) edsdrf = new IFSelect_EditForm (edsdr,Standard_False,Standard_True,"STEP Product Data (SDR)");
430   WS->AddNamedItem ("step-SDR-edit",edsdr);
431   WS->AddNamedItem ("step-SDR-data",edsdrf);
432
433   
434   
435 }