SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Oct 25, 2014, 04:10 PM
Registered User
Joined Sep 2011
1 Posts
Discussion
FreeCAD script to generate EDF shroud

Folks, I am attaching this script I wrote to generate an EDF shroud, which can later be printed on Shapeways. This is for the benefit of all the micro EDF fans out there.


# Free for non-commercial use

from FreeCAD import Part
from FreeCAD import Base
from math import pi

thickness = 0.8
nacelle_outer_dia = 32
nacelle_inner_dia = 7.1
nacelle_outer_height = 12
nacelle_inner_height = 8
vane_height = 6
mount_hole_spacing = 4
mount_hole_dia = 0.4
cone_taper_height = 20
cone_taper_dia = 10

nacelle_outer_rad = (nacelle_outer_dia/2.0)
nacelle_inner_rad = (nacelle_inner_dia/2.0)
cone_taper_rad = (cone_taper_dia/2.0)

nacelle_outer_ring = nacelle_outer_rad + thickness
nacelle_inner_ring = nacelle_inner_rad + thickness

ring_outermost = Part.makeCylinder(nacelle_outer_ring, nacelle_outer_height)
ring_outer = Part.makeCylinder(nacelle_outer_rad, nacelle_outer_height)
outer_diff = ring_outermost.cut(ring_outer)

ring_inner_outermost = Part.makeCylinder(nacelle_inner_ring, nacelle_inner_height)
ring_inner = Part.makeCylinder(nacelle_inner_rad, nacelle_inner_height)
inner_diff = ring_inner_outermost.cut(ring_inner)

vane_1 = Part.makeBox(nacelle_outer_rad - nacelle_inner_ring + thickness, thickness, vane_height)
vane_2 = Part.makeBox(nacelle_outer_rad - nacelle_inner_ring + thickness, thickness, vane_height)
vane_3 = Part.makeBox(nacelle_outer_rad - nacelle_inner_ring + thickness, thickness, vane_height)
vane_4 = Part.makeBox(nacelle_outer_rad - nacelle_inner_ring + thickness, thickness, vane_height)

stub_length = nacelle_inner_rad - (mount_hole_spacing/2.0) + 1

stub_1 = Part.makeBox(stub_length, thickness, thickness)
stub_2 = Part.makeBox(stub_length, thickness, thickness)

trf_1 = Base.Matrix()
trf_2 = Base.Matrix()
trf_3 = Base.Matrix()
trf_4 = Base.Matrix()
trf_5 = Base.Matrix()
trf_6 = Base.Matrix()
trf_7 = Base.Matrix()
trf_8 = Base.Matrix()

trf_1.move(Base.Vector(nacelle_inner_ring - (thickness/2.0), -(thickness/2.0), 0))
trf_2.rotateZ(pi)
trf_2.move(Base.Vector(-nacelle_inner_ring + (thickness/2.0), (thickness/2.0), 0))
trf_3.rotateZ(pi/2)
trf_3.move(Base.Vector((thickness/2.0), nacelle_inner_ring - (thickness/2.0), 0))
trf_4.rotateZ((-pi)/2)
trf_4.move(Base.Vector(-(thickness/2.0), -nacelle_inner_ring + (thickness/2.0), 0))

trf_5.move(Base.Vector(nacelle_inner_rad - stub_length + (thickness/2.0), -(thickness/2.0), nacelle_inner_height - thickness))
trf_6.move(Base.Vector(-nacelle_inner_ring + (thickness/2.0), -(thickness/2.0), nacelle_inner_height - thickness))

hole_left = Part.makeCylinder((mount_hole_dia/2.0), thickness)
hole_right = Part.makeCylinder((mount_hole_dia/2.0), thickness)
trf_7.move(Base.Vector((mount_hole_spacing/2.0), 0, nacelle_inner_height - thickness))
trf_8.move(Base.Vector(-(mount_hole_spacing/2.0), 0, nacelle_inner_height - thickness))

vane_1.transformShape(trf_1)
vane_2.transformShape(trf_2)
vane_3.transformShape(trf_3)
vane_4.transformShape(trf_4)
stub_1.transformShape(trf_5)
stub_2.transformShape(trf_6)
hole_left.transformShape(trf_7)
hole_right.transformShape(trf_8)

stub_1_hole = stub_1.cut(hole_left)
stub_2_hole = stub_2.cut(hole_right)

Part.show(outer_diff)
Part.show(inner_diff)
Part.show(vane_1)
Part.show(vane_2)
Part.show(vane_3)
Part.show(vane_4)
Part.show(stub_1_hole)
Part.show(stub_2_hole)

c1 = Part.makeCone(cone_taper_rad,nacelle_outer_rad,con e_taper_height)
c2 = Part.makeCone(cone_taper_rad + thickness,nacelle_outer_rad + thickness,cone_taper_height)
nacelle = c2.cut(c1)
trf_nac = Base.Matrix()
trf_nac.move(Base.Vector(0,0,-cone_taper_height + (thickness/2)))
nacelle.transformShape(trf_nac)
Part.show(nacelle)
heli_radiohead is offline Find More Posts by heli_radiohead
Reply With Quote
Sign up now
to remove ads between posts
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Sold 9305 het shroud and fan 90mm edf c payne Aircraft - Electric - Jets (FS/W) 0 May 05, 2014 06:11 PM
Wanted E-Flite Delta V-15 EDF Shroud (housing) Jetsom Aircraft - Electric - Jets (FS/W) 0 Feb 20, 2014 10:06 PM
Wanted 40mm EDF rotor to fit AEO 40mm edf shroud Keenan smith Aircraft - Electric - Jets (FS/W) 4 Feb 14, 2013 04:05 PM
Where to get EDF inlets and shrouds for GWS. Darn Servo ! Foamies (Kits) 2 Jun 30, 2003 03:04 PM