Aligning geometry for rotation axis machining
Orient and position your geometry in the 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 and for 3D scans this might not give the desired results: you may need a different center of rotation. Changing the Zero point settings in the DeskProto Part Parameters won't make a difference, as these translations are added after calculating the toolpaths.
On this page four solutions are shown, and two examples.
- 1. Check "Center geometry"
- 2. Transform the geometry in the Project parameters
- 3. Create a new STL file in DeskProto
- 4. Translate in your CAD software
- Example 1: Change the center of rotation
- Example 2: Also change size and orientation
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. Transform the geometry in the Project parameters
DeskProto offers an extra option to transform and translate the geometry (since V7.0): in the Project parameters you can find a Transformation dialog for every CAD file. This is a rather hidden option: normally when using DeskProto you will not see it.The transformations (including translations) that you enter here are processed immediately when loading the CAD data. You can use them to set the desired orientation and center of rotation: they will be effective when calculating the (rotary) toolpaths.
3. Create a new STL file in DeskProto
In older DeskProto versions (up to V6.1) the transformation option described above is not available. In these versions you can use a different 'trick':load the STL file, do NOT check Use rotation axis, set the desired orientation and center of rotation using the transformations and translations in the Part parameters. Then Save the geometry to create a new STL file, including these changes. Next start a fresh project and load this new STL file to calculate the rotary toolpaths.
4. Translate in your CAD software
In case you cannot use any of the above options you can of course go back to the source of your STL data. Open the CAD data in the original CAD program (or in any other CAD program), translate and transform to achieve the desired orientation and center of rotation, and then write a new STL file.Example 1: Change the center of rotation
![DeskProto screenshot, geometry not centered](../img/tips-renaud1-480x335.gif)
Geometry in DeskProto, not correctly positioned for rotation axis machining.
This is a geometry by Renaud, from Belgium (thanks !).
Rotation axis machining is needed, however this center of rotation obviously is not what the user wants. The rotation axis should be trough the center of this cylinder shaped part.
![DeskProto screenshot, geometry still not centered](../img/tips-renaud2-480x335.gif)
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) material block. The result will be a toolpath with a continuously changing Z-value, which is not optimal for this part.
The center of rotation needs to be translated (in this case just a tiny little bit along Z) to position it in the exact center of the blue cylinder. For the center of rotation only Y and Z are relevant.
![DeskProto screenshot, with the Part parameters dialog added](../img/tips-renaud3-480x335.gif)
Use the Translation option (Part parameters) to locate the zero point at the required position.
Find which translation is needed:
- In the Part Parameters Uncheck 'Use rotation axis' and 'Center geometry'.
- On tab Zero-point select 'Make center of (material) block zero' and press Apply. Now the zero point should be at the same position as it was when Center geometry was checked. The (disabled) edit fields for Y and Z will show which translation values are applied.
- Now select 'Custom' for the translations that need to be changed (Y and/or Z), and change the values to correctly position the zero point (you can press Apply to view the new position). 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 only for Z a different value was needed.
These are the steps for Solution 2:
- Write down these two translation values (in this example -16.42 for Y and -11.57 for Z).
- Start a new project in DeskProto (a geometry project)
- Again load the same geometry data file
- Open the Project parameters, tab Geometry, and press button Transform
- Now as Translation enter the Y value and the Z value that you just wrote down and press OK (twice).
- In the Part parameters check Use rotation axis
These are the steps for Solution 3:
- After setting the correct Translation values for Y and Z in the Part parameters, close that dialog with OK
- 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.
- Enter the name of the new STL file to be written
- Start a new project in DeskProto (a geometry project)
- Load the new STL file
- In the Part parameters check Use rotation axis
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](../img/tips-renaud4-480x335.gif)
Same geometry in DeskProto, now correctly positioned.
Example 2: Also change size and orientation
![3D scan of a human head, shown in DeskProto](../img/tips-bert1-480x335.gif)
This 3D scan of Bert's head is orientated and positioned totally incorrect for rotation axis machining.
This second example will show the same positioning trick, however now in a more complex situation: the scanned head shown above. This sample comes from EdingCNC (it is in fact Bert Eding - thanks !).
The screenshot above shows the situation after importing the geometry and checking "Use rotation axis". It is clear that this is not OK for toolpath generation. The geometry needs to be rotated in order to get it aligned with the rotation axis. For this geometry we found that a rotation of -5 degrees round X and -82 degrees round Z was OK.
Rotating round several axes in DeskProto is difficult, as DeskProto uses absolute rotation values. The three rotations are always done on the original geometry: first round X, then round Y and finally round Z. That means that (for instance) the Y rotation is not done round the Y-axis as shown on your screen, as the X rotation will be applied first.
![3D scan of a human head, shown in DeskProto in 4 views](../img/tips-bert2-650x433.gif)
Orientation and scaling now are OK, still the positioning needs to be improved.
In order to make the model fit our small milling machine we also scaled down with a scaling factor of 0.2 (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), and we need to have that head in the center of the block (to reduce waste and to make the part as large as possible).
The screenshot above shows what happens when the block is made smaller: the head simply is not in the center of the block. That is exactly the same situation as in example 1, so here as well a translation is needed. We use the same trick as in example 1:
- Uncheck Use rotation axis (and if checked also uncheck Center geometry)
- Use the Custom translation values for Y and Z to get the zero point on the correct location
For solution 2 now enter the rotation values the scaling factor(s) and the translations that you found in the Geometry Transformation dialog of the STL file (Project parameters, tab Geometry).
For solution 3 now check Scale, Rotation and Translation in the Save Geometry Data Options dialog (after selecting File > Save Geometry as), and proceed with the new STL file.
![DeskProto screenshot with geometry and correct segment](../img/tips-bert4-650x433.gif)
Now the geometry is correctly positioned for rotation axis machining.
For both solutions the new project will look like shown above.: properly aligned with the rotation axis, with the head as large as possible for this block of material.