CamBam

FeedBack => Feature Requests => Topic started by: 10bulls on September 27, 2019, 13:40:12 pm



Title: Machining Out File behaviour and defaults
Post by: 10bulls on September 27, 2019, 13: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?


Title: Re: Machining Out File behaviour and defaults
Post by: EddyCurrent on September 27, 2019, 18: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.


Title: Re: Machining Out File behaviour and defaults
Post by: Garyhlucas on September 27, 2019, 18: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.


Title: Re: Machining Out File behaviour and defaults
Post by: dh42 on September 27, 2019, 18: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


Title: Re: Machining Out File behaviour and defaults
Post by: Dragonfly on September 27, 2019, 19: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.


Title: Re: Machining Out File behaviour and defaults
Post by: dh42 on September 27, 2019, 19: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


Title: Re: Machining Out File behaviour and defaults
Post by: gmoo on September 27, 2019, 19: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.



Title: Re: Machining Out File behaviour and defaults
Post by: dh42 on September 27, 2019, 19: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)



Title: Re: Machining Out File behaviour and defaults
Post by: Bob La Londe on September 27, 2019, 20: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.  



Title: Re: Machining Out File behaviour and defaults
Post by: gmoo on September 28, 2019, 10: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 !


Title: Re: Machining Out File behaviour and defaults
Post by: Dragonfly on October 01, 2019, 09: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.


Title: Re: Machining Out File behaviour and defaults
Post by: gmoo on October 01, 2019, 09:51:44 am
+1


Title: Re: Machining Out File behaviour and defaults
Post by: onekk on October 01, 2019, 10: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.



Title: Re: Machining Out File behaviour and defaults
Post by: dh42 on October 01, 2019, 14: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


Title: Re: Machining Out File behaviour and defaults
Post by: gmoo on October 01, 2019, 14: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 !


Title: Re: Machining Out File behaviour and defaults
Post by: Dragonfly on October 01, 2019, 16:30:14 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
Not really David,
that will require even more time and attention than generating manually part by part with the default names given by CB.
The naming convention is good and keeps track of linked files down to a single MOP exported explicitly from a part with a bunch of other operations.
When, for example, one wants to refresh all files in the project saving from the Machining root part by part is the most convenient way. I'd imagine even an additional checkbox to allow overwriting existing files without confirmation.


Title: Re: Machining Out File behaviour and defaults
Post by: 10bulls on October 02, 2019, 12:45:55 pm
V1 rc-2 is now available (http://www.cambam.co.uk/forum/index.php?topic=8214.0), which hopefully should improve the machining out file behaviour.

Drawing Templates

Drawing templates now preserve the Machining - Out File property.

So to set a default g-code ouput path...

1. Create a CamBam drawing and set the Machining - Out File property
Make sure to use the {$cbfile.name} macro!
For example...
Code:
X:\gcode\{$cbfile.name}\{$cbfile.name}.nc
or relative to the CamBam drawing...
Code:
gcode\{$cbfile.name}.nc

2. Save this drawing into the CamBam system \ templates folder.
This can now be used from File - New From Template...'

3. To make this the default drawing template, set the System - Configuration (Misc) Drawing Template property.

Admittedly, this is a little more work than just adding a default g-code config option, but this way allows having different options for various templates / machines.
I have added an item on the TODO list, to manage drawing templates through the System tab within CamBam (similar to how post processors work), which should simplify managing drawing templates.

Prompting behaviour

There is a new Gcode Output - Out File Prompt config setting

If Exists - prompts if output gcode file already exists (similar to existing behaviour)
Always - always prompts for output filename
Never - automatically overwrites existing output

CamBam will now create the full output path if it does not already exist.
It will always prompt to confirm this, regardless of the above config setting.

Creating g-code for individual machining operations and parts (where the outfile property is empty) will still always prompt to confirm the gcode filename.
If a part - Out File property is set, the prompting behaviour will follow the config setting.

Browse Path

The default folder shown in the file prompt should be sensible in most cases.
If an Out File path is specified, the folder will default to that.
For machining ops and where Out File is blank, the first non empty path will be used in the following hierarchy...
Part.Out File -> Machining.Out File -> Drawing Folder -> Default folder *

* The 'Default folder' above is now also set through drag / drop operations.
So if you open a DXF file by dragging it onto CamBam, then save the drawing or generate gcode without saving, it will default to the same folder as the DXF file.

Other

I have not tackled creating individual part (and machine op?) files in a single operation in this release.

I think this is a good idea, so I have added it to the TODO list.  However, this will be in a post 'V1 official production release', release.

Thank you all for your feedback and I hope this update improves the gcode output behaviour for you all.
If not, please let me know!