# Thread: "Transfert" toolphat on a surface

1. ## "Transfert" toolphat on a surface

Hello,

I have create a toolpath in mastercam, for example a square with Z=0.1" depth.

I want to engrave this on a surface not really flat.

Is there a way, with the help of Artcam and MACH3, to probe the surface (multiples points X,Y,Z), then import this surface to artcam, then import toolphat and transfert it on the surface, then create a new toolpath ?

Thanks you very much.

2. I've met the same problem some time ago. I needed to make a thin relief on a large wood board which is slightly warped. The relief hieght was 0.6 mm while the heights of board corners differ by more than 1.5 mm.
We need to scan the surface and fit the toolpath on this surface to get a modified toolpath for actual machining.
The straight way is to get a point cloud, convert it to a surface (such as stl file, in MeshLab or so), import it into ArtCam and get a composite relief, then redo the toolpath. It looks too complex - our machine operators would prefer a single-click procedure.
I couldn't found any suitable solution after comprehensive search in internet, so I decided to make the program by myself. Once complete, the result was perfect!
Bad news that I cannot share it for now (I'm bound with an agreement) but there's a small chance we will distribute it later for a small fee.
Now I can just present the general ideas.
First, I get a "height map" of a surface by means of a contact probe and Mach3's Digitizing Wizard. I get an array of Z values in a rectangular grid. The steps may be large comparing to that for common 3D scanning - say, a few inches, depending on the curvature of the surface.
Next, the program reads this file and fills the internal XY matrix with Z values. The most tricky task is to get the steps by X and Y and the grid dimensions by analyzing the XY pairs. Also, I need to define the "base point" where the correction must be zero - this is the point where I will set the tool height. Having set it, I calculate the Z for this point and subtract it from every Z value in the matrix.
Finally, I read the existing G-Code files and modify them (actually I make copies) so that the Z coordinates would change according to the surface.
For each given point, I find the 3 nearest points frim the grid, build a plane through these points and get the Z coordinate for the required point. These are common math which can be easily found in any handbook on computational geometry. The modification itself is performed line by line by simple string substitution - it there is any Z in a line, it's replaced; if there is no Z but any of X or Y exists, the Z is appended.
Please feel free to ask questions if anyone will try to implement something of this kind.

3. Even though this is an aging post I will respond for those who still ask the question !

Depending on the version and features you have with Mastercam, the easiest way is to export as stl if thats not an option
You could scan or probe the part as mentioned. (but there is some draw backs)

Since you already know or have drawn the profile of the relief shape, you can import the vectors to ArtCam run a quick 2 rail sweep or extrude as required to create the relief.
Subtract your .01" squares and toolpath.
Once again you don't say what version of ArtCam but a quick call to your training reseller will get you sorted out.
Gary
Beckwith Decor Products