Author Topic: 3D digitize with Mach3 and Cambam  (Read 36429 times)

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6723
    • View Profile
    • Cambam V1.0 French Doc
3D digitize with Mach3 and Cambam
« on: March 12, 2012, 19:57:47 pm »
Hello,

From some days, I work on the digitizing features of Mach3, and you can show the results here.

http://www.metabricoleur.com/t2083-numerisation-3d-avec-mach3#28389

I must create a little soft in VB to convert Mach digit file in stl format.

It's in French, but there is full of picture and video ....(translation in the following post, thanks to Imagining !)

++
David
« Last Edit: April 01, 2013, 16:01:41 pm by dh42 »

Offline Imagining

  • Storm Trooper
  • ***
  • Posts: 198
    • View Profile
Re: 3D digitize with Mach3 and Cambam
« Reply #1 on: April 08, 2012, 23:24:48 pm »
A translation of David's digitizing with MACH3

[His English is better than my French ...which I am learning again... with some help of translation programs]

The translations are presented sequentially following his entries on his web site.
The "****" are breaks where there are photographs or videos on his web site.
(picture added)


Hi all,

Recently, I became interested in a very useful feature of Mach3, its ability to scan in 3D with the CN [?] and the help of the digitizing Wizard that allows it (+ a few personal tweaks ..)



Scan with Mach3



The wizard opens a screen for setting a vertical scanning over a rectangular area.




After entering the width and height (in the XY plane) of the area to "scan", 10 x 10 mm.  Here, we define the positions of minimum and maximum Z displacement; then the probe will descend to a maximum coordinate - 2 if it detects anything before. It will rise to the +4 coordinated rapidly before moving to the next measurement point.

The button "Check file size" can be used to calculate the number of lines of code to be produced depending on the settings.

You must also determine the feed rate of probing, here set to 300mm/min.

Once all adjustments made, click on "Create and load G-code" to generate the G-code that will be directly transferred to the interface of Mach3.



It only remains to launch the program.

The M40 calls a routine in Visual Basic (a. M1S) located in the folder macros Mach3, and contains just the "OpenDigFile ()" which has the effect to open a query file in which you will specify the file name under which the coordinates scanned will be saved.

It is important to you then remember to put the extension. Txt at the end of the filename (Mach does not do automatically), otherwise it will not be available for the second part of the operation that is turn it into a 3D file in STL format.



The second line G-code, G92X0Y0Z0 has the effect of moving all axes to 0 at the point where the sensor is located, so before starting the program, move your probe to the point that you consider the 0, 0, 0 in XYZ.

The G31 triggers the descent of Z; when the entry of "digit" is activated by contact with the object, the coordinates are saved in text file.

Here is an excerpt of this text file, with the X, Y and Z of each scanned point on a line.

0.00000,0.00000,0.00259
4.99917,0.00000,0.00259
10.00458,0.00000,0.00259
15.00375,0.00000,0.00259
20.00292,0.00000,0.00259
.....................


The zigzag scan is performed as shown in the image below.



Mounting of the probe

In my case, I simply used my touch probe, mounted upside down and is operated through the back of the stem of the guage, which in this case, only serves as a "accurate movable rod ". This arrangement may of course also be used only with the guage for other uses.

Here the assembly into 3D images







.... and actual parts ....







mounting on the machine ....







and then a test on a mouse.

https://www.youtube.com/watch?v=rJT_sCL-sBo

Then a coin

https://www.youtube.com/watch?v=uBfli_h4uok#t=16

and finally capture a profile using a step Y greater than the size of the area to be scanned, which provides a single line.

https://www.youtube.com/watch?v=DHmXUbzNhNA

File conversion points.

I had to develop a small application in Visual Basic. Net to transform this "scatter" in a full 3D shape, and in a format readable by most of 3D softwares.

This application, Mach3Digit2STL.exe is attached and the converted. Txt file created by Mach3 in a file. STL

the file. STL result is saved in the same folder and with the same name as the original text file, except that its file extension becomes. stl

Here is a video how to do this.

http://www.screencast.com/t/yiroCd0sAQ

and the result for the coin, opened in 3Dsmax. The difference in height of the engraving is of the order of 0.25mm



Note that if you do not remove the scanned part of the machine, and you put in the STL CAMBAM, all coordinates are in correspondence between the "real" part and the part in 3D open CAMBAM, you just have to replace the probe by a tool and re-Z 0 in order to be able to machine at the desired location on the workpiece.

EDIT: Instead of my Mach3Digit2STL utility, you can use the Digitizer Import Plugin written by GeoffreyGRoy that give better results.

http://www.cambam.co.uk/forum/index.php?topic=4303.msg30573#msg30573

+ +
David

attachments
Mach3Digit2STL.zip
« Last Edit: April 02, 2015, 13:30:51 pm by dh42 »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6723
    • View Profile
    • Cambam V1.0 French Doc
Re: 3D digitize with Mach3 and Cambam
« Reply #2 on: April 09, 2012, 14:41:42 pm »
Hello,

Thanks for the translation  :D

++
David

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 250
    • View Profile
Re: 3D digitize with Mach3 and Cambam
« Reply #3 on: August 04, 2014, 07:00:50 am »
Dear David

I am starting to learn how to digitize from my CNC machine using Mach3.  I have run into problems as I use a USB Motion Card this does not appear to support all the Mach3 capabilities.  While it supports G31 (probing) for depth and edge probing, when using the Mach3 Digitizing Wizard it will not save the X,Y,Z coordinates in the nominated file, even though the file is created.  This problem has been reported elsewhere. 

So, I am now in the process of writing a Mach3 script to do the job, and so far it is looking promising.  I would like to now convert the X,Y,Z text file to an STL file to import into CamBam.  I note you have posted a small converter program, but I think it makes some assumptions about the order of points in the file.  For example the Mach3 wizard scans in a zig-zag fashion, I would like scan like a raster.  Would you be able to post the sources for your program as this would save me some time in starting from scratch.

thanks

Geoff

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1539
    • View Profile
Re: 3D digitize with Mach3 and Cambam
« Reply #4 on: August 04, 2014, 09:33:05 am »
Hi Geoff
The following is taken from my notes, During my probing adventures.
"First make a probe file with Mach3 (use the probing ) wizard
 you get a txt file which can be directly imported into cambam with <right click in drawing panel -->draw from  point list>
 or use dh42's mach3tostl program to convert the pointlist.txt file to a stl file which can be imported into  cambam. 
 IMPORTANT for files over a couple of k do not use notepad either rename the file to ---> filename.txt with   wordpad or just rename the file with windows!."

The first thing I probed (Made my own probe of instructions from the net) was a matchbox toy car
roughly 30 mm by 70 mm, And to get good resolution of the model  took over 40 minutes!. :o

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6723
    • View Profile
    • Cambam V1.0 French Doc
Re: 3D digitize with Mach3 and Cambam
« Reply #5 on: August 04, 2014, 12:07:08 pm »
Hello Geoff,

The sources are in attachment.

Have fun !  ;)

++
David

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4186
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: 3D digitize with Mach3 and Cambam
« Reply #6 on: August 08, 2014, 16:56:18 pm »
I believe there is a free utility called mesh cloud that converts point lists to surface meshes. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3215
    • View Profile
Re: 3D digitize with Mach3 and Cambam
« Reply #7 on: August 08, 2014, 20:23:17 pm »
I believe there is a free utility called mesh cloud that converts point lists to surface meshes. 

I used Mach3 MachCloud, and it works OK, It can be downloaded from..http://www.machsupport.com/forum/index.php/topic,4948.0.html
My 2ยข

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4186
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: 3D digitize with Mach3 and Cambam
« Reply #8 on: August 08, 2014, 20:48:19 pm »
I believe there is a free utility called mesh cloud that converts point lists to surface meshes. 

I used Mach3 MachCloud, and it works OK, It can be downloaded from..http://www.machsupport.com/forum/index.php/topic,4948.0.html

MachCloud!!!  That's what I was thinking of. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline MrJTJinx

  • Droid
  • **
  • Posts: 64
    • View Profile
Re: 3D digitize with Mach3 and Cambam
« Reply #9 on: September 04, 2018, 06:50:22 am »
Grblgru has a probing facility for GRBL firmware users,
https://discuss.inventables.com/t/grblgru-free-cam-program-with-3d-simulation-for-mills-and-lathes/44042

and i am led to believe Blender has the ability to create meshes from point clouds

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4938
  • Made in England
    • View Profile
Re: 3D digitize with Mach3 and Cambam
« Reply #10 on: September 04, 2018, 08:34:44 am »
It's an old thread and since then this CamBam plugin has been written to create an stl surface from a point cloud.
http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Digitizer.html
Filmed in Supermarionation