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

added options to svg export #716

Merged
merged 24 commits into from
Feb 7, 2021
Merged

Conversation

shimwell
Copy link
Collaborator

@shimwell shimwell commented Feb 4, 2021

Proposed changes

This PR updates the export svg methods so that they allow new export options such as view angle and image width.

The animation examples script has also been updated to make use of this improved feature.

Ideally the gif made for the rotation should have their last and first frame blend into each other but I've not quite got the angles x,y,z correct

This makes use of quite a new feature in CQ so the docker image usedin circle ci might need rebuilding for this to pass

3d_svg

rotated_z

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactoring
  • Documentation Update (if none of the other choices apply)
  • New tests

Checklist

  • Pep8 applied
  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@shimwell
Copy link
Collaborator Author

shimwell commented Feb 5, 2021

Now with showHidden=False

rotated

strokeWidth=6

randoms

Now with showHidden=False and strokeWidth=None

randoms

height, width, marginTop, marginLeft settings can be used to make longer gifs still relatively small file size
rotated

rotated

Thanks to @jmwright for upgrading the svg feature in the newest release of CadQuery 2.1

@jmwright
Copy link

jmwright commented Feb 5, 2021

Wow! That's an excellent use of that new feature, and the animation script is really interesting. Thanks for letting me know.

@shimwell shimwell changed the base branch from develop to develop_combine2 February 7, 2021 18:59
@shimwell
Copy link
Collaborator Author

shimwell commented Feb 7, 2021

merging into a temporary branch to combine with the updated stp and stl exporters

@shimwell shimwell merged commit 1a030c6 into develop_combine2 Feb 7, 2021
@shimwell shimwell deleted the updating_export_method_try_2 branch February 10, 2021 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants