New primitive HELIX

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
DoNotGood

New primitive HELIX

Post by DoNotGood »

Hi folks,

there's a pretty new primitive in FreeCAD called HELIX. My simple question is: How can I create a helix within a Python-Script? Until now I used the GUI to create one.

Bye, ...
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: New primitive HELIX

Post by wmayer »

With the very last revision I have added a new Python command to create the helix.

Code: Select all

import Part
helix=Part.makeHelix(0.5,5,1.5)
Part.show(helix)
The first parameter is pitch, second is height and third is radius.

Starting with the helix you can create more nice things

Code: Select all

g=helix.Edges[0].Curve
c=Part.Circle()
c.Center=g.value(0) # start point of the helix
c.Axis=(0,1,0)
c.Radius=0.1
p=c.toShape()
s=helix.makePipe(p)
Part.show(s)
Post Reply