parabolica.py
· 383 B · Python
Исходник
import Part, math
focalPoint = 792.0
diameter = 2200.0
radius = diameter / 2
thickness = 3
m=App.Matrix()
m.rotateY(math.radians(-90))
parabola=Part.Parabola()
parabola.Focal = focalPoint
parabola.transform(m)
edge=parabola.toShape(0,radius)
Part.show(edge)
face=edge.revolve(App.Vector(0,0,0),App.Vector(0,0,1),360)
offset=face.makeOffsetShape(-thickness,0.001)
Part.show(offset)
| 1 | import Part, math |
| 2 | |
| 3 | focalPoint = 792.0 |
| 4 | diameter = 2200.0 |
| 5 | radius = diameter / 2 |
| 6 | thickness = 3 |
| 7 | |
| 8 | m=App.Matrix() |
| 9 | m.rotateY(math.radians(-90)) |
| 10 | parabola=Part.Parabola() |
| 11 | parabola.Focal = focalPoint |
| 12 | parabola.transform(m) |
| 13 | edge=parabola.toShape(0,radius) |
| 14 | Part.show(edge) |
| 15 | face=edge.revolve(App.Vector(0,0,0),App.Vector(0,0,1),360) |
| 16 | offset=face.makeOffsetShape(-thickness,0.001) |
| 17 | |
| 18 | Part.show(offset) |