Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by adrianinsaval »

MRx wrote: Thu Jan 20, 2022 2:21 am ... in this discussion it has been advised to add a chamfer/fillet to the edges.
... now increasing the tolerance to sub micrometer is worse than chamfer/fillet to the intersecting edge? please explain in detail so everyone will understand.
The chamfer/fillet will work until the next refining / down/upgrading and then the issue will be back again. It's just a temporary workaround.
Did you get an actual error, not BOP check error but a failed boolean operation, on this model afterwards? was it possible to make the operation successful after modifying the tolerance? It's just this that I've been asking but you never answer my questions. I'm not saying 0.0001 is an unacceptable tolerance, what I'm saying is, does changing the tolerance actually solve the problem or does it only hide the problem from BOP check, only to give you trouble anyways when performing a boolean operation? Or another possibility, is this just one of those false positives from the BOP check and we are cracking our heads just to please a flawed test and flawed interpretations of said test while the geometry doesn't actually give problems?
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by MRx »

I have had issues in an area with an intersected hole, but that said I cannot say if it was the intersected hole itself or something else.
It will be easier for me now to classify issues because I have cleaned up my entire project and know what to look for in the future.
Boolean operations can be very picky, I even had them fail on a healthy project it very much depends what and where they intersect particular parts of an object.

For me I have set the rule that the geometry checker has to be clean, i guess only opencascade developers can give a clear answer about that (and possibly only those ones who are really into that topic).
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by adrianinsaval »

That might not be a good parameter IMO, one because of the potential false positives, second because your fix of raising the tolerance might not be fixing but just hiding the issue from the check.
You didn't answer some of the more important things so I'm asking again and adding some stuff, hopefully the listing will help you notice and address more of them.
  1. were you able to make a failing operation succeed by changing the tolerance of the shape before the operation?
  2. Or does your conclusion that raising the tolerance fixes issues come solely from the BOP check results?

    Also,
  3. can you explain/show with a minimal file what operation failed with the intersecting hole shape?
  4. how close to the problematic edge was the operation and what operation?
  5. And what exactly do you mean by issue here?
I have had issues in an area with an intersected hole
visibly bugged shapes? (twisted, missing a face, etc please give details)
full fail? (no resulting shape, just error message)
or visually ok but fails BOP check?
User avatar
grandcross
Posts: 348
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by grandcross »

One thing is conspicuously absent in this conversation, and way too many similar conversations about OCC errors.

Nowhere is there an explanation of what the error BOPAlgo_InvalidCurveOnSurface is. Not how it applies to this part or any other part, but what the error actually is. What was checked in OpenCascade that threw the error. Without an understanding of what the error ACTUALLY is no proposed fix can be evaluated intelligently.

Seriously folks, I'm getting the same error in completely different circumstances and none of the kludges suggested here would fix it. I still have no idea what the error is after seven pages of thread.
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by MRx »

BOPAlgo_InvalidCurveOnSurface I'd explain it as there's a surface and on that surface there's a calculated line which actually does not entirely match the surface. Problems are usually in a range which a user cannot identify visually.

If you get into surfaces a little bit more it's still a "hot" topic and the surface workbench is also crashing from time to time, so I'm happy to not use it too often.
The increased tolerance will cause things to match up again, too high tolerances will destroy the object however by potentially snapping wrong vertices together. In some cases it's useful, and in some cases it's bad.

FreeCAD lacks an option to rebuild a project and eliminate existing tolerances. Sometimes tolerances evolve terribly through the design stage of an object ending up with the destruction of the object itself.
"refining"/removeSplitter (BRepBuilderAPI_Sewing as far as I remember) an object itself is a potentially dangerous option but there are also some useful cases where it can be applied, It carries a tolerance setting option and might increase the tolerance for some vertices.

The BOP Check let's you swim between the good and the bad and freecad gives the ultimate decision to the user if he wants to go on with a defect object. It takes some experience to identify which errors are critical at what time. Follow up errors can be a big problem with other mathematical procedures in various workbenches.
An object might look fine - but might be internally garbled and cause many issues eg. with the Path workbench.
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by tanderson69 »

Summary: Anything using the shapefix package of occt can trigger the BOPAlgo_InvalidCurveOnSurface error. Yes refine/removesplitter uses shapefix. I did a deep dive on this last year.

My advice: Inspect the actual tolerances of the edges that trigger the error and see if they makes sense. Making sense of tolerance values is pure intuition. You are just going to have to look at a lot of models and tolerances. 1.e-7 is the floor and the base of your comparisons. The more 'curvy' the shapes the looser the tolerance. If you decide a BOPAlgo_InvalidCurveOnSurface error is a valid problem, I would do some form of modeling to fix it. As a user of a cad program, I would NEVER manually change the tolerance value in a hope to fix an error. Oh you can get the error to go away, but you will create many more problems. With all that being said, if you don't want/can't put this much time/effort into this, then ignore the error.

Why I added the bop check: I had some modeling data that looked good and passed the normal brep check, but still failed on some modelling operations. Looking into it, I discovered the tolerances for this model was bigger than the model itself. There was at least one more situation were bop check pointed out a modeling operation we had done wrong in freecad that passed then normal brep check, don't remember the specifics.
drmacro
Veteran
Posts: 8806
Joined: Sun Mar 02, 2014 4:35 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by drmacro »

tanderson69 wrote: Mon Jun 05, 2023 1:01 pm Summary: Anything using the shapefix package of occt can trigger the BOPAlgo_InvalidCurveOnSurface error. Yes refine/removesplitter uses shapefix. I did a deep dive on this last year.

My advice: Inspect the actual tolerances of the edges that trigger the error and see if they makes sense. Making sense of tolerance values is pure intuition. You are just going to have to look at a lot of models and tolerances. 1.e-7 is the floor and the base of your comparisons. The more 'curvy' the shapes the looser the tolerance. If you decide a BOPAlgo_InvalidCurveOnSurface error is a valid problem, I would do some form of modeling to fix it. As a user of a cad program, I would NEVER manually change the tolerance value in a hope to fix an error. Oh you can get the error to go away, but you will create many more problems. With all that being said, if you don't want/can't put this much time/effort into this, then ignore the error.

Why I added the bop check: I had some modeling data that looked good and passed the normal brep check, but still failed on some modelling operations. Looking into it, I discovered the tolerances for this model was bigger than the model itself. There was at least one more situation were bop check pointed out a modeling operation we had done wrong in freecad that passed then normal brep check, don't remember the specifics.
Since I don't think this thread is about models created with Curves or Surfaces workbench...are the tolerances you refer to available to the end user?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by tanderson69 »

drmacro wrote: Mon Jun 05, 2023 2:08 pm Since I don't think this thread is about models created with Curves or Surfaces workbench...are the tolerances you refer to available to the end user?
I was referring to things like this post where it appears the occt geometry tolerances are being set by a user through the python console.
drmacro
Veteran
Posts: 8806
Joined: Sun Mar 02, 2014 4:35 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by drmacro »

tanderson69 wrote: Mon Jun 05, 2023 11:06 pm ...
I was referring to things like this post where it appears the occt geometry tolerances are being set by a user through the python console.
[/quote]

Ahh...I see.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
grandcross
Posts: 348
Joined: Sun Oct 11, 2015 3:08 pm
Contact:

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by grandcross »

MRx wrote: Mon Jun 05, 2023 3:39 am BOPAlgo_InvalidCurveOnSurface I'd explain it as there's a surface and on that surface there's a calculated line which actually does not entirely match the surface. Problems are usually in a range which a user cannot identify visually.

If you get into surfaces a little bit more it's still a "hot" topic and the surface workbench is also crashing from time to time, so I'm happy to not use it too often.
The increased tolerance will cause things to match up again, too high tolerances will destroy the object however by potentially snapping wrong vertices together. In some cases it's useful, and in some cases it's bad.

FreeCAD lacks an option to rebuild a project and eliminate existing tolerances. Sometimes tolerances evolve terribly through the design stage of an object ending up with the destruction of the object itself.
"refining"/removeSplitter (BRepBuilderAPI_Sewing as far as I remember) an object itself is a potentially dangerous option but there are also some useful cases where it can be applied, It carries a tolerance setting option and might increase the tolerance for some vertices.

The BOP Check let's you swim between the good and the bad and freecad gives the ultimate decision to the user if he wants to go on with a defect object. It takes some experience to identify which errors are critical at what time. Follow up errors can be a big problem with other mathematical procedures in various workbenches.
An object might look fine - but might be internally garbled and cause many issues eg. with the Path workbench.
This is VERY useful. I wish it had been the first reply :)
Post Reply