Creates g-code toolpath from selected curves, optionaly in multiple Z levels (selected curves represent actual single toolpath level)
Only planar lines, arcs and circles are supported (use "curve->convert->to arcs") 
Use XY costruction plane.
Toolpath is generated in one direction only.

1.Selection
Curves can be pre-selected before executing script.
Multiple curves can be selected, open or closed. 

2. Direction and start point
For open curves you can choose toolpath direction, for closed curves you can choose toolpath start point and direction (pres <ENTER> when done). Open and closed curves are handled in separate steps.

3. Options
Top pass: will generate additional toolpath level at the "work top", eg. can be used on uneven surface to ensure that first stepdown level is within specified limit.
Simplify: see Rhino help for Simplify lines and arcs. Be careful with self-intersecting geometry where more than two segments have their start/end points at same location - continuiti may not be preserved.
Adjust: if path is to be made in multiple steps and total depth of cut is not divisible by step down: select what to adjust. Can be utilised to make last step down level lower that others.
SortOrder: "Closest" will allow you to select programatic sort order, "Selection" will try to keep the order in which curves were selected.
G1G0CVfix: "Dwell" will insert P0 code before Z move to compensate for mach3 rounding corner in Z direction (bug?)
AlignToOrigin: this option will probably be removed, it uses selected geometry bounding box lower left corner as origin for generating toolpath
ControlSpindle: will prompt for spindle speed
HSM: experimental option, use with ConvexPocket script, may be bugs (probably when more than one level is used), allows non planar lines to be treated as "approach" and "depart" features

4. Cut parameters:
Safe Z (mm): this is the Z level at which it is safe to start the spindle and move it to the toolpath start XY coords, also used as Z level to park and stop the spindle after the program is done 
Rapid Z (mm): rapid transfers between toolpaths happen at this level
Work top (mm): stock surface Z level
Plunge offset (mm): offset from stock in Z direction at which G0 move finishes and G1 starts (plunge move between Z levels)
Approach top (mm): Z level at which first plunge move starts
Cut depth (mm): total cut depth
Max stepdown (mm): prefered depth of cut per pass, can be modified by script: see Adjust option
Plunge feed (mm/min): 
Cut feed (mm/min):
Plunge speed (rpm): spindle speed for plunge
Cut speed (rpm): spindle speed for cut
Sort direction: programatic sorts, left/right is X axis, botom/top is Y axis, shortest path will select next toolpath which has start point closest to previous toolpath end point

Changelog is in rvb file.

