File size: 1,940 Bytes
ebc1b3a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | import FreeCAD as App
import Part
cream = (0.90, 0.86, 0.76)
coral = (0.94, 0.47, 0.34)
mint = (0.37, 0.63, 0.54)
screen = (0.09, 0.12, 0.17)
flame = (1.00, 0.80, 0.32)
# Main body.
body = Part.makeCylinder(4.5, 16, App.Vector(0, 0, 3))
body_obj = Part.show(body, "Body")
body_obj.ViewObject.ShapeColor = cream
# Nose cone.
nose = Part.makeCone(4.5, 0.2, 7, App.Vector(0, 0, 19))
nose_obj = Part.show(nose, "Nose")
nose_obj.ViewObject.ShapeColor = coral
# Coral band around the body.
band = Part.makeCylinder(4.58, 0.7, App.Vector(0, 0, 6.2))
band_obj = Part.show(band, "Band")
band_obj.ViewObject.ShapeColor = coral
# Porthole and rim.
window = Part.makeCylinder(2.0, 0.9, App.Vector(0, -4.8, 12.4), App.Vector(0, 1, 0))
window_obj = Part.show(window, "Window")
window_obj.ViewObject.ShapeColor = screen
rim = Part.makeTorus(2.2, 0.32, App.Vector(0, -4.75, 12.4), App.Vector(0, 1, 0))
rim_obj = Part.show(rim, "WindowRim")
rim_obj.ViewObject.ShapeColor = cream
# Three swept fins. The profile is drawn in XY, extruded along Z and then
# tipped upright so it becomes a vertical triangle.
fin_profile = Part.Face(
Part.makePolygon(
[
App.Vector(4.0, 0, 0),
App.Vector(9.5, 0, 0),
App.Vector(4.0, 6.5, 0),
],
True,
)
)
fin = fin_profile.extrude(App.Vector(0, 0, 0.8))
fin.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 90)
fin.translate(App.Vector(0, -0.4, 3.0))
for i in range(3):
blade = fin.copy()
blade.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), i * 120)
blade_obj = Part.show(blade, "Fin")
blade_obj.ViewObject.ShapeColor = mint
# Exhaust flame.
outer = Part.makeCone(0.7, 3.6, 6.0, App.Vector(0, 0, -3.0))
outer_obj = Part.show(outer, "OuterFlame")
outer_obj.ViewObject.ShapeColor = coral
inner = Part.makeCone(0.0, 1.8, 5.2, App.Vector(0, 0, -4.2))
inner_obj = Part.show(inner, "InnerFlame")
inner_obj.ViewObject.ShapeColor = flame
|