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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user