cadquery
cadquery copied to clipboard
Add option to export binary STL
- exporters.export add "ascii" (or "ASCII") options dict
- Shape.exportStl add "ascii" bool param
- fix corrupt docstrings/typos in shapes.py
Codecov Report
Merging #1106 (24d09b2) into master (f3b0b09) will decrease coverage by
2.42%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #1106 +/- ##
==========================================
- Coverage 96.32% 93.90% -2.43%
==========================================
Files 40 25 -15
Lines 9672 5328 -4344
Branches 1280 979 -301
==========================================
- Hits 9317 5003 -4314
+ Misses 210 193 -17
+ Partials 145 132 -13
| Impacted Files | Coverage Δ | |
|---|---|---|
| cadquery/occ_impl/exporters/__init__.py | 91.81% <100.00%> (+0.22%) |
:arrow_up: |
| cadquery/occ_impl/shapes.py | 92.55% <100.00%> (+0.01%) |
:arrow_up: |
| tests/test_exporters.py | ||
| tests/test_cadquery.py | ||
| tests/test_cqgi.py | ||
| tests/test_sketch.py | ||
| tests/naca.py | ||
| tests/test_importers.py | ||
| tests/test_workplanes.py | ||
| tests/test_utils.py | ||
| ... and 7 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Initially I thought I would clean up some of the docstrings since I was already touching shapes.py. I've removed the unrelated docstring cleanup changes to simplify this PR.
@lorenzncode which default value did you have in mind?
@adam-urbanczyk I had left the default as ascii mostly to maintain the current behavior and defer the decision. If you agree, let's change to binary in master. If a problem is raised prior to the next release, it can be reverted back to ascii.
I'm OK with changing to binary, let's see what others will say.
Feel free to merge after the change to binary as the default is made.
The behavior of deprecated exportShape is unchanged. Binary STL format support is not added to exportShape. It continues to export ASCII format.
@lorenzncode Is this ready to merge?
@jmwright Yes, in summary:
Provide binary STL export format option Binary is now the default for STL export
also tests excluded from coverage calculation
@lorenzncode Thanks!