Carlo, whatever you do in your own code is your choice and that is good, the return value was just something I saw and like all of us, something you might have missed.

In fact I have missed many things in the code, I missed to change the name of some variables that belongs to your code, from what I stolen some code. :-D

Now I'm working to a more polished code, with some comments and some more meaningful names. When I have done that I will ask you if you could compile my source for Windows as you kindly have done with version 1.0.

David.

I assume it's because if you move the polyline several time (without grid snap ON), and if you round the coordinate after each move, you lose precision. (same thing for matrix transformation)

For linear move I think that the error is not so great, if your choice is to not use "snap to grid", you lose all precision move, pixel to "real coordinates" are ever and interpolation.

For matrix trasformation, is even worse, if you rotate a rectangle, the "exact" coordinates are never preserved say if you have a 30x40mm rectangle you will have after a rotate matrix trasformation a 30.000000000005x40.00000000003 (some number similar to those) rectangle.

That could be avoided if use a concept similar to the "decimal" type of some language instead of the "double float" that is used actually, i didn't know if there is a "decimal" implementation for .NET, and what amount of rewriting is needed, but in a CAD program the approximation has to be controlled in some manner, but speakly mathematics, "The exact science is permeated with the concept of epsilon and limits, all of these are only approximation, but you know the amoount of that approximation".

Even CNC is an approximation, you state to machine a square of 30x30 and obtain a 30x30 squre +-0.00000whatever is the precision of your machine.

But this is too much philosophical.

Take this post as an appreciation for your help.

For 100Euro or so CamBam is the most price per value software I ever bought, it make things and not only "smoke". (If you set the spindle speed correctly for your material and there is enough cooling ) ;-D

Regards to all

Carlo D.