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

[Mesh] Avoid false negatives during self-intersection checks #5002

Merged
merged 1 commit into from Sep 8, 2021

Conversation

AjinkyaDahale
Copy link
Contributor

@AjinkyaDahale AjinkyaDahale commented Aug 31, 2021

Fixes issue #4732.

Within the code, a different algorithm is used for intersection checks when
faces are found to be coplanar. That algorithm does not return the "intersection
line", which is used to remove false-positives. This however results in
false-negatives.


Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the FreeCAD forum!

  • Your pull request is confined strictly to a single module. That is, all the files changed by your pull request are either in App, Base, Gui or one of the Mod subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next ones
  • In case your pull request does more than just fixing small bugs, make sure you discussed your ideas with other developers on the FreeCAD forum. Small fix, but see https://forum.freecadweb.org/viewtopic.php?f=8&t=61757&p=528994#p528994.
  • Your branch is rebased on latest master git pull --rebase upstream master
  • All FreeCAD unit tests are confirmed to pass by running ./bin/FreeCAD --run-test 0
  • All commit messages are well-written ex: Fixes typo in Draft Move command text
  • Your pull request is well written and has a good description, and its title starts with the module name, ex: Draft: Fixed typos
  • Commit messages include issue #<id> or fixes #<id> where <id> is the FreeCAD bug tracker issue number in case a particular commit solves or is related to an existing issue on the tracker. Ex: Draft: fix typos - fixes #0004805

And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.20 Changelog Forum Thread.


Fixes issue FreeCAD#4732.

Within the code, a different algorithm is used for intersection checks when
faces are found to be coplanar. That algorithm does not return the "intersection
line", which is used to remove false-positives. This however results in
false-negatives.
@AjinkyaDahale
Copy link
Contributor Author

Possibly not complete since performing the check sometimes makes the mesh disappear temporarily until "repaired". Please test with the STL file provided in forum.

@AjinkyaDahale AjinkyaDahale marked this pull request as draft August 31, 2021 15:33
@chennes
Copy link
Member

chennes commented Aug 31, 2021

I can confirm that this compiles and runs, and both fixes the self-intersection problem, and introduces the "hidden mesh" problem.

@luzpaz luzpaz added the 🥅Mesh label Sep 1, 2021
@AjinkyaDahale AjinkyaDahale marked this pull request as ready for review September 6, 2021 18:31
@AjinkyaDahale
Copy link
Contributor Author

Marking as ready for review since @yorikvanhavre mentioned mentioned this somewhere (though I don't recall where)

@yorikvanhavre
Copy link
Member

Okay let's merge then. The hidden mesh bug doesn't seem critcal. (Indeed I have a déja-vu impression of having written that already somewhere, but can't find where 😆 )

@yorikvanhavre yorikvanhavre merged commit 642836d into FreeCAD:master Sep 8, 2021
@luzpaz
Copy link
Contributor

luzpaz commented Sep 8, 2021

Please add to the 0.20 Release Page

@AjinkyaDahale
Copy link
Contributor Author

Okay let's merge then. The hidden mesh bug doesn't seem critcal. (Indeed I have a déja-vu impression of having written that already somewhere, but can't find where laughing )

@yorikvanhavre: confirmed that I have an email where this was a reply. I guess you deleted the comment sometime.

@AjinkyaDahale
Copy link
Contributor Author

Please add to the 0.20 Release Page

Added to thread because I don't have edit access.

@AjinkyaDahale AjinkyaDahale deleted the fix-4732-self-int branch September 14, 2021 16:44
@AjinkyaDahale
Copy link
Contributor Author

Guess I did have that edit access after all. Made the changes.

@luzpaz luzpaz added WB Mesh Related to the Mesh Workbench and removed 🥅Mesh labels Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WB Mesh Related to the Mesh Workbench
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants