Metric functionality and new operations.
Project Units of Measure
A new feature that's just about done is an all-important option to users to work in metric/millimeters instead of the existing imperial/inches units of measurement. This was a feature planned early on in development and for which code was written in some of the core systems. Seeing as how I never have worked in metric with CNC it had slowly but surely worked its way down the list of development priorities. This option will allow the user to set their Units of Measurement that they wish to work with under the Config menu in the CNC/CAM Settings dialog. This only indicates to PixelCNC which measuring system new projects will be created with, as PixelCNC will run in whatever measurement system the currently loaded project was created with, regardless of the user's configured units of measure. This decoupling is intentional. Some kind of converter for projects may be looked at in the future, but the idea of magically converting tools that are standard sizes in one measurement system will not have an exact matching standard sized cutter in the other, so it will likely require some user assistance re-placing existing tools in the project.
Grid Overlay Changes
The current working project's units of measure also determines the Z0 grid overlay. An option has been added so that the Z0 grid overlay's subdivisions can be configured by the user, rather than be hard-coded to a specific fractional spacing. The grid changes it's measurement units when a project is loaded/created but the subdivisions can be adjusted on-the-fly via the Config menu in Appearance Settings.
Since adding the units of measure value to the project's data structure and file format warrants a change in the file format, it also demands a mechanism by which I can continue adding stuff while still allowing users to load their existing project files. As such, in tandem with the units of measure addition, I've setup a system to allow for backwards compatibility with older project files. Project files which are missing information that newer versions of PixelCNC are looking for will default those values to whatever values were assumed by older versions of PixelCNC. For instance: all existing v1.00a projects that the next version of PixelCNC opens will surely be in inches, because metric wasn't supported in v1.00a. Easy peasy!
Along with all of these little features are two new operations. One operation is strictly for generating a toolpath which follows the boundary between light/dark areas of a binary image. It will feature three modes: follow on the boundary, inside the boundary, and outside the boundary - where inside/outside just offset 'on the boundary' by the radius of the tool. This will be handy for certain engraving style applications.
The other operation is a bit more involved, and should prove to be invaluable for some who struggle with creating depthmaps from their binary black/white designs. The input image is distance-transformed so that each pixel's height/value is equal to its distance from the nearest delineation between black/white. This yields the equivalent 3D shape one would obtain by 'flood filling with cones', similar to a v-carving, or its inverse (islands of peaks/ridges). The user specifies a 2D curve, by plotting points on a simple graph, effectively defining the profile of the shape and form they want the sides of these peaks/valleys to take. This will make it easy to turn a simple 2D circle, for instance, into a spherical or rounded convex shape. It could also be turned into a set of concentric rings, or ripples. It still requires some planning as far as what the user should be able to control without there being too much for them to understand in order to use it, but the core idea is there, and all the algorithmic pieces needed to make it happen were written months ago. This will effectively 'automagically' generate depthmaps from simple black/white designs.
Get PixelCNC: The Handy Image CAM Solution
Leave a comment
Log in with your itch.io account to leave a comment.