-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added multiple file export at once #34
Conversation
Looks like the tests are failing with the Numpy 2.x issue that is fixed in CadQuery master. I will need to figure out how to fix that here, but this code should still work fine for testing. |
The Numpy version issue is now fixed. |
@jmwright The speed improvement is significant. I can build 3 files in 8s instead of 20s. The one issue I am having is that it throws an error if I don't specify the codec (for one file or for multiple files) |
Correct, you have to specify a matching codec for each file. The reason for this is that the codec cannot always be inferred correctly from the file extension. Is this a blocker for the use of cq-cli with ExSource? |
Not a blocker, just was useful that it used to guess it correctly. I suppose it isn't clear to me from the |
@julianstirling I think that |
Yes, I never specified a codec before. It wasn't immediately clear what the codecs were called (though in hindsight they were pretty obviously named) |
@julianstirling Can you try with the latest commit to this PR branch? You should not be required to specify the codecs anymore. If you use a filename extension that does not match the codec name like |
I just did a test and it worked. Thanks! |
I had a quick skim through the code as we discussed. I don't have anything helpful to add/say, except that the logic makes sense to me. |
@julianstirling Great, thanks for the review. |
This PR adds the ability to specify multiple output files at once in the
outfile
parameter by separating them with a;
character. The number of codecs specified via thecodec
parameter should match the number of output files. This prevents users from having to invoke cq-cli from scratch for each different export format they want of a single model.@justbuchanan If you have the time and interest, please review. If you do not, I'll merge in a few days.