CamBam

Resources => Scripts and Plugins => Topic started by: jk on September 13, 2016, 20:30:10 pm



Title: 'Simulate with CAMotics' plugin
Post by: jk 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


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on September 13, 2016, 21:15:47 pm
Sounds great, I'll give it a try tomorrow.


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp 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


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bubba 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.. ;)


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent 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  :D


Title: Re: 'Simulate with CAMotics' plugin
Post by: pixelmaker 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




Title: Re: 'Simulate with CAMotics' plugin
Post by: jk 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 )


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bubba 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...  ;)


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 16, 2016, 03:21:48 am
Updated initial post with version 1.1


Title: Re: 'Simulate with CAMotics' plugin
Post by: pixelmaker 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


Title: Re: 'Simulate with CAMotics' plugin
Post by: dwc 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


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe 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.



Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp 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


Title: Re: 'Simulate with CAMotics' plugin
Post by: joel.r1 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 >:(
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.


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe 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. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 17, 2016, 20:39:20 pm
Hello,

The problem that I encounter is that I must not have any space in the filepath.

ex on a french Windows, if you store something on the desktop, the path is

C:\Documents and Settings\David\Bureau

the spaces in "Documents and Settings" are not recognised

in Documents, same pb
C:\Documents and Settings\David\Mes documents

If I move my CB file in
C:\temp\toto

no problem, the XML is read

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on September 17, 2016, 20:49:33 pm
David, try putting the path in double-quotes, as: "C:\Documents and Settings\David\Bureau"

In earlier versions of Winblows, that would work.

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 17, 2016, 21:03:30 pm
Hello Llyod

No way, the path is C:\Documents and Settings\David\Bureau, but in the XML i've only the file name without path

<nc-files>coque_V407.nc</nc-files>

If i change to

<nc-files>"C:\Documents and Settings\David\Bureau\coque_V407.nc"</nc-files>

camotics show the stock and the tools, but no Gcode is loaded (same result without the "")

If think the pb is in camotics itself, not in the plugin (also it don't understand the shortcuts to folder ; all my shortcuts appears as xxxx.lnk and are not usable, it's painful)

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: pixelmaker on September 17, 2016, 22:36:39 pm
David

remove the "C:\Documents and Settings\David\Bureau\" CAMotics needs relative url.
With absolute url I also see no toolpath

ralf


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 17, 2016, 22:51:12 pm
Arg ! I edit your message instead of reply ...

Hello Ralf

As I say here:

Quote
No way, the path is C:\Documents and Settings\David\Bureau, but in the XML i've only the file name without path
<nc-files>coque_V407.nc</nc-files>

by default, there is only the file name, but it do not work if the path where is the file contain a space,even if it is not written in the XML (not really a pb for me, I don't use camotics  ;D)

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: joel.r1 on September 18, 2016, 08:22:40 am
The problem that I encounter is that I must not have any space in the filepath.
Yeah, this is it. There are two parameters to consider :
- Path should not contain any space
- File name/path should not contain any accent (éèàë, etc... prohibited)
First is related to script and second related to CAMotics. Once you know, it is fine.
Joel


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 18, 2016, 19:48:29 pm
I've added quotes "..." to the path of project to open, hopefully this would fix the 'spaces in path' issue.
First post updated.


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 18, 2016, 20:35:23 pm
Hello

Tested, and it solve the pb for me .. nice !

The values for the conical tools are wrong in the XML definition ; the diameter is OK*, but the height do not match to obtain the right angle given in the tool definition (in the tool library)

so for a D=20mm 60° the definition give D20 Height 15 -> angle = 67.38°

and for a D=20mm 90° the definition give exactly the same ..

*another pb with tool is that the definition reflect the diameter of the tool that is set in the tool library, but if you change the diameter in the mop property this value is not taken in account and the default value is used. (those in the tool lib for this tool number)

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 18, 2016, 21:04:07 pm
For conical tools the angle seems to be calculated from length and shank diameter, while tip diameter is assumed to be zero. In CamBam diameter is a diameter of tip, angle is controlled by a separate property Vee Angle.
Think I'll modify tool length definition for conicals to obtain a correct angle.

MOP-specified diameter won't be used since it conflicts with tool library and essentially means introducing another tool and hacking output G-code ) Same thing with tools with the zero index and mop-specified diameter.

Also I've tried to add 'sim this part'/'sim this mop' via right key popup in machining tree,
failed at obtaining g-code name for part/mop. Otherwise it's possible and may be useful.


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 18, 2016, 21:41:27 pm
Hello

Added to the website

http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Simu_camotics.html

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on September 19, 2016, 04:12:59 am
Awesome.  I'll have to download the update and try it tomorrow. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 19, 2016, 17:36:49 pm
Updated first post with version 1.3

Fixed calculation of length for V-bits, should be close enough. The tool diameter (cut width at depth) is not used,
shape is an ideal cone, cone height is calculated to obtain a specified vee angle. Cone base diameter is set to the shank diameter (or set to 1/8'' if absent :)

Also added warnings if tool diameter is overridden in mop and conflicts with library.


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 19, 2016, 18:59:26 pm
Hello,

Seems to be ok for the cone value but there is a pb with the diameter that can cause bad simulation.

Quote
Cone base diameter is set to the shank diameter (or set to 1/8'' if absent :)

I don't understand why  ??? ... the tool diameter is the tool diameter, not the shank diameter ;)

ex: if I simulate with my tool that is 12.7mm Ø, 90° shank 8mm (wood tool), I get a tool of only 8mm diameter and it's not good.

Depending on the depth you cut ; with a 12.7 tool 90° you can cut up to 6.35mm deep, but with a 8mm tool 90°, the max deep is 4mm, if you cut more, you get a wall.

look on the picture, my 12.7 tool don't give the right simulation because it is resized to 8 by the plugin.

I thing you must keep the diameter given by the user, and only recalculate the tool length to match the given angle.

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 19, 2016, 19:22:11 pm
Hmm, that make sense. The only conicals I've used are the v-bits for engraving (pcb work etc.),
so my perspective is limited ). Shank diameter was used to make the tool look like 'a real thing',
not a tiny needle with sub-mm diameter ... e.g. the common 1/8" bit with ~0.4mm diameter at a cut depth :)

So the best way is to set cone base diameter to a given diameter, and calculate length to match angle.
Shank diameter won't be used.

Will update the plugin soon.


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 19, 2016, 19:30:20 pm
Re

Something that can be useful:

An interesting thing to know is that camotics simulates only the given height of the cutter (it's why there is missing cut in the picture), the material that is above the top of the tool is not removed, while cutviewer uses infinite length for a tool.

The result is that if I set a endmill = 2 mm length, with camotics I can simulate a T cutter/saw blade = 2 mm high and I can simulate grooves.

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on September 20, 2016, 02:08:59 am
I don't use (well haven't mostly) conical cutters and v cutters almost never, so that doesn't affect me much, but I have to say the way it is now is nice.

I just turn on the operations I want and simulate with Camotics.  Depending on the complexity a few minutes later I have a rough cut proof on screen.  Since I tend to use CamBam on my right side monitor its really convenient because Camotics opens up on the left side monitor. 

This is a nice plugin and the bug fix on the spaces in file path was just icing on top. 





Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 20, 2016, 16:05:39 pm
Version 1.4 has arrived - fix for the diameter of conical tools. Hopefully this time would be ok )
First post updated.


Title: simulation with camotics
Post by: michel on September 22, 2016, 05:26:28 am
Hi,

I installed that plugin and when running a silulation of a part for testing I get this error . What can be the issue here ?



regards
Michel


Title: Re: 'Simulate with CAMotics' plugin
Post by: dave benson on September 22, 2016, 13:54:32 pm
I've had a chance to use the plug today, and have done a fair bit of simulating (with lots of different files)
and find It's very handy.
Dave


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on September 22, 2016, 15:47:24 pm
The big thing for me is between the plug-in and the Camotics software its now very very easy to use.  I've used Camotics off and on for a while now, but this plug-in really makes it pop.  

I know.  I know.  I am starting to sound like a fanboy.  I'm really not.  So far the latest rendition seems to work and its easy to use. 


Title: Re: simulation with camotics
Post by: jk on September 22, 2016, 16:50:49 pm
Quote
I installed that plugin and when running a silulation of a part for testing I get this error . What can be the issue here ?

Something wrong with the generated g-code file, I think.
Show the first lines of it for investigation )


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 22, 2016, 20:46:49 pm
Topics merged

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: michel on September 22, 2016, 20:57:49 pm
here is the created g-code


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 22, 2016, 21:14:54 pm
Hello Michel

I have a look on your Gcode ; the pb is that there is a lot of Gcode that Camotics do not understand like:

G60, M51, M20, M83, M28, M29 ... etc

Use a more standard post pro (Like Mach3) to do the simulation, then switch to your Ranc232 postpro to generate the 'real' Gcode for the machine.

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 22, 2016, 21:19:27 pm
Michel, CAMotics screams on a first line because of 'percent sign' start of program marker it do not understand.
You should switch to a standard preprocessor for simulation as dh42 suggests.


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on September 22, 2016, 21:20:13 pm
In addition to what David said, I had to delete %11 in line 1 before Camotics would even attempt to run it.

Ha jk, you posted the same time as me  :D


Title: Re: 'Simulate with CAMotics' plugin
Post by: michel on September 23, 2016, 07:33:52 am
Hi All,

My opinion is that a simulation has to be a close representation of the actual reel milling after . So it is a kind of evaluation of your g-code output. If I have to use another processor like the mach 3 for example then any evaluation  of your reel output is gone and then this is just becoming a visual on screen with no added value.

If camotics can't handle the output I have for my machine then it is useless for me . Perhaps it can be achieved to get another processor to output a similar g-code that leaves out the bugging parts of it.

I must say that I was hoping to use this when I had to mill a unsual part to be sure of the result but until today CB did not give me any reason to simulate as it works very well. The program has never let me down yet ;-)

It would have been a nice addition in some situations.



Title: Re: 'Simulate with CAMotics' plugin
Post by: pixelmaker on September 23, 2016, 10:04:08 am
michel,
if you have a controller that needs a G91.1 the toolpathes are the same in a controller that need G91.
You have to configure a pp that work with a simulation software. If same commands have different numbers does not matter. That's always the same.
It is the same with the simulation of mach3 code in CutViewer. The original code don´t work and you use a different, but always the same, post processor for simulation.

ralf


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on September 23, 2016, 17:00:39 pm
Hello,

Your Gcode works as is on CutViewer Mill, just need to define stock and tools (but it can also be defined in the PP and passed automatically by CB, so you don't need to define it yourself in CV).

If CV don't understand a code, it skip it, where Camotics give an error.

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on September 29, 2016, 02:03:48 am
This plug in so saved me some destroyed parts today.  

I was just playing but it did the trick.  


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 29, 2016, 15:16:03 pm
Bob, there is a mop time estimations in your screenshot. Is it some plugin or native feature ? Want it too )


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on September 29, 2016, 15:34:19 pm
Bob, there is a mop time estimations in your screenshot. Is it some plugin or native feature ? Want it too )

In the diagnostic messages of CamBam?  Just turn up your diagnostic level in the settings.  I haven't found it to be particularly accurate, but I like the higher level of messages so I can see what the progress is when CB is calculating tool paths.  


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on September 29, 2016, 19:47:29 pm
Thank you, never changed this setting. Set it to the maximum, will see if cambam would be too chatty.


Title: Re: 'Simulate with CAMotics' plugin
Post by: SteveT on November 06, 2016, 08:46:11 am
Hi, Just tried the plugin and it work great first go, it will save some time as I use Camotics before machining.
Thanks for your effort.

Running on Ubuntu 16.04

Steve


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on November 18, 2016, 15:57:53 pm
I have to say again.  This is a really useful plug-in.  It has saved me several destroyed parts by doing a simulation first.  Even at cost for materials and machine time its probably saved me thousands.  Certainly lots of hundreds. 

Is there (this is probably a reach) a way to specify in advance what resolution to render at instead of having to render the part twice if you want a higher resolution?  I know higher res takes more time, but its still faster to cut a part right the first time than to cut it twice. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on November 21, 2016, 06:43:46 am
Nice to hear it so useful )

Resolution may be specified in plugin config.
Open cb2cm.config from system folder (Tools->Browse system folder) with text editor and change line
Code:
<sim_resolution>MEDIUM</sim_resolution>
to the one of LOW, MEDIUM, HIGH, VERY_HIGH


Title: Re: 'Simulate with CAMotics' plugin
Post by: grzgrz on February 04, 2017, 12:25:14 pm
Hi jk,

Camotics doesn't actually animate the removal of the material, does it? What I see is in fact a cutter moving over a workpiece that is already machined. Am I doing something wrong or is it just the way it works?  ???

Grzegorz


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 04, 2017, 20:45:41 pm
Hello

Quote
Camotics doesn't actually animate the removal of the material, does it?

No, you can only see the result of the cut for a given position of the position cursor (then hit the 'run' toolbar icon)

Only the path is simulated in real time

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on February 05, 2017, 00:38:34 am
FYI:  Camotics does not show regular drill operations.  This can cause you issues if you have a drill operation placed incorrectly. 

It does show spiral mill drilling operations. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 05, 2017, 00:50:13 am
Hello

I've a pb with camotics because I usually works with Z zero on the table and camotics always starts the simulation with the tool at Z = 0, so the first movement, or the movement just after the toolchange does a mark in the part. On cutviewer the Z position for tool start can be set (I set it to Z = 100) , but I can't find how to do the same with camotics.

if someone know the trick ?

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: grzgrz on February 05, 2017, 07:42:23 am
Just when I thought I finally knew how to get Camotics to work, I gave it one more try and it only displayed the workpiece without the machined area... I even made sure to use a tool from a tool library.

Is there any procedure I should follow in CamBam to ensure proper simulation of my MOPs in Camotics?

That there are three places for defining tool parameters in CamBam (Machining, Part and MOP) sure is confusing...

Grzegorz


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on February 05, 2017, 09:04:43 am
That there are three places for defining tool parameters in CamBam (Machining, Part and MOP) sure is confusing...

Grzegorz

We've heard this mentioned in another thread recently  :D

CamBam works with a hierarchy of;

Machining
   Part
      MOP(s)

If you set the tool number in Machining, then all Machining Operations (MOPs) you add will inherit that tool
If you set a tool number in Part, then any MOPs in that Part will inherit that tool
If you set a tool number in a MOP, then only that MOP will use that tool

So that means if you only want to use one tool for all MOPs it only has to specified once in Machining
And if you have multiple MOPs in each Part that use the same tool it only has to be specified once in the Part
And if all or some of your MOPs use different tools then these tools can be specified in each MOP

Create a new CamBam file and try it out for yourself, the only way to learn is to do it.


Title: Re: 'Simulate with CAMotics' plugin
Post by: grzgrz on February 05, 2017, 09:18:08 am
Eddy,

Thanks for your explanation. But shouldn't Camotics render my machined workpiece properly regardless of where (i.e. in which section) the tool was defined and whether or not it is a library item? Depending on a project, sometimes the simulation works and sometimes it doesn't and I don't know why.

Take #1: I've just tried again, chose a 'Mach3+CutViewer' postprocessor, defined stock, selected tool #1 from library (in Part), and Camotics still only displays the uncut workpiece (its dimensions and offset, as well as the tool type and diameter, are fine).

Take #2: Started from scratch with the same imported model. Same postprocessor. Same stock. Same cutter type and diameter, this time entered manually in MOP. Got a warning in CamBam '3DSurface1 has tool diameter overridden. Sim results may be wrong', yet this time everything seems fine in Camotics.

Any thoughts?

Grzegorz


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on February 05, 2017, 10:20:24 am
Grzegorz,

My post about tools was just to explain that aspect, I don't use Camotics much myself but I'll try to have a look today to see if I can duplicate your problems.

Edit:

Everything seemed to work okay except V tools did not leave a cut path in the stock surface even though the tool geometry was picked up correctly by Camotics.
It did show the toolpaths in wireframe view but nothing in stock view. Other tools appeared to work as expected.

Grzegorz, the best way forward here is for you to attach a cb file that does not work so that others can run it and try to reproduce the problem with a view to solving it.

 


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 05, 2017, 21:28:09 pm
Hello,

Quote
Same cutter type and diameter, this time entered manually in MOP. Got a warning in CamBam '3DSurface1 has tool diameter overridden. Sim results may be wrong', yet this time everything seems fine in Camotics.

With the plugin, you must use the CB tool library, the tool Ø is read for the tool number of the current tool library, unfortunately, if you set the tool diameter directly in the mop, the plugin don't use it.

(PS: as Eddy, I'm not a Camotics user, except when I need a STL of the machining result)

Quote
If you set the tool number in Machining, then all Machining Operations (MOPs) you add will inherit that tool

Only if tool number is set to Auto in the mops

++
David



Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on February 06, 2017, 07:22:05 am
FYI:  Camotics does not show regular drill operations.  This can cause you issues if you have a drill operation placed incorrectly. 

It does show spiral mill drilling operations. 

Camotics shows G81 simple drill. If there are dwell or peck specified, drill becomes G82/G83. They are  unsupported by Camotics.

I've a pb with camotics because I usually works with Z zero on the table and camotics always starts the simulation with the tool at Z = 0, so the first movement, or the movement just after the toolchange does a mark in the part.

I think this could be fixed with a custom postprocessor, say, insert G0 Z{$mop.first.z} inside the toolchange macro.

But shouldn't Camotics render my machined workpiece properly regardless of where (i.e. in which section) the tool was defined and whether or not it is a library item? Depending on a project, sometimes the simulation works and sometimes it doesn't and I don't know why.

Any thoughts?

Camotics takes diameter only from the tooltable (indexed by the tool number). The real machine do the same for tool diameter and length offset.

So plugin ignores any concrete specified diameters and uses only tool number (possibly inherited from Part or Machining). In case of any mismatch (no tootable entry, tool number == 0, manually entered tool diameter not equal to the table-based one) plugin issues warning.

If custom diameter is specified in mop, there is no way to pass it to camotics except introducing new tool and fake entry in tooltable.

AFAIK Cutviewer has a way to pass this info via magic comments, but Camotics is not, being closer to the real machine. And it helps us be disciplined and keep our tooltables well managed :-)


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on February 12, 2017, 18:35:27 pm
The problem is many beginners trying desperately to get past their first stumbling blocks don't use or know any of that stuff.  Tool tables?  Styles?  Etc.  I didn't use any of that stuff for years.  I just custom built up each MOP and made sure there was no conflicts as I went.  I think most beginners start that way. 



Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 12, 2017, 18:49:35 pm
Hello

not only beginners  ;) .. I alway use the tool lib to set my tools, ... but also I often change the diameter value in the mop after that because I do not have all exotic tool diam in my lib (ex: re sharpened tools) or because it's a file that comes from another person and his tool numbers don't match with those in my lib. (and CB autmatically switch to 'value' in this case.

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: grzgrz on February 13, 2017, 09:39:07 am
...I've found out that Camotics works fine when I define the tool library and tool number in the Part section. I don't even need to select any postprocessor.

Grzegorz


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on February 13, 2017, 12:06:24 pm
" I don't even need to select any postprocessor."
---
Quite the contrary!  Even when you don't select a different post-processor than the default, you have "selected a post-processor".

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on February 13, 2017, 18:22:52 pm
I've tweaked diameters of library tools by a small amount too. It doesn't affect the simulation much, IMHO
simulation is most useful as a coarse check just to be sure all is ok.

But example with third-party files (and tools) is interesting. Maybe support for mop-specified tools is worth investigating after all. Any ideas besides adding 'fake' tooltable entries ?


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 14, 2017, 00:18:25 am
Hello,

Quote
I don't even need to select any postprocessor.

Unlike cutviewer, for camotics, the tools and stock datas are not written in the Gcode, so you do not need a specific post processor.

but maybe, it can be another way to create the XML for camotics, maybe simpler:

setting a post pro for cutviewer to do the Gcode, and use the Post Build to call a post treatment code (.exe) that read the Gcode to extract tool and stock data from the cutviewer data strings to creates the XML file. So we are sure that the datas for tool profile and tool diam are those used in the Gcode, no matter if they are taken in the tool lib or set directly in a mop by hand.

in this case the plugin in the menu do not creates the XML file and only run camotics with the right filepath.

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on February 14, 2017, 00:55:44 am

but maybe, it can be another way to create the XML for camotics, maybe simpler:

setting a post pro for cutviewer to do the Gcode, and use the Post Build to call a post treatment code (.exe) that read the Gcode to extract tool and stock data from the cutviewer data strings to creates the XML file. So we are sure that the datas for tool profile and tool diam are those used in the Gcode, no matter if they are taken in the tool lib or set directly in a mop by hand.


Extracting tool data from MOP in plugin is trivial, no need to parse cutviewer magic comments.
The real problem is different.

Camotics read G-code, see T<number> M6 and loads tool definition from tooltable in XML (indexed by number).
AFAIK there is no way to pass tool specs except by the number.

If tool diameter is overridden manually, there is no such tool in tooltable and no valid tool to load.

I see just one hacky solution - collect all manual tools, create temporary entries in tooltable, assign temporary tool numbers for manual MOPs, export g-code, revert the MOPs back. A little too dirty for my taste.


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 14, 2017, 01:18:41 am
Hello,

Yes, but if you use the same way as to do the comments for cutviewer, you can do the major job with it because you can write what you want in the Gcode, CB do the job to associate a tool number and a tool diam even if it is not the same than in tool lib.

so you just need to read this data in the Gcode and do some adjustment because CB talk with diameter and camotics with radii.

an example of what I can get in the Gcode with just adding a macro in the toolchange property

G0 Z5.0
(length="20.0")
( number="6" )
(diameter="3.0" )
(rad="1.5" )
(angle="0.0" )
(shape="BallNose" )

T6 M6
..
..

G0 Z5.0
(length="22.0")
( number="5" )
(diameter="3.0" )
(rad="0.0" )
(angle="0.0" )
(shape="EndMill" )

T5 M6
...
...
( Gravure3 )
G0 Z5.0
(length="4.0")
( number="60" )
(diameter="3.0" )
(rad="0.0" )
(angle="60.0" )
(shape="VCutter" )

T60 M6
M3 S12500
G0 X59.0 Y31.0

so you have all the value needed to do the xml without the pb of the source of the data (lib or hard coded in the mop)

its done with the toolchange macro of the pp


Code:
{$clearance}
{$comment}length="{$tool.length}"{$endcomment}
{$comment} number="{$tool.index}" {$endcomment}
{$comment}diameter="{$tool.diameter}" {$endcomment}
{$comment}rad="{$tool.radius}" {$endcomment}
{$comment}angle="{$tool.veeangle}" {$endcomment}
{$comment}shape="{$tool.profile}" {$endcomment}
T{$tool.index} M6

of course, you can do the same for the stock with the following macros in the header

{$stock_width},{$stock_length},{$stock_height},{$stock_x},{$stock_y},{$stock_z}

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on February 14, 2017, 02:50:18 am
dh42, think I get an idea, thank you for examples.

I've supposed CB allows same tool numbers with different diameters in one G-code. Just tried - it gives a loud warning.
Different tool shapes do not give warnings, though.

So I just could give a priority to MOP diameters then generating xml tooltable - numbers and diameters
will match, sim tooltable will be specific for the concrete G-code. CB should  catch diameter conflicts for same numbers (if any).

This should handle the third party files and sharpened tools too.


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 14, 2017, 03:05:50 am
Also, playing with the data, I also see that we can define an endmill with an angle in CB tool lib, so in addition to the conical tool ('Vcutter' with no flat tip), we can also add conical tool with flat tip (snubnoze in camotics), by using the tool.lenght + tool.veeangle + tool.diameter data and calculation.

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on February 15, 2017, 04:48:42 am
Made a small changes to support non-library tools.
Tool number in MOP can't be zero (since no toolchange is generated in this case), otherwise should be working.

If everything is ok, I'll update first post with this version. Imperial users are especially welcome for testing.

dll is attached below.



Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on February 15, 2017, 10:04:11 am
jk,

It worked as described for me  ;D
The only thing it did not do was to report the 'Tool Profile' for MOP specified tools.
I also noticed that Camotics sorts the tools in ascending numerical order rather than the order they will be used in.


Title: Re: 'Simulate with CAMotics' plugin
Post by: driedeker on February 15, 2017, 21:07:26 pm
CAMotics v1.1.0. is now available


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 16, 2017, 09:05:17 am
CAMotics v1.1.0. is now available

Hello

I just install it .... and now, nothing is working ; when I run Camotics it say that it is not a valid win32 application

(I checked twice, but no error, I installed the right version: camotics_1.1.0_x86.exe)

unfortunatelly I do not have the previous version to reinstall

Edit: Ok, I retrieve the version 1.06 that is working

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: pixelmaker on February 16, 2017, 11:45:44 am
I try the mac version (camotics_1.1.0_x86_64.pkg) and it works very good.
The old version don´t show the material while simulation, only at the end.
This version makes a update of the view at the end of every line.

I install the windows 32bit version camotics_1.1.0_x86.exe on a windows 7 drive without problems. Between the installation it installs a Microsoft Visual C++ 2015 package.
I install the windows 64bit version camotics_1.1.0_AMD64.exe on a windows 7 drive without problems. Also here between the installation it installs a Microsoft Visual C++ 2015 package.

ralf


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 16, 2017, 11:58:24 am
Hello Ralf

Quote
Between the installation it installs a Microsoft Visual C++ 2015 package.

Yes, same for me .. I'll retry maybe a corrupted file ? (or it won't XP !)

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 16, 2017, 11:58:52 am
Hello Ralf

Quote
Between the installation it installs a Microsoft Visual C++ 2015 package.

Yes, same for me .. I'll retry the download ; maybe a corrupted file ? (or it won't XP !)

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: pixelmaker on February 16, 2017, 12:01:10 pm
1 minute please, XP is starting

The installation on XP works without problems. When I start camotics I get the same warning "This is not a valid win32 application"
Same with the Debug Version. It looks that this software don´t work with XP

ralf


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 16, 2017, 13:01:39 pm
Ok, I retry too, and same result ...

so return to 1.06

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on February 16, 2017, 19:58:09 pm
I am running Windows XP Pro 32 that is currently registry hacked to look to Microsoft like Windows XP Embedded for POS and I am not having any issues with XP and Camotics or the plug-in.  I am not using the latest version of the Plug-In however.  Still using CB 098P.   

FYI:  Windows XP Embedded for POS is Windows XP Pro SP3 at its core. 



Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on February 16, 2017, 20:26:17 pm
Hello

I tried this trick, but with no luck  >:(

https://github.com/CauldronDevelopmentLLC/CAMotics/issues/194

(XP Pro SP3)

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on March 14, 2017, 12:43:00 pm
Added version 1.5.1 to the first post.

* mop-specified tools are allowed (same as in 1.5)
* mop-specified tool with index 0 is valid now (will issue a warning though).
handy for small jobs with a single non-library tool and no toolchanges


Title: Re: 'Simulate with CAMotics' plugin
Post by: GeoffreyGRoy on April 14, 2017, 00:55:24 am
I have noted a small issue in the naming of the saved NC file.  Normally, and correctly, the name of the NC file created matches the name of the CamBam file.  I have a case where the name of the NC file matches the name of one of the MOP entries!  This may not be a plugin issue but rather something to do with my CamBam model, any thoughts?

Geoff


Title: Re: 'Simulate with CAMotics' plugin
Post by: kvom on April 14, 2017, 13:45:57 pm
I haven't been following this thread since I own a licensed copy of CutViewer  Mill.  Are there any advantages to Camotics over Cutviewer that would incent me to switch?


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on April 14, 2017, 14:34:51 pm
Hello

I also use CV, but sometimes I use Camotics because it is able to save the result as STL ; CV can't

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on April 17, 2017, 14:26:49 pm
I have noted a small issue in the naming of the saved NC file.  Normally, and correctly, the name of the NC file created matches the name of the CamBam file.  I have a case where the name of the NC file matches the name of one of the MOP entries!  This may not be a plugin issue but rather something to do with my CamBam model, any thoughts?


Can you provide a test file with the issue ?

I call CAMUtils.GenerateGCodeOutput(CamBamUI.MainUI.ActiveView);
and think cambam does the same then clicking Produce Gcode.




Title: Re: 'Simulate with CAMotics' plugin
Post by: kvom on April 18, 2017, 01:31:57 am
Produce Gcode when right clicked on MOP names output like this.


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on April 18, 2017, 02:18:36 am
CB will accept MOP names with characters that are not valid for file names. 



Title: Re: 'Simulate with CAMotics' plugin
Post by: GeoffreyGRoy on April 20, 2017, 00:15:17 am
Dear JK

The example Cambam file is rather large and cannot be posted, but I can attach a pdf doc showing some steps in the process.

I also note that is the NC files exists and "Cancel" is selected  on the file dialog then the plugin continues and will try to load a previously created NC file into Camotics.  Maybe this is intentional.

Geoff


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on April 20, 2017, 11:51:15 am
Ok, I'll try to reproduce it.

Continue after the cancel is intentional to allow Camotics launch if nc file is already
generated (and user think it is up to date).


Title: Re: 'Simulate with CAMotics' plugin
Post by: Momboz on April 26, 2017, 13:39:38 pm
This plugin works fine with the Cambam plus [0.9] Rel 8P. I like it... However, will also be available for CamBam plus [1.0] Rel 12?

Of course, you would tell me I have to be patient and I would agree :)

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


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on April 26, 2017, 14:50:16 pm
It works with CB 1.0 rel12 just fine.
Think I've addressed your problem here: http://www.cambam.co.uk/forum/index.php?topic=6557.0


Title: Re: 'Simulate with CAMotics' plugin
Post by: tau on May 19, 2017, 11:01:50 am
Dear All,

i have a similar issue as mentioned by Ralf on pg 1 of this thread, but then by reading onwards it seems that mine is related somehow different.

First of all, if i install CAMotics 1.1.1 per default to my C: drive everything is just fine and CB is possible to call CAMotics with no problems at all passing on the file to be simulated. So far, great!

But when i manually move the CAMotics install to another drive (e.g. E:\ - which the installer of CAMotics does NOT seem to provide to be installed to), CB is not able to find CAMotics to pass on the simulation gcode.

So even trying to add a path to cb2cm.config seems impossible, since it will be deleted from there by the plgin i assume, nor the hint that pops up to start CAMotics before starting CG so it will locate CAMotics, seems to work.

Because if i start CAMotics before starting CB, the plugin entry does NOT show up in CB!??

So it is actually two things that interfere here with my setup,

a) CAMotics not accounting for for installation to different drives and
b) after manually moving CAMotics to a different drive, being able to use the plugin.

Any advice on how to resolve this are highly appreciated!

Thanks for your attention and hoping to get closer to a solution.  ;)

Regards,  Tunc

P.S.: Using here CB 0.9.8P and plugin v1.5.1


Title: Re: 'Simulate with CAMotics' plugin
Post by: jk on May 19, 2017, 12:48:49 pm
Hello.

Just tried the following actions, works for me:

1) close cambam
2) delete cb2cm.config
3) run cambam and exit (plugin will create default cb2cm.config on load)
4) put path into the cb2cm.config manually with the text editor. I place camotics on a different drive too,
so my entry is:
<camotics_path>D:\winp\app\camotics\camotics.exe</camotics_path>
5) run cambam. everything should work now
 


Title: Re: 'Simulate with CAMotics' plugin
Post by: tau on May 19, 2017, 15:48:34 pm
jk,

thanks a bunch for your quick answer & the great help!

Once added the correctly formatted ( ::)) path to Camotics, the plugin didn't erase this entry and all goes well now!

I must admit i'm really proud to be a member of such a great forum!  ;D


Now if CAMotics only could handle a 3D mouse input the same way EddyCurrents plugin does, i guess that would make a great addition to the work flow.

Regards,  Tunc


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on May 19, 2017, 16:47:24 pm
The creator of CAMotics responds well to people who donate and sometimes to people who participate in his projects site.  I've done both. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bubba on May 19, 2017, 21:52:56 pm
The creator of CAMotics responds well to people who donate and sometimes to people who participate in his projects site.  I've done both. 


+1 ;) ;D


Title: Re: 'Simulate with CAMotics' plugin
Post by: tau on May 19, 2017, 21:59:56 pm
The creator of CAMotics responds well to people who donate and sometimes to people who participate in his projects site.  I've done both. 

Bob, i guess you've made a good point about that!  ;)

Thx,

Tunc


Title: Re: 'Simulate with CAMotics' plugin
Post by: Lou van Wijhe on November 11, 2017, 16:54:15 pm
I have 2 questions about this very handy plugin, which I like a lot:

1. The plugin creates a CAMotics project named after the CamBam file name. Today I needed to split a project into 2 parts, with different out file names. Would it be possible for the plugin to create CAMotics projects named after the out file name of parts?

2. Where can I find a donate button for this plugin?

Lou


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bubba on November 12, 2017, 00:04:08 am
Don't know how to help with question 1.

2. I don't think there is a way to donate for the plugin itself, but CAMotics accept support/donations. I'm for one supporting this project by donating.

 http://camotics.org/#donations


Title: Re: 'Simulate with CAMotics' plugin
Post by: Lou van Wijhe on November 12, 2017, 15:22:58 pm
Thanks for responding, Bubba. I did donate to CAMotics but I assumed I could donate to the maker of the plugin as well. I like the plugin, it's very convenient.

Lou


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 12, 2017, 15:34:34 pm
For the PART only idea, try this update to the plugin.

Edit: it's had a further update.

Please see here; http://www.cambam.co.uk/forum/index.php?topic=6041.msg56679#msg56679
for v1.5.3

Lou, you should know that "donate" is looked upon as a bad word in this forum  ;D





Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 12, 2017, 21:23:43 pm
Update.

It looks like you may have to generate gcode for the whole CamBam file first, before going onto the Part only.
I think it depends upon the setting you have in cb2cm.config for; <regen_gfile_before_post>true</regen_gfile_before_post>

If set to "true" you may be okay, further testing I think. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: Lou van Wijhe on November 12, 2017, 22:10:58 pm
Thanks very much for this, Eddy. I do have <regen_gfile_before_post>true</regen_gfile_before_post> in cb2cm.config.

I'll test the update tomorrow and come back to you. At the moment it's close to midnight in Holland and old people like me should go to bed now. Zzzzz...

Lou


Title: Re: 'Simulate with CAMotics' plugin
Post by: Lou van Wijhe on November 13, 2017, 11:33:29 am
The updated plugin works. However, there are some peculiarities:

I have a project named CS Rudder and within it 2 machining parts named Registration Holes and Front Side. When I produce G-code it is placed in a file called CS Rudder.nc and CAMotics starts a project CS Rudder.xml. So far, so good.

1. When I want to produce different G-code files for each part, say for Registration Holes, I click on the [...] button in its Properties panel and CamBam creates a file named {$cbfile.name}-Registration Holes.nc (i.e. CS Rudder-Registration Holes.nc). However, when I then use the Simulate with CAMotics (Part) routine, the dash character is replaced by a full stop character and the simulation doesn’t work. When I manually replace the dash character in the Out-File name by a full stop character, it does work.

2. When I use these unique Out-File part names, I can no longer run a simulation for the entire project because all G-code output goes into the Out Files per part. I suppose this is as designed by CamBam. When I want to review the entire project, I must erase the Out-File part names first.

All in all, the updated plugin works well, with a proviso for the peculiarities.

Thank you!!
Lou


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 13, 2017, 11:40:42 am
With my testing I have nothing in the Parts 'outfile' text box, it's just blank.
I can see how the method you are using inserts a dash though.

The problem arises because CamBam uses a "." if a right click method is used but uses a "-" if the outfile method is used  ???


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on November 13, 2017, 15:32:40 pm
If I have some time I'll do some testing, but I simulate parts of jobs all the time.  I just name them differently when I get to that point.  Am I missing the point? 

Usually I have a TEST.nc file I use whenever I am doing CAMotics simulations.  I just keep over writing it since I don't cut from it anyway. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: Lou van Wijhe on November 13, 2017, 20:39:12 pm
With my testing I have nothing in the Parts 'outfile' text box, it's just blank.
I can see how the method you are using inserts a dash though.

The problem arises because CamBam uses a "." if a right click method is used but uses a "-" if the outfile method is used  ???

I'm still pleased with the updated plugin, despite the peculiarities. I know where I have to pay attention to. By the way, where did you use the "right click method".


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 13, 2017, 20:48:26 pm
Right mouse click on a Part name in the tree view.
Then use produce gcode, note the outfile box is empty.


Title: Re: 'Simulate with CAMotics' plugin
Post by: Lou van Wijhe on November 13, 2017, 20:49:50 pm
If I have some time I'll do some testing, but I simulate parts of jobs all the time.  I just name them differently when I get to that point.  Am I missing the point? 

Usually I have a TEST.nc file I use whenever I am doing CAMotics simulations.  I just keep over writing it since I don't cut from it anyway. 

I sometimes create different G-code files per part and do cut from them. So, I thought this would be convenient. Nevertheless, I'm curious about the outcome of your tests.

Lou


Title: Re: 'Simulate with CAMotics' plugin
Post by: Lou van Wijhe on November 13, 2017, 20:52:13 pm
Right mouse click on a Part name in the tree view.
Then use produce gcode, note the outfile box is empty.

I see, I just leave the Out-File text box empty, use the right click method and everything works fine!

I do like the update!
Lou


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 14, 2017, 10:51:17 am
Okay, this version is more civilised. v1.5.3

PLEASE NOTE: This information applies to the option; "Simulate with CAMotics (PART)" only.


1. It automatically uses the correct character "-" or "." by looking to see if "outfile" has been populated.
so the outfile box can be empty or populated whichever method you prefer.

2. It now uses the SELECTED PART rather than the 'active part'
just select ONE part from the Treeview before running the plugin, it need not be the 'active part'

There are so many ways in CamBam to do the same thing it makes life a little difficult sometimes, so try the plugin yourself and let me know if it is not doing something you expect.

Suffice to say that whichever work flow you use, a gcode file must exist before CAMotics can simulate.

Instructions for use.

if cb2cm.config has, <regen_gfile_before_post>false</regen_gfile_before_post>
do this exactly,

1. start cambam, open your cb file
2. Machining->Produce gcode (i.e. for ALL the file)
3. select and right click the part required to simulate
4. select, produce gcode, from the context menu
5. with the part still selected choose, Tools->simulate with camotics (part)

if cb2cm.config has, <regen_gfile_before_post>true</regen_gfile_before_post>
do this,
1. start cambam,  open your cb file
2. select and right click the part required to simulate
3. select, produce gcode, from the context menu
4. with the part still selected choose, Tools->simulate with camotics (part)



Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on November 14, 2017, 13:41:37 pm
When I run the "simulate with CAMotics", everything is fine.

When I select a Part (with all MOps enabled), and use the "part" plugin, I get no display, and this error:

"Opening C:\Documents and Settings\LLoyd\Desktop\Evo Projects\Evo 22mm dipper\CAMotics test.Dip-wax mold - reworked.xml
Computing surface bounded by ((-1.79769e+308,-1.79769e+308,-1.79769e+308), (1.79769e+308,1.79769e+308,1.79769e+308)) at 0 grid resolution
Time: 2.05 secs Triangles: 0 Triangles/sec: 0.00 Resolution: 0"

I see, further, that it has created an illegal filename for XP when the part plugin is used.

One other thing... I have an engraving tool working to put nomenclature on the mold, and it never shows any contact having occurred between that tool and the lowered work surface (but it works in 'real life' on my mill).

Example attached.

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 14, 2017, 14:01:52 pm
Lloyd,
Thanks for the example file.

Regarding the geometry errors, I've done nothing other than play about with filenames for this modification.

I tried it (win7, CamBam v1.0) and it all works for me.

What is the illegal filename for XP ? I don't have XP so can't test that.

This next bit has nothing to do with the plugin, purely CamBam, I created gcode for the part using two methods,

1. Right click the part then 'produce gcode' (the Part outfile text is empty)

Result; CAMotics test.Dip-wax mold - reworked.nc

1. Right click the part then 'produce gcode' (the Part outfile text populated)

Result; CAMotics test-Dip-wax mold - reworked.nc

Is one of those an illegal filename for XP ?


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on November 14, 2017, 14:49:07 pm
Part names (and MOP names) can have punctuation that would create illegal file names.  Its not a fault of your plugin other than using a field that can store data not suitable for a file name.  You could write a string data filter, but that is far beyond the scope I think.


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on November 14, 2017, 15:11:42 pm
Eddie,

This: "Cambam.testfile.cb" is illegal unless the entire path is passed to the OS in quotes.

I can fool with my filename and/or Part names.  It appears the plugin substitutes a "." for "-" wherever one appears.

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on November 14, 2017, 15:20:39 pm
You know... I very much appreciate this plug-in and I really respect you for going so far beyond to facilitate people who use the plug-in.  

But...  I started out writing individual MOP files.  Each one had a unique name.  Such as:

1 Surface Plate.nc
2 Rough Cavities.nc


When saving code it ASKS if you want to overwrite the last file name you used.  Just enter a new file name.  


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on November 14, 2017, 15:43:50 pm
Eddy,
I renamed everything so that there were no 'special' characters, only spaces.

The plugin re-names the outfile as "mastername.partname.cb".  That's an illegal filename for XP unless special path-passing means are used.  Apparently CAMotics doesn't do that in the older XP version (the most-recent version that will work on XP).

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on November 14, 2017, 16:00:49 pm
Nope.... sorry, I was completely mistaken about filename compatibility.  I'm running the latest POS (point of sale, not the OTHER POS!!) version of XP.

Those names ARE legal in this version.  But I found the problem.


When I run the 'part' plugin, it names the project .xml according to the filename and partname... Like "CAMotics test.Dip wax mold.xml"  And that CAN be found by my system.

But it names the .nc file only as CAMotics test.nc.  And that's not the .nc file referenced in the project file.  What shows in the project is "CAMotics test.Dip wax mold.nc".

If I change either the actual filename OR the filename referenced in the project, it works fine.

???

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 14, 2017, 17:17:50 pm
Too hard this time. ???

if cb2cm.config has, <regen_gfile_before_post>false</regen_gfile_before_post>
do this exactly,

1. start cambam, open camotics test.cb
2. Machining->Produce gcode (i.e. for ALL the file)
3. select and right click the part, dip wax mold reworked
4. select, produce gcode, from the context menu
5. with the part still selected choose, Tools->simulate with camotics (part)

if cb2cm.config has, <regen_gfile_before_post>true</regen_gfile_before_post>
do this,
1. start cambam,  open camotics test.cb
2. select and right click the part, dip wax mold reworked
3. select, produce gcode, from the context menu
4. with the part still selected choose, Tools->simulate with camotics (part)



Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on November 14, 2017, 18:55:41 pm
Bingo!  Thanks!

Now, the other part about the V-cutter not showing its cuts is probably a CAMotics issue, and I'll fiddle around a bit to see what it takes to correct it.

LLoyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 14, 2017, 19:09:14 pm
Marvelous !

So what were you doing different before ?


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on November 14, 2017, 20:28:15 pm
Not generating the g-code for the part just before simulating.  It WAS generated from a previous run, so I don't know exactly why it wouldn't work without generating it immediately before invoking CAMotics for part... <shrug>

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on November 14, 2017, 20:32:03 pm
Hello

Quote
One other thing... I have an engraving tool working to put nomenclature on the mold, and it never shows any contact having occurred between that tool and the lowered work surface (but it works in 'real life' on my mill).

Maybe a tool definition problem ?

On the Tag field in the engrave mop, is see 82° V cutter, but in camotics, it's a 0.11° tools with Ø = 0.02 (pic1)

If, in the CB tool library I set the following values for the tool #5

Diameter = 0.125"
Vee Angle = 82
Length = 0.2"

I get the right 82° tool in camotics and the simulation works. (better if you choose "Very Hight" for resolution) pic2

If you have a look on camotic resolution, you can see that for your part, with medium setting, the resolution is set to 0.98", and for Very Hight, it is set to 0.289", so in this case camotics can't simulate a tool of Ø 0.02" as you set in the engrave mop.

I tried with 0.02 for resolution ... and after some minutes, camotics use the whole RAM (16GB) !!! .. and show a calculation time = 8h00 ... LOL

++
David


Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 14, 2017, 21:41:57 pm
Not generating the g-code for the part just before simulating.  It WAS generated from a previous run, so I don't know exactly why it wouldn't work without generating it immediately before invoking CAMotics for part... <shrug>

Lloyd

The plugin uses the generated .nc filename as the one to use for generating the .xml file and then passes that to CAMotics.
I tried to disturb JK's code as little as possible




Title: Re: 'Simulate with CAMotics' plugin
Post by: EddyCurrent on November 15, 2017, 13:27:35 pm
What's wrong with just disabling all the Parts other than the one to simulate ?
To disable a Part, just select it in tree view then press the Space Bar.
Then just produce gcode as normal, is there something I've missed ? is that too laborious ?


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on November 15, 2017, 14:50:22 pm
What's wrong with just disabling all the Parts other than the one to simulate ?
To disable a Part, just select it in tree view then press the Space Bar.
Then just produce gcode as normal, is there something I've missed ? is that too laborious ?

That was kind of my point before.  I was missing why ...   I simulate part of jobs all the time in order to isolate problems. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: lloydsp on November 15, 2017, 17:33:04 pm
I probably wasn't clear on my last post.

I had created a .nc file for the particular part in an earlier run, so my puzzlement was why CAMotics wouldn't have used that .nc file.  The name was the same each time.  It was ONLY for the one part.

Is there some residue in memory at the time of creation of the .nc file that CAMotics relies upon?

It IS 'no more trouble' to run the creation immediately before running CAMotics.  I sometimes do it JUST to make sure I haven't created any errors which only show up during its creation.  I'm just curious about why the older .nc file wouldn't have served the purpose.

Lloyd


Title: Re: 'Simulate with CAMotics' plugin
Post by: Dragonfly on December 04, 2017, 20:38:23 pm
Anyone using Camotics and the plugin with Linux?
I had to install a missing library for Camotics to run. It's Java Script runtime, old version and I read comments about it having security issues. Also, where is the config file for the plugin because it cannot find Camotics automatically.
Although a simple simulation ran OK with Camotics started manually before CB.


Title: Re: 'Simulate with CAMotics' plugin
Post by: Bob La Londe on December 04, 2017, 20:42:26 pm
Anyone using Camotics and the plugin with Linux?
I had to install a missing library for Camotics to run. It's Java Script runtime, old version and I read comments about it having security issues. Also, where is the config file for the plugin because it cannot find Camotics automatically.
Although a simple simulation ran OK with Camotics started manually before CB.

I had to locate the config file and enter the Camotics location manually with W10 and CB1.0.14 also.  It was ok, though as I also changed the default resolution from medium to high at the same time. 


Title: Re: 'Simulate with CAMotics' plugin
Post by: dh42 on December 04, 2017, 22:09:56 pm
Hello

Quote
Also, where is the config file for the plugin

On Windows, it is located in the Cambam system folder (menu Tools/browse system folder in Cambam)

it is called cb2cm.config


++
David