Is it possible to calculate a volume?

classic Classic list List threaded Threaded
9 messages Options
Jon
Reply | Threaded
Open this post in threaded view
|

Is it possible to calculate a volume?

Jon
Hi,

I am looking for a package to calculate a volume - specifically, to
calculate how much earth will have to be shifted in an excavation.  The
intention is to take a grid of measurements of the existing land, model
the cut and fill in 3D, and hence estimate the volume of earth to be moved.

I've been through the openscad manual but haven't seen functionality to
support this - can it be done?  If not, can anyone suggest an
alternative package?

Thanks,

Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

nophead
You could model the shape in Openscad, generate an STL and then use Netfabb studio to show the volume.

On 20 December 2012 11:32, Jon <[hidden email]> wrote:
Hi,

I am looking for a package to calculate a volume - specifically, to
calculate how much earth will have to be shifted in an excavation.  The
intention is to take a grid of measurements of the existing land, model
the cut and fill in 3D, and hence estimate the volume of earth to be moved.

I've been through the openscad manual but haven't seen functionality to
support this - can it be done?  If not, can anyone suggest an
alternative package?

Thanks,
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

nophead
I used the technique for working out how much resin was needed to fill a printed mould and then printed measuring vessels to hold that volume plus 10%.  

On 20 December 2012 11:46, nop head <[hidden email]> wrote:
You could model the shape in Openscad, generate an STL and then use Netfabb studio to show the volume.


On 20 December 2012 11:32, Jon <[hidden email]> wrote:
Hi,

I am looking for a package to calculate a volume - specifically, to
calculate how much earth will have to be shifted in an excavation.  The
intention is to take a grid of measurements of the existing land, model
the cut and fill in 3D, and hence estimate the volume of earth to be moved.

I've been through the openscad manual but haven't seen functionality to
support this - can it be done?  If not, can anyone suggest an
alternative package?

Thanks,
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

Alan Cox
In reply to this post by Jon
On Thu, 20 Dec 2012 22:02:31 +1030
Jon <[hidden email]> wrote:

> Hi,
>
> I am looking for a package to calculate a volume - specifically, to
> calculate how much earth will have to be shifted in an excavation.  The
> intention is to take a grid of measurements of the existing land, model
> the cut and fill in 3D, and hence estimate the volume of earth to be moved.
>
> I've been through the openscad manual but haven't seen functionality to
> support this - can it be done?  If not, can anyone suggest an
> alternative package?

I've not found a direct way to do it in openscad but if you make the
model and upload it to shapeways that will tell you its volume of
material without having to bother printing it 8)

Alan

Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

Giles Bathgate-2
Could you not add a volume() module to openscad that echos the volume of a polyhedron? there might be something in CGAL that does this for you or you could use this: http://www.ecse.rpi.edu/~wrf/Research/Short_Notes/volume.html

I a bounds() module in RapCAD that is similar, I cannot remember if that was ported to openscad or not. 

Regards,
Giles


On 20 December 2012 13:12, Alan Cox <[hidden email]> wrote:
On Thu, 20 Dec 2012 22:02:31 +1030
Jon <[hidden email]> wrote:

> Hi,
>
> I am looking for a package to calculate a volume - specifically, to
> calculate how much earth will have to be shifted in an excavation.  The
> intention is to take a grid of measurements of the existing land, model
> the cut and fill in 3D, and hence estimate the volume of earth to be moved.
>
> I've been through the openscad manual but haven't seen functionality to
> support this - can it be done?  If not, can anyone suggest an
> alternative package?

I've not found a direct way to do it in openscad but if you make the
model and upload it to shapeways that will tell you its volume of
material without having to bother printing it 8)

Alan
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

nophead
I don't think anything in openscad at the moment allows you to pass a module as an argument, or ever mixes modules and expressions. So if you have a bounds() module how to you apply it in an expression?

On 20 December 2012 14:39, Giles Bathgate <[hidden email]> wrote:
Could you not add a volume() module to openscad that echos the volume of a polyhedron? there might be something in CGAL that does this for you or you could use this: http://www.ecse.rpi.edu/~wrf/Research/Short_Notes/volume.html

I a bounds() module in RapCAD that is similar, I cannot remember if that was ported to openscad or not. 

Regards,
Giles


On 20 December 2012 13:12, Alan Cox <[hidden email]> wrote:
On Thu, 20 Dec 2012 22:02:31 +1030
Jon <[hidden email]> wrote:

> Hi,
>
> I am looking for a package to calculate a volume - specifically, to
> calculate how much earth will have to be shifted in an excavation.  The
> intention is to take a grid of measurements of the existing land, model
> the cut and fill in 3D, and hence estimate the volume of earth to be moved.
>
> I've been through the openscad manual but haven't seen functionality to
> support this - can it be done?  If not, can anyone suggest an
> alternative package?

I've not found a direct way to do it in openscad but if you make the
model and upload it to shapeways that will tell you its volume of
material without having to bother printing it 8)

Alan
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

Giles Bathgate-2
I said: "echos the volume"

It would be a control module like echo(), it cannot be used to assign output. Assigning output aside from the syntax changes involved, is also technically much more difficult since you would have to evaluate the csg subtree in cgal first, and then get the bounds, and then re-evaluate the ast with the new values.

Regards,
Giles

On 20 December 2012 15:27, nop head <[hidden email]> wrote:
I don't think anything in openscad at the moment allows you to pass a module as an argument, or ever mixes modules and expressions. So if you have a bounds() module how to you apply it in an expression?
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

nophead
The volume of what though? Its child perhaps?

On 20 December 2012 15:35, Giles Bathgate <[hidden email]> wrote:
I said: "echos the volume"

It would be a control module like echo(), it cannot be used to assign output. Assigning output aside from the syntax changes involved, is also technically much more difficult since you would have to evaluate the csg subtree in cgal first, and then get the bounds, and then re-evaluate the ast with the new values.

Regards,
Giles


On 20 December 2012 15:27, nop head <[hidden email]> wrote:
I don't think anything in openscad at the moment allows you to pass a module as an argument, or ever mixes modules and expressions. So if you have a bounds() module how to you apply it in an expression?

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to calculate a volume?

Giles Bathgate-2
Yes sorry it was a bit out of context when I didn't describe how my bounds() module worked.

  bounds() cube([10,10,10]);

echos: 
Bounds: [0,0,0] [10,10,10]

  import <wades_gear.stl> as gear;

  bounds() gear();


echos: 

Bounds: [0,0.004,0] [19.994,20,15]


Regards,
Giles

On 20 December 2012 15:45, nop head <[hidden email]> wrote:
The volume of what though? Its child perhaps?