Skip to content
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

SVG export enhancements #1277

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lorenzncode
Copy link
Member

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.

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.
@codecov
Copy link

codecov bot commented Feb 26, 2023

Codecov Report

Merging #1277 (ab7c6fe) into master (9c519e6) will decrease coverage by 0.07%.
The diff coverage is 66.66%.

❗ 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%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jmwright
Copy link
Member

It seems like this PR is also related to #1282 and #487

@Jopie01
Copy link

Jopie01 commented Oct 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants