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 the ability for the user to adjust the tolerance and angular tolerance of VRML tessellation #1066

Merged
merged 6 commits into from
May 3, 2022

Conversation

jmwright
Copy link
Member

With the KiCAD 3D model generator the generated VRML files were 6MB, which was too large compared to the ~200KB original files. I added the ability for the user to adjust the tolerance and angularTolerance so that I could decrease the file size. I don't think I'll be able to keep the same quality at ~200MB, but I can get vast improvements in file size with these changes.

@jmwright jmwright requested review from adam-urbanczyk and lorenzncode and removed request for adam-urbanczyk and lorenzncode April 27, 2022 14:58
@jmwright jmwright marked this pull request as draft April 27, 2022 15:14
@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #1066 (7d1129f) into master (d7724a8) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 7d1129f differs from pull request most recent head 077c48e. Consider uploading reports for the commit 077c48e to get more accurate results

@@           Coverage Diff           @@
##           master    #1066   +/-   ##
=======================================
  Coverage   96.32%   96.32%           
=======================================
  Files          40       40           
  Lines        9407     9407           
  Branches     1248     1248           
=======================================
  Hits         9061     9061           
  Misses        204      204           
  Partials      142      142           
Impacted Files Coverage Δ
cadquery/assembly.py 95.04% <100.00%> (ø)
cadquery/occ_impl/assembly.py 97.61% <100.00%> (ø)
cadquery/occ_impl/exporters/assembly.py 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@jmwright jmwright marked this pull request as ready for review April 27, 2022 19:50
@jmwright
Copy link
Member Author

I think this is ready for review now. @adam-urbanczyk and @lorenzncode I requested reviews from you two, but if either of you don't have time to review let me know and I'll request from someone else.

Copy link
Member

@lorenzncode lorenzncode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's expose tolerance and angular tolerance to Assembly.save as well.

exportVRML(self, path)

exportVRML(self, path, tolerance, angularTolerance)

.gitignore Show resolved Hide resolved
@jmwright
Copy link
Member Author

jmwright commented May 3, 2022

@lorenzncode Fixed CI, so I cna merge this now. Thanks for the reviews.

@jmwright jmwright merged commit c32c08e into master May 3, 2022
@jmwright jmwright deleted the vrml branch May 24, 2022 13:13
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.

3 participants