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
surface of revolution
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: surface of revolution
Hi,
the complete Python script looks like this:
I hope the code snippet is self-explanatory.
Cheers,
Werner
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)
Cheers,
Werner
-
- Posts: 3
- Joined: Thu Oct 08, 2009 1:40 am
Re: surface of revolution
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
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