Skip to content

Commit

Permalink
Import: handle OCC versions 7.4.1 and earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed May 30, 2020
1 parent 063515f commit 2cb9b14
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Mod/Import/App/StepShape.cpp
Expand Up @@ -34,6 +34,7 @@
# include <Interface_Static.hxx>
# include <Message_Messenger.hxx>
# include <Message_PrinterOStream.hxx>
# include <Standard_Version.hxx>

# include <Base/FileInfo.h>
# include <Base/Exception.h>
Expand Down Expand Up @@ -86,12 +87,22 @@ int StepShape::read(const char* fileName)
//rank = model->NextNumberForLabe(label, 0, Standard_False);

std::cout << "dump of step header:" << std::endl;
#if OCC_VERSION_HEX < 0x070401
Handle(Message_PrinterOStream) mstr = new Message_PrinterOStream();
Handle(Message_Messenger) msg = new Message_Messenger(mstr);
model->DumpHeader(msg);
#else
model->DumpHeader(std::cout);
#endif

for(int nent=1;nent<=model->NbEntities();nent++) {
for (int nent=1;nent<=model->NbEntities();nent++) {
Handle(Standard_Transient) entity=model->Entity(nent);
std::cout << "label entity " << nent << ":" ;
#if OCC_VERSION_HEX < 0x070401
model->PrintLabel(entity, msg);
#else
model->PrintLabel(entity, std::cout);
#endif
std::cout << ";"<< entity->DynamicType()->Name() << std::endl;
}

Expand Down

0 comments on commit 2cb9b14

Please sign in to comment.