Author Topic: Calculate Volume of toolpath  (Read 7558 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5259
  • Made in England
    • View Profile
Calculate Volume of toolpath
« on: June 13, 2020, 17:32:34 pm »
Try the attached new plugin.

1. After installation it appears in the "Tools" menu as "Pocket Volume"
2, create a Pocket MOP using the shape of choice for it's perimeter
3. Select the shape that defines the pocket perimeter.
4. run the plugin

It will show the calculated volume.

Please note it assumes an endmill was used, if a ballnose was used the figure will be slightly off.

Image shown a 30 x 20 rectangle in a Pocket MOP with Target Depth of -2
« Last Edit: June 13, 2020, 17:41:21 pm by EddyCurrent »
Filmed in Supermarionation

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8964
    • View Profile
Re: Calculate Volume of toolpath
« Reply #1 on: June 13, 2020, 18:38:06 pm »
Neat, Eddy!  Even if a ball-nose or radiused-corner mill were used, it would only slightly reduce the volume, so the calculation would be satisfactory.  I usually mix about 5% more of the required liquid, anyway, just to "make sure".

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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5259
  • Made in England
    • View Profile
Re: Calculate Volume of toolpath
« Reply #2 on: June 13, 2020, 19:21:52 pm »
Maybe it also needs a conversion to litres, pint, etc. based upon the chosen units in CamBam.

I looked at an online resin calculator and for the already mixed resin they use 0.5541125541126 oz per cubic inch of cavity, if metric units are selected the answer is in millilitres

Some people mix by volume and others by weight. The last time I mixed some it was far better to use the weight method.
« Last Edit: June 13, 2020, 19:39:46 pm by EddyCurrent »
Filmed in Supermarionation

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1612
    • View Profile
Re: Calculate Volume of toolpath
« Reply #3 on: June 14, 2020, 00:02:13 am »
I assume that if there are islands their volumes need to be calculated separately and subtracted.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8964
    • View Profile
Re: Calculate Volume of toolpath
« Reply #4 on: June 14, 2020, 00:26:41 am »
That's why I sometimes actually rely on the 'sand method'.  Islands can really complicate the calculations!

A lot of my designs have islands, even sometimes many of them!

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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5259
  • Made in England
    • View Profile
Re: Calculate Volume of toolpath
« Reply #5 on: June 14, 2020, 08:53:02 am »
I assume that if there are islands their volumes need to be calculated separately and subtracted.

That is correct.
Filmed in Supermarionation

Offline tsikows

  • Ewok
  • *
  • Posts: 18
    • View Profile
Re: Calculate Volume of toolpath
« Reply #6 on: June 14, 2020, 11:26:34 am »
Very cool. So im guessing the pocket volume plugin grabs the depth of cut and then calcuclates the based on the same math as the area tool?

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5259
  • Made in England
    • View Profile
Re: Calculate Volume of toolpath
« Reply #7 on: June 14, 2020, 11:41:06 am »
Very cool. So im guessing the pocket volume plugin grabs the depth of cut and then calcuclates the based on the same math as the area tool?

That is correct.
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5259
  • Made in England
    • View Profile
Re: Calculate Volume of toolpath
« Reply #8 on: June 21, 2020, 17:31:03 pm »
Update to the plugin attached, version 2.0,  it can now handle 'islands' in the pocket and reports Area and Volume.

This is what it does;

1. select an entity that represents the pocket perimiter. In the example cb file choose PolyRectangle(10)
2. start the plugin, Tools->Pocket Area and Volume
3. the plugin looks for a Pocket MOP that contains the selected entity, it assumes the same entity will exist in one pocket MOP only.
4. the plugin gets TargetDepth of the pocket MOP
5. the plugin looks through the other entity IDs in that pocket MOP and checks if they are inside the perimeter entity, i.e. islands
6. the plugin uses all that information to calculate areas and volume.
7. extra information about each inside entity or island is shown in the bottom message log window.

You may think Circle(2) is an inside island but because it touches the perimeter PolyRectangle(10) CamBam regards it as "not an island"

It can't handle "Regions"

Plugin and test cb file attached. I used easy dimensions for the shapes to enable checking of the calculations.

Thanks to Lloyd for the code that calculates area.
« Last Edit: June 21, 2020, 18:08:04 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7400
    • View Profile
    • Cambam V1.0 French Doc
Re: Calculate Volume of toolpath
« Reply #9 on: March 09, 2021, 21:26:09 pm »
Hello Eddy ;)

I just added the plugin to the website. (better late than never  :-[ )

There is wrong aliment of the texts when translated (and millimeter ^2 -- ^3 are not translatable)

++
David
« Last Edit: March 12, 2021, 01:01:23 am by dh42 »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5259
  • Made in England
    • View Profile
Re: Calculate Volume of toolpath
« Reply #10 on: March 10, 2021, 14:09:14 pm »
David,

The texts are "Labels" on the form and they are all aligned "MiddleRight", maybe I can't remember what it needs, ant ideas ?
I did not think the millimeters/inches texts required translation.
Filmed in Supermarionation

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4475
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Calculate Volume of toolpath
« Reply #11 on: March 10, 2021, 14:20:51 pm »
Maybe it also needs a conversion to litres, pint, etc. based upon the chosen units in CamBam.

I looked at an online resin calculator and for the already mixed resin they use 0.5541125541126 oz per cubic inch of cavity, if metric units are selected the answer is in millilitres

Some people mix by volume and others by weight. The last time I mixed some it was far better to use the weight method.

I mix urethane and two part silicone resins all the time by weight.  Many say on the description 1:1 by weight or volume.  That being said some resins can't be mixed by weight.  The polyester and vinylester resins used in boat construction use a very tiny amount of MEK to kick over the resin.  Its often measured in drops per gallon. 

Regardless your estimating tool looks like it will have very good utility. 

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: 7400
    • View Profile
    • Cambam V1.0 French Doc
Re: Calculate Volume of toolpath
« Reply #12 on: March 10, 2021, 17:28:58 pm »
Hello
David,

The texts are "Labels" on the form and they are all aligned "MiddleRight", maybe I can't remember what it needs, ant ideas ?
I did not think the millimeters/inches texts required translation.

Same as you ; MiddleRight ... maybe it is the width of the labels that is too short ?

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5259
  • Made in England
    • View Profile
Re: Calculate Volume of toolpath
« Reply #13 on: March 11, 2021, 17:17:34 pm »
David,

Try this new version 2.1

I had the label size set to "Auto" so changed it to the biggest fixed size and position to fit.
Also the units text should now translate.
« Last Edit: March 11, 2021, 17:19:29 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7400
    • View Profile
    • Cambam V1.0 French Doc
Re: Calculate Volume of toolpath
« Reply #14 on: March 12, 2021, 00:58:24 am »
Hello

Perfect !  ;D  thanks Eddy !!

++
David
« Last Edit: March 12, 2021, 01:00:26 am by dh42 »