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

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Console Output

Console Output

Console Output
alzi 2012/03/13 19:10
Hi,

Open CASCADE writes output to the console when importing e.g. a STEP file that looks like this:

... Step File Reading : test.stp
... STEP File Read ...
Elapsed time: 0 Hours 0 Minutes 0.00931294204656 Seconds
CPU user time: 0 seconds
CPU system time: 0 seconds
... Step File loaded ...
Elapsed time: 0 Hours 0 Minutes 0.0119157234358 Seconds
CPU user time: 0 seconds
CPU system time: 0 seconds
138 records (entities,sub-lists,scopes), 320 parameters

... Parameters prepared ... Elapsed time: 0 Hours 0 Minutes 0.019636403754
7 Seconds
CPU user time: 0 seconds
CPU system time: 0 seconds
... Objets analysed ...
Elapsed time: 0 Hours 0 Minutes 0.0225558484308 Seconds
CPU user time: 0 seconds
CPU system time: 0 seconds
STEP Loading done : 75 Entities


Is there any way to stop Open CASCADE doing this?
I couldn't find anything in the documentation about that.
I tried to redirect std::cout to some other file but this somehow only works if i build my application in release mode but not for the debug mode.

Would be glad if someone could help me out!

alzi
Mikko Lyly 2012/03/14 11:59
Hello,

One possible solution is to use ios::rdbuf() as follows.

std::stringstream ss;
std::streambuf *ob = std::cout.rdbuf(ss.rdbuf());

// STEP stuff
writer.Transfer(solid, STEPControl_AsIs);
writer.Write("cylinder.step");

// ss.str() contains the output from STEPControl
std::cout.rdbuf(ob); // restore original buffer

ML
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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