kes888 发表于 2022-7-5 19:44:54

İnterpolation problem

Hi everybody,
 
Basically I am looking for some help in finding an interpolation lisp that will work in the order below. Not sure if anyone has something like this already that they could share.
 
I am looking for an interpolation lisp that has steps in this order...
 
-click on first point which has elevation data
-click on the a bunch of points which do not have elevation data
-click on the last point which also has elevation data
-interpolate elevation data of points between first and last points depending on distance from the firstpoint
 
For example if the first point elevation is 10 and the last point elevation is 15. And there are 4 points between these two and every two points havea distance of 5 betweem them:
 
Δx=5   Δx5   Δx5Δx5   Δx5
   .-----.-----.-----.-----.-----.
   z=10                              z=15
 
after i click last point which has z=15
 
points between z=10 and z=15 will have z value of :
 
11
12
13
14
 
 
Thank You

BIGAL 发表于 2022-7-5 21:30:48

The only problem with what you want is you would need to pick pick pick as an auto selection would assign the wrong Z to a point as they are selected from the drawing in creation order not visual order. Here is a start. Running out of time.
 

(setq pt1 (getpoint "\nPick pt1"))(setq pt2 (getpoint "\nPick pt2"))(setq diff (- (nth 2 pt1)(nth 2 pt2)))(alert(strcat "difference is " (rtos diff 2 3)))
页: [1]
查看完整版本: İnterpolation problem