PDA

View Full Version : Removing useless vertex from Copy Machine output from probe scan - software available



Marc F. Lupien
02-25-2015, 03:38 PM
Hi There,

Just recently managed to build my own probe for scanning an object on my Desktop CNC.

I found out that the result file (I am generating a DXF Polyline file) is quite large and I am having a hard time with it in autocad because of its size.

I Just wrote a Windows PowerShell script that can remove useless points from the polyline if they are located almost in the middle between the previous point and the next point. For each group of 3 successive points int the file, lets call them a b c, I compute the position of a point b2 exactly in the middle between a and c then I compute the distance between b and b2 and if they are closer than the given tolerance, I remove b from the list. The idea is point b is useless if it's along the line joining a and c.

If you are interrested, email me at marclupien@hotmail.com and I will send you the Powershell script along with basic instructions.

Note: I use Powershell because it's free and already installed on most machines (windows 7 and 8), it's an very powerfull environment and well supported by Microsoft. Furthermore, the software is just text files so easily distributed and readable.

Marc