samifox Posted November 22, 2019 Share Posted November 22, 2019 hi im having a situation where i have a servy plan with no elevation data only numbrical values, as you can see, for example i have 230.50 as the start elevation point, and 231.00 as the end elevation, for example i need to know the door elevation is there a plugin program that i can use for this? Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 22, 2019 Share Posted November 22, 2019 Normally you would have two well established spot elevations to interpolate between. That is not the case here so if you did attempt to interpolate between the two contours (231 and 230.50) you will get varying answers. Are you familiar with interpolation? Quote Link to comment Share on other sites More sharing options...
lrm Posted November 22, 2019 Share Posted November 22, 2019 Linear interpolation is usually used to determine elevation from contour lines. For a simple case like you have with only two contour lines you can do the following. Move the two contour lines to their respective Z values. Use LOFT to create a surface between the two contour polylines. Use the section command followed by YZ then click on the point for which you want to know the elevation. This will yield the red line in the image below. Add a point using osnap nearest to the line or use the ID command with nearest to get the coordinates of a point on the section line. Quote Link to comment Share on other sites More sharing options...
eldon Posted November 22, 2019 Share Posted November 22, 2019 The contours appear to me to be totally disconnected with the construction. I would assume that they be original ground level contours, before any construction would have taken place. If they are relevant, I would have thought that eye-balling would give an adequate answer. A 3D line drawn from apexes of the contours and passing through the doorway would give a good result. Quote Link to comment Share on other sites More sharing options...
samifox Posted November 22, 2019 Author Share Posted November 22, 2019 intertesting but not working . the interpulation look like a stright grid Quote Link to comment Share on other sites More sharing options...
lrm Posted November 22, 2019 Share Posted November 22, 2019 (edited) "intertesting but not working . the interpulation look like a stright grid" What does "not working" mean? Were you not able to create the surface or the section cut? If you look at the surface does it appear to be sloping from one contour line to the next? The change in elevation between the two contour line is only 6". The actual terrain could have a variety of shapes between the 2 contour lines. Autodesk's Civil 3D would create a TIN (Triangulated Irregular Network) between contour lines which is a linear interpolation. For your sample problem using LOFT will yield the same result as using a TIN. In the image below a box at z= 220 was added to help visualize the shape. Edited November 22, 2019 by lrm Quote Link to comment Share on other sites More sharing options...
lrm Posted November 22, 2019 Share Posted November 22, 2019 You could also just work in 2D to get the elevation by creating an xline through the point and taking the ratio of the distance from the lower contour line to the door and divide it by the distance between contour lines along the xline and multiply that by the difference in elevation of the two contour lines (0.5 ft) plus the elevation of the lower contour line For example, 8.3588/13.8990 * 0.5 + 230.5 = 230.80 ft. Using a different xline yields: 8.115/14.6155 * 0.5 + 230.5 = 230.78 a difference of 1/4 inch. Well within tolerance for terrain. Quote Link to comment Share on other sites More sharing options...
samifox Posted November 26, 2019 Author Share Posted November 26, 2019 thans irm i have lots of elevations i need to know with a cilck of a point, so this proccess wont work if we look on that image , we see few elevation what is the math needed to find the approximate red circle elevation? Quote Link to comment Share on other sites More sharing options...
eldon Posted November 26, 2019 Share Posted November 26, 2019 With that set of individual spot heights, without any reference to the shape of the land surface, you would be in deep trouble if you go for a purely mathematical solution. Where are the fault lines? Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 26, 2019 Share Posted November 26, 2019 The mathematical solution was demonstrated in a previous post by IRM. I think you would arrive at a different answer depending on which two elevations are used. Quote Link to comment Share on other sites More sharing options...
lrm Posted November 26, 2019 Share Posted November 26, 2019 As noted in my previous post, the common method for determining elevation values from a series of points or contour lines is to create a TIN. Civil 3D includes a feature to create a TIN from a set f 3D points or contour lines with appropriate z values. A TIN assumes linear interpolation between points when creating the 3D Faces (triangular planes). For example, your set of points might be subdivided into 3d faces as follows: or like this: Either way you would get a similar value for the z coordinate of your red circle. If you do not have access to Civil 3D you can use the following LISP program to find the z coordinate of a point given three 3D points and a 4th point that you want projected (in the z direction) to the plane defined by the 3 points. Load the following program and give the "elz" command. For geometry similar to your example the elevation of the red circle was found to be 9.77. (defun c:elz (/ p1 p2 p3 p v12 v13 norm d un a paz pt ) ; calculates the elevation of a point projected in the z direction ; onto a plane defined by three points. ; LRM 11/26/2019 ; (setq p1 (getpoint "\nPoint #1") p2 (getpoint p1 "\nPoint #2") p3 (getpoint p2 "\nPoint #3") p (getpoint "\nPoint to find elevation") v12 (mapcar '- p2 p1) v13 (mapcar '- p3 p1) norm (cross v12 v13) d (distance '(0 0 0) norm) un (mapcar '/ norm (list d d d)) ) (setq d (dot un p1)) ; distance to plane (setq a (* -1 (+ (* (nth 0 un) (nth 0 p)) (* (nth 1 un) (nth 1 p)) (* -1 d)))) (setq paz (/ a (nth 2 un))) (princ "\nPoint coordinates: x = " ) (princ (nth 0 p)) (princ ", y = ")(princ (nth 1 p)) (princ ", z = ")(princ paz) (setq pt (list (nth 0 p) (nth 1 p) paz)) ;;(command "_point" pt ) (princ) ) ;;; Compute the dot product of 2 vectors a and b (defun dot (a b / dd) (setq dd (mapcar '* a b)) (setq dd (+ (nth 0 dd) (nth 1 dd) (nth 2 dd))) ) ;;; cross product of 2 vectors a and b (defun cross (a b / crs) (setq crs (list (- (* (nth 1 a) (nth 2 b)) (* (nth 1 b) (nth 2 a)) ) (- (* (nth 0 b) (nth 2 a)) (* (nth 0 a) (nth 2 b)) ) (- (* (nth 0 a) (nth 1 b)) (* (nth 0 b) (nth 1 a)) ) ) ;end list ) ;end setq crs ) ;end cross point_on_plane.zip Quote Link to comment Share on other sites More sharing options...
eldon Posted November 27, 2019 Share Posted November 27, 2019 I don't think that all possible solutions have been explored. If the TIN has feature (valley or ridge) breaks, then the results can differ by over 0.5m. The diagrams below show what I consider to be extreme scenarios. Either could be correct. Quote Link to comment Share on other sites More sharing options...
lrm Posted November 27, 2019 Share Posted November 27, 2019 Of course with sparse point data it is possible that anything can happened between the points. You could have a mountain peak or sink hole, or as you noted a ridge, at the red circle location. As noted, a TIN assumes a linear interpolation between points which may not be representative of the true surface. Guessing that a ridge exists might be appropriate but would probably be based on additional information which was not initially provided. What happens between the data points is only a guess. With the limited data provided a linear interpolation is a suitable guess. Quote Link to comment Share on other sites More sharing options...
eldon Posted November 27, 2019 Share Posted November 27, 2019 (edited) 1 hour ago, lrm said: Of course with sparse point data it is possible that anything can happened between the points..... That was the point I was trying to make earlier. I take nothing away from your excellent solution, but I did not want the OP to think lisp was the sole solution that magically gave the proper answer even when used out of context. Edited November 27, 2019 by eldon more thoughts Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 29, 2019 Share Posted November 29, 2019 Eldon your right I have spent to many years playing with TIN's Triangular Irregular Network, you are correct that a ridge line would be added as a breakline to a tin model a 2nd pass update. The shape shown has maybe 3 different patterns before adding the breakline. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.