[SOLVED] The use of non-solids for booleans when parts appear solid?

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!
Post Reply
sevalecan
Posts: 3
Joined: Fri May 07, 2021 3:32 am

[SOLVED] The use of non-solids for booleans when parts appear solid?

Post by sevalecan »

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

TL;DR, try to Boolean Union some parts, get error about non-solids(Even when all constituent parts appear to be solid), does not generate part correctly. Check Geometry doesn't indicate any errors so far.

Attached is my FCstd file. I get this issue that when I attempt to combine thread lead-in with an existing fusion to make a bottle. When I try to fuse the solid bottle with theads with the thread lead-out, it says attempting a boolean operation with non-solids can do unexpected things. Except, to the best of my knowledge, all of my previous steps have resulted in a solid. Check geometry doesn't fail on any component, and I can see the part when selected in the tree (and I'm sure we all know when something breaks, that final step either disappears or only shows a piece).

This is an extended saga I've been going through for the last several days where combining shapes (particularly threads in to other things) leads to bizarre behavior. If I make the threads interfere with the object I want to union with, sometimes it works, sometimes it doesn't, if I try to make them just touch the surface, either by creating the profile to match with the neck of the bottle, or by making it interfere and doing a circular cut, sometimes it works, sometimes it doesn't.

If I try to shift the threads to not meet at the circular seem (which I think should be something someone /can/ do), sometimes it works, sometimes it doesn't. If I prevent the threads from meeting the top or bottom of the neck cylinder, sometimes that helps, sometimes it doesn't. Usually in all these cases a shell disappears.

Of course you will see by the history that I've switched to modeling with the Part workbench because threads were, according to some wiki info somewhere, supposed to be easier to make into a solid from that workbench set than from Part Design. Seemed to actually work better on average, but I guess this isn't my day(Or last 4 days, to be precise).

I have made another bottle almost exactly like this, simply with different dimensions on the OD. I used slightly different methods, somehow, after fighting for days, I got the cap to work which was much more difficult than the bottle.

Sometimes if I set all the fusions, ETC, to "false" for refine object, it works, but also sometimes it doesn't.

I do Check Geometry on the part, sometimes it tells me of issues (but no real indication on how to solve them, more hunt and peck). In this case it doesn't seem to be telling me much.

So, either I'm consistently doing something really stupid (and that would be great, because then I could not do that and have all my parts instead of wasting days on redesigning the same thing over and over), or FreeCAD really doesn't like combining complex shapes. I've had similar issues with things disappearing just by trying to sweep a tube out of another tube. I also had to attempt about 5 different approaches until that 'worked'.

I did manage to get a version of this current bottle to not outright break yesterday. The final fusion showed the full part, but some meshes must've been generated strangely as after I exported it to STL and imported into Prusa Slicer, it had some weird face concentric with the neck circle and the threads all chopped up, neither of which existed in the model from what I could see. So, I tried reapproaching several steps by reading answers and trying things 5 different ways each, and I'm stuck again.

I /have/ gotten thread lead-ins and lead-outs designed like this to also work within the last few days, so I'm stumped. It at least seems to be one of the components giving the most difficulty, but not one I'm willing to forego.

Sorry for the rant. I really do appreciate FreeCAD as it keeps me away from very expensive software. In the event that I am not just a total idiot, it seems like there is room for improvement on how shape combinations are done, but that is outside of my expertise to help with. In the event that I am just an idiot, here's hoping there's a quick fix to my misery.
Attachments
SilicaBottle50mm_What.FCStd
(1.31 MiB) Downloaded 15 times
Last edited by sevalecan on Mon May 10, 2021 6:16 pm, edited 1 time in total.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: The use of non-solids for booleans when parts appear solid?

Post by chrisb »

CheckGeometry of Chamfer shows lots of errors.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
sevalecan
Posts: 3
Joined: Fri May 07, 2021 3:32 am

Re: The use of non-solids for booleans when parts appear solid?

Post by sevalecan »

I will grant you that. Was pretty sure I ran the geometry checker on the chamfer. That said, and I don't know if this is unique to me(And again if there is something I am missing), the geometry checker has not been useful at all in identifying how to correct a problem or what the mistake was. I have done similar geometry before and sometimes had issues, sometimes not.

Here are 3 more spins on this same exact problem. I removed the thread interference with the neck revolve, tried it, got geometry checker errors.

I added the interference back, attempted a union, and got geometry checker errors (and the neck disappeared)

I copied the neck, used it to perform a cut on the threads with interference, and then attempted to union this cut with the neck, which also resulted in geometry errors.

I see self-intersecting issues with edges and vertices, but my thread spacing should avoid self-interference from the helix. This was also the motivation behind the cut attempt above with interference, and the version with no interference. So it seems different geometry would be causing the issue

I also adjusted the helix starting Z distance and removed the transform on the sweep, which I thought helped before, but did not help with this one.

Sometimes it's the tail that I'm trying to add to the threads, sometimes it seems to be the threads unioning with a cylindrical part. Even if there are errors, I don't understand the solution. Let's say that there are "edge too short" or 'vertex' errors in the self intersecting check. So, if those are related to tolerances, I have no idea how to resolve it. I created a sketch referencing the face with the end of a thread, for instance, I took two reference geometry lines from the thread and used coincident constraints with a quadrilateral to replicate the profile.

Using one vertex on that sketch, I translate origin for a new sketch normal to the Z axis, and then pull in reference goemetry from the end of the thread again and create a line parallel with this, with the end point coincident with the reference geometry, and then I use vertices from those sketches to create another plane, and create a vertical line to reference my new, smaller diameter helix around, and then sweep the same profile.

I extrude a plane based on the reference geometry in another translated Z-normal sketch and cut the new sweep, which should have a face lining up pretty much exactly with the end of the thread. I really don't know how I could possibly make it any closer.

So, I'm still stumped. Probably the weirder part is that I've somehow managed to generate a perfect STL file with 'broken' geometry, and yet my model comes out as intended. Sometimes.
Attachments
SilicaBottle50mm_What_NoInt.FCStd
(1.19 MiB) Downloaded 7 times
SilicaBottle50mm_What_IntWithCut.FCStd
(1.22 MiB) Downloaded 12 times
SilicaBottle50mm_What_Int.FCStd
(1.14 MiB) Downloaded 9 times
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: The use of non-solids for booleans when parts appear solid?

Post by chrisb »

You have indeed respected the common pitfalls described in the Tips section of the Thread for Screw Tutorial, and yet it doesn't work. I will give it a last try and attach the section to the helix.

We have also seen that PartDesign threads can work even if Part threads fail, and vice versa. The issues seem to come from the third party OCC kernel.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: The use of non-solids for booleans when parts appear solid?

Post by chrisb »

I think I found the culprit: It is in the sections of the thread. The endpoints of the horizontal lines must not lie on the surface of the revolve. So it was finally a coincidence thing. I have fixed this and some attachments, but the external references of Sketch015 failed.

I would recommend to place the section at the upper end of the helix and reuse the sketch for attaching Sketch015.
Attachments
SilicaBottle50mm_cb.FCStd
(1.11 MiB) Downloaded 10 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
sevalecan
Posts: 3
Joined: Fri May 07, 2021 3:32 am

Re: The use of non-solids for booleans when parts appear solid?

Post by sevalecan »

Thank you sir.

I also did some playing around over the weekend before coming back here and pretty much concluded the same thing. It seems I am better off in that case extending the thread angles through the revolve so that a surface is intersecting a surface.

This also seems to be the same issue that causes me to struggle with winding out a smaller helix from theads at something other than a 90 degree angle. It looks like there's some "close but not quite" math issues when FreeCAD (and excuse my terminology as I don't know how things are described from the internal source code size) attemptes to see if two vertices are equal, or if two edges or an edge and a surface are coincident.

I was able to try some things with that thread tail by making a shell, expanding it in drafting and doing a cut on the thread instead, which worked but produced funky geometry. Since angles in a non-polar coordinate system are going to introduce inaccuracies here, I expect that's also part of my issue with some of the other geometry. There might be some tricks I can come up with to sort that, under the assumption there was a case where I felt a specific angle was critical, like slicing at 90, doing a union, then rotating after the operation.

I then went back to Part Design and attempted threads with some of the new 'rules' I established, and so far so good. Using that intersection and not having the line endpoint on the revolve or a cylinder seems to help a lot.

I need to do a bit more playing around and make sure of a few things, if I'm motivated enough I will try to write up a guide on a few of these pitfalls because it doesn't seem to be information I have managed to run across yet.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: The use of non-solids for booleans when parts appear solid?

Post by chrisb »

sevalecan wrote: Mon May 10, 2021 6:15 pm if I'm motivated enough I will try to write up a guide on a few of these pitfalls because it doesn't seem to be information I have managed to run across yet.
I hope you are motivated. You may add additional things to consider to the "Tips" section of the Thread for Screw Tutorial.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply