Author Topic: Machining Out File behaviour and defaults  (Read 10999 times)

Offline 10bulls

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 2163
  • Coding Jedi
    • View Profile
    • www.cambam.info
Machining Out File behaviour and defaults
« on: September 27, 2019, 12:40:12 pm »
Improvements are needed as to how the default gcode out file behaviour is handled, including how and when the file is prompted and the default gcode folder displayed.

This one has come up a couple of times...
http://www.cambam.co.uk/forum/index.php?topic=4325.0
http://www.cambam.co.uk/forum/index.php?topic=7470.0

There were some changes made in the latest V1.0 rc-1 release, but its not quite there yet.

Here are a couple of changes I am proposing to add to the next update, so any comments and feedback is welcome.

Proposal 1

Remove the drawing template logic that currently clears the Machining - Out File property when creating a new drawing from the template.
I think this is just a carry over from the days before the {$cbfile.name} macro and relative file path checking were added.  Before those were added, anything in the template's gcode outfile property was likely not wanted.

Taking out this code will allow storing default gcode paths in the template files.

I think this is a better option that adding a single default gcode path in the system config.
(although this hasn't been totally ruled out)

So you could have different templates with Out File values such as ...

gcode\{$cbfile.name}.nc
X:\laser\{$cbfile.name}\{$cbfile.name}.nc
X:\mill\{$cbfile.name}\{$cbfile.name}.nc
\\plasma-machine\gcode\{$cbfile.name}\{$cbfile.name}.nc
etc

Proposal 2

A system config setting [GCode Generation] - GCode Out File Prompt - If Exists / Always / Never
If Exists (like it behaves now)
Always (sounds like some people would appreciate this)
Never (just overwrite existing files without prompting - unless the target folder doesn't exist)

Proposal 3

Add a prompt to 'Create output folder: <folder name> ?' if the target path does not already exist.

This is useful if your template out file property is something like:
X:\gcode\{$cbfile.name}\{$cbfile.name}.nc
...it would get a bit tedious creating this sub folder manually each time.


These changes allow, a default gcode name to be stored in the drawing template, with alternative targets for different templates.

If the out file property contains a sub folder that does not exist, prompt to create this.

The amount of filename prompting should be configurable and the default folder paths shown should in most cases be in the required location.

Have I missed anything?

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5191
  • Made in England
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #1 on: September 27, 2019, 17:15:42 pm »
This is what I now do, it's very basic but that's how I like it.

1. Create my CamBam file then, "File->Save As", give it a name then navigate to my desired folder and Save.

2. Regarding gcode, "Machining->Produce  gcode", it takes on the same filename as step 1, navigate to my desired folder and Save.

3.  A lot of the time I right click on 'Part' then, "Produce gcode", it takes on the same filename as step 1 but with the part name appended, navigate to my desired folder and Save.

So for me it would ideal if CamBam did this;

1. remember the path where I saved the .cb file
2. remember the path where I saved the .nc files

I think each subsequent session of CamBam should start afresh to prevent overwriting of previous files with the same name but if an existing cb file was opened then it would use the last used paths for that file.

So unless the "Out file" fields are doing something 'behind the scenes' I don't specifically use them or enter anything into those fields.
« Last Edit: September 27, 2019, 17:27:36 pm by EddyCurrent »
Filmed in Supermarionation

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1452
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #2 on: September 27, 2019, 17:48:46 pm »
Eddy,
I work the same way. Not just in CB but in SolidWorks as well. I save work in a job folder along one path and parts in a different folder along a very different path so specifying paths in a program does not save time.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7256
    • View Profile
    • Cambam V1.0 French Doc
Re: Machining Out File behaviour and defaults
« Reply #3 on: September 27, 2019, 17:58:25 pm »
Hello

In my case I use a folder per project, and all files concerning the project are saved in the same folder ; CB file, Gcode file, 3D files, text file with notes, pictures used in CB or picture that "describe" how the stock is fixed on the machine, etc .. my Gcode file always has the same name than the CB file.

In other words, the actual behavior is fine for me, and I never take care about what is in the OutFile property.

++
David
« Last Edit: September 27, 2019, 18:00:01 pm by dh42 »

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2610
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #4 on: September 27, 2019, 18:19:02 pm »
My approach is very similar. An I too don't pay attention to the out file name field, it's fine as the file names are generated currently depending on what code is being generated - the whole project, a part of the project or a single MOP.
What slows down my work is the need every time to navigate to the folder I want the .nc file written to.
If CamBam remembers the last output folder and then automatically suggests it as the output folder for the consequent .nc file generation it will be OK. If the user decides to change the folder next time the newly selected one will be suggested.
(Actually CB does this currently but only for files that are not saved and are unnamed.)
So, IMHO, having two dynamic paths - one for the active CB project work files and one for the G-code generation seems to be a proper solution. They may point to one and the same destination if the user wants the machine files in the same place as the work ones. And still, if he uses a subfolder under the current work one he will benefit also from this approach.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7256
    • View Profile
    • Cambam V1.0 French Doc
Re: Machining Out File behaviour and defaults
« Reply #5 on: September 27, 2019, 18:35:44 pm »
Maybe it's another problem that need another thread, but when I was helping a friend to manage its machine that have both a spindle and a laser at the same time, I falls on a problem ; the post processor to use is not the same for the spindle and the laser, so even if I use a CAMpart for the spindle mops and another for the laser mops, the same PP is used for both ... no good. It would be fine if we can specify a PP also in the CAMpart so we can handle this kind of machine configuration.

++
David

Offline ThisAmplifierIsLoud

  • Storm Trooper
  • ***
  • Posts: 227
  • Jam it !
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #6 on: September 27, 2019, 18:49:47 pm »
My workflow is drag n drop a dxf file to the CB shortcut at the Desktop.
And everytime I am saving th cb file for the 1st time, I am shouting loud :

Why the hell it can't be stored at location the dxf comes from ???

But from now on it is ok : nc files are stored at the cb file's location
when cb is started by double click the cb file.

best regards

Bernhard

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7256
    • View Profile
    • Cambam V1.0 French Doc
Re: Machining Out File behaviour and defaults
« Reply #7 on: September 27, 2019, 18:58:14 pm »
Yep, it's working when using the menu to open a dxf but not when using drag/drop over the CB windows. (but works for a drag/drop of a .cb file)

« Last Edit: September 27, 2019, 19:02:50 pm by dh42 »

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4393
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Machining Out File behaviour and defaults
« Reply #8 on: September 27, 2019, 19:07:15 pm »
I think options for outflow are necessitated by the work flow of different users.  

I would like the outflow directory and file to be a persistent property of the file.  Once you save the file, or save a code file those values and directories should remain the same whenever that project is opened unless you change them.  Ideally two sets of properties.  One for .cb file and one for .nc file.  

If this is done you could have a default CamBam property for those values also.  If the user wanted to save all .NC files to the same directory.  They would just never change that default.  

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 ThisAmplifierIsLoud

  • Storm Trooper
  • ***
  • Posts: 227
  • Jam it !
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #9 on: September 28, 2019, 09:10:42 am »
Yupp, If I could set a "." or nothing that means "where it comes from"
(including the drag“n“dropped dxf) I would be VERY happy !
best regards

Bernhard

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2610
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #10 on: October 01, 2019, 08:26:24 am »
While the topic is still fresh: There was a wish to have an option to output all parts in a project to separate .nc files when 'Machining -> Generate G-code' is selected.

Offline ThisAmplifierIsLoud

  • Storm Trooper
  • ***
  • Posts: 227
  • Jam it !
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #11 on: October 01, 2019, 08:51:44 am »
+1
best regards

Bernhard

Offline onekk

  • CNC Jedi
  • *****
  • Posts: 525
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #12 on: October 01, 2019, 09:49:38 am »
While the topic is still fresh: There was a wish to have an option to output all parts in a project to separate .nc files when 'Machining -> Generate G-code' is selected.
+1 for me.

Also the "save location" saved as a proerty in the XML file (.cb file) is a very good idea.

Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7256
    • View Profile
    • Cambam V1.0 French Doc
Re: Machining Out File behaviour and defaults
« Reply #13 on: October 01, 2019, 13:17:04 pm »
Hello,

While the topic is still fresh: There was a wish to have an option to output all parts in a project to separate .nc files when 'Machining -> Generate G-code' is selected.

It's already the case ; if you give a different name in the OutFile property of each CamPart and generate the GCode for the whole project, you get a GCode file per CamPart ;)

++
David

Offline ThisAmplifierIsLoud

  • Storm Trooper
  • ***
  • Posts: 227
  • Jam it !
    • View Profile
Re: Machining Out File behaviour and defaults
« Reply #14 on: October 01, 2019, 13:41:21 pm »
Automatically ... without typing explicite filenames,
cause filename is already generated by rightclick on the part. => generate GCode

Just another menu item "Generate GCode Parts" and create all 6736 gcode files part by part just by one mouseclick !
best regards

Bernhard