Author Topic: How To Delete / Default Stock  (Read 10126 times)

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4579
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
How To Delete / Default Stock
« on: May 12, 2023, 23:20:06 pm »
I use the stock settings sometimes for a particular result in simulation with Camotics, but there are times when I would be nice to delete or default the stock settings.  I DO NOT MEAN CHANGE THE STOCK SETTINGS.  I mean go quickly back to the original default where no stock exists.  Not even stock with zero dimensions. 
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 lloydsp

  • CNC Jedi
  • *****
  • Posts: 9079
    • View Profile
Re: How To Delete / Default Stock
« Reply #1 on: May 12, 2023, 23:38:26 pm »
Hmmm... Bob, I just recently did this, and can't remember how.  I'll explore it again.  I was able to completely delete the stock.

'Sorry I don't remember how I did it!

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9079
    • View Profile
Re: How To Delete / Default Stock
« Reply #2 on: May 13, 2023, 14:30:33 pm »
Sorry,
I can delete all the stock settings to zero, but I can't seem to delete the stock entry, itself.  I'll remember how I did it when you don't need it anymore.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5330
  • Made in England
    • View Profile
Re: How To Delete / Default Stock
« Reply #3 on: May 13, 2023, 16:28:17 pm »
"View" menu then uncheck "Show Stock"
Filmed in Supermarionation

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4579
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: How To Delete / Default Stock
« Reply #4 on: May 13, 2023, 22:50:27 pm »
Sorry,
I can delete all the stock settings to zero, but I can't seem to delete the stock entry, itself.  I'll remember how I did it when you don't need it anymore.

Lloyd

Yeah, that's what I wound up with too. 


"View" menu then uncheck "Show Stock"

I'll have to double check, but I think it still feeds that to Camotics.  Sometimes would be nice to just switch back to let Camotics generate its own oversize stock. 
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 EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5330
  • Made in England
    • View Profile
Re: How To Delete / Default Stock
« Reply #5 on: May 14, 2023, 20:18:36 pm »
Bob,

Now I've joined the septuagenarian ranks I sometimes tend to forget stuff  ;D

I made some modifications to the Camotics plugin last year.

It looks like you have to mark the stock as "Undefined" at Machining and Part level so that the plugin will ignore it, see attached image.

Code: [Select]
// Eddy April 2022
            // Stock hierarchy
            //
            // 1. find and use first stock defined at PART level
            // 2. override 1. if stock defined at Machining level
            // 3. override 1&2 if ONE PART ONLY has been selected and it has a stock defined

            // get stocks defined at parts level
            foreach (CAMPart part in parts)
            {
                if (!part.Stock.IsUndefined)
                    stocks.Add(get_stock(part.Stock));
            }
            stock = stocks.Count > 0 ? stocks[0] : null;

            // get stock defined at Machining level, if there is one
            if (!mopts.Stock.IsUndefined) stock = get_stock(mopts.Stock);

            // if only one PART was selected then use the stock defined for that PART
            if (Cb2cm_plugin.one_part_only == true)
            {
                CAMPart selected_part = CamBamUI.MainUI.CADFileTree.SelectedParts[0];
                if (!selected_part.Stock.IsUndefined) stock = get_stock(selected_part.Stock);
            }

« Last Edit: May 14, 2023, 20:20:28 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7578
    • View Profile
    • Cambam V1.0 French Doc
Re: How To Delete / Default Stock
« Reply #6 on: May 14, 2023, 23:09:44 pm »
Hello,

Quote
It looks like you have to mark the stock as "Undefined" at Machining and Part level so that the plugin will ignore it, see attached image.

Yes, but how ? .... I tried to write "Undefined" and this is not working ; the only way I found is to set all the six values to 0.

That sound like an "erase stock" plugin to do ;D

Quote
I mean go quickly back to the original default where no stock exists.  Not even stock with zero dimensions. 

When no stock exists, on a new file, all values are set to 0 except the colors

Also selecting another material in the list do not change the stock dimension, unfortunately stock dimension are not stored in the material list ..

++
David
« Last Edit: May 14, 2023, 23:22:50 pm by dh42 »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7578
    • View Profile
    • Cambam V1.0 French Doc
Re: How To Delete / Default Stock
« Reply #7 on: May 16, 2023, 20:56:23 pm »
Hello Bob

By patient, I'm working on a delete/restore stock plugin ;)

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7578
    • View Profile
    • Cambam V1.0 French Doc
Re: How To Delete / Default Stock
« Reply #8 on: May 18, 2023, 21:47:12 pm »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5330
  • Made in England
    • View Profile
Re: How To Delete / Default Stock
« Reply #9 on: May 19, 2023, 11:35:01 am »
I've just had a better look at Camotics.

If you import a CamBam file with stock that has been defined but don't want that, Ctrl+4 hides the stock solid object and Ctrl+7 hides it's outline.

Ctrl+3 brings the stock solid object back and Ctrl+7 brings it's outline back.

I would have thought that solves Bob's issue ?
Filmed in Supermarionation

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4579
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: How To Delete / Default Stock
« Reply #10 on: May 19, 2023, 21:55:04 pm »
No.  The reason for defaulting stock in CamBam is to allow Camotucs to generate its own stock. Not to just hide the stock.
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 dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7578
    • View Profile
    • Cambam V1.0 French Doc
Re: How To Delete / Default Stock
« Reply #11 on: May 26, 2023, 16:44:26 pm »
Hello Bob,

Is the plugin useful for you ?

++
David

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4579
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: How To Delete / Default Stock
« Reply #12 on: May 27, 2023, 21:55:27 pm »
I finally had a need for it again and tested it.  I've been up to my back side in alligators the last couple weeks or I would have tested sooner.  Equipment problems, vendor problems, mostly just me problems.  I apologize for not trying this sooner.  Especially since you went to the effort to create it for me. 

I notice two things. 

Not related to the plugin:  If stock is set in a part then setting the values to zero DOES set the stock to undefined unlike setting the stock values in the machining parameters. 

About the plugin:  The plugin works perfectly on only the machining parameters for stock.  I am running 64bit CamBam.  No bugs noted so far.   

Thank you, and again I apologize for not trying it and giving feedback sooner. 
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 dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7578
    • View Profile
    • Cambam V1.0 French Doc
Re: How To Delete / Default Stock
« Reply #13 on: May 28, 2023, 16:00:20 pm »
Ok, nice if it is working for you  ;D

++
David