I have a bounding area of a contour after the slicing operation. Now to generate the tool-path over the contour, I need to distribute the bounding area into grid space so that each each cell maintain a certain precomputed width.
I am doing the math as follows, but I am not sure if the whole area will be covered as there is floating point values concatenated to integer coordinates.
short int xDist = std::abs(xMax - xMin); short int yDist = std::abs(yMax - yMin); short int xCells = (xDist/scanSpacingStep) + 1; short int yCells = (yDist/scanSpacingStep) + 1;
The indexing starts from (0,0).