Display full version of the post: Volume of Pipe

nham
02.07.2014, 14:47
Please help me to calculate the volume of pipe. Please see attached drawinguploads/483549/pipe_3.dwg

Kent Cooper
03.07.2014, 15:12
Let's say [for the generic case, including this specific example] the pipe diameter is in a variable called 'dia', the angle in a variable called 'ang', and the wall thickness in a variable called 'thk'.  In AutoLISP terms:
The cross-sectional area of the pipe is pi times the square of the radius:
(* pi (expt (/ dia 2) 2))
 
The distance along the pipe as it goes through the wall is a function of the thickness and the angle:
(/ thk (sin ang))
 
The volume of the pipe inside the wall is just the product of those:
(* pi (expt (/ dia 2) 2) (/ thk (sin ang)))
 
As for constructing it in 3D, that's a process of using Extrude on a Circle, or [shortcut to the same thing] drawing a Cylinder, longer than you need, and using Slice twice on it at the appropriate angle and spacing.  Some changes of User Coordinate System will make it easier, though it could be done without that.  It could presumably be automated in a Lisp routine, if this is something that is needed often enough.
 
EDIT:  Actually, in a quick trial, I find you can construct it without making it too long and using Slice, by using Extrude along a 3D-diagonal Line as a path.  In this example, to get the shape [though not in the same orientation], draw a Circle with 300 radius, and a Line diagonally up off the page, from the Circle's center to @0,300,300 [or any combination with either the X or Y coordinate 0 and the other two 300 or -300].  Then Extrude the Circle, using the Path option and selecting the Line.  With a UCS change you can draw it directly in the orientation of the wall and pipe.Kent Cooper2014-07-03 15:44:55

John Connor
03.07.2014, 16:11
Create the pipe and wall in 3D.Subtract the pipe from the wall.Use the Separate command to unjoin (is that a word?) the main wall from the portion of the wall contained within the interior of the pipe.Use the Massprop command to get the volume.