Display full version of the post: How to get elevation between two contours

ABHAYPAGRUT
02.07.2013, 05:58
I Want to take spot levels bwt two contours in autocad 2006

heinsite
02.07.2013, 06:50
This kind of question really makes me smile... and makes me happy I was learning how to do this sort of thing long before personal computers came along or anything even remotely called AutoCAD.Here's how to think of contours:  they are points of equal elevation or the shoreline of water risen to that level.  And when you look at contours it's helpful to think of water in another way:  which way would it travel if it were a raindrop.The answer in the second case is that a raindrop will always move the shortest distance or perpendicular to contour lines.  So the way to interpolate between contours is to draw a line between them that is mostly perpendicular to each.  Then you simply measure the length of that line and do the math to determine how to subdivide the distance.  If all you want to do is find an elevation half way between two contour lines you only need to look for a point halfway between them.It's not rocket science.Dave.

ABHAYPAGRUT
02.07.2013, 08:09
Thanks , this is simple math i know, but i want result in autocad by single click between two polylines representing contours having elevations.

heinsite
02.07.2013, 10:10
AutoCAD isn't built to do that sort of thing.  You might be able to write some kind of complex LISP routine to do it, but if you're going to work with contours, or more specifically digital terrain surfaces, you're going to need to use something like Civil 3D.Dave.

John Connor
02.07.2013, 12:19
Are you working in 2D or 3D?Your profile says AutoCAD 2007 but your question references 2006.  Why?

JSC
02.07.2013, 14:02
If your'e using Civil 3d (even the older version) and have (or can create) surfaces, the process is conceptually simple. But it can be cumbersome to carry out (as you should expect with just about any advanced Civil 3D function). Are you using Civil 3D?

Kent Cooper
02.07.2013, 15:05
>>> ...i want result in autocad by single click between two polylines representing contours having elevations.




 
Try Midpoint-between-two-points [M2P] object snap if you have it, using Nearest object snap on each of the two contours to get the points to find the midpoint between.  If your version doesn't have M2P object snap [I don't remember when that was introduced], there are many routines out there built to do the equivalent -- this is the one I made years ago:
 
(defun m2 (/ pt1 pt2 osm) ; Midway between 2 points snap  (setq    pt1 (getpoint "\nFirst point: ")    pt2 (getpoint pt1 "\nSecond point: ")    osm (getvar 'osmode)  ); end setq  (setvar 'osmode 0)  (command (mapcar '/ (mapcar '+ pt1 pt2) '(2 2 2)))  (setvar 'osmode osm)  (princ)); end defun
 
Use it by typing (m2) [including the parentheses] or put that into a toolbar button or something.  You can apply Nearest or any other Osnap mode on the two contours when it's asking for points.  You can use it inside something like a Point or Insert command to place something at the midpoint between, including halfway between in the Z direction.

Kent Cooper
02.07.2013, 15:13
Or now I'm wondering whether I misunderstood.  If you want to pick a single point, which won't necessarily be halfway between two contours in the XY direction, and you want the elevation at the same proportion of the distance in the Z direction as the point is between the two contours in the XY direction, that can certainly be done, but it's more complicated.  A routine would need to "reach out" somehow to find the adjacent contours, such as possibly with increasingly larger crossing windows until it finds two, and do some calculations based on the nearest points on them.  Does that sound like what you're after?

ABHAYPAGRUT
02.07.2013, 18:33
working in 3 Di am working in both the version of AUTOCAD at different places at home and at office. iam just Beginner to Autocad.

ABHAYPAGRUT
02.07.2013, 18:37
thanks, You are using Code to explain my Query. Please Elaborate it.

John Connor
02.07.2013, 20:00
M2P also known as MTP is a command modifier used during the execution of another command.  In this case the command modifier will find a point midway between two other points specified by the user.Re: code.  Haven't you ever heard of lisp?  There are lisp routines that are built into AutoCAD and those that are created by CAD users.  One of the suggestions above hints that someone familiar with lisp might be able to write a custom code to help you find that elusive point between two contours but to do so you would have to provide more detail as to what you are looking for.  There probably won't be a one click solution as some input might be required from the user.

heinsite
03.07.2013, 06:42
M2P came along as a command modifier with AutoCAD 2005.  Dave.

jevnydaniel
04.07.2013, 09:23
Thanks for the Heinsite's comments,it is helpful.