Cad Cam Development

It’s easy to create second CEREC like dental milling machine

Together with my collegues I study with, I had to program a dental milling machine like those from CEREC (see the movies above). This was our task, the teacher asked for. So at first it seemed as a very hard work and almost impossible to complete but in fact it wasn’t as bad as it seemed to be. We have split our work onto the following areas:

  • 1st programmer – to visualize model, generate a model and compute the model paths which milling  machine should work on. I was assisting by the generating paths in teeth coordinates
  • 2nd and 3rd programmer – to visualize the milling machine (done in XNA)
  • 4th and 5th programmer –  to provide a mapping between model coordinates and milling machine coordinates. This was the most mathematical task in this project and is heart of that. I was one of them who developed this part and the process of creating this part of project will be shown in this post, programmed in C++.

It took us 1,5 moths to complete a project. Personally I dislike XNA and don’t have it installed on my PC so have to go to student’s house to record the movie that shows the result. Once I do it I will put here a youtube movie to show you a result.

How to do everything else despite the mathematical part and how it works?

It’s easy. The model visualization is just something more than mesh visualization (tons of tutorials in the internet). The path generation isn’t also complicated at all. Our mesh is consisting out of triangles. My idea was to generate tool path in teeth coordinates in the same way like it’s done in Gouraud shading. That’s been implemented in our project and works well and seems to be versatile, easy in programming and use. Next pass the results to the next layer (coordinates conversion) and visualize it on a machine (done in XNA).   And you’re done. We haven’t had any machine to make it work, but once you’ve converted coordinates to machine-compatible form the interface it requires to programm could be everything – APT or any other form of machining assembler. Overall it’s relatively easy, don’t you think?

How to convert teeth coordinates to machine tool coordinates?

What parameters does CEREC – like milling machine has? Look at the photos below. Photos are taken out from our project documentation.

How does tooth coordinates look like?

Tooth Coordinates in preview (mesh) mode (on the left) and in milling machine (on the right)

Tooth Coordinates in preview (mesh) mode (on the left) and in milling machine (on the right)

How the milling machine works?

The machine is driving its tool along X and Z axis. It doesn’t drive a tool directly along Y axis. Driving along Y axis is implicit and is computed out of some arcus function 9you need the toolAngle to obtain Y position). This observation is substantial to understand on how it works. Well, the machine is relatively simple and we don’t use any kinematic chains to make the it work. Analytical solution is good and quick enough, but please do be aware of what trigonometrical functions you use and what’s their domain!!!

This kind of machine has several limitations. For example: you can’t set your tool with vector (x,y,z) =  (0,0,-1) (parallel to z-axis). So, there is blank angle of tool vector you cannot set in your machine. This imposes limitation that not every tooth geometry can be milled with additional normal vector information and take it into consideration either while generating teeth path or converting coordinates.

How to get proper analytical solution to coordinates conversion problem?

Suppose your tooth visualization program provides you a file with a computed tooth path milling format in the following order:

x y z vx vy vz

These are space separated 6 numbers. The first three explains paths’ point position and last three one stand for tool normal vector. This file you have to convert to machine compatible format:

blockAngle; leftToolDepth; leftToolX; leftToolAngle; rightToolDepth; rightToolX; rightToolAngle

These are ‘;’ separated 7 numbers. The first one – block angle should be responsible for milling tool vector alignment to (vx,vy,vz) vector and you can compute it by yourself from arcTan(y/x) or something similar. It’s not sophisticated to derive it from the images I’ve provided in that post. Next there are coordinates for left and right milling tools. The tools will work in parallel when you provide proper blockAngle: the condition : leftBlockAngle = – rightBlockAngle must be satisfied to have both milling tools working simultaneously.  The tooth path points that have its x coordinate smaller than materialSize/2 are milled by left tool, otherwise by right tool. And that’s all.

Look at the photos below and analyze them carefully. That’s almost everything you need to know to program this kind of machine.

Tooth in a milling machine image 1

Tooth in a milling machine image 2

Tooth in a milling machine image 2


Trackbacks & Pingbacks


  1. I needed to thank you for this very good read!
    ! I definitely loved every bit of it. I have got you book marked to check out new things you post…

    | Reply Posted 4 years, 8 months ago

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s