surface of revolution

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
braveulysses

surface of revolution

Post by braveulysses »

hello,

i'd like to create a surface of revolution from a parabola. i have a parabola created from line segments using the python command line, but can't find the right command(s) for creating a surface. can anyone point me in the right direction?

much appreciated,

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

Re: surface of revolution

Post by wmayer »

Hi,

the complete Python script looks like this:

Code: Select all

import Part, math

# create a parabola
parabola=Part.Parabola()
# rotate the curve around the x-Axis and the origin (0,0,0)
revol=Part.SurfaceOfRevolution(parabola,App.Vector(0,0,0),App.Vector(1,0,0))
# create a shape out of the surface geometry in order to make it visible
shape=revol.toShape(0,math.pi, -5, 5)
Part.show(shape)
I hope the code snippet is self-explanatory.

Cheers,
Werner
braveulysses
Posts: 3
Joined: Thu Oct 08, 2009 1:40 am

Re: surface of revolution

Post by braveulysses »

hi werner,

exactly what i was looking for; thank you for taking the time to answer my question. i hope to get quite a bit of mileage out of freecad.

thanks again,

b
Post Reply