to DeskProto home page
looking glass icon
to DeskProto Facebook page
to DeskProto Youtube page
to DeskProto Instagram page

Align geometry for rotation axis machining

Orient and position your geometry in the cylinder block

When calculating rotation axis toolpaths, DeskProto will make the geometry rotate round the "true" X-axis. This is the line parallel to X at the location Y=0.0 and Z=0.0, in the STL file's coordinates (so in CAD coordinates).

In many cases that will be what the user wants: for instance most ring designers will use a zero point in their CAD model at the exact center of the ring. However, for other designs this may not give the desired results: you may need a different center of rotation. Changing the Translation settings won't make a difference, as the translation is added after calculating the toolpaths.

On this page a few solutions are shown.

1. Check "Center geometry"

DeskProto offers an option that may help: the option "Center geometry" (Part parameters, tab Transform). The point X=0/Y=0/Z=0 will now be set in the exact center of the geometry (for each of the axes halfway between min and max). This is in fact a translation too, however this one will be done before the calculations start. In case this solves the problem then no further action is needed.

2. Translate in the CAD software

In case this is not the desired center of rotation either, then only solution is to change the STL file: translate the CAD data to achieve the desired center of rotation, and then write a new STL file. When you have the original CAD program and CAD data you can do this in CAD: the second method to solve the problem.

3. Create a new STL file in DeskProto, with translated geometry

When you only have the STL data then you can also change the center of rotation and write a new STL file using DeskProto. This third method is what this Forum Tip is about.

DeskProto screenshot, geometry not centered
Sample geometry in DeskProto, not correctly positioned for rotation axis machining.

This is a sample geometry by Renaud, from Belgium (thanks !).
Rotation axis machining is needed, however this center of rotation obviously is not what he wants. The rotation axis should be trough the center of this cylinder shaped part.

DeskProto screenshot, geometry still not centered
Same geometry in DeskProto, now with the option Center geometry checked.

Checking "Center geometry" (Part parameters, tab Transform) does improve the situation a lot: see the image above. However: it still is not correct, as the cylindrical part is not centered in the cylindrical part segment. The result will be a toolpath with a continuously changing Z-value, which is not optimal.

DeskProto screenshot, with the Part parameters dialog added
Use the Translation option (Part parameters) to locate the zero point at the required position.

Here is the trick:
  • Uncheck 'Use rotation axis' and 'Center geometry'.
  • In the Translate tab (Part parameters) select Custom for both Y and Z, and enter values to correctly position the zero point. It is shown as a blue cube ("orientator on workpiece zero point") and needs to be positioned on the required center of rotation. See the image above.
    In this example the translation value for Y is the same as when selecting "Make center of part zero". For Z a different value is needed though.
  • Now press OK, and then in the File menu select 'Save geometry as...'
    The dialog 'Save geometry Options' will pop up: check 'Translation' as you want the translation values that you just set to be included.
    Finally enter the name of the new STL file to be written.
In case you cannot see the blue cube it may be obscured by the geometry. You can change this in the "Subjects in view" dialog (double-click in the drawing to open it): uncheck 'Geometry, rendered' for a more clear view. In order to still see the geometry you can check 'Geometry, wireframe' or 'Geometry, points' instead.

DeskProto screenshot, geometry centered correctly
Same geometry in DeskProto, now correctly positioned.

Now start a new project in DeskProto, load this new STL file and check "Use rotation axis". The rotation axis now will be exactly where you want it.
Important detail: 'Center geometry' may not be checked now !

4. Small Z-axis movements when rotary machining

One more tip for projects like this one concerns small Z-axis movements. When the zero point is exactly in the center of a cylindrical geometry, one would expect that a toolpath around the cylinder can be done at a constant Z-level, so one movement command to machine a complete 360 degrees circle. However, in many cases this won't happen. Instead you will see many Z-variations: the cutter will keep going up and down all the time, slowing down the process and causing a bad surface finish.

These variations in Z are caused by the STL file: it is polygon data, so the cylinder is approximated by a large number of flat surfaces. When machining these surfaces the cutter will move up and down.
For this problem we can offer two fixes:
1. Create a more accurate STL file (the STL export accuracy is a setting in the CAD system's export option).
The resulting STL file will be larger, which needs not be a big problem.
2. Reduce the number of positions behind the decimal point in the NC file (for the Z-coordinate value).
This can be done in DeskProto's configurable postprocessor: Options > Library of postprocessors > OK on warning > Select your post and press Edit > tab Movement > Edit the value for 'Decimals' in column Z.
Reducing this value from (example values in mm) 3 to 2 will remove all 1/1000 mm variations: Z = 3.000 3.001, 2.999, 3.002 etc will all be output as 3.00, and the resulting movement commands will automatically be combined to one movement. This may influence the accuracy of the result, so take care when an exact diameter is needed.

5. Create a new STL file, now also rotated and scaled

The next example will show the same positioning trick, however now in a more complex situation.

3D scan of a human head, shown in DeskProto
This 3D scan of Bert's head is orientated and positioned totally incorrect for rotation axis machining.

This same method will also work in more complex situations: for instance the scanned head shown above. This sample comes from EdingCNC's Bert (thanks !).
Also in this case: the situation shown above, after importing the geometry and checking "Use rotation axis", is not OK for toolpath generation.

3D scan of a human head, shown in DeskProto in 4 views
Orientation and scaling now are OK, still the positioning needs to be improved.

First thing that needed to be done is rotating the part in order to correctly align it with the rotation axis. For this geometry we found that a rotation of -82 degrees round Z was OK (for other STL files it may be needed to also rotate round other axes).
In order to make the model fit our small milling machine we also scaled down with a scaling factor of 0.1 (uniform, so for all three axes). This already will look much better.

Still this is not the desired situation: we want to machine only the head (so without the shoulders), in order to get as much detail as possible on our small machine. Reducing the max Z value of the part segment does not work: the above picture shows that it is not possible for DeskProto to position the head in the center of the cylinder block of material.

DeskProto screenshot with geometry and part parameters dialog
Using the Translation option to correctly position the zero point.

We applied the same trick as described above:
  • Uncheck Use rotation axis and uncheck Center geometry
  • Use the Custom translation values for Y and Z to get the zero point on the correct location
  • Save Geometry as, including translation (we also included rotation and scaling), to write a new STL file.

DeskProto screenshot with geometry and correct segment
Now the geometry is correctly positioned for rotation axis machining.

In a new project we imported this fresh STL file. Now we could indeed set a proper part segment, for a nice large model of the head without the shoulders.