-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 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
{
union {
Standard_ShortReal f;
- char c[4];
+ char c[4];
} u;
u.f = theVal;
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];
" endfacet\n", 21 );
}
}
- aFile.writeRaw ("endsolid\n" , 9 );
+ buf = "endsolid " + myName + "\n";
+ aFile.writeRaw( buf.c_str(), buf.size() );
return aResult;
}
}
}
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