Fill object with specific volume


Quite new to Rhino so apologies for any wrong terminology

Imagine I have model a drinking glass, i would now like to fill it to 250ml and know at what height the water is

I have made a closed Polysurface of the inside and it is too much (i.e. over 250ml) so i know it needs to be less

Can i reduce this polysurface by a specific volume or is there another way?

Hi Tom,

A couple of tips:

If this is for rendering, offset the inner surface of the glass be 0.01mm and use that as the fluid, tis way you don’t get clashes when rendering.

Regarding volume:

ExtractSrf command to get the inside face of the glass.
Cap command to cap the shape.
Check the volume
Front view draw a horizontal line that bisects about 10mm (or whatever measurement) from the top of the fluid/volume and use the command WireCut.
Keep chopping off bits of the volume until you’re close to 250ml.

Second approach.

As above, make the volume of the fluid but 3D Scale the volume until you have 250ml then redraw the sectional detail of the glass and revolve it.

This way you’ve scaled the volume and size of the glass but your wall thickness remains the same.

Hope that helps


Another approach: The command “Hydrostatics” will calculate among other things the displaced volume of water, with whatever waterline elevation you specify (relative to the CPLane). The thing to remember is that the units will be whatever your design is drawn with, so when you use mm, the volume will be expressed in mm3. 250 ml will thus be expressed as 250000 mm3.
What I would do is extract or isolate the inner surface of your drinking glass solid, raise or lower it until the 250 ml filling mark that you desire is at 0 elevation, i.e. on the CPlane. Run “Hydrostatics”, keep the waterline at “0” and read the displacement. If it needs adjustment, 3Dscale your object by using random points on the Cplane for the origin and scaling factor reference points. Read the displacement again and repeat as necessary.

A more scientific way is checking by which factor the volume of the contents is off, then use the third power root of that to calculate your 3D scaling factor.


1 Like

Thanks. I wanted to be quite exact and this method leaves a lot of trail and error


This works but in reverse

I want to know where the 250ml will be rather than scale the model to suit where i want it

I want to be able to model the glass to my overall dimensions and then mark on it where 250ml will be and not rescale the model.

You could always use something free like Blender.

Import your model then create a 250ml cube of material and see where it fills the glass to…

Or maybe a 30 day free trial of:

No need with Hydrostatics command to move the object. Just specify the desired waterline Z coordinate in the input to Hydrostatics. Pick a waterline height, run Hydrostatics and look at the calculated volume. If the volume is too large run Hydrostatics again with a lower waterline. If the volume is too small run Hydrostatics again with a higher waterline height. Iterate until the volume is close enough to the target volume.

That will still be trial and error, which apparently the TS does not want. I knew about the waterline input field, but wanted an easy way of scaling the object with the high water mark remaining in the same relative height.


There is no good tool for this- but- do you want to scale the object to meet the 250 ml or do you want to say, lower the top surface while keeping the overall size and shape otherwise intact? The second one is harder…


eeek :frowning:

I have modelled it already and made it so the total water volume is 300ml, I now want to put a mark/indentation at the 250ml point. I don’t want to rescale the model

The Blender software looks like it will do it for me but i have only just started with Rhino and seeing another program has already begun to give me a head ache

All I can suggest then is to make a plane through the volume and BooleanDifference it from the object - check the volume (Volume command) , Undo, adjust the plane, repeat until you get close enough…’


Thats similar to what I have done, I used ‘davidcockey’s’ method but i thought that there must be another, more precise way but I guess not.

No biggy, i can get it pretty close to 250, it will just take longer and longer the closer i want to get

Don’t forget the CutVolume command… --Mitch

1 Like

Any reason not to use Hydrostatics which does not require creating a closed volume?

I did forget the CutVolume command- that will help a lot- thanks! @VAtom check that out…


That should work too- lots of workarounds!


I like CutVolume! Thanks

Actually, the best way to do this is with a spreadsheet.

For instance, I needed an accurate way to size round-bottom chemical reaction vessels so I wrote a spreadsheet where I input the desired volume and diameter. On the output side I get 1/2 the volume of the sphere used for the bottom, which the spreadsheet subtracts from the total desired and gives me the height of the corresponding cylinder required for the total volume.

Then it’s just a matter of drawing an Arc S-E-D, a Line up, Join, Offset to the outside by glass thickness, close the curve top and revolve. For liquid, you would offset the inside curve by, say .001, Revolve and Cap the planar top.

With some thought, you can pretty much size volumes accurately using math and solid primitives. If you need to do this a lot, it’s better to write a function. I imagine it could be done in GH and if I had experience in GH it’d be worth a shot.

@Frank and @2DCube : I find it amusing that both of you assume that the “drinking glass” mentioned by the topic starter is a revolved shape, he never said it was…


Sorry, to clarify, it is not a revolved shape. It is quite irregular to be honest.