> I'm going to try to make wind generator airfoils from laser-cutted sheet > metal.
Cool. > > The orientation is so that the z-direction is the longest one, > x-direction is wind direction (as in the case of airplanes wing), and > y-direction is the shortest one. > > I will take cut-out profiles on several different z-positions, and also > few profiles on different x-positions. > I also need to make cutouts to the sheets so that they can slide across > each other (like in the following image for wood: > http://tinyurl.com/2dod3lx > The sheets will be heft welded together and finally fiber glass will be > placed as the outer surface. > > Originally I planned to make a simple program to calculate the shapes > from airfoil data (profile pictures and rotation vs z-position), but I > think using pythonocc could yield to more generic solution. > > For this I need two programs: > > 1. Parametric representation of wind generator airfoil. Including > profiles in different z-position, and rotation angle vs z-position. And > a script to generate complete (iterpolated) airfoil from this data. > > 2. A program to take airfoil shape (e.g. STEP/IGES import) and cutting > parameters (planes representing sheet metal positions, and their > thicknesses). This should output 2-D cutting profiles for laser cutter > preferably exporting DXF images. Here's a head start, that shows you how to make NACA profiles. If you don't use NACA shapes, just think of it as an analogy. You could use SDXF to export the data: http://nixbit.com/cat/multimedia/graphics/sdxf/# Though you need a good excuse not to use .iges or .step data. -jelle from OCC.Utils.Common import interpolate_points_to_spline_no_tangency from OCC.Utils.Construct import * from OCC.KBE.Level2API import Curve from OCC.Utils.Topology import * #=============================================================================== # GUI #=============================================================================== from OCC.Display.SimpleGui import init_display display, start_display, add_menu, add_function_to_menu = init_display() #=============================================================================== # CONSTANTS #=============================================================================== TOLERANCE = 1e-6 TRAITS = False EXPORT = 'iges' # 'step' #=============================================================================== # FUNCTIONS #=============================================================================== def naca_curve(length, thickness_to_chord, show=False): def y(x): x_c = x/c x_c2 = x_c * x_c x_c3 = x_c2 * x_c x_c4 = x_c3 * x_c y = 10*t*c*(0.2929*sqrt(x_c)-0.1260*x_c-0.3516*x_c2+0.2843*x_c3-0.1015*x_c4) return y c = length t = thickness_to_chord points_coord = [] x = 0.0 x_step = 0.1 while x<=c: points_coord.append([x,y(x)]) x += x_step crv1, crv2 = [], [] for point in points_coord: P1 = gp_Pnt(point[0], 0.0, point[1]) P2 = gp_Pnt(point[0], 0.0, -point[1]) if show: display.DisplayShape(map(make_vertex, [P1,P2])) crv1.append(P1) crv2.append(P2) #crv2.reverse() #crv1 += crv2 interpolated_curve1 = make_edge(interpolate_points_to_spline_no_tangency(crv1, False, False ) ) return interpolated_curve1 _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users