CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 13, 2018, 21:58:43 pm


Login with username, password and session length


Pages: [1] 2 3 ... 9
  Print  
Author Topic: 'Simulate with CAMotics' plugin  (Read 27352 times)
jk
Wookie
****
Offline Offline

Posts: 261


View Profile
« on: September 13, 2016, 20:30:10 pm »

Hi !

Had some free time and rewrote my 'CAMotics export' python script as a plugin.
It will add a new entry to the Tools top menu. Single click on a 'Simulate with CAMotics' will regenerate G-code file,
create CAMotics xml project with embedded tools and stock definitions and (re)open it in CAMotics.

Source on github:
https://github.com/jkmnt/cb2cm

Feedback is welcome )

---
Version 1.5.1 - mop-specified tools are allowed now
Version 1.4 - fix for the diameter of conical tools
Version 1.3 - fix calculation of length for the conical tools, added warnings for tool diameter conflicts
Version 1.2 - fix for spaces in file path
Version 1.1 - changed nc paths in xml to relative

* cb2cm_1_5_1.zip (7.93 KB - downloaded 153 times.)
« Last Edit: March 14, 2017, 12:40:25 pm by jk » Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3654



View Profile
« Reply #1 on: September 13, 2016, 21:15:47 pm »

Sounds great, I'll give it a try tomorrow.
Logged
lloydsp
CNC Jedi
*****
Online Online

Posts: 7636



View Profile
« Reply #2 on: September 13, 2016, 21:36:51 pm »

Neat!  New plugin creation has been at a lull for a time.  Maybe your effort will stimulate it again.

(I'm one of the guilty)

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
Bubba
CNC Jedi
*****
Offline Offline

Posts: 2502



View Profile
« Reply #3 on: September 13, 2016, 21:41:47 pm »


Just tried the plugin and it works very good. Thanks for that.

 As you say it creates Xml project file. Often wonder why would I want the xml project file.. As far as I'm concerned it is useless feature, because all I need to see/verify how machined part will looks like and CaMotics does this with out creating an xml file.. Wink
« Last Edit: September 14, 2016, 11:57:52 am by Bubba » Logged

My 2¢
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3654



View Profile
« Reply #4 on: September 14, 2016, 10:35:52 am »

Excellent job, works fine for me and have not come across any issues/bugs with it so far  Cheesy
Logged
pixelmaker
CNC Jedi
*****
Offline Offline

Posts: 1651


View Profile WWW
« Reply #5 on: September 14, 2016, 17:18:56 pm »

Hello
I try this plugin. Because CAMotics is installed at a different drive (camotics nativ on mac, windows in a VM) I get the message:
"Failed to run CAMotics. Set location in cb2cm.config file or start CAMotics manually before CamBam to autodetect it."
If I start CAMotics before CamBam it don´t autodetect it, because the different drive. I don´t see cb2cm.config.
If I open the .xml file in CAMotics I don´t see any toolpath.
The path in the .xml file is <nc-files>Y:\Desktop\testcode1.nc</nc-files>. This path is wrong because the .nc file is at the same location then the .xml file.
If I change the path manually to  <nc-files>testcode1.nc</nc-files> I can open the file in CAMotics and all works.

I think the path must always be the only the filename, without storage path. NC file and XML file are always at the same place and it needs no absolute path.

ralf


Logged
jk
Wookie
****
Offline Offline

Posts: 261


View Profile
« Reply #6 on: September 15, 2016, 12:14:57 pm »

Thank you all for testing.

The xml project is for passing information absent in g-code to the CAMotics. Now it is a table of used tools, stock dimensions and sim resolution. Maybe a something else in the future as the CAMotics will develop.
If there are a tooltables synced between CB and CM, and correct stock size is of no interest, .nc will suffice )

Regarding the error:
I doubt one could launch native app (external to to vm) from the virtual machine.
cb2cm.config is stored in CamBam's system folder (Tools->Browse System Folder).
Upon CB startup, plugin tries to detect CM executable in location specified in config, else looks in some common locations (Program Files ...), else tries to find a running windows process named 'camotics' and determine the path it was started from. Detected location is stored in config for the next run.
e.g. my config entry is <camotics_path>D:\winp\app\camotics\camotics.exe</camotics_path>

Thanks for suggestion of pathless .nc files - it is a right way. Fix will follow )
Logged
Bubba
CNC Jedi
*****
Offline Offline

Posts: 2502



View Profile
« Reply #7 on: September 15, 2016, 12:28:36 pm »

If there are a tooltables synced between CB and CM, and correct stock size is of no interest, .nc will suffice )
***************************************
That's exactly where I'm at...  Wink
Logged

My 2¢
jk
Wookie
****
Offline Offline

Posts: 261


View Profile
« Reply #8 on: September 16, 2016, 03:21:48 am »

Updated initial post with version 1.1
Logged
pixelmaker
CNC Jedi
*****
Offline Offline

Posts: 1651


View Profile WWW
« Reply #9 on: September 16, 2016, 09:42:52 am »

Quote
in xml to relative
Thank you,
now it works also if the files are on different drives

ralf
Logged
dwc
CNC Jedi
*****
Online Online

Posts: 516



View Profile WWW
« Reply #10 on: September 16, 2016, 10:29:38 am »

Thanks for your work making this plugin!
I have not been using CAMotics as I am too lazy to make those project files, now all is automatic, great!
Don
Logged

Bob La Londe
CNC Jedi
*****
Offline Offline

Posts: 3385


^ 8.5 pounds on my own hand poured bait.


View Profile WWW
« Reply #11 on: September 16, 2016, 17:59:10 pm »

Just played with your plug-in.  THAT'S COOL. 

It created the XML and the G-Code just fine. 
Then it opened CAMotics. 
Then I had to open the project file manually. 

The results were good and dead easy compared to anything else I've done.  This is cool.

Logged

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
lloydsp
CNC Jedi
*****
Online Online

Posts: 7636



View Profile
« Reply #12 on: September 16, 2016, 18:08:51 pm »

I'm not sayin' that Bob "has sway" with me, but when he says something is "cool", I listen.

First chance I get, I'll be trying this out, too!

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
joel.r1
Droid
**
Offline Offline

Posts: 69


View Profile
« Reply #13 on: September 17, 2016, 14:34:09 pm »

Single click on a 'Simulate with CAMotics' will regenerate G-code file,
create CAMotics xml project with embedded tools and stock definitions and (re)open it in CAMotics.
All working fine, except it does not (re)open in CAMotics... CAMotics open, but is empty Angry
If I open the .xml file manually, then working fine.
CB files and .nc are not stored in default CB directory, but on USB stick. May be the reason.
Any idea ?
Cheers. Joel.
Logged
Bob La Londe
CNC Jedi
*****
Offline Offline

Posts: 3385


^ 8.5 pounds on my own hand poured bait.


View Profile WWW
« Reply #14 on: September 17, 2016, 16:52:07 pm »

I tried it and had the same result.  It did not open the XML file automatically.  I didn't really care.  The rest worked so well that little bit wasn't even annoying to me.  My NC files and CB files are each stored in a separate folder per customer and customer project, so I might have the same issue. 
Logged

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
Pages: [1] 2 3 ... 9
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

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

Copyright © 2018 HexRay Ltd. | Sitemap