1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0027447: Add support for long IGES entity names

Adding support for long IGES names.
The method IGESCAFControl_Writer::WriteNames is now extended
to also write IGES 406 / 15 name entities containing the full label name.

Test case for issue #27447
This commit is contained in:
Martin Siggel
2016-04-28 14:33:57 +03:00
committed by bugmaster
parent 9d1bf7ae05
commit 6f21399c0d
2 changed files with 57 additions and 0 deletions

View File

@@ -21,10 +21,12 @@
#include <IGESGraph_Color.hxx>
#include <IGESGraph_DefinitionLevel.hxx>
#include <IGESSolid_Face.hxx>
#include <IGESBasic_Name.hxx>
#include <NCollection_DataMap.hxx>
#include <Standard_Transient.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TCollection_HExtendedString.hxx>
#include <TColStd_HSequenceOfExtendedString.hxx>
#include <TDataStd_Name.hxx>
#include <TDF_ChildIterator.hxx>
@@ -526,6 +528,14 @@ Standard_Boolean IGESCAFControl_Writer::WriteNames (const TDF_LabelSequence& the
anAsciiName->SetValue (aNameLength+1, IsAnAscii (aName.Value (aCharPos)) ? (Standard_Character )aName.Value (aCharPos) : '?');
}
anIGESEntity->SetLabel (anAsciiName);
// Set long IGES name using 406 form 15 entity
Handle(IGESBasic_Name) aLongNameEntity = new IGESBasic_Name;
Handle(TCollection_HExtendedString) aTmpStr = new TCollection_HExtendedString(aName);
aLongNameEntity->Init(1, new TCollection_HAsciiString(aTmpStr, '_'));
anIGESEntity->AddProperty(aLongNameEntity);
AddEntity(aLongNameEntity);
}
}