1 // ImportExport.h: interface for the CImportExport class.
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_IMPORTEXPORT_H__BAA02E6B_A948_11D1_8DA6_0800369C8A03__INCLUDED_)
6 #define AFX_IMPORTEXPORT_H__BAA02E6B_A948_11D1_8DA6_0800369C8A03__INCLUDED_
10 #endif // _MSC_VER >= 1000
12 #include <Storage_Error.hxx>
13 #include <IFSelect_ReturnStatus.hxx>
14 #include <STEPControl_StepModelType.hxx>
15 #include <Quantity_HArray1OfColor.hxx>
16 #include <TColStd_HArray1OfReal.hxx>
18 #include <Standard_Macro.hxx>
20 class Standard_EXPORT CImportExport
25 virtual ~CImportExport(){};
28 static Handle(TopTools_HSequenceOfShape)
29 BuildSequenceFromContext(const Handle(AIS_InteractiveContext)& anInteractiveContext,
30 Handle(Quantity_HArray1OfColor)& anArrayOfColors,
31 Handle(TColStd_HArray1OfReal)& anArrayOfTransparencies);
35 //======================================================================
36 // return is HSequence to be able to select a set of files
37 static int ReadBREP(const Handle_AIS_InteractiveContext& anInteractiveContext);
38 static Handle_TopTools_HSequenceOfShape ReadBREP();
39 static Standard_Boolean ReadBREP(CString aFileName,
40 TopoDS_Shape& aShape);
42 //----------------------------------------------------------------------
43 static void SaveBREP(const Handle_AIS_InteractiveContext& anInteractiveContext);
44 static Standard_Boolean SaveBREP(const TopoDS_Shape& aShape);
45 static Standard_Boolean SaveBREP(CString aFileName,
46 const TopoDS_Shape& aShape);
48 //======================================================================
50 static void ReadIGES(const Handle(AIS_InteractiveContext)& anInteractiveContext);
51 static Handle(TopTools_HSequenceOfShape) ReadIGES(); // not by reference --> the sequence is created here !!
52 static Standard_Integer ReadIGES(const Standard_CString& aFileName,
53 Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape);
54 //----------------------------------------------------------------------
55 static void SaveIGES(const Handle(AIS_InteractiveContext)& anInteractiveContext);
56 static Standard_Boolean SaveIGES(const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape);
57 static Standard_Boolean SaveIGES(const Standard_CString& aFileName,
58 const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape);
60 //======================================================================
62 static void ReadSTEP(const Handle(AIS_InteractiveContext)& anInteractiveContext);
63 static Handle(TopTools_HSequenceOfShape) ReadSTEP(); // not by reference --> the sequence is created here !!
64 static IFSelect_ReturnStatus ReadSTEP(const Standard_CString& aFileName,
65 Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape);
66 //----------------------------------------------------------------------
67 static void SaveSTEP(const Handle(AIS_InteractiveContext)& anInteractiveContext);
68 static IFSelect_ReturnStatus SaveSTEP(const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape);
69 static IFSelect_ReturnStatus SaveSTEP(const Standard_CString& aFileName,
70 const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape,
72 const STEPControl_StepModelType aValue = STEPControl_AsIs);
74 static void ReadSAT(const Handle(AIS_InteractiveContext)& anInteractiveContext);
75 static Handle(TopTools_HSequenceOfShape) ReadSAT(); // not by reference --> the sequence is created here !!
76 static IFSelect_ReturnStatus ReadSAT(const Standard_CString& aFileName,
77 Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape);
78 //----------------------------------------------------------------------
79 static Standard_Boolean SaveSTL(const Standard_CString& aFileName,
80 const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape,
81 TCollection_AsciiString& ReturnMessage);
82 static Standard_Boolean SaveSTL(const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape);
83 static void SaveSTL(const Handle(AIS_InteractiveContext)& anInteractiveContext);
84 //----------------------------------------------------------------------
85 static Standard_Boolean SaveVRML(const Standard_CString& aFileName,
86 const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape,
87 const Handle(Quantity_HArray1OfColor)& anArrayOfColors,
88 const Handle(TColStd_HArray1OfReal)& anArrayOfTransparencies,
89 TCollection_AsciiString& ReturnMessage);
90 static Standard_Boolean SaveVRML(const Handle(TopTools_HSequenceOfShape)& aHSequenceOfShape,
91 const Handle(Quantity_HArray1OfColor)& anArrayOfColors,
92 const Handle(TColStd_HArray1OfReal)& anArrayOfTransparencies);
93 static void SaveVRML(const Handle(AIS_InteractiveContext)& anInteractiveContext);
97 #endif // !defined(AFX_IMPORTEXPORT_H__BAA02E6B_A948_11D1_8DA6_0800369C8A03__INCLUDED_)