0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / STEPCAFControl / STEPCAFControl_Controller.cxx
... / ...
CommitLineData
1// Created on: 2000-10-05
2// Created by: Andrey BETENEV
3// Copyright (c) 2000-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16
17#include <Interface_Static.hxx>
18#include <Standard_Type.hxx>
19#include <STEPCAFControl_ActorWrite.hxx>
20#include <STEPCAFControl_Controller.hxx>
21#include <XSAlgo.hxx>
22
23IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Controller,STEPControl_Controller)
24
25//=======================================================================
26//function : STEPCAFControl_Controller
27//purpose :
28//=======================================================================
29STEPCAFControl_Controller::STEPCAFControl_Controller ()
30{
31 Handle(STEPCAFControl_ActorWrite) ActWrite = new STEPCAFControl_ActorWrite;
32 myAdaptorWrite = ActWrite;
33}
34
35//=======================================================================
36//function : Init
37//purpose :
38//=======================================================================
39
40Standard_Boolean STEPCAFControl_Controller::Init ()
41{
42 static Standard_Mutex theMutex;
43 {
44 Standard_Mutex::Sentry aSentry(theMutex);
45 static Standard_Boolean inic = Standard_False;
46 if (inic) return Standard_True;
47 inic = Standard_True;
48 }
49 // self-registering
50 Handle(STEPCAFControl_Controller) STEPCTL = new STEPCAFControl_Controller;
51 // do XSAlgo::Init, cause it does not called before.
52 XSAlgo::Init();
53 // do something to avoid warnings...
54 STEPCTL->AutoRecord();
55
56 //-----------------------------------------------------------
57 // Few variables for advanced control of translation process
58 //-----------------------------------------------------------
59
60 // Indicates whether to write sub-shape names to 'Name' attributes of
61 // STEP Representation Items
62 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", 'e', "");
63 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "enum 0");
64 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval Off"); // 0
65 Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval On"); // 1
66 Interface_Static::SetIVal("write.stepcaf.subshapes.name", 0); // Disabled by default
67
68 // Indicates whether to read sub-shape names from 'Name' attributes of
69 // STEP Representation Items
70 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", 'e', "");
71 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "enum 0");
72 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
73 Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On"); // 1
74 Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
75
76 return Standard_True;
77}