Exemple #1
0
 def get_flattened(self, glider, ribs_flattened):
     first, second = self.get_3d(glider)
     left, right = flatten_list(first, second)
     return left, right
Exemple #2
0
 def get_flattened(self, glider, ribs_flattened):
     first, second = self.get_3d(glider)
     left, right = flatten_list(first, second)
     return left, right
Exemple #3
0
 def shape(self):
     return flatten_list(self.get_spanwise(0), self.get_spanwise(1))
__author__ = 'simon'


prof = openglider.airfoil.Profile2D()
prof.importdat(os.path.dirname(os.path.abspath(__file__)) + "/testprofile.dat")

ballooning = BallooningBezier()
balloon = [ballooning(i) for i in prof.x_values]

r1 = Rib(prof, ballooning, [0., 0.12, 0], 1., 20 * math.pi / 180, 2 * math.pi / 180, 0, 7.)
r2 = r1.copy()
r2.mirror()
r1.recalc()
r2.recalc()

left, right = flatten_list(r2.profile_3d.data, r1.profile_3d.data)
ding = [numpy.array([0, 0]), numpy.array([1., 0])]

#[numpy.array([0,0]),numpy.array([1,0])

cell = Cell(r1, r2)
left2, right2 = flattened_cell(cell)
left_out = left2.copy()
left_out.add_stuff(-0.02)
right_out = right2.copy()
right_out.add_stuff(0.02)


openglider.graphics.Graphics2D([openglider.graphics.Line(left.data), openglider.graphics.Line(right.data),
                                openglider.graphics.Line(left2.data), openglider.graphics.Line(right2.data),
                                openglider.graphics.Line(left_out.data),
from openglider.glider.rib import Rib
import numpy
__author__ = 'simon'

prof = openglider.airfoil.Profile2D()
prof.importdat(os.path.dirname(os.path.abspath(__file__)) + "/testprofile.dat")

ballooning = BallooningBezier()
balloon = [ballooning(i) for i in prof.x_values]

r1 = Rib(prof, ballooning, [0., 0.12, 0], 1., 20 * math.pi / 180,
         2 * math.pi / 180, 0, 7.)
r2 = r1.copy()
r2.mirror()

left, right = flatten_list(r2.profile_3d.data, r1.profile_3d.data)
ding = [numpy.array([0, 0]), numpy.array([1., 0])]

#[numpy.array([0,0]),numpy.array([1,0])

cell = Cell(r1, r2)
left2, right2 = flattened_cell(cell)
left_out = left2.copy()
left_out.add_stuff(-0.02)
right_out = right2.copy()
right_out.add_stuff(0.02)

openglider.graphics.Graphics2D([
    openglider.graphics.Line(left.data),
    openglider.graphics.Line(right.data),
    openglider.graphics.Line(left2.data),