Jump to content

calculate 3D polyline area


Guest bepcec

Recommended Posts

A 3DPOLYLINE doesn't really define the planes needed in order to calculate an area. So in short, no, you can't. -David

Link to comment
Share on other sites

Guest bepcec

Hi hendie and David Bethel,

thanx for your replies.

I know : a 3D polyline doesn't define a plane. :D

But my question was about how to resolve THAT problem (programatically or not).

Triangulation ?

 

Ciao.

Beppe

Link to comment
Share on other sites

Beppe,

 

I'm afraid you cannot do it. ACAD does not give you enough information.

 

Example: Draw a non coplaner 3DFACE. Acad does not speciffy whether points 10, 11 & 12 make a face or use 11, 12 & 13. ( These images are fairly poor representation of this. )

 

The same goes with a 3DPOLY. There is simply no way of knowing which edges match up to make the plane. -David

 

face1.jpg

 

face2.jpg

Link to comment
Share on other sites

  • 2 weeks later...
Guest ervine

As Beppe mentioned, triangulation is a solution here.

 

Dono if you have the option, but triangulate the 3dpoly and remove any triangles outside of the polyline.

 

Then calculate is using eg the Heron formula [3 3D-line lengths] and add them all. See http://astro.temple.edu/~dhill001/trianglearea/trianglearea.html and look for Heron.

Proof of the formula: http://www.math.umn.edu/~rejto/1151/1151_heron.pdf.

 

It depends on how many vertices the polyline got and how they relate to each other. All evenly spread would give best result.

 

Esri is using same logic: area of accumulated triangles of a tin: http://arcobjectsonline.esri.com/ArcObjectsOnline/Samples/3D%20Analyst/Surface%20Analysis/Poly%20Surface%20Area%20Via%20Tin/bas3DArea.htm

Link to comment
Share on other sites

I agree with David Bethel: you need more info to calculate the area of a 3D polyline. Here is a sample:

 

3dpoly0.jpg

 

There are a lot of possibilities to construct a surface...

 

3dpoly1.jpg 3dpoly2.jpg 3dpoly3.jpg

 

I didn't calculate the areas for these surfaces but probable that are not the same.

Link to comment
Share on other sites

  • 6 years later...

Hi,

 

this is an old post but I hope still up-to-date problem:

I am also new to Civil 3D and have similar situation - I was thinking if there is a way to quickly know an area of "footprint" of a 3D polyline? I know I could copy it, flatten and there it is, but if I need information as such for numerous p-lynes I will have a lot of extra work...

 

Any suggestions?

 

Mike

Link to comment
Share on other sites

In Autodesk Inventor I would simply create a Boundary Patch and Inventor would tell me the area.

Can you attach your dwg here - perhaps it can now be done with AutoCAD (How complicated is the boundary?)

(I don't use Civil 3D - but I think it can be done there as this has been a pretty common question).

Link to comment
Share on other sites

  • 12 years later...

There is a formula for an area using points, so disregard the Z and it will give Plan area, if using CIV3D can get 3dfaces and work out the planar area of each 3d face. So the correct response is that there are 2 area solutions. 

 

Sorry forget where I found this, gives theory for XY points.

 

(DEFUN C:FACEAREA.LSP ( / MYERROR OLDERROR 
                          SS EN ED P1 P2 P3 P4 AREA3P FAREA)

;;------- SUBROUTINES --------
 
(DEFUN AREA3P (P1 P2 P3 / A B C S)
(SETQ
    A (DISTANCE P1 P2)
    B (DISTANCE P2 P3)
    C (DISTANCE P3 P1)
    S (* 0.5 (+ A B C))
)
(SQRT
    (*
        S
        (- S A)
        (- S B)
        (- S C)
    )
)
)

;;=========== MAIN ROUTINE ===============
 
 (SETQ X 0)
 (SETQ TOTAREA 0.0) 
 (SETQ SS (SSGET "X" '((0 . "3DFACE"))))
(SETQ Y  (SSLENGTH SS))  
        
(IF   (=  SS NIL)
(PROGN 
  (GETSTRING  "\NNO 3D FACES . PRESS ANY KEY WHEN READY ")
  (EXIT)
)
)

(SETQ Y  (SSLENGTH SS))  
(REPEAT Y
        (SETQ EN (SSNAME SS X)
              ED (ENTGET EN)
              P1 (CDR (ASSOC 10 ED))
              P2 (CDR (ASSOC 11 ED))
              P3 (CDR (ASSOC 12 ED))
              P4 (CDR (ASSOC 13 ED))
              )
        (SETQ FAREA (+ (AREA3P P1 P2 P3) (AREA3P P3 P4 P1)))
        (SETQ TOTAREA (+ TOTAREA FAREA))
        (PRINC "\NAREA: ") (PRINC TOTAREA) (PRINC)
           
      (SETQ X (+ X 1))
) ; REPEAT

)  ;DEFUN

(DEFUN C:3FA ()
  (C:FACEAREA)
)

(PRINC "FACEAREA LOADED. TYPE FACEAREA OR 3FA TO RUN.")


(PRINC)

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Create a surface from the 3d polyline. And get a surface report. Which will give you the slope surface area and the horizontal area. Or use Surpac to get the best fit area from the 3d polyline

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...