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

OCCT speedups and fixes #1292

Merged
merged 16 commits into from
Feb 28, 2024
Merged

OCCT speedups and fixes #1292

merged 16 commits into from
Feb 28, 2024

Conversation

snoyer
Copy link
Contributor

@snoyer snoyer commented Feb 16, 2024

Performance improvements for the OCCT reader:

  • color lookups turn out to add up a lot when they're done for every triangle of a re-meshed face.
  • re-meshing can be batched instead of done for each face/edge individually.
  • color lookups with XCAFDoc_ColorTool were also wrong in addition to being slow, using XCAFPrs to walk down the attribute tree and collect inherited style properties is more correct and faster

all in all the 18MB step file from https://www.printables.com/model/612925-creality-k1-corexy-motion-assembly-cad/files now opens in about 40sec 15sec instead of almost 5min

before and after:

f3d-k1-before

f3d-k1-after

also fixes a minor bug where progress was reported up to 150%, meaning the progress bar would look full before the actual processing was finished.

@snoyer
Copy link
Contributor Author

snoyer commented Feb 16, 2024

TestIGES.png baseline should not have needed an update now, but it should have been updated with the previous OCCT PR that did change the edges behavior. I guess the tiny variations from both PR just now added up past the test threshold?

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a5ecb6b) 96.57% compared to head (cedca38) 96.57%.
Report is 1 commits behind head on master.

Files Patch % Lines
plugins/occt/module/vtkF3DOCCTReader.cxx 98.82% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1292      +/-   ##
==========================================
- Coverage   96.57%   96.57%   -0.01%     
==========================================
  Files         138      138              
  Lines        8500     8553      +53     
==========================================
+ Hits         8209     8260      +51     
- Misses        291      293       +2     

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

Copy link
Member

@Meakk Meakk left a comment

Choose a reason for hiding this comment

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

Looks good. Why do we have a baseline change tho?

@snoyer
Copy link
Contributor Author

snoyer commented Feb 16, 2024

Looks good. Why do we have a baseline change tho?

Not sure to be honest. I think it's because of the edges showing, that should have needed an update with the last PR that fixed the edges but it didn't (only the STEP one needed to be updated).

But yeah I don't know why on this PR the IGES one failed and the STEP one didn't.

@snoyer snoyer changed the title OCCT speedups OCCT speedups and fixes Feb 17, 2024
Copy link
Contributor

@mwestphal mwestphal left a comment

Choose a reason for hiding this comment

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

some questions

Copy link
Member

@Meakk Meakk left a comment

Choose a reason for hiding this comment

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

I don't pretend to understand everything but that looks good to me

@mwestphal mwestphal merged commit 61eec04 into f3d-app:master Feb 28, 2024
39 checks passed
@snoyer snoyer deleted the occt-speedups branch February 28, 2024 14:48
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