Code: Select all
ps1=(7.0,0,0)
ps2=(6.0,0,0.5)
ps3=(6.0,0,-0.5)
ps4=(0,0,0.5)
ps5=(0,0,-0.5)
edge1 = Part.makeLine(ps1,ps2)
edge2 = Part.makeLine(ps1,ps3)
edge3 = Part.makeLine(ps2,ps4)
edge4 = Part.makeLine(ps4,ps5)
edge5 = Part.makeLine(ps5,ps3)
cutProfile = Part.Wire([edge1,edge2,edge3,edge4,edge5])
helix0=App.ActiveDocument.addObject("Part::Helix","Helix")
helix0.Pitch=1.00
helix0.Height=14.00
helix0.Radius=7.00
helix0.Angle=0.00
helix0.LocalCoord=1
makeSolid=1
isFrenet=1
pipe = Part.Wire(helix0.Shape).makePipeShell([cutProfile],makeSolid,isFrenet)
cylinder=Part.makeCylinder(8,10)
cylinder.Placement=App.Placement(App.Vector(0,0,1),App.Rotation(0,0,0,1))
cylinder_cut=cylinder.cut(pipe)
Part.show(cylinder_cut)
Gui.getDocument("Unnamed").getObject("Helix").Visibility=False
FreeCAD 0.13, Linux x86_64