Gotcha, but it still doesn't make sense. This a bug or a rule?
The 2nd example I attached was based off of two sketches. One for the large cylinder, and then a second one to pocket an outer ring using the same face as the first sketch. Why wouldn't that variation work? Perhaps the Boolean function does not like to work with a solid which had a sketch that had been pocketed (instead of padded) over it? That is what seems to be the reason I could not get this to work.
This does cause an issue as the part that I'm trying to do this on is somewhat complex. Joining the sweep is the last step in which quite a few processes have been done to the smaller radius cylinder.
I've attached that part.
Union of threads and cylinder "Shape is Invalid"
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Union of threads and cylinder "Shape is Invalid"
- Attachments
-
- CableRelief_USB.FCStd
- (76.75 KiB) Downloaded 45 times
Re: Union of threads and cylinder "Shape is Invalid"
How are you creating your sweeps??? In all the files you posted they are non parametric. A sweep created with the Part Sweep tool should be linked to the helix and the sketch used as profile. Yours aren't.
Seriously, creating threads is a nightmare because of quite a few bugs competing against each other. Most of the time I struggle with this. There have been multiple requests for a detailed tutorial on creating screw threads. I've refrained from creating one because I can't find a reliable method.
Nope, magic incantation.dre99gsx wrote:Gotcha, but it still doesn't make sense. This a bug or a rule?
Seriously, creating threads is a nightmare because of quite a few bugs competing against each other. Most of the time I struggle with this. There have been multiple requests for a detailed tutorial on creating screw threads. I've refrained from creating one because I can't find a reliable method.
Heh.cblt2l wrote:normandc: maybe it is time for a stickied Thread thread
Re: Union of threads and cylinder "Shape is Invalid"
I hear you, and it is to be expected with software which is still under development. I wish I could find that one method that works for all scenarios, but if it these quirks are known issues that go deeper, than so be it.
Regarding the helix, I used an old script which will sweep along a path. Heck, I think your name was on it!
The sweep becomes it's own shape with no parametric steps. Perhaps the Sweep tool can help reduce some of these issues. I had previously generated a coil using the Sweep tool (successfully), but ran into the same Boolean issues.
Well, in the end, looks like I need to think through my part construction a bit to get around this. Thanks!
Regarding the helix, I used an old script which will sweep along a path. Heck, I think your name was on it!
Code: Select all
import Part, FreeCAD, math, PartGui, FreeCADGui
from FreeCAD import Base
# pick selected objects, where 1st selection is the trajectory and the 2nd is the section to sweep
s = FreeCADGui.Selection.getSelection()
try:
shape1=s[0].Shape
shape2=s[1].Shape
except:
print "Wrong selection"
traj = Part.Wire([shape1])
section = Part.Wire([shape2])
# create a Part object into the active document
myObject=App.ActiveDocument.addObject("Part::Feature","Sweep")
makeSolid = 1
isFrenet = 1
# Create the 3D shape and set it to the Part object
Sweep = Part.Wire(traj).makePipeShell([section],makeSolid,isFrenet)
myObject.Shape = Sweep
Well, in the end, looks like I need to think through my part construction a bit to get around this. Thanks!
Re: Union of threads and cylinder "Shape is Invalid"
Just wanted to update this thread on a method that has been working almost every time for me. I have been making threads using a helix of just one revolution (pitch = height). I wrote a macro that then copies that same thread as many times as I need, offseting each copy the same distance as the thread height. I then end up with a smooth thread.
This allows me to do boolean fusion or cuts without issue. I do rotate the thread slightly so that it does not start or stop at the same seam as the cylinder (thanks to the tips from here).
Something to try out if you run into trouble...
This allows me to do boolean fusion or cuts without issue. I do rotate the thread slightly so that it does not start or stop at the same seam as the cylinder (thanks to the tips from here).
Something to try out if you run into trouble...
Re: Union of threads and cylinder "Shape is Invalid"
A macro that works this way is available since a few month here: http://www.freecadweb.org/wiki/index.ph ... w_maker1_2andre wrote:Just wanted to update this thread on a method that has been working almost every time for me. I have been making threads using a helix of just one revolution (pitch = height). I wrote a macro that then copies that same thread as many times as I need, offseting each copy the same distance as the thread height. I then end up with a smooth thread.
The latest version is posted here: viewtopic.php?f=3&t=5198&start=20#p41199