OSD_OpenFile.hxx header is created for using in file open operations with Unicode names.
Fix for STEP files reading.
Adding test cases for issue 25367
Update test case for issue 25364
Update test cases due to improvements
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
+#include <OSD_OpenFile.hxx>
#include <errno.h>
const Handle(Message_ProgressIndicator)& PR)
{
ofstream os;
- // if (!fic.open(File,output)) return Standard_False;
- os.open(File, ios::out);
+ OSD_OpenStream(os, File, ios::out);
if (!os.rdbuf()->is_open()) return Standard_False;
Standard_Boolean isGood = (os.good() && !os.eof());
{
filebuf fic;
istream in(&fic);
- if (!fic.open(File, ios::in)) return Standard_False;
-
+ OSD_OpenFileBuf(fic,File,ios::in);
+ if(!fic.is_open()) return Standard_False;
+
BRepTools_ShapeSet SS(B);
SS.SetProgress(PR);
SS.Read(in);
#include <FSD_BinaryFile.ixx>
#include <OSD.hxx>
+#include <OSD_OpenFile.hxx>
const Standard_CString MAGICNUMBER = "BINFILE";
SetName(aName);
if (OpenMode() == Storage_VSNone) {
-#ifdef _WIN32
- TCollection_ExtendedString aWName(aName);
if (aMode == Storage_VSRead) {
- myStream = _wfopen((const wchar_t*)aWName.ToExtString(),L"rb");
+ myStream = OSD_OpenFile(aName.ToCString(),"rb");
}
else if (aMode == Storage_VSWrite) {
- myStream = _wfopen((const wchar_t*)aWName.ToExtString(),L"wb");
+ myStream = OSD_OpenFile(aName.ToCString(),"wb");
}
else if (aMode == Storage_VSReadWrite) {
- myStream = _wfopen((const wchar_t*)aWName.ToExtString(),L"w+b");
+ myStream = OSD_OpenFile(aName.ToCString(),"w+b");
}
-#else
- if (aMode == Storage_VSRead) {
- myStream = fopen(aName.ToCString(),"rb");
- }
- else if (aMode == Storage_VSWrite) {
- myStream = fopen(aName.ToCString(),"wb");
- }
- else if (aMode == Storage_VSReadWrite) {
- myStream = fopen(aName.ToCString(),"w+b");
- }
-#endif
if (myStream == 0L) {
result = Storage_VSOpenError;
#include <Interface_Macros.hxx>
#include <stdio.h>
+#include <OSD_OpenFile.hxx>
+
static int deja = 0;
Standard_Boolean IFSelect_SessionFile::WriteFile
(const Standard_CString filename)
{
- FILE* lefic = fopen(filename,"w");
+ FILE* lefic = OSD_OpenFile(filename,"w");
Standard_Integer nbl = thelist.Length();
for (Standard_Integer i = 1; i <= nbl; i ++)
fprintf (lefic,"%s\n",thelist.Value(i).ToCString());
(const Standard_CString filename)
{
char ligne[201];
- FILE* lefic = fopen(filename,"r");
+ FILE* lefic = OSD_OpenFile(filename,"r");
if (!lefic) return Standard_False;
ClearLines();
// read mode : lire les lignes
#include <Interface_Macros.hxx>
#include <Message_Messenger.hxx>
#include <Message.hxx>
+#include <OSD_OpenFile.hxx>
#include <stdio.h>
{
FILE* fic; int lefic = 0;
if (file != NULL && file[0] != '\0') {
- fic = fopen (file,"r");
+ fic = OSD_OpenFile (file,"r");
if (fic) lefic = 1;
else { cout<<" ... Script File "<<file<<" not found"<<endl; return IFSelect_RetFail; }
cout << " ... Reading Script File " << file << endl;
#include <TopExp_Explorer.hxx>
#include <Message_ProgressIndicator.hxx>
#include <errno.h>
+#include <OSD_OpenFile.hxx>
IGESControl_Writer::IGESControl_Writer ()
: theTP (new Transfer_FinderProcess(10000)) ,
Standard_Boolean IGESControl_Writer::Write
(const Standard_CString file, const Standard_Boolean fnes)
{
- ofstream fout(file,ios::out);
+ ofstream fout;
+ OSD_OpenStream(fout,file,ios::out);
if (!fout) return Standard_False;
#ifdef OCCT_DEBUG
cout<<" Ecriture fichier ("<< (fnes ? "fnes" : "IGES") <<"): "<<file<<endl;
/* Regroupement des sources "C" pour compilation */
#include <stdio.h>
#include "igesread.h"
+#include <OSD_OpenFile.hxx>
/*
void IGESFile_Check21 (int mode,char * code, int num, char * str);
int Dstat = 0; int Pstat = 0; char c_separ = ','; char c_fin = ';';
iges_initfile();
lefic = stdin; i0 = numsec = 0; numl = 0;
- if (nomfic[1] != '\0') lefic = fopen(nomfic,"r");
+ if (nomfic[0] != '\0')
+ lefic = OSD_OpenFile(nomfic,"r");
if (lefic == NULL) return -1; /* fichier pas pu etre ouvert */
for (i = 1; i < 6; i++) lesect[i] = 0;
for (j = 0; j < 100; j++) ligne[j] = 0;
#include <Interface_Check.hxx>
#include <Interface_Macros.hxx>
+#include <OSD_OpenFile.hxx>
#include <errno.h>
static int deja = 0;
if (igesmod.IsNull() || prot.IsNull()) return Standard_False;
ofstream fout;
- fout.rdbuf()->open(ctx.FileName(),ios::out );
+ OSD_OpenStream(fout,ctx.FileName(),ios::out );
if (!fout) {
ctx.CCheck(0)->AddFail("IGES File could not be created");
sout<<" - IGES File could not be created : " << ctx.FileName() << endl; return 0;
#include <gp.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
+#include <OSD_OpenFile.hxx>
#include <fstream>
#include <algorithm>
}
// Open file
-#ifdef _WIN32
- const TCollection_ExtendedString aFileNameW (theFileName.ToCString(), Standard_True);
- FILE* aFile = _wfopen ((const wchar_t* )aFileNameW.ToExtString(), L"wb");
-#else
- FILE* aFile = fopen (theFileName.ToCString(), "wb");
-#endif
+ FILE* aFile = OSD_OpenFile (theFileName.ToCString(), "wb");
if (aFile == NULL)
{
return false;
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_Mutex.hxx>
+#include <OSD_OpenFile.hxx>
#include <stdlib.h>
#include <stdio.h>
if (theFileName == NULL || * theFileName == '\0') return Standard_False;
// Open the file
-#ifdef _WIN32
- // file name is treated as UTF-8 string
- TCollection_ExtendedString aFileNameW(theFileName, Standard_True);
- FILE *anMsgFile = _wfopen ((const wchar_t*)aFileNameW.ToExtString(), L"rb");
-#else
- FILE *anMsgFile = fopen (theFileName, "rb");
-#endif
+ FILE *anMsgFile = OSD_OpenFile(theFileName,"rb");
if (!anMsgFile) return Standard_False;
// Read the file into memory
OSD_MAllocHook.hxx
OSD_MemInfo.hxx
OSD_MemInfo.cxx
+OSD_OpenFile.hxx
+OSD_OpenFile.cxx
--- /dev/null
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <OSD_OpenFile.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <NCollection_UtfString.hxx>
+
+// ==============================================
+// function : OSD_OpenFile
+// purpose : Opens file
+// ==============================================
+FILE* OSD_OpenFile(const char* theName,
+ const char* theMode)
+{
+ FILE* aFile = 0;
+#ifdef _WIN32
+ // file name is treated as UTF-8 string and converted to UTF-16 one
+ const TCollection_ExtendedString aFileNameW (theName, Standard_True);
+ const TCollection_ExtendedString aFileModeW (theMode, Standard_True);
+ aFile = ::_wfopen ((const wchar_t* )aFileNameW.ToExtString(),
+ (const wchar_t* )aFileModeW.ToExtString());
+#else
+ aFile = ::fopen (theName, theMode);
+#endif
+ return aFile;
+}
+
+// ==============================================
+// function : OSD_OpenFile
+// purpose : Opens file
+// ==============================================
+FILE* OSD_OpenFile(const TCollection_ExtendedString& theName,
+ const char* theMode)
+{
+ FILE* aFile = 0;
+#ifdef _WIN32
+ const TCollection_ExtendedString aFileModeW (theMode, Standard_True);
+ aFile = ::_wfopen ((const wchar_t* )theName.ToExtString(),
+ (const wchar_t* )aFileModeW.ToExtString());
+#else
+ // conversion in UTF-8 for linux
+ NCollection_Utf8String aString((const Standard_Utf16Char*)theName.ToExtString());
+ aFile = ::fopen (aString.ToCString(),theMode);
+#endif
+ return aFile;
+}
+
+// ==============================================
+// function : OSD_OpenFileBuf
+// purpose : Opens file buffer
+// ==============================================
+void OSD_OpenFileBuf(std::filebuf& theBuff,
+ const char* theName,
+ const std::ios_base::openmode theMode)
+{
+#ifdef _WIN32
+ // file name is treated as UTF-8 string and converted to UTF-16 one
+ const TCollection_ExtendedString aFileNameW (theName, Standard_True);
+ theBuff.open ((const wchar_t* )aFileNameW.ToExtString(), theMode);
+#else
+ theBuff.open (theName, theMode);
+#endif
+}
+
+// ==============================================
+// function : OSD_OpenFileBuf
+// purpose : Opens file buffer
+// ==============================================
+void OSD_OpenFileBuf(std::filebuf& theBuff,
+ const TCollection_ExtendedString& theName,
+ const std::ios_base::openmode theMode)
+{
+#ifdef _WIN32
+ theBuff.open ((const wchar_t* )theName.ToExtString(), theMode);
+#else
+ // conversion in UTF-8 for linux
+ NCollection_Utf8String aString((const Standard_Utf16Char*)theName.ToExtString());
+ theBuff.open (aString.ToCString(),theMode);
+#endif
+}
+
+// ==============================================
+// function : OSD_OpenStream
+// purpose : Opens file stream
+// ==============================================
+void OSD_OpenStream(std::ofstream& theStream,
+ const char* theName,
+ const std::ios_base::openmode theMode)
+{
+#ifdef _WIN32
+ // file name is treated as UTF-8 string and converted to UTF-16 one
+ const TCollection_ExtendedString aFileNameW (theName, Standard_True);
+ theStream.open ((const wchar_t* )aFileNameW.ToExtString(), theMode);
+#else
+ theStream.open (theName, theMode);
+#endif
+}
+
+// ==============================================
+// function : OSD_OpenStream
+// purpose : Opens file stream
+// ==============================================
+void OSD_OpenStream(std::ofstream& theStream,
+ const TCollection_ExtendedString& theName,
+ const std::ios_base::openmode theMode)
+{
+#ifdef _WIN32
+ theStream.open ((const wchar_t* )theName.ToExtString(), theMode);
+#else
+ // conversion in UTF-8 for linux
+ NCollection_Utf8String aString((const Standard_Utf16Char*)theName.ToExtString());
+ theStream.open (aString.ToCString(),theMode);
+#endif
+}
+
--- /dev/null
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+//! Auxiulary file to provide Unicode compatibility for file open functionality
+//! Names of files are encoded as UTF-16 strings
+
+#ifndef _OSD_OpenFile_HeaderFile
+#define _OSD_OpenFile_HeaderFile
+
+#include <Standard_Macro.hxx>
+
+#if defined(__cplusplus)
+
+#include <fstream>
+#include <TCollection_ExtendedString.hxx>
+
+//! Function opens the file stream.
+//! @param theStream stream to open
+//! @param theName name of file encoded in UTF-8
+//! @param theMode opening mode
+__Standard_API void OSD_OpenStream (std::ofstream& theStream,
+ const char* theName,
+ const std::ios_base::openmode theMode);
+
+//! Function opens the file stream.
+//! @param theStream stream to open
+//! @param theName name of file encoded in UTF-16
+//! @param theMode opening mode
+__Standard_API void OSD_OpenStream (std::ofstream& theStream,
+ const TCollection_ExtendedString& theName,
+ const std::ios_base::openmode theMode);
+
+//! Function opens the file buffer.
+//! @param theBuff file buffer to open
+//! @param theName name of file encoded in UTF-8
+//! @param theMode opening mode
+__Standard_API void OSD_OpenFileBuf (std::filebuf& theBuff,
+ const char* theName,
+ const std::ios_base::openmode theMode);
+
+//! Function opens the file buffer.
+//! @param theBuff file buffer to open
+//! @param theName name of file encoded in UTF-16
+//! @param theMode opening mode
+__Standard_API void OSD_OpenFileBuf (std::filebuf& theBuff,
+ const TCollection_ExtendedString& theName,
+ const std::ios_base::openmode theMode);
+
+
+//! Function opens the file.
+//! @param theName name of file encoded in UTF-16
+//! @param theMode opening mode
+//! @return file handle of opened file
+__Standard_API FILE* OSD_OpenFile (const TCollection_ExtendedString& theName,
+ const char* theMode);
+
+extern "C" {
+#endif // __cplusplus
+
+//! Function opens the file.
+//! @param theName name of file encoded in UTF-8
+//! @param theMode opening mode
+//! @return file handle of opened file
+__Standard_API FILE* OSD_OpenFile (const char* theName, const char* theMode);
+
+#if defined(__cplusplus)
+}
+#endif // __cplusplus
+
+#endif // _OSD_OpenFile_HeaderFile
#include <gp.hxx>
#include <stdio.h>
#include <gp_Vec.hxx>
+#include <OSD_OpenFile.hxx>
#include <BRepBuilderAPI_CellFilter.hxx>
#include <BRepBuilderAPI_VertexInspector.hxx>
thePath.SystemName (filename);
// Open the file
- FILE* file = fopen(filename.ToCString(),"r");
+ FILE* file = OSD_OpenFile(filename.ToCString(),"r");
fseek(file,0L,SEEK_END);
long filesize = ftell(file);
- fclose(file);
- file = fopen(filename.ToCString(),"r");
+ rewind(file);
// count the number of lines
for (ipos = 0; ipos < filesize; ++ipos) {
nbTris = (nbLines / ASCII_LINES_PER_FACET);
// go back to the beginning of the file
-// fclose(file);
-// file = fopen(filename.ToCString(),"r");
rewind(file);
// skip header
! XmlOcaf format
!
XmlOcaf.Description: Xml Document Version 1.0
-XmlOcaf.FileExtension: xml
+XmlOcaf.FileExtension: xml
XmlOcaf.StoragePlugin: 03a56820-8269-11d5-aab2-0050044b1af1
XmlOcaf.RetrievalPlugin: 03a56822-8269-11d5-aab2-0050044b1af1
!
checkread->Clear();
recfile_modeprint ( (modepr > 0 ? modepr-1 : 0) );
-#ifdef _WIN32
- TCollection_ExtendedString aFileNameW(ficnom, Standard_True);
- FILE* newin = stepread_setinput((char*)aFileNameW.ToExtString());
-#else
FILE* newin = stepread_setinput(ficnom);
-#endif
if (!newin) return -1;
#ifdef CHRONOMESURE
Standard_Integer n ;
#include <stdio.h>
#include <string.h>
#include "recfile.ph"
+#include <OSD_OpenFile.hxx>
/* StepFile_Error.c
{
FILE* newin ;
if (strlen(nomfic) == 0) return stepin ;
-#ifdef _WIN32
- // file name is treated as UTF-8 string
- // nomfic is prepared UTF-8 string
- newin = _wfopen((const wchar_t*)nomfic, L"r") ;
-#else
- newin = fopen(nomfic,"r") ;
-#endif
+ newin = OSD_OpenFile(nomfic,"r");
+
if (newin == NULL) {
return NULL ;
} else {
#include <Message_Messenger.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Check.hxx>
+#include <OSD_OpenFile.hxx>
StepSelect_WorkLibrary::StepSelect_WorkLibrary
(const Standard_Boolean copymode)
if (stepmodel.IsNull() || stepro.IsNull()) return Standard_False;
ofstream fout;
- fout.open(ctx.FileName(),ios::out|ios::trunc);
+ OSD_OpenStream(fout,ctx.FileName(),ios::out|ios::trunc);
if (!fout || !fout.rdbuf()->is_open()) {
ctx.CCheck(0)->AddFail("Step File could not be created");
#include <TObj_TModel.hxx>
#include <TObj_TNameContainer.hxx>
#include <Message_Msg.hxx>
+#include <OSD_OpenFile.hxx>
#ifdef WNT
#include <io.h>
}
*/
// checking write access permission
- FILE *aF = fopen (theFile, "w");
+ FILE *aF = OSD_OpenFile (theFile, "w");
if (aF == NULL) {
Messenger()->Send (Message_Msg("TObj_M_NoWriteAccess") << (Standard_CString)theFile,
Message_Alarm);
if ( !osdfile.Exists() )
return Standard_True;
- FILE* f = fopen( theFile, "r" );
+ FILE* f = OSD_OpenFile( theFile, "r" );
if ( f )
{
Standard_Boolean isZeroLengh = Standard_False;
#include <Voxel_TypeDef.hxx>
#include <TCollection_AsciiString.hxx>
+#include <OSD_OpenFile.hxx>
Voxel_Reader::Voxel_Reader():myBoolVoxels(0),myColorVoxels(0),myFloatVoxels(0)
{
Standard_Boolean Voxel_Reader::Read(const TCollection_ExtendedString& file)
{
// Open file in ASCII mode to read header
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "r");
+ FILE* f = OSD_OpenFile(file, "r");
if (!f)
return Standard_False;
Standard_Boolean Voxel_Reader::ReadBoolAsciiVoxels(const TCollection_ExtendedString& file)
{
// Open file for reading
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "r");
+ FILE* f = OSD_OpenFile(file, "r");
if (!f)
return Standard_False;
Standard_Character line[65], sx[33], sy[33], sz[33];
Standard_Boolean Voxel_Reader::ReadColorAsciiVoxels(const TCollection_ExtendedString& file)
{
// Open file for reading
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "r");
+ FILE* f = OSD_OpenFile(file, "r");
if (!f)
return Standard_False;
Standard_Character line[65], sx[33], sy[33], sz[33];
Standard_Boolean Voxel_Reader::ReadFloatAsciiVoxels(const TCollection_ExtendedString& file)
{
// Open file for reading
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "r");
+ FILE* f = OSD_OpenFile(file, "r");
if (!f)
return Standard_False;
Standard_Character line[65], sx[33], sy[33], sz[33];
Standard_Boolean Voxel_Reader::ReadBoolBinaryVoxels(const TCollection_ExtendedString& file)
{
// Open file for reading
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "rb");
+ FILE* f = OSD_OpenFile(file, "r");
if (!f)
return Standard_False;
Standard_Boolean Voxel_Reader::ReadColorBinaryVoxels(const TCollection_ExtendedString& file)
{
// Open file for reading
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "rb");
+ FILE* f = OSD_OpenFile(file, "r");
if (!f)
return Standard_False;
Standard_Boolean Voxel_Reader::ReadFloatBinaryVoxels(const TCollection_ExtendedString& file)
{
// Open file for reading
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "rb");
+ FILE* f = OSD_OpenFile(file, "r");
if (!f)
return Standard_False;
#include <Precision.hxx>
#include <TCollection_AsciiString.hxx>
+#include <OSD_OpenFile.hxx>
Voxel_Writer::Voxel_Writer():myFormat(Voxel_VFF_ASCII),myBoolVoxels(0),myColorVoxels(0),myFloatVoxels(0)
{
return Standard_False;
// Open file for writing
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "w+");
+ FILE* f = OSD_OpenFile(file, "w+");
if (!f)
return Standard_False;
return Standard_False;
// Open file for writing
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "w+");
+ FILE* f = OSD_OpenFile(file, "w+");
if (!f)
return Standard_False;
return Standard_False;
// Open file for writing
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "w+");
+ FILE* f = OSD_OpenFile(file, "w+");
if (!f)
return Standard_False;
return Standard_False;
// Open file for writing
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "wb");
+ FILE* f = OSD_OpenFile(file, "wb");
if (!f)
return Standard_False;
return Standard_False;
// Open file for writing
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "wb");
+ FILE* f = OSD_OpenFile(file, "wb");
if (!f)
return Standard_False;
return Standard_False;
// Open file for writing
- FILE* f = fopen(TCollection_AsciiString(file, '?').ToCString(), "wb");
+ FILE* f = OSD_OpenFile(file, "wb");
if (!f)
return Standard_False;
#include <Vrml_Instancing.hxx>
#include <Vrml_Separator.hxx>
#include <VrmlConverter_WFDeflectionShape.hxx>
+#include <OSD_OpenFile.hxx>
VrmlAPI_Writer::VrmlAPI_Writer()
{
OSD_Path thePath(aFile);
TCollection_AsciiString theFile;thePath.SystemName(theFile);
ofstream outfile;
- outfile.open(theFile.ToCString(), ios::out);
+ OSD_OpenStream(outfile, theFile.ToCString(), ios::out);
Handle(VrmlConverter_IsoAspect) ia = new VrmlConverter_IsoAspect; // UIso
Handle(VrmlConverter_IsoAspect) ia1 = new VrmlConverter_IsoAspect; //VIso
ia->SetMaterial(myUisoMaterial);
#include <OSD_File.hxx>
#include <OSD_Environment.hxx>
+#include <OSD_OpenFile.hxx>
#define STORAGE_VERSION "STORAGE_VERSION: "
#define REFERENCE_COUNTER "REFERENCE_COUNTER: "
if (WriteToDomDocument (theDocument, anElement, theFileName) == Standard_False) {
// Write DOM_Document into XML file,
- TCollection_AsciiString aFileName (theFileName, '?');
- FILE * aFile = fopen(aFileName.ToCString(), "wt");
+ FILE * aFile = OSD_OpenFile(theFileName, "wt");
if (aFile) {
LDOM_XmlWriter aWriter (aFile);
SetIsError (Standard_True);
SetStoreStatus(PCDM_SS_WriteFailure);
TCollection_ExtendedString aMsg =
- TCollection_ExtendedString("Error: the file ") + aFileName +
+ TCollection_ExtendedString("Error: the file ") + theFileName +
" cannot be opened for writing";
aMessageDriver -> Write (aMsg.ToExtString());
Standard_Failure::Raise("File cannot be opened for writing");
--- /dev/null
+puts "=========="
+puts "OCC25367"
+puts "=========="
+puts ""
+################################################################
+# IGES and BRep persistence - support unicode file names on Windows
+################################################################
+
+set s [encoding convertfrom unicode "\xDE\x30\xF9\x30\xF1\x30"]
+
+set NameFile ${imagedir}/OCC25367_${s}.brep
+
+box b 1 1 1
+
+bsave b ${NameFile}
+
+brestore ${NameFile} result
+
+set square 6
+
+set nb_v_good 8
+set nb_e_good 12
+set nb_w_good 6
+set nb_f_good 6
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 34
+
+file delete -force [glob -nocomplain ${NameFile}]
+
+set 2dviewer 1
--- /dev/null
+puts "=========="
+puts "OCC25367"
+puts "=========="
+puts ""
+################################################################
+# IGES and BRep persistence - support unicode file names on Windows
+################################################################
+
+pload XDE
+
+set s [encoding convertfrom unicode "\xDE\x30\xF9\x30\xF1\x30"]
+
+set NameFile ${imagedir}/OCC25367_${s}.igs
+
+box b 1 1 1
+
+param write.iges.brep.mode 1
+
+brepiges b ${NameFile}
+
+igesbrep ${NameFile} result *
+
+set square 6
+
+set nb_v_good 8
+set nb_e_good 12
+set nb_w_good 6
+set nb_f_good 6
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 34
+
+file delete -force [glob -nocomplain ${NameFile}]
+
+set 2dviewer 1
set mem_delta_virt 180
set mem_delta_heap 80
+if { [regexp {Debug mode} [dversion]] } {
+ set mem_delta_swap 150
+ set mem_delta_swappeak 250
+}
+
if { [expr ${mem_private_2} - ${mem_private_1}] > ${mem_delta_private}} {
puts "Error : there is memory problem (private)"
}
-puts "TODO OCC11111 ALL: StepFile Error"
puts "==========="
puts "OCC22993"
puts "==========="
-puts "TODO OCC12345 ALL: StepFile Error"
-
puts "========================"
puts "BUC60992"
puts "OCC98"