One thing you may want to add to the screen is a scale function button. You can scale the part size up or down to help make it fit to the tube circumference.

It asks for the part size and what size you need it to be and does the math for you then applies SCALE to mach3.

Another I have on the screen is a set of DROs that give the max extents for X and Y. It assumes the origin is 0,0 and gives the sizes of X and Y.

Here is a scale function sample button code.

'Macro M3004 Auto Scale

Dim Size1 As Double

Dim Size2 As Double

Dim Scale As Double

Size1 = Question(" Current Size ? ")

Size2 = Question(" New Size ?")

While Ismoving()

Wend

Scale = (Size2/Size1)

While Ismoving()

Wend

SetOemDro(59,Scale)

While Ismoving()

Wend

SetOemDro(60,Scale)

While Ismoving()

Wend

DoOemButton(160)

While Ismoving()

Sleep(100)

Wend

END

Just a thought, (;-) TP