Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
bejant
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by bejant »

Edit: filed as issue #4034.

In another topic, TheMarkster wrote that he had written a macro to easily enable / disable BOPCheck. Several regulars agreed that it would be handy to enhance the macro and provide a button or tickbox in the Check Geometry widget to easily toggle BOPCheck on and off instead of the existing Tools > Edit Parameters route. So, before I put in a ticket I'm opening this discussion thread.

The BOPCheck discussion I mentioned starts here:
https://forum.freecadweb.org/viewtopic. ... 10#p316228
Last edited by bejant on Mon Jun 24, 2019 10:31 pm, edited 1 time in total.
openBrain
Posts: 6518
Joined: Fri Nov 09, 2018 5:38 pm

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by openBrain »

Sure it would be a nice idea.
Technically speaking I won't say "provide a button or tickbox in the Check Geometry widget to easily toggle BOPCheck on and off instead of the existing" but "provide a checkbox in the Check Geometry widget that will bind to the parameter value currently used". ;) So it's easier and less risky to code, and the old way still works. ;)
openBrain
Posts: 6518
Joined: Fri Nov 09, 2018 5:38 pm

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by openBrain »

Actually ATM there is no HMI in the task panel when running "Check Geometry". Only result is displayed. Maybe a message box at check launching time asking "Do you want to also perform the BOPCheck ? Yes/No" would be enough ?
TheMarkster
Posts: 2720
Joined: Thu Apr 05, 2018 1:53 am

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by TheMarkster »

Edit: https://github.com/FreeCAD/FreeCAD/pull/2291

How about a new "settings" panel in the task dialog? Currently it would only contain a checkbox to toggle RunBOPCheck parameter, but perhaps other settings could be added in the future. Open Cascade allows quite a few parameters to the bop check operations, which we currently set all to true (where the currently installed library supports them) in order to run all the tests. This from the source code:

Code: Select all

  //all settings are false by default. so only turn on what we want.
  BOPCheck.ArgumentTypeMode() = true;
  BOPCheck.SelfInterMode() = true;
  BOPCheck.SmallEdgeMode() = true;
  BOPCheck.RebuildFaceMode() = true;
#if OCC_VERSION_HEX >= 0x060700
  BOPCheck.ContinuityMode() = true;
#endif
#if OCC_VERSION_HEX >= 0x060900
  BOPCheck.SetParallelMode(true); //this doesn't help for speed right now(occt 6.9.1).
  BOPCheck.SetRunParallel(true); //performance boost, use all available cores
  BOPCheck.TangentMode() = true; //these 4 new tests add about 5% processing time.
  BOPCheck.MergeVertexMode() = true;
  BOPCheck.CurveOnSurfaceMode() = true;
  BOPCheck.MergeEdgeMode() = true;
phpBB [video]
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
UR_
Posts: 1348
Joined: Tue Jan 03, 2017 8:42 pm

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by UR_ »

TheMarkster wrote: Tue Jun 25, 2019 1:17 am How about a new "settings" panel in the task dialog?
Thank your immediately PR ;)

Warning: off topic!

While you are fooling around at TaskCheckGeometry getting familiarized with the code, :lol:
it would be nice to get following FR solved:

There is this possibility to "save" data from this tab to clipboard.
Perhaps for communication with your team mate to solve some problems. :roll:

Screenshot 001.png
Screenshot 001.png (17.48 KiB) Viewed 900 times

But there is no way, except screenshots, for part below.

Screenshot 002.png
Screenshot 002.png (17.25 KiB) Viewed 900 times

Would it possible to repeat output at least to report view for further access.
Otherwise you will have only some "deadlocked" information. :(
TheMarkster
Posts: 2720
Joined: Thu Apr 05, 2018 1:53 am

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by TheMarkster »

UR_ wrote: Tue Jun 25, 2019 4:40 am
TheMarkster wrote: Tue Jun 25, 2019 1:17 am How about a new "settings" panel in the task dialog?
Thank your immediately PR ;)

Warning: off topic!

While you are fooling around at TaskCheckGeometry getting familiarized with the code, :lol:
it would be nice to get following FR solved:

There is this possibility to "save" data from this tab to clipboard.
Perhaps for communication with your team mate to solve some problems. :roll:
This is a good idea. I wouldn't want to just take over the clipboard since the user might have something in it he wants to keep. I think it should go to the report view whenever an error is found. It is then simple enough to copy that information to the clipboard should the user wish to do so. I'll do this as a separate pull request since it is a separate matter. https://github.com/FreeCAD/FreeCAD/pull/2293

In this video I have 2 objects in the document. One (Revolve) has some normal BRep errors that are found without BOP check enabled. The other (Compound001) has BOP Algo errors not found during the usual check without BOP check enabled.

phpBB [video]
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
UR_
Posts: 1348
Joined: Tue Jan 03, 2017 8:42 pm

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by UR_ »

TheMarkster wrote: Tue Jun 25, 2019 7:47 pm I'll do this as a separate pull request since it is a separate matter.
Thank you for this prompt delivery! :gift_heart:
User avatar
bejant
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by bejant »

TheMarkster wrote: Tue Jun 25, 2019 1:17 am How about a new "settings" panel in the task dialog?
Looks good! I have a small suggestion, which is to simplify the tool tip message like this:

"Extra boolean operations check that can sometimes find errors that the regular geometry check misses, but which said These errors do not always mean the checked object is unusable."

so it now reads:

"Extra boolean operations check that can sometimes find errors that the regular geometry check misses. These errors do not always mean the checked object is unusable."

UR_ wrote: Tue Jun 25, 2019 4:40 am Would it possible to repeat output at least to report view for further access.
I like that too. (And it's interesting to see how the original thing requested in the ticket gets better).


Thank you both!
User avatar
bejant
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by bejant »

Oops - I just saw that the PR was already merged.
User avatar
Kunda1
Posts: 10973
Joined: Thu Jan 05, 2017 9:03 pm

Re: Discussion topic for more easily enable / disable BOPCheck in Check Geometry

Post by Kunda1 »

Can issue #4034 be closed ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Post Reply