Skip to content

Commit

Permalink
add custom cylinder
Browse files Browse the repository at this point in the history
  • Loading branch information
co2e14 committed Dec 18, 2024
1 parent 858ca1d commit edf66df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/rtc6_fastcs/cut_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
await RTC.connect()

# need to find the conversion of bits to distance. Then can do cylinder(length, width, passes)
def cylinder_200l_100w(passes):
shape = [(-10000,10000,False),(0,5000,True),(20000,5000,True),(20000,-5000,True),(0,-5000,True),(-10000,-10000,True)] * passes
def cut_cylinder_200l_100w(passes: int):
shape = [(-100,100,False),(0,50,True),(200,50,True),(200,-50,True),(0,-50,True),(-100,-100,True)] * passes
RE(draw_polygon(RTC, shape)

def cut_cylinder(width: int, length: int, passes: int):
shape = [(-width,width,False),(0,(width/2),True),(length,(width/2),True),(length,(-width/2),True),(0,(-width/2),True),(-width,-width,True)] * passes
RE(draw_polygon(RTC, shape))

0 comments on commit edf66df

Please sign in to comment.