0024927: Getting rid of "Persistent" functionality -- Samples and data
[occt.git] / samples / CSharp / OCCTProxy / OCCTProxy.cpp
index e7bc2a6..9f0d074 100644 (file)
 //brep tools
 #include <BRep_Builder.hxx>
 #include <BRepTools.hxx>
-#include <MgtBRep.hxx>
-#include <PTColStd_PersistentTransientMap.hxx>
-//csfdb I/E
-#include <FSD_File.hxx>
-#include <ShapeSchema.hxx>
-#include <Storage_Data.hxx>
-#include <Storage_HSeqOfRoot.hxx>
-#include <Storage_Root.hxx>
 // iges I/E
 #include <IGESControl_Reader.hxx>
 #include <IGESControl_Controller.hxx>
@@ -44,9 +36,6 @@
 #pragma comment(lib, "TKernel.lib")
 #pragma comment(lib, "TKMath.lib")
 #pragma comment(lib, "TKBRep.lib")
-#pragma comment(lib, "PTKernel.lib")
-#pragma comment(lib, "TKPShape.lib")
-#pragma comment(lib, "TKShapeSchema.lib")
 #pragma comment(lib, "TKXSBase.lib")
 #pragma comment(lib, "TKService.lib")
 #pragma comment(lib, "TKV3d.lib")
@@ -779,51 +768,6 @@ public:
     return true;
   }
 
-  /// <summary>
-  ///Import Csfdb file
-  /// </summary>
-  /// <param name="theFileName">Name of import file</param>
-  bool ImportCsfdb(char* theFileName)
-  {
-    Standard_CString aFileName = (Standard_CString) theFileName;
-    if ( FSD_File::IsGoodFileType(aFileName) != Storage_VSOk )
-    {
-      return false;
-    }
-
-    FSD_File aFileDriver;
-    TCollection_AsciiString aName( aFileName );
-    if ( aFileDriver.Open( aName, Storage_VSRead ) != Storage_VSOk )
-    {
-      return false;
-    }
-
-    Handle(ShapeSchema) aSchema = new ShapeSchema();
-    Handle(Storage_Data) data  = aSchema->Read( aFileDriver );
-    if ( data->ErrorStatus() != Storage_VSOk )
-    {
-      return false;
-    }
-    aFileDriver.Close();
-
-    Handle(Storage_HSeqOfRoot) aRoots = data->Roots();
-    for ( int i = 1; i <= aRoots->Length() ; i++ )
-    {
-      Handle(Storage_Root) aStorRoot = aRoots->Value( i );
-      Handle(Standard_Persistent) aStandPersistent = aStorRoot->Object();
-      Handle(PTopoDS_HShape) aPShape = Handle(PTopoDS_HShape)::DownCast(aStandPersistent);
-      if ( !aPShape.IsNull() )
-      {
-        PTColStd_PersistentTransientMap aMap;
-        TopoDS_Shape aTShape;
-        MgtBRep::Translate( aPShape, aMap, aTShape, MgtBRep_WithTriangle );
-        myAISContext()->Display(new AIS_Shape(aTShape));
-      }
-    }
-
-    return true;
-  }
-
   /// <summary>
   ///Import Step file
   /// </summary>
@@ -1037,12 +981,9 @@ public:
         isResult = ImportBrep(aFilename);
         break;
       case 1:
-        isResult = ImportCsfdb(aFilename);
-        break;
-      case 2:
         isResult = ImportStep(aFilename);
         break;
-      case 3:
+      case 2:
         isResult = ImportIges(aFilename);
         break;
       default:
@@ -1056,19 +997,19 @@ public:
       case 0:
         isResult = ExportBRep(aFilename);
         break;
-      case 2:
+      case 1:
         isResult = ExportStep(aFilename);
         break;
-      case 3:
+      case 2:
         isResult = ExportIges(aFilename);
         break;
-      case 4:
+      case 3:
         isResult = ExportVrml(aFilename);
         break;
-      case 5:
+      case 4:
         isResult = ExportStl(aFilename);
         break;
-      case 6:
+      case 5:
         isResult = Dump(aFilename);
         break;
       default: