Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
looooo committed Feb 2, 2016
1 parent 7efad53 commit 1505c21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openglider/glider/parametric/glider.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ def get_arc_angles(self, arc_curve=None):
"""
arc_curve = ArcCurve(self.arc)

return arc_curve.get_rib_angles(self.rib_x_values)
return arc_curve.get_rib_angles(self.shape.rib_x_values)

@property
def attachment_points(self):
"""coordinates of the attachment_points"""
return [a_p.get_2d(self.shape)
return [a_p.get_2d(self)
for a_p in self.lineset.nodes
if isinstance(a_p, UpperNode2D)]

Expand Down
8 changes: 8 additions & 0 deletions openglider/glider/parametric/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ def rib_dist_interpolation(self):
num = self.cell_num // 2 + 1
return [[interpolation(i), i] for i in np.linspace(start, 1, num)]

@property
def fast_interpolation(self):
data = self.rib_distribution.get_sequence(self.num_distribution_interpolation).T
start = self.has_center_cell / self.cell_num
num = self.cell_num // 2 + 1
positions = np.linspace(start, 1, num)
return np.interp(positions, data[1], data[0])


### besser mit spezieller bezier?
@property
Expand Down

0 comments on commit 1505c21

Please sign in to comment.