Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP routine for interpolating elevation

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
552 Views, 2 Replies

LISP routine for interpolating elevation

I have only been using LISP for a few weeks now and I would like some advice. 

 

This is what I want to be able to do with this lisp routine:

 

- enter two points with elevations

- enter a number of points at random intervals in between those, with no elevations

- find the elevations of all the points between the first two elevated points

 

I am using autocad civil 3d lt 2012. 

 

I think I would be able to do this using simple math, but the points are not spaced evenly. 

 

Thank you 

Tags (1)
2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: Anonymous

Using the first 2 points, calculate the slope between them. Then find the 2d distance from the first point to each of the points to find the elevations and apply the slope to the distance. Add the result to the first point's elevation. It really is just simple math, done a number of times.
Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
hencoop
in reply to: Anonymous

Jeff has the answer.  Be sure to get the 2D distance between the points for your slope calculation.  (drop or zero any point z-values)

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report