Commit ddf06eb2 authored by Lars Kruse's avatar Lars Kruse

"get_points_of_arc" now returns 3D points

parent 3e03c255
...@@ -115,9 +115,8 @@ def get_points_of_arc(center, radius, a1, a2, plane=None, cords=32): ...@@ -115,9 +115,8 @@ def get_points_of_arc(center, radius, a1, a2, plane=None, cords=32):
num_of_segments = ceil(angle_diff / (2 * math.pi) * cords) num_of_segments = ceil(angle_diff / (2 * math.pi) * cords)
angle_segment = angle_diff / num_of_segments angle_segment = angle_diff / num_of_segments
points = [] points = []
get_angle_point = lambda angle: ( get_angle_point = lambda angle: (center[0] + radius * math.cos(angle),
center[0] + radius * math.cos(angle), center[1] + radius * math.sin(angle), 0)
center[1] + radius * math.sin(angle))
points.append(get_angle_point(a1)) points.append(get_angle_point(a1))
for index in range(num_of_segments): for index in range(num_of_segments):
points.append(get_angle_point(a1 + angle_segment * (index + 1))) points.append(get_angle_point(a1 + angle_segment * (index + 1)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment