Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Average elevation of a 3dpolyline?

3 REPLIES 3
Reply
Message 1 of 4
BMcAnney
276 Views, 3 Replies

Average elevation of a 3dpolyline?

Hello all,

Does anyone happen to have a LISP routine that will provide the average elevation of a 3dpolyline object?

Members in other forums have been kind enough to provide me with a couple of routines that do this, but there is one issue. These routines provide a simply average of all of the vertex Z elevations, but do not take into account the length of the segments, so they are not providing a true average of the actual polyline elevation.

If anyone has one they could share, it would be greatly appreciated - Thanks!
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: BMcAnney

You'll have to be more specific as to what math, exactly, you want.

If you asked me for an average elevation, I would do the same
thing.........average the sum of the elevations by the number of vertices.

wrote in message news:5377320@discussion.autodesk.com...
Hello all,

Does anyone happen to have a LISP routine that will provide the average
elevation of a 3dpolyline object?

Members in other forums have been kind enough to provide me with a couple of
routines that do this, but there is one issue. These routines provide a
simply average of all of the vertex Z elevations, but do not take into
account the length of the segments, so they are not providing a true average
of the actual polyline elevation.

If anyone has one they could share, it would be greatly appreciated -
Thanks!
Message 3 of 4
BMcAnney
in reply to: BMcAnney

If anyone is interested, I am attaching to this message the routine I eventually came up with to solve this. It calculates a weighted Z average of the selected 3dpolyline. (takes segment length into account)
Message 4 of 4
Anonymous
in reply to: BMcAnney

Thank you much for sharing it. No doubt it will help someone.

wrote in message news:5384279@discussion.autodesk.com...
If anyone is interested, I am attaching to this message the routine I
eventually came up with to solve this. It calculates a weighted Z average of
the selected 3dpolyline. (takes segment length into account)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost