volume calculation not working properly

Started by paul craig, August 19, 2014, 05:35:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

paul craig

HI guys,
long time no talk.
Whilst doing a research project just now, I have had problems with the Dimension/volume command.

I have drawn a couple of water tanks from a prototype, and then using a 3d creation, have tried to obtain the volume.
Sadly I have had a couple of problems, since the calculated volume does not match the dimensions shown in the info box.
Also a couple of times one of them command failed many times.

Obviously I have converted to plane, then extruded. Hit Dimension, volume, then clicked on the item.

maybe you can see what capacities you get. I am trying to find out how many UK gallons can be fitted in the space?

1/ should be 1600 UK gallons, the other 2000.  plus or minus about 10%.
I have been getting a volume of about 409,000 cubic inches calculated by the programme, but multiplying the figures in the info box gives me more like 430,000. So is it me or the programme

VMax 22 with updates
No memory problems etc. Just seems a mathematics problem.

Paul

prl

#1
For your two tanks, which I have put into one file  (attached):

The green tank has a volume of 409941.32 cubic inches = 1477.69 UK Gallons
The blue tank has a volume of 532562.88 cubic inches = 1919.70 UK Gallons

DesignCAD is correct in the volume calculations in the infobox (same as the volume command under Dimensions>Info)


paul craig

thanks prl
but when I look in the info box I get 174.75 x 34.6 x 71.75 as xyz dimensions. that gives me 433825.6,
so why are the two different.?

whilst I expect a little difference, nearly 10% seems wrong to me.

prl

#3
Quote from: paul craig on August 20, 2014, 01:11:40 AM
but when I look in the info box I get 174.75 x 34.6 x 71.75 as xyz dimensions. that gives me 433825.6,
so why are the two different.?

Not sure why you are computing the area of a rectangular solid.  The front plane area is NOT 174.75 X 34.6.

You need to subtract for the rounded corners and also the chamfered edge.  And in case you aren't aware of it, the top of the tank is not drawn level.  If you draw a 174.75 x 34.6 x 171.75 rectangular solid around the green solid and subtract the green solid, here is your difference in volume computations graphically.


paul craig

thanks mate, but the larger one comes out nearer what I expect.

and yes, I do know and understand that the top is slanted toward the front.

it is just that on a couple of other volume calculations with what are called well tanks hence my questions.

Paul

prl

Paul,

Based on those models in the file I attached, I also checked the volumes using TurboCAD Pro, and SketchUP Pro.  They give the same cubic inches.

Hope that helps and at least verifies DesignCAD.

Oh yes, I did need to fix the blue tank from your original drawings.  It had a couple of coplanar edges the volume calculation routine didn't like, but shape wise I didn't change anything.

samdavo

#6
well here's a developed tank - I suspect the smaller of the two, but I forget   (thanks to macro unwrapG.d3m)
cheers
sam
(PS gotta feeling I need to doublecheck that lol - trouble with macros that you only use once every blue moon is that moths and/or bugs get in there somehow).

EDIT,  the jpeg now shows the corrected development, which is 406 long.  Ignore the 365 long version.

samdavo

#7
There was an "Opportunity For Improvement" in that unwrapG macro,  (and yet again, thanks entirely to prl), I add an updated version (unwrapG2.d3m)  in the relevant thread.  - together with examples (in fact these blue and green tanks)
cheers
http://forum.designcad.com/index.php?topic=5464.msg40802#new
(reply #73)

paul craig

Having checked  my own work again, I know I stuffed up :-[ I took the wrong figure in one of the vol boxes,  BUT.

In working new drawings to allow me to check the volumes against those written on the original drawings, some
from 1866, and wondering how accurate their work was. I have had problems with two files, and not sure what I
have done wrong. One marked R12 will not allow me to calculate the volume, the other marked R14 2900 will not
allow me to press the 3d button, which I have done earlier tonight and get a 3 d initial drawing so I can extrude.

I have used the normal commands, B and then convert to plane, so I wonder what has happened.

And how do I use that macro samdavo?????

Paul

samdavo

#9
howdy paul,
How to use that macro?
Best to read some of the recent posts on that thread if that is ok.
http://forum.designcad.com/index.php?topic=5464.msg40802#new

Basically (for the dcd that I include in the zipped file there) you select the solid, - or better you copy it first and select that - and (provided it doesn't have grids) you run the macro.  The elemental planes appear magically along that baseline - thanks to the genius of one prl.

If it does have grids, you have to explode the solid, then explode the grids, then collect the planes and Ctrl+D define a new gridless solid.

Basically also, what I posted above was wrong (due to a bug of sorts - btw best not to have duplicated points in the perimeter of the plane you extrude - as you infer).
EDIT - I have posted the corrected development (406 long) above, reply #6,  to replace the incorrect one.

PS You have to set the tank vertically - and it must have a horizontal plane at the base.  The set of points around the perimeter of that plane determines the base line of the developed shape. The macro will develop all the vertical planes THAT are above that base line.  As per prl's solid on that thread, you can also have multiple holes/windows.   

Furthermore, none of the cyan-blue planes will be included in the devlopment, because they are not above the perimeter of the bottom plane.  (see jpeg titled "BLUE END", which is the far end of the solid in the first isometric jpeg)

prl

#10
Quote from: paul craig on August 23, 2014, 05:23:09 PM
I have used the normal commands, B and then convert to plane, so I wonder what has happened.

Paul,  the problem is the profiles, before you convert them to a plane.  In the attached file, the red profile (plane), from your original R12 file has 47 points.  The green profile which I traced snapping to your red profile has 45 points.  Somewhere and somehow you are setting extra points on existing points.

File with the two profiles attached.

edit: I've traced the problem.  You have inadvertently created a stray line segment either starting or stopping your line command.

You started your line here:




In the location above that I'm pointing to with the blue arrow, zoom in very close (say a zoom level of about a million) and you will see the extra line segment that is adding the two extra points.



paul craig

#11
thanks again,
1/ I have to understand properly how to down load the macros, which I know is dumb, but when I down load the macro, what do I do it next? How do I get it into Dcad and then be able to use it? That is what I have had problems understanding.

as for the two drawings, thanks but why does my programme not cycle properly between 2d and 3d in one particular case?

edit, I see where the extra points come in, it happened at the beginning of the drawing, when I tried to get the curve at the top to meet the line coming up from the lower curve, somehow I did not manage  to snap the two lines together properly, so on very much close up, there is a gap. It was for much time my problem with hatch fill years ago.

But like many people, I still assume that when I do the B command and have put all the end points together, the damn thing should be complete, but obviously it does not always work that way which is a pita. Surely, if the B command shows a solid, and does not indicate a gap or break, we should be able to feel ok about doing the work???


Paul

prl

Quote from: paul craig on August 24, 2014, 06:58:00 AM
as for the two drawings, thanks but why does my programme not cycle properly between 2d and 3d in one particular case?

Good question.  I didn't notice this.

On my machine, for versions 22, 23 and 24, when switching from 2d mode to 3d mode, DesignCAD crashes.
Versions below 19 will open and toggle between 2d/3d modes.

I'll submit it as a bug file.

Dr PR

Paul,

The macro doesn't really help you with what you are trying to do here. But it could be VERY useful to you for "unwrapping" surfaces in a 3D drawing in order to make a 2D outline of the surface, especially if the surfaces have holes in them.*

****

To execute a macro follow these steps:

First you must tell DesignCAD where to find the macro. You only need to do this once (for each new DesignCAD version).

1. Put the macro file in a known folder - it's a good idea to put all macros in the same folder. I use:

C:\DesignCAD\Macros

2. In DesignCAD open the "Options/Options" folder (Q).

3. In the "File Locations" tab look down to the "Macro" entry. Select it and click "Change."

4. Change the file location to the folder where you put the macros.

5. Click "OK" and then click "Save as Default." Then click "Apply" and "OK."

Now you can execute macros.

With DesignCAD running and your drawing open press "%" or use "Tools/Macro Execute" to start the macro.

Select the macro from the list shown and click "Open." Many macros just execute immediately, but some require you to enter values, make selections, etc. They should prompt you for this information.

Macros are ASCII text files that end with ".d3m." You can open and edit them in any text file editor. They are written in the BasiCAD macro programming language.


****

The "B" function does exactly what you tell it to do, and if you have created extra points it will put them in the resulting line. The area functions do exactly what you tell them to do, and if you have create a polygon with extra points it will try to calculate the area of what you have created.

Sloppy work generates sloppy results. Don't blame DesignCAD.

****

* The "unwrapG.d3m" macro will not work with DesignCAD grids. All native solids in DesignCAD have at least one grid. So you have to explode the grids before using the macro.

There is another macro that unfolds grids. You can learn about it here:

http://forum.designcad.com/index.php?topic=5548.0

Phil
DesignCAD user since 1987

prl

#14
Quote from: Dr PR on August 24, 2014, 08:55:24 AM
* The "unwrapG.d3m" macro will not work with DesignCAD grids. All native solids in DesignCAD have at least one grid. So you have to explode the grids before using the macro.

Also as a clarification/history lesson.  UnwrapG.d3m was spawned from dealing with cylinders with holes.  Sam pointed out it could do more generic vertical end-cap type shapes.

You should use UnwrapG2.d3m since I had failed to realize that multiple coplanar faces can exist in the same plane if they are interrupted with a reveal (notch) or ledge.  Technically doesn't happen with cylinders, but since we have moved to generic user-defined shapes, just use the UnwrapG2.d3m (until I learn of the next exception).