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!
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by MRx »

Pn3mK5.png
Pn3mK5.png (115.65 KiB) Viewed 1669 times
> Now your story doesn't check out, how come a higher tolerance would fix it?

I think you understand now what I have written. Let's forget about the rest here.
Edit: I was wrong changing the tolerance to 2.09e-7 did not lead to a clean BOP check, although it did give different results, turns out the first time I was just running the check on the single edge since I hadn't reselected the body :oops: I suspect the same happened to OP here so it might have happened before too.
I just saw that yes -- I have messed up the test with the original tolerance value too. However setting the tolerance to 0.0001 still clears up the issue and practically that number is absolutely okay, for sure it's better than chamfering the edges.
The final floating point accuracy depends on a number of things, it's not a fixed number - so whatever OCC is calculating inside might have an effect on this.

I attached the testsample as a playground (I just created it a few minutes ago - and no I did not have that before either).
Attachments
intersection.FCStd
(234.58 KiB) Downloaded 26 times
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by adrianinsaval »

Can you explain in that file were you had a failure that was fixed by setting 0.0001 tolerance? From what I've been seeing setting that would lead to a higher tolerance.
Most of the shapes I found to have tolerances in e-7 range, I did not manage to clear any BOP check by setting a lower tolerance, but I did manage to get more errors. On the other hand the errors were not shown when using a tolerance of 0.0001, I'm not sure how raising the tolerance is meant to be a fix. I think it just makes BOP check miss the "problems" rather than fix them. Are you perhaps confused by the numbers ending in e-* and you think 1e-7 is bigger than 0.0001? I doubt that's the case but just to be sure.
Also, what's up with all the copies and using a separate body to make a pad? why not all in the same Body, are they necessary to reproduce the issue? (let's focus on the issue and forget for a second your history removal goals)
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by MRx »

I think you should study tolerances and their impact a little bit more, and try to really understand them. They can have a huge impact everywhere.
I might have mixed up lowering / increasing the tolerance yesterday since it was late already;
larger tolerance numbers fix the problem.

The issue is triggered by:
- refining the object
- downgrading / upgrading the object in the draft workbench (and that's why some items are outside of the body)
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by adrianinsaval »

well a higher tolerance would mean less accuracy, that should be universal. Of course they have huge impact, what I'm dubious about is the concept that arbitrarily raising the tolerance would actually solve problems. Maybe they are just not detected due to the inaccuracy. This also causes some contradictions in your reports were too much tolerance caused some points to be considered equal when they aren't, and I don't see how too little tolerance could cause something like that. It's obviously not so simple as you were saying "FreeCAD sets tolerances too high and messes up my models" (paraphrasing). Sounds like it's different issues and some of them are probably just problematic geometries for OCC.
Also do the issues really come from downgrading and upgrading? Did you not get the same when working solely in PD? What exactly is the issue for you? (can you show me an operation that doesn't work normally and is solved by changing the tolerance?)
Last edited by adrianinsaval on Wed Jan 19, 2022 6:12 pm, edited 1 time in total.
user1234
Veteran
Posts: 3261
Joined: Mon Jul 11, 2016 5:08 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by user1234 »

MRx wrote: Wed Jan 19, 2022 3:44 pm I think you should study tolerances and their impact a little bit more, and try to really understand them.
I think you should study and understand them, because adrianinsaval is right. The higher the tolerance, the worse the part. And if you set them per hand higher, that solves nothing, it is just ignoring. And with every boolean operation from this part to an other, you will destroy (destroy is not really the right term, increase their tolerances is more correct) more objects. This can lead, that things do not work precise enough. With a tolerance of 10e-4 (0.0001) accuracy, placements, CAM, exports can give out invalid results, due cain flaws.
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by MRx »

I think someone is not getting the point here.

... 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.

I am doing a lot of CNC work here, the typical accuracy I aim at is 50 micrometer. I very well know what the output of FreeCAD is delivering in terms of accuracy. If in practice higher tolerances are needed I would definitely NOT recommend FreeCAD due to all the issues it has, and if you have a manufacturing machine / CNC / EDM which can do higher precision you'll very likely not use FreeCAD with it either.

I am very concerned about the output from the geometry checker since it was one important part of the solution for my problem before.
Plus things on my side are advancing quicker than you might think the tolerance of my object already has an accuracy of 1e-7 (most of it except the round intersections), 1e-4 was the first step to get my things fixed.
heron
Posts: 307
Joined: Mon Apr 20, 2020 5:32 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by heron »

Hello, I have stumbled upon this problem and it happened to me as MrX commented above, I have a piece built in PD with a lot of work (about 40MB), which is broken.
I have tried to isolate the problem and finally I have been able to make a simple part that reproduces the error that my part had in one of the initial operations. File attached.
#
results_check_1.PNG
results_check_1.PNG (80.79 KiB) Viewed 1465 times
#
In this test part, the error doesn´t appear until the last pad is done. But If you modify the constraint of the sketch and make it shorter, then the error doesn´t appear, maybe it's because of the seam that is created in Pad001... I have no clue.
#
results_check_2.PNG
results_check_2.PNG (70.45 KiB) Viewed 1465 times
#
I do not think that modifying the tolerance is a solution to this problem, since these examples that we show are very simple, but in complex parts the error can appear after a feature that throws many errors with many faces and edges involved, and then wthat are you going to do?, modify one by one all the tolerances?

Edit: I forgot to include my freecad info:

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26761 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: Spanish/Spain (es_ES)

Regards.
Attachments
BOP_errors.FCStd
(45.35 KiB) Downloaded 23 times
User avatar
Shalmeneser
Veteran
Posts: 9443
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by Shalmeneser »

heron wrote: Thu Jan 20, 2022 9:00 am I have tried to isolate the problem and finally I have been able to make a simple part that reproduces the error that my part had in one of the initial operations. File attached.
No problem for me with Part_CheckGeometry check.

Code: Select all

OS: Windows 7 SP 1 (6.1)
Word size of FreeCAD: 64-bit
Version: 0.20.26498 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: French/France (fr_FR)
kisolre
Veteran
Posts: 4159
Joined: Wed Nov 21, 2018 1:13 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by kisolre »

heron wrote: Thu Jan 20, 2022 9:00 am In this test part, the error doesn´t appear until the last pad is done.
And it is Refine=True that makes it appear. Guys from OCC really needs to work on that.
heron
Posts: 307
Joined: Mon Apr 20, 2020 5:32 pm

Re: Intersecting Holes (BOPAlgo_InvalidCurveOnSurface)

Post by heron »

Shalmeneser wrote: Thu Jan 20, 2022 10:31 am No problem for me with Part_CheckGeometry check.
Really?, did you follow these steps?
- Select the Body object or last feature object (Pad002_BOP_error)
- Run Part_CheckGeometry check (make sure "Run BOP check" is select in settings)
kisolre wrote: Thu Jan 20, 2022 11:50 am And it is Refine=True that makes it appear.
Exactly, thanks for confirm
Post Reply