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

feat: create mesh in fewer iterations #868

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

drbh
Copy link
Contributor

@drbh drbh commented Jan 14, 2025

Hi @gumyr thank you for this awesome library!

this PR includes some small changes to the meshing logic that greatly improve the export speed for a couple of toy projects I'm working on (300K+ vertices), and wanted to share it as it may be helpful to others.

with change

Number of vertices Time (s)
100 0.003
1000 0.002
10000 0.014
100000 0.215

without change

Number of vertices Time (s)
100 0.004
1000 0.007
10000 0.509
100000 58.602

additional this PR adds a small test to ensure that 100K vertices always take less than 1 second.

pytest tests/test_mesher.py -v
# tests/test_mesher.py::InternalApiBenchmark::test_create_3mf_mesh PASSED

Please let me know if I should make any changes, and thanks again! 🙏

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.40%. Comparing base (5f7dfc2) to head (9e6bc2d).
Report is 21 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #868      +/-   ##
==========================================
- Coverage   96.49%   96.40%   -0.10%     
==========================================
  Files          31       31              
  Lines        9080     9112      +32     
==========================================
+ Hits         8762     8784      +22     
- Misses        318      328      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drbh
Copy link
Contributor Author

drbh commented Jan 14, 2025

just attempted to run mypy on both dev and this branch and they both seem to return the type issue so I'm not sure if these changes introduced the CI issue..

@gumyr gumyr merged commit 3f93e93 into gumyr:dev Jan 14, 2025
17 of 20 checks passed
@gumyr
Copy link
Owner

gumyr commented Jan 14, 2025

Thanks! 300K vertices - that's a very large model. This change will be very helpful those that dream big.

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