(*** GCode generated by NativeCAM for LinuxCNC ***)

(*.ngc files are best viewed with Syntax Highlighting)
(visit https://forum.linuxcnc.org/forum/20-g-code/30840-new-syntax-highlighting-for-gedit)
(or https://github.com/FernV/Gcode-highlight-for-Kate)

G17 G40 G49 G90 G92.1 G94 G54 G64 p0.001
G21  (metric)

#<_off_rot_coord_system>   = 57

#<_show_final_cuts>     = 1
#<_show_bottom_cut>     = 1

#<_units_radius>        = 1  (factor for radius and diameter)
#<_units_width>         = 1  (factor for width, height, length)
#<_units_cut_depth>     = 1  (factor for depth)

#<_mill_data_start>     = 70

#<in_polyline>          = 0

(end defaults)

(This is a built-in safety to help avoid gouging into your work piece)
/ o<safety_999> repeat [1000]
/     M0
/ o<safety_999> endrepeat

(sub definitions)
(end sub definitions)


(begin Rectangle)
(rectangle author : Fernand Veilleux)
o<rect_001_active> if [1]
	o<rect_001_00> if [50.000 GT 75.000] (if narrower than high)
		#<h10>   = [75.000 * #<_units_width>]
		#<w10>   = [50.000 * #<_units_width>]
		#<rot10> = [90.0 + 0.00]
		o<select> CALL [31] [0] [-#<h10> / 2] [0] [#<h10> / 2]
		o<select> CALL [32] [2] [-#<w10> / 2] [0] [#<w10> / 2]

	o<rect_001_00> else
		#<w10>   = [75.000 * #<_units_width>]
		#<h10>   = [50.000 * #<_units_width>]
		#<rot10> = 0.00
		o<select> CALL [32] [0] [#<w10> / 2] [0] [-#<w10> / 2]
		o<select> CALL [31] [2] [-#<h10> / 2] [0] [#<h10> / 2]
	o<rect_001_00> endif

	#<fcs10> = [1.250 * #<_units_width>]
	o<get_min> CALL [37] [2] [0.000 * #<_units_width>] [#<h10> / 2]

	o<select> CALL [33] [1] [0.000] [#<surface>] [#<surface> - #<wp_depth> / 2] [#<surface> - #<wp_depth> / 4] [#<bottom> + #<wp_depth> / 4]
	o<select> CALL [34] [1] [-12.000] [#<bottom_through>] [#<bottom>] [#<surface> - #<wp_depth> / 2] [#<surface> - #<wp_depth> / 4] [#<bottom> + #<wp_depth> / 4]

	o<rectangle> CALL [0.000] [0.000] [#<w10>] [#<h10>] [#<rot10>] [#32] [#31] [0] [#37] [0] [3] [#33] [#34] [1] [0] [#<fcs10>]
o<rect_001_active> endif
(end Rectangle)

 
M2
