0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / IGESSelect / IGESSelect_SetVersion5.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
15 #include <IFSelect_ContextModif.hxx>
16 #include <IGESData_IGESModel.hxx>
17 #include <IGESSelect_SetVersion5.hxx>
18 #include <Interface_Check.hxx>
19 #include <Interface_CopyTool.hxx>
20 #include <Standard_Type.hxx>
21 #include <TCollection_AsciiString.hxx>
22
23 IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_SetVersion5,IGESSelect_ModelModifier)
24
25 IGESSelect_SetVersion5::IGESSelect_SetVersion5 ()
26     : IGESSelect_ModelModifier (Standard_False)    {  }
27
28     void  IGESSelect_SetVersion5::Performing
29   (IFSelect_ContextModif& ctx,
30    const Handle(IGESData_IGESModel)& target,
31    Interface_CopyTool& ) const
32 {
33   IGESData_GlobalSection GS = target->GlobalSection();
34   if (GS.IGESVersion() >= 9) return;
35   GS.SetIGESVersion(9);
36   GS.SetLastChangeDate ();
37   target->SetGlobalSection(GS);
38   Handle(Interface_Check) check = new Interface_Check;
39   target->VerifyCheck(check);
40   if (check->HasFailed()) ctx.CCheck()->GetMessages(check);
41 }
42
43
44     TCollection_AsciiString  IGESSelect_SetVersion5::Label () const
45 { return TCollection_AsciiString ("Update IGES Version in Global Section to 5.1"); }