cadquery
cadquery copied to clipboard
SVG export enhancements
Add option to set scaling based on model dimension instead of autoscale. Change default projection to match cq-editor. Add option and set default "up" direction so it does not flip with changes to projectionDir. Remove margin from autoscale calculation when autoscale enabled. This allows margins to be edited without affecting scale.
Resolves #729, resolves #730.
Codecov Report
Merging #1277 (ab7c6fe) into master (9c519e6) will decrease coverage by
0.07%. The diff coverage is66.66%.
:exclamation: Current head ab7c6fe differs from pull request most recent head e18197d. Consider uploading reports for the commit e18197d to get more accurate results
@@ Coverage Diff @@
## master #1277 +/- ##
==========================================
- Coverage 94.16% 94.10% -0.07%
==========================================
Files 26 26
Lines 5451 5459 +8
Branches 925 927 +2
==========================================
+ Hits 5133 5137 +4
- Misses 188 191 +3
- Partials 130 131 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| cadquery/occ_impl/exporters/svg.py | 93.54% <66.66%> (-3.01%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
It seems like this PR is also related to #1282 and #487
Currently it is not supported to let the exporter decide the size of the image. you have set a height or width.
It would be nice to let the exporter decide the height and width based on the boundingbox and the margin. All based on a unitscale of 1 instead of the 0.75.