solved another bug
This commit is contained in:
parent
9a134e94c2
commit
5a19316136
|
@ -283,7 +283,11 @@ class Surface:
|
||||||
point = polygon_2d.points[i]
|
point = polygon_2d.points[i]
|
||||||
next_point = polygon_2d.points[i+1]
|
next_point = polygon_2d.points[i+1]
|
||||||
area += (next_point[1] + point[1]) / 2 * (next_point[0] - point[0])
|
area += (next_point[1] + point[1]) / 2 * (next_point[0] - point[0])
|
||||||
self._area = area
|
next_point = polygon_2d.points[0]
|
||||||
|
point = polygon_2d.points[len(polygon_2d.points)-1]
|
||||||
|
area += (next_point[1] + point[1]) / 2 * (next_point[0] - point[0])
|
||||||
|
self._area = abs(area)
|
||||||
|
print(self._area)
|
||||||
return self._area
|
return self._area
|
||||||
|
|
||||||
def _is_almost_same_terrain(self, terrain_points, ground_points):
|
def _is_almost_same_terrain(self, terrain_points, ground_points):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user