-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraw_shapes code.txt
43 lines (30 loc) · 975 Bytes
/
draw_shapes code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
!PRECONDITION:
--UFRAME_NUM=0, UTOOL_NUM=4, R[8] & R[9] ARE OVERWRITABLE, PR[11]=DRAW TOOL 1, PR[12]=OFFSET TO DRAW TOOL 2, R[12]=CURRENT DRAW TOOL #, R[13]=TARGET DRAW TOOL #, R[14]=TARGET X POSITION, R[15]=TARGET Y POSITION, R[7]=BOUNDS, R[18]=TARGET PRESSURE
!POSTCONDITION:
--ROBOT DRAWS A SQUARE WITH CORNER AT TARGET POS AND SIDE LENGTHS EQUAL TO BOUNDS USING DRAW TOOL 1, ROBOT INSCRIBES A CIRCLE IN THE BOX USING DRAW TOOL 2, ROBOT INSCRIBES A TRIANGLE IN THE CIRCLE USING DRAW TOOL 3, ALL AT TARGET PRESSURE
!PREP BOT
UFRAME_NUM=0
UTOOL_NUM=4
!GET DRAW TOOL 1
R[13]=1
SWAP DRAW TOOL
!SAVE TARGET X,Y
R[5]=R[14]
R[6]=R[15]
!DRAW SQUARE
R[17]=4[15]+R[7]
R[16]=4[14]+R[7]
DRAW BOX
!GET DRAW TOOL 2
R[13]=2
SWAP DRAW TOOL
!DRAW CIRCLE
!GET DRAW TOOL 3
!DRAW TRIANGLE
!REMOVE PRESSURE
!GO TO START X,Y
!a=(j,k+n/2)
!GET TARGET POINT
!b=(j+(1.5*n)/2,k+(0.133975*n)/2)
!GET NEXT POINT
!c=(j+(1.5*n)/2,k+(1.866025*n)/2)