[SUBROUTINE] icon = icons/circle.png name = Circle image = images/circle.png type = Circle help = Creates circle Parameters: CX CY R Depth Rappid order = cx cy d depth depth_step surface final rappid [PARAM_CX] name = CX type = float icon = icons/rect.png tool_tip = CX value = 0 [PARAM_CY] name = CY type = float icon = icons/rect.png tool_tip = CY value = 0 [PARAM_D] name = D type = float icon = icons/diameter.png tool_tip = Diameter value = 1 [PARAM_DEPTH] name = Depth type = float icon = icons/height.png tool_tip = Depth value = #<_global_depth> [PARAM_DEPTH_STEP] name = Depth step type = float icon = icons/dz.png tool_tip = Depth step per pass value = #<_global_depth_step> [PARAM_SURFACE] name = Surface type = float icon = icons/dz.png tool_tip = Surface height value = #<_global_surface> [PARAM_RAPPID] name = Rappid type = float icon = icons/height.png tool_tip = Rappid height value = #<_global_rappid> [PARAM_FINAL] name = Final cut type = float icon = icons/height.png tool_tip = Rappid height value = #<_global_final> [DEFINITIONS] content = (Multipass sub definition) O SUB # = #1 # = #2 # = #3 # = #4 # = #5 # = #6 # = #7 # = #8 # = #9 G0 Z# G0 X# Y# # = # O WHILE [# GT [#+#]] # = [#-#] O IF [# LT [#+#]] #=[#+#] O ENDIF ; G1 Z# (call pass sub with the restof parameters) # = #1 O#1 CALL [#] [#] [#] [#] O ENDWHILE (Make final cut) ; G1 Z# O#1 CALL [#] [#] [#] [#] O#1 CALL [#] [#] [#] [0] G0 Z# O ENDSUB (Circle sub definition) (Circle sub definition) #<_circle-spiral> = self.get_unique_id() ; should be unique id O#<_circle-spiral> sub # = [#1-#3] # = #2 # = #3 # = #4 # = [#<_z>-#] G3 X[#+#] Y# I[-#] Z[#] O#<_circle-spiral> endsub [CALL] content = (Call circle sub cx cy r depth rappid) O CALL [#<_circle-spiral>] [#param_depth] [#param_depth_step] [#param_surface] [#param_rappid] [#param_final] [#param_cx+#param_d/2] [#param_cy] [#param_d/2] [BEFORE] content = [AFTER] content =