CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 20, 2017, 11:26:17 am


Login with username, password and session length


Pages: [1] 2 3
  Print  
Author Topic: First attempt to do 4 axis toolpaths from a 3D model  (Read 3122 times)
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4686



View Profile WWW
« on: February 16, 2017, 11:43:40 am »

Hello,

I'm playing with VB script to try to do toolpath for 3D models to cut with the 4th axis.

The goal of the script is to "unroll" the 3D model so we get a bunch of polylines.

this polylines are converted to points with the digitize import plugin, then the same plugin is used to do a stl.
http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Digitizer.html

a 3D machining mop is used to do the toolpath, then the wrapper plugin is used to wrap them for the 4th axis.

some data can be changed in the script in the following section (a little rough ... I write it this night ... no it's coffee time !)

Code:
'*************************************
dim min as double = 0.1 ' the start and end point of the toolpath (boundaries)
dim max as double = 100
dim ss as double = 25 'stock surface
dim stp as double = 0.5 ' resolution along the axis in current units
'*************************************

min and max values are the boundaries along the rotational axis, here it go from 0.1 to 100mm in Y

ss must be set to the radius of the stock
stp is the distance between the points in the toolpath, in the axial direction.

the script ask for a number of rotational step (60 by default).





It can be very long to compute, depending of the settings for stp and rotational step ... and also depending on the number of triangles of the 3D model.

Enjoy to experiment Wink

a little video that show the workflow and the result (simulation)

https://youtu.be/pBVQY4pFwQo

of course, in further version, I'll try to do the 3D surface without to use the digitize plugin ... and to pluginize the script Wink

++
David
« Last Edit: February 16, 2017, 16:31:25 pm by dh42 » Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3139



View Profile
« Reply #1 on: February 16, 2017, 13:19:09 pm »

David,

That is absolutely brilliant !
Watching the stl model rotate as it build the flat version is great, now I must get my 4th axis finished.

... and to pluginize the script Wink

++
David

"pluginize", excellent new word David
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4686



View Profile WWW
« Reply #2 on: February 16, 2017, 13:40:15 pm »

Hello

Quote
Watching the stl model rotate as it build the flat version is great

Yes, I like too, it slow the thing a little, but not too much

There is a timer that give the calculation time in the log windows.

for the venus, resolution 1 and rot step 60 (0.1 to 100 for boundaries)

25.64s with rotation visible during calculation

25.04 if the display is refreshed only at the end (just comment the before-last line)

It would be interesting to see what is the calculation time with a plugin version ...

++
David

Edit: I adds the venus.stl as attachment

* venus.zip (853.25 KB - downloaded 80 times.)
« Last Edit: February 16, 2017, 13:42:46 pm by dh42 » Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4686



View Profile WWW
« Reply #3 on: February 16, 2017, 16:35:12 pm »

Re

A more "user friendly" version

Undo is working
All values are taken with a message window (min and max are taken from the model)
Hit ESC to stop calculation

I also add the same as plugin ... and it is not faster than the script  Huh Huh

++
David
« Last Edit: February 17, 2017, 00:29:51 am by dh42 » Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4686



View Profile WWW
« Reply #4 on: February 17, 2017, 00:29:33 am »

Re

A new version that do some tests to avoid pb with vertical faces (not always detected)

I tried it (the plugin) on both 0.98 and 1.0, and it is faster on 0.98 ... maybe a different setting somewhere .. Huh

PS: only tried with mm at this time ... maybe you will get strange results with inches ... job for another day Wink

++
David

* UnRoll_pluginV02.zip (5.97 KB - downloaded 83 times.)
* unroll_V02_script.zip (1.79 KB - downloaded 80 times.)
« Last Edit: February 17, 2017, 00:31:15 am by dh42 » Logged
Garyhlucas
CNC Jedi
*****
Offline Offline

Posts: 1001


View Profile
« Reply #5 on: February 17, 2017, 14:40:45 pm »

David,
This is really amazing work! Combine what you have done with Autodesks 123Catch and you can carve out 3D objects quite easily.
Logged

Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4686



View Profile WWW
« Reply #6 on: February 17, 2017, 21:40:58 pm »

Hello Gary

Yes but that need to be tested on a real workpiece ; I'm not sure that the tool profile compensation performed on a flat model still match after the model as been wrapped ... no 3D simulator to test that ..

++
David
Logged
Bubba
CNC Jedi
*****
Offline Offline

Posts: 2225



View Profile
« Reply #7 on: February 17, 2017, 21:48:46 pm »

David,
This is pretty good. Nice work!
Logged
BR52
Wookie
****
Offline Offline

Posts: 304



View Profile
« Reply #8 on: February 17, 2017, 23:23:32 pm »

Hi David,
The version of my CamBam is "1.0 Rel12" runs on Win10 Pro and on Win7 ultimate.
Problem is that YOUR script does not work and other scripts also do not work.  Huh
All script files are unlocked.
The plugins works great.

   Armando
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4686



View Profile WWW
« Reply #9 on: February 17, 2017, 23:56:21 pm »

Hello

Patience .. currently only Python is suported, but VB scripts interpreter will come back soon in CB 1.0 Wink ... and more other nice things !

++
David
Logged
BR52
Wookie
****
Offline Offline

Posts: 304



View Profile
« Reply #10 on: February 18, 2017, 00:42:11 am »



I was thinking in international conspiracy.  Cheesy Grin

David, thanks for the good news.

   Armando
Logged
papslab
CNC Ewok
*
Offline Offline

Posts: 4


View Profile
« Reply #11 on: March 20, 2017, 12:52:35 pm »

It's my first attempt. i did it two days ago.  120mm high.
Thanks for this scripts.


* aaa.jpg (80.11 KB, 677x960 - viewed 177 times.)
« Last Edit: March 20, 2017, 12:59:03 pm by papslab » Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4686



View Profile WWW
« Reply #12 on: March 20, 2017, 13:14:30 pm »

Hello

Nice job !

So the unwrap/wrap works in real ? and not only in my mind  Cheesy .. (not yet tested on the machine)

did you notice distortions compared to the original model ?

++
David
Logged
Garyhlucas
CNC Jedi
*****
Offline Offline

Posts: 1001


View Profile
« Reply #13 on: March 20, 2017, 13:53:08 pm »

That is amazing! What was the source of the 3d model?
Logged

Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/
Bubba
CNC Jedi
*****
Offline Offline

Posts: 2225



View Profile
« Reply #14 on: March 20, 2017, 20:52:41 pm »

@ papslab. Z jakiego drzewa to wyciete?
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.145 seconds with 19 queries.

Copyright © 2008 HexRay Ltd. | Sitemap