+ customize IGES header

This commit is contained in:
wmayer
2014-10-29 16:39:33 +01:00
parent b6df4a490e
commit 76906d20a0
6 changed files with 70 additions and 30 deletions

View File

@@ -98,6 +98,8 @@
# include <IGESControl_Controller.hxx>
# include <IGESControl_Writer.hxx>
# include <IGESControl_Reader.hxx>
# include <IGESData_GlobalSection.hxx>
# include <IGESData_IGESModel.hxx>
# include <STEPControl_Writer.hxx>
# include <STEPControl_Reader.hxx>
# include <TopTools_MapOfShape.hxx>
@@ -695,6 +697,11 @@ void TopoShape::exportIges(const char *filename) const
// write iges file
IGESControl_Controller::Init();
IGESControl_Writer aWriter;
IGESData_GlobalSection header = aWriter.Model()->GlobalSection();
header.SetAuthorName(new TCollection_HAsciiString(Interface_Static::CVal("write.iges.header.author")));
header.SetCompanyName(new TCollection_HAsciiString(Interface_Static::CVal("write.iges.header.company")));
//header.SetSendName(new TCollection_HAsciiString(Interface_Static::CVal("write.iges.header.product")));
aWriter.Model()->SetGlobalSection(header);
aWriter.AddShape(this->_Shape);
aWriter.ComputeModel();
if (aWriter.Write(encodeFilename(filename).c_str()) != IFSelect_RetDone)