Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge imn/IMACS branch into imn/IMACS_8_3_0
[modules/smesh.git]
/
src
/
DriverSTL
/
DriverSTL_W_SMDS_Mesh.cxx
diff --git
a/src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx
b/src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx
index 6f9d02a3070e2d4970d99e8f4452b00ac22843b5..333c72d96af80d11dfb031cad24825458e0aecba 100644
(file)
--- a/
src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx
+++ b/
src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-176,7
+176,7
@@
static void writeFloat( const Standard_ShortReal& theVal, SMESH_File& ofile)
{
union {
Standard_ShortReal f;
{
union {
Standard_ShortReal f;
- char c[4];
+ char c[4];
} u;
u.f = theVal;
} u;
u.f = theVal;
@@
-485,7
+485,8
@@
Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
SMESH_File aFile( myFile, /*openForReading=*/false );
aFile.openForWriting();
SMESH_File aFile( myFile, /*openForReading=*/false );
aFile.openForWriting();
- std::string buf("solid\n");
+ std::string buf("solid ");
+ buf += myName + "\n";
aFile.writeRaw( buf.c_str(), buf.size() );
char sval[128];
aFile.writeRaw( buf.c_str(), buf.size() );
char sval[128];
@@
-520,7
+521,8
@@
Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
" endfacet\n", 21 );
}
}
" endfacet\n", 21 );
}
}
- aFile.writeRaw ("endsolid\n" , 9 );
+ buf = "endsolid " + myName + "\n";
+ aFile.writeRaw( buf.c_str(), buf.size() );
return aResult;
}
return aResult;
}
@@
-554,6
+556,11
@@
Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
}
}
std::string sval( LABEL_SIZE, ' ' );
}
}
std::string sval( LABEL_SIZE, ' ' );
+ if ( !myName.empty() )
+ {
+ sval = "name: " + myName;
+ sval.resize( LABEL_SIZE, ' ' );
+ }
aFile.write( sval.c_str(), LABEL_SIZE );
// write number of triangles
aFile.write( sval.c_str(), LABEL_SIZE );
// write number of triangles