From 22acaf4fdf63ca807378d3418cf0657e5aad01da Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Sun, 17 May 2020 21:09:19 -0700 Subject: [PATCH] [import] Hotfix for build failure from bad debug code Quick fix for a build failure with latest opencascade. Directly use std::cout instead of custom streams. --- src/Mod/Import/App/StepShape.cpp | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/Mod/Import/App/StepShape.cpp b/src/Mod/Import/App/StepShape.cpp index acd4a9e706..ec714c891e 100644 --- a/src/Mod/Import/App/StepShape.cpp +++ b/src/Mod/Import/App/StepShape.cpp @@ -65,38 +65,33 @@ int StepShape::read(const char* fileName) throw Base::FileException("Cannot open STEP file"); } - //Standard_Integer ic = Interface_Static::IVal("read.precision.mode"); - //Standard_Real rp = Interface_Static::RVal("read.maxprecision.val"); - //Standard_Integer ic = Interface_Static::IVal("read.maxprecision.mode"); - //Standard_Integer mv = Interface_Static::IVal("read.stdsameparameter.mode"); - //Standard_Integer rp = Interface_Static::IVal("read.surfacecurve.mode"); - //Standard_Real era = Interface_Static::RVal("read.encoderegularity.angle"); - //Standard_Integer ic = Interface_Static::IVal("read.step.product.mode"); + //Standard_Integer ic = Interface_Static::IVal("read.precision.mode"); + //Standard_Real rp = Interface_Static::RVal("read.maxprecision.val"); + //Standard_Integer ic = Interface_Static::IVal("read.maxprecision.mode"); + //Standard_Integer mv = Interface_Static::IVal("read.stdsameparameter.mode"); + //Standard_Integer rp = Interface_Static::IVal("read.surfacecurve.mode"); + //Standard_Real era = Interface_Static::RVal("read.encoderegularity.angle"); + //Standard_Integer ic = Interface_Static::IVal("read.step.product.mode"); //Standard_Integer ic = Interface_Static::IVal("read.step.product.context"); - //Standard_Integer ic = Interface_Static::IVal("read.step.shape.repr"); + //Standard_Integer ic = Interface_Static::IVal("read.step.shape.repr"); //Standard_Integer ic = Interface_Static::IVal("read.step.assembly.level"); //Standard_Integer ic = Interface_Static::IVal("read.step.shape.relationship"); - //Standard_Integer ic = Interface_Static::IVal("read.step.shape.aspect"); + //Standard_Integer ic = Interface_Static::IVal("read.step.shape.aspect"); - Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList(); + Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList(); //Use method StepData_StepModel::NextNumberForLabel to find its rank with the following: //Standard_CString label = "#..."; Handle(StepData_StepModel) model = aReader.StepModel(); //rank = model->NextNumberForLabe(label, 0, Standard_False); - Handle(Message_PrinterOStream) mstr = new Message_PrinterOStream(); - Handle(Message_Messenger) msg = new Message_Messenger(mstr); - std::cout << "dump of step header:" << std::endl; - - model->DumpHeader(msg); + model->DumpHeader(std::cout); for(int nent=1;nent<=model->NbEntities();nent++) { Handle(Standard_Transient) entity=model->Entity(nent); - std::cout << "label entity " << nent << ":" ; - model->PrintLabel(entity,msg); + model->PrintLabel(entity, std::cout); std::cout << ";"<< entity->DynamicType()->Name() << std::endl; }