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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4565
    • 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 »
Made in England

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8360
    • 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: 4565
    • 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 »
Made in England

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1587
    • 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: 8360
    • 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: 4565
    • 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.
Made in England

Offline tsikows

  • Ewok
  • *
  • Posts: 14
    • 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: 4565
    • 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.
Made in England

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4565
    • 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 »
Made in England