Skip to content

Shape Healing - Optimize FixFaceOrientation#584

Merged
dpasukhi merged 18 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:shell_fix_time_consumption
Oct 11, 2025
Merged

Shape Healing - Optimize FixFaceOrientation#584
dpasukhi merged 18 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:shell_fix_time_consumption

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

Rework algorithm with efficient data structures and graph-based connectivity analysis

@dpasukhi dpasukhi requested a review from Copilot June 24, 2025 14:17
@dpasukhi dpasukhi added 2. Bug Something isn't working 2. Enhancement New feature or request 1. Shape Healing Shape healing operation (fixing topology issue with BRep data) labels Jun 24, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reworks the shell construction algorithm by using efficient data structures and a graph-based connectivity analysis to optimize face orientation fixes.

  • Introduces incremental memory allocation via NCollection_IncAllocator and indexed maps for O(1) access.
  • Implements a graph-based DFS extraction for connected component analysis of face shells.
Comments suppressed due to low confidence (1)

src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx:258

  • [nitpick] Adding inline comments to explain the edge orientation retrieval and reversal logic in this loop would help future maintainers understand the intent behind the connectivity analysis.
           anExp1.Next())

Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx Outdated
@dpasukhi dpasukhi linked an issue Jun 24, 2025 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this from Todo to Integration in Maintenance Jun 25, 2025
@dpasukhi dpasukhi force-pushed the shell_fix_time_consumption branch from 589832b to e03cefd Compare September 20, 2025 12:20
@dpasukhi dpasukhi marked this pull request as ready for review September 22, 2025 10:29
@dpasukhi dpasukhi requested review from a team and AtheneNoctuaPt September 22, 2025 10:29
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx Outdated
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx Outdated
@dpasukhi dpasukhi requested a review from Copilot October 11, 2025 09:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.

Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx Outdated
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx Outdated
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx Outdated
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx Outdated
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx
…arity and efficiency with type aliases and consistent variable naming
@dpasukhi dpasukhi force-pushed the shell_fix_time_consumption branch from 5ad2f18 to 2c4c729 Compare October 11, 2025 09:58
@dpasukhi dpasukhi requested a review from Copilot October 11, 2025 09:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.

Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx
Comment thread src/ModelingAlgorithms/TKShHealing/ShapeFix/ShapeFix_Shell.cxx
@dpasukhi dpasukhi added this to the Release 8.0 milestone Oct 11, 2025
@dpasukhi dpasukhi merged commit 87c5031 into Open-Cascade-SAS:IR Oct 11, 2025
23 checks passed
@dpasukhi dpasukhi deleted the shell_fix_time_consumption branch October 11, 2025 11:19
@github-project-automation github-project-automation bot moved this from Integration to Done in Maintenance Oct 11, 2025
dpasukhi added a commit to dpasukhi/OCCT that referenced this pull request Oct 20, 2025
Fixed issue with unstable shape order after fixing.
Fixed reference data which was changed
dpasukhi added a commit that referenced this pull request Oct 21, 2025
Fixed issue with unstable shape order after fixing.
Fixed reference data which was changed
dpasukhi added a commit to dpasukhi/OCCT that referenced this pull request Oct 27, 2025
Second iteration of fixing regressions.
Fixed issue with loops and incorrect shell created.
Open-Cascade-SAS#584 affected some tests which were not updated on time. Now all test cases are passed.
dpasukhi added a commit that referenced this pull request Oct 27, 2025
Second iteration of fixing regressions.
Fixed issue with loops and incorrect shell created.
#584 affected some tests which were not updated on time.
Now all test cases are passed.
dpasukhi added a commit to dpasukhi/OCCT that referenced this pull request Dec 5, 2025
Refactor shell construction algorithm for improved performance:
- Add GetConnectedFaceGroups function using DFS to identify topologically 
  connected face groups before shell construction
- Replace O(nˆ3) iterations with pre-built connectivity maps (FaceEdgesMap, 
  EdgeFacesMap) using STL unordered_map with custom allocators for O(1) lookup.
- Process only the largest connected component first, significantly reducing 
  time complexity for large face sets
dpasukhi added a commit to dpasukhi/OCCT that referenced this pull request Dec 5, 2025
…AS#753)

Fixed issue with unstable shape order after fixing.
Fixed reference data which was changed
dpasukhi added a commit to dpasukhi/OCCT that referenced this pull request Dec 5, 2025
…AS#769)

Second iteration of fixing regressions.
Fixed issue with loops and incorrect shell created.
Open-Cascade-SAS#584 affected some tests which were not updated on time.
Now all test cases are passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Shape Healing Shape healing operation (fixing topology issue with BRep data) 2. Bug Something isn't working 2. Enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

STEP file with a lot of faces are stack during fixing

3 participants