Invalid geometry

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!
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Invalid geometry

Post by perot »

What's wrong with this exceeding simple geometry? When I apply Part:CheckGeometry on this object, it reports problems associated with the contour of the drill hole's opening. Somehow this is related to the cut that removes the back part of the base cylinder. If I dissolve that cut, and check the cyclinder with the drill hole, everything's fine, even though the dissolved cut is entirely unrelated to the drill hole (it does not cut through the drill hole, nor effects it in any other way).

So, why is there a problem, and how to avoid it?

This is of course a simplified version of a much larger model I have this problem with.

Cheers Peter

shot.png
shot.png (70.27 KiB) Viewed 1259 times

Code: Select all

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23578 (Git)
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)
Attachments
problem.FCStd
(36.88 KiB) Downloaded 27 times
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Invalid geometry

Post by TheMarkster »

Select this edge and apply a very small chamfer. I used 0.011 mm and it worked to resolve the issue.
Snip macro screenshot-297967.png
Snip macro screenshot-297967.png (76.8 KiB) Viewed 1249 times
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Invalid geometry

Post by drmacro »

Interestingly, the same object done in Part Design with two sketches is fine... :?: :roll:
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Invalid geometry

Post by chrisb »

I have increased the cube to avoid all so called coplanar problems. To no avail. Then I swapped the sequence of subtractions and now it works without geometry errors.
Attachments
noproblem_cb.FCStd
(11.78 KiB) Downloaded 15 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: Invalid geometry

Post by perot »

TheMarkster wrote: Sun Jan 23, 2022 4:11 pm Select this edge and apply a very small chamfer. I used 0.011 mm and it worked to resolve the issue.

Snip macro screenshot-297967.png
Indeed! How can complicating the surface make problems disappear. Scratching head ...

So later today I'll try that solution with my full model. There it'll require a bit of re-arranging, for which I do not have time right now. I'll get back on this.

Thanks a lot!

Cheers Peter
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Invalid geometry

Post by chrisb »

Errors shown in CheckGeometry are most often, but not always an indicator that something bad will happen in the future. Sou you can try to continue, similar as with the fillets, and see if the issue vanishes all by itself.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: Invalid geometry

Post by heda »

it has something to do with the large cylinder seam.
the orientation angle is at zero in the problem model, the same with chrisb's model, however in the problem model the seam is no longer visible - it has magically disappeared, whereas it is visible in chrisb's model.

you probably do not need to remodel as such, your model starts working when the angle is 94 and above.
(maybe some occ guru will say why this is obvious and why it has to be this way :-))
Snip macro screenshot-7a9ec4.png
Snip macro screenshot-7a9ec4.png (28.45 KiB) Viewed 1173 times
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: Invalid geometry

Post by kisolre »

As always Refine=True is the reason...
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: Invalid geometry

Post by perot »

chrisb wrote: Sun Jan 23, 2022 5:03 pm I have increased the cube to avoid all so called coplanar problems. To no avail. Then I swapped the sequence of subtractions and now it works without geometry errors.
I noticed this too, by now. Unfortunatly, swapping the subtractions is not an option, as I need the object with the drill hole, but the backside not cut away, in another context too (as a clone).

I also noticed another way of avoiding the problem, which may be applicable in my full model. If the base cylinder is rotated by 180° about it's axis, the problem goes away. For this there is no need to disassemble the tree, you just select the base cylinder and enter 180° under Properties/Placement/Angle. For the model proper, this is a no-op, as the cylinder is rotated about it's symmetry axis. However, Open Cascade's cylindrical surfaces always have a "seam" along the side, and this seam gets rotated to the other side, where in the model I posted it gets cut away.

Cheers Peter

PS.: Originally, I thought the seams exist because every surface in OpenCascade needs to be a simply connected manifold, but I realised that that does not explain the seams on spheres. Does anybody know more about the seams? Seems it'd be beneficial to understand them better.
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: Invalid geometry

Post by perot »

chrisb wrote: Sun Jan 23, 2022 6:17 pm Errors shown in CheckGeometry are most often, but not always an indicator that something bad will happen in the future.
That was my experience too, so I aquired the habit to, from time to time, CheckGeometry all the objects I created, and if possible, fix the ones with problems.

Cheers Peter
Post Reply