-
Notifications
You must be signed in to change notification settings - Fork 56
suppress_stdout_stderr seams to suppress to much #267
Comments
It seems strange that you're missing messages before you run the exporter.
totally agree 👍. Those wacky FreeCAD people! |
Yes, this is what I think as well. It is bad since I want to use the print statements to show progress of the script. And the buffering makes all the print come at the very end of the script run, so much for progress. :) |
I found a possible solution to the problem that freecad buffers everything that is written to stdout until the end of execution.
See https://forum.freecadweb.org/viewtopic.php?f=22&t=28354&hilit=Step+stdout |
...or we could just accelerate progress to pull in @adam-urbanczyk 's OCC branch and convert this function to use OCC directly and just skip freecad. that'd be my vote. Last I checked his branch had just about everything working without FreeCAD. I think we should start pulling in his branch, and then start slowly converting CQ functions to use OCC directly, initially, using the OCC bundled with FreeCAD. |
@gntech
That's exciting! @adam-urbanczyk is it time to start migrating |
@adam-urbanczyk @fragmuffin it is definitely close enough i think its time to try to make it happen. I think he reported having all of the tests passing at the time even. Our test coverage is pretty good, so I think that means we're pretty close. I've created #268 to get the ball rolling on that. |
This has been closed in favor of the CQ 2.0 implemention at https://github.com/cadquery/cadquery |
When exporting a STEP-file cadquery swallows some of the things written to stdout.
Consider the following script. Run from terminal with python.
I would expect to get to get 3 print statements but I only get the last one
after exporting model
I suspect that this has something to with the function suppress_stdout_stderr that is designed to suppress some messages from freecad regarding the step-export.
If I run the script like so instead I get all 3 print statments but also some messages from freecad regarding step creation. Using this form of the export I bypass the suppress_stdout_stderr()
My suggestion for how to fix this issue is to contact freecad upstream to see if we can get a clean step output from freecad to get rid of suppress_stdout_stderr. Because, seriously, the suppress_stdout_stderr() is not the ideal solution. :)
The text was updated successfully, but these errors were encountered: