Union of threads and cylinder "Shape is Invalid"

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!
dre99gsx
Posts: 29
Joined: Fri Oct 11, 2013 11:55 pm

Union of threads and cylinder "Shape is Invalid"

Post by dre99gsx »

1. I created a cylinder
2. Created a sketch on the side of the cylinder of a triangle
3. Created a new helix sketch wrapping around the cylinder with a decent pitch and length
4. Ran a macro which extrudes along the helix path

- I get a nice thread like pattern, similar to a screw

5. I then try to Union the Sweep and the cylinder, and keep getting "Resulting Shape is Invalid"

Funny thing is if I move the triangle-like sketch away from the cylinder so it does not intersect the cylinder at all, and repeat, the union works well. But, when I then try to create another cylinder to bridge the gap between the threads and the original cylinder via a Union, I get "Resulting Shape is Invalid".

Thoughts?
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Union of threads and cylinder "Shape is Invalid"

Post by NormandC »

Screw thread creation has been discussed numerous times on the forum. Sorry but the forum is too slow at the moment for me to search for them, and I'll be honest I don't wish to repeat myself ATM. Maybe when the forum gets better I can help locate them if you don't manage to yourself.

Also, posting your FCStd file here would help us see what you may have done wrong. It is also always relevant to post info about your FreeCAD version, as is already explained in the "Read first before asking for help" topic pinned at the top of this forum.
dre99gsx
Posts: 29
Joined: Fri Oct 11, 2013 11:55 pm

Re: Union of threads and cylinder "Shape is Invalid"

Post by dre99gsx »

I searched for "Invalid Shape" and could not find any valid explanations that matched my situation.

I'm not as much concerned with how to create a screw. This thread was more about why I'm having an issue joining two separate objects and what causes the Invalid Shape issue.

Attached an example. Try to select both parts and create a Union.

I have this issue with v.13 as well as:
OS: Windows 7
Platform: 32-bit
Version: 0.14.2370 (Git)
Branch: master
Hash: a836759ebd91404954a778ff8885e152611576e1
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
Attachments
ScrewTest.FCStd
(47.67 KiB) Downloaded 82 times
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Union of threads and cylinder "Shape is Invalid"

Post by tanderson69 »

rotate the cylinder a little so that the cylinders seam edges doesn't coincide with the start and end of the sweep.
dre99gsx
Posts: 29
Joined: Fri Oct 11, 2013 11:55 pm

Re: Union of threads and cylinder "Shape is Invalid"

Post by dre99gsx »

That worked. I also tried changing the helix length such that it does not complete the last coil at the same location as the start (basically, instead of wrapping 6 complete times, I had it wrap 5.9 times). I could then do a CUT without a problem, but FUSION still showed invalid.

Not sure why it is doing this, but looks like I can now get it to work with a few options. Thanks!
dre99gsx
Posts: 29
Joined: Fri Oct 11, 2013 11:55 pm

Re: Union of threads and cylinder "Shape is Invalid"

Post by dre99gsx »

Or so I thought. I went the next step further and pocketed an outer ring from the cylinder. I then tried all the techniques mentioned above, but continue to get Invalid Shape.
Attachments
ScrewTest2.FCStd
(30.21 KiB) Downloaded 86 times
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Union of threads and cylinder "Shape is Invalid"

Post by tanderson69 »

why do you still have coincidences with a sweep end and the seam edge of the cylindrical face! I proved to you with that last iteration that, that is a problem condition.

1 closed boundary per sketch.
User avatar
cblt2l
Posts: 155
Joined: Sat May 15, 2010 3:59 am

Re: Union of threads and cylinder "Shape is Invalid"

Post by cblt2l »

dre99gsx wrote:Or so I thought. I went the next step further and pocketed an outer ring from the cylinder. I then tried all the techniques mentioned above, but continue to get Invalid Shape.
I'm not home so I can't look at your file, but from my experience adding a little clearance between the threads and the OD of the cylinder will help with the union and may subsequently help with your pad.

normandc: maybe it is time for a stickied Thread thread :lol:
dre99gsx
Posts: 29
Joined: Fri Oct 11, 2013 11:55 pm

Re: Union of threads and cylinder "Shape is Invalid"

Post by dre99gsx »

tanderson69 wrote:why do you still have coincidences with a sweep end and the seam edge of the cylindrical face! I proved to you with that last iteration that, that is a problem condition.

1 closed boundary per sketch.
Hmm.. I don't know what to tell you. I mentioned in my last response that I tried all the techniques mentioned here, and they did not work for this latest example. I may have submitted a saved version without the rotation, but if you try it, it won't work.
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Union of threads and cylinder "Shape is Invalid"

Post by tanderson69 »

dre99gsx wrote:
tanderson69 wrote:why do you still have coincidences with a sweep end and the seam edge of the cylindrical face! I proved to you with that last iteration that, that is a problem condition.

1 closed boundary per sketch.
Hmm.. I don't know what to tell you. I mentioned in my last response that I tried all the techniques mentioned here, and they did not work for this latest example. I may have submitted a saved version without the rotation, but if you try it, it won't work.
refering to screwtest2 (last file you uploaded): the top of the sweep no longers coincides with the cylinder seam, but the bottom still does.

Go back and use 2 sketches to make the screw body.
Attachments
ScrewTest2_ta1.FCStd
(248.66 KiB) Downloaded 77 times
Post Reply