Pencil Progress
The pencil algorithm is starting to work well now. Simple paths are no problem as shown by the star shot below. To get paths with some potential ambiguity, like the standard “Cheese Whiz” model, to work I’m going to need some more code and testing.
The screen below shows how the internals of the new system work for pencil machining. The system builds a series of x and y passes to find all of the features of the model. These passes, shown in white, are sometimes called CL nets , short for cutter location net. The spacing of the lines is calculated from the tolerance value and the cutter information entered in the toolpath dialog. The spacing of the lines can be relatively wide compared to the old ZMap spacing because each of the line is subdivided along its length to ensure that nothing is gouged.
Pencil points can be found on the cl net by looking at the angles of the lines that make it up. In the photo below red boxes represent the pencil points with green lines pointing away from the model at each point. The shot on the right shows the points only for more clarity. The weird paths shown above are due to problems in connecting all of the pencil points since it’s difficult to calculate the correct way to link a bunch of points with no real information about how the real surface is laid out.

Robert, thank you for this glimpse into Meshcam. It’s a little like “Donald in Mathmagicland”, which I watched the other day for the first time in 20 years.
Are the green vectors normals to the raster lines (X or Y), or they are just pointing “outwards”? I was wondering why some red dots only had one vector, and some appeared to have two, but then I realized where there are two vectors it is actually closely spaced dots, one on the X raster and one on the Y. Do you get useful information from the green vectors? Like in helping to decide which pencil point to go to next when there is more than one candidate?
Best regards,
Randy
The green lines are normal to the raster lines so they’re only able to be in the /- x and y direction. The green lines help in the case where there are two pencil paths that come very close to one another but in the average case they don’t contribute that much. If there are multiple candidates the most important thing to look at is which one is closest to being in-line with the last two. This helps pick the point that will lead to the smoothest line.