Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Naming data in IGES Export

Naming data in IGES Export
Philippe Carret 2013/04/09 20:55
Dear OCC members,


We are trying to export names of our entities in IGES export and we are not fully successful (enclosed is a 3d viewer screenshot) .
It works only for the first entity.
We don't know how to set names of hierarchy at level 0 and level 1


Assembly
|
|_ level 0
| level 1 (only this one "JOUE_DRO" is OK)
| level 1
|_ level 0
| level 1
| level 1
| level 1


------------------------------------------------------------------------

Here is our code :

     TopoDS_Shape ithShape;
     CString ithName;
     Handle(IGESData_IGESEntity) ithEntity;
//     Handle(IGESData_NameEntity) ithNamedEntity;
//     Handle(IGESData_LevelListEntity) ithLevelListEntity;

     for (Standard_Integer iShape = 1; iShape <= NbShape; iShape++)
     {
          ithShape = aSequenceOfShape.Value(iShape);
     
          _igesWriter.AddShape(ithShape);

          Handle(IGESData_IGESModel) aModel = _igesWriter.Model();
          Handle(IGESData_IGESEntity) aModelEntity = aModel->Entity(iShape);
//          Handle(IGESData_LevelListEntity) aLevelListEntity = aModelEntity->LevelList();

          ithName.Format("MM%d", iShape);
          aModelEntity->SetLabel(new TCollection_HAsciiString(Standard_CString((LPCSTR) ithName)));
          
     }

------------------------------------------------------------------------

I've tried to read IGESCAFControl_Writer.
Any code or any indication is welcome.


Thanks for any help,

Philippe
You have to be logged in to download the attached file
 
 
Latest news
  • OCCT Applications
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map