Search the Community
Showing results for tags 'distance between 2 points'.
-
Hi everyone, Attached lisp is writen by Alan Thompson and then modifed by another developer. This lisp calculates the distance between two points along an object (line, circle, arc, polyline, spline, etc.) and writes the distance on second point. But it takes too much time while using this lisp for 2 or more times on same object. Because you have to restart the procedure for each point pair. Can this lisp upgradeable like this; first, we will choose a start point on an object, then lisp will write the distance which is between start point and n'th point, on n'th point. So we will choose start point only once and then lisp will write the distance on all next points which we click on the object. Thanks for help, DistanceBetweenPoints2.rar
-
Longest/Closest Distance Between Two Objects
toxicsquall posted a topic in AutoLISP, Visual LISP & DCL
Hello, I have this Lisp MD (Closest Distance Between Two Objects).lsp that can show me what is the shortest distance between two objects. If you type MD it shows the distance value and if you type MDL, it draws a line between them on the closest point distance. It can be useful for you if you need. But I need the right opposite of it. I need the Longest Distance between two objects. I need the number and the line of it. Can someone help me?- 3 replies
-
- distance between 2 points
- distance
- (and 2 more)
-
Repeating function for the mid between 2 points and writing their distance
tsotzo posted a topic in AutoLISP, Visual LISP & DCL
Hello, I made the following: (defun c:MC () (setq au* (getvar "aunits")) (setq osm* (getvar "osmode")) (setvar "aunits" 3) (setvar "osmode" 0) (setq pt1 (getpoint)) (setq pt2 (getpoint pt1)) (defun MdatDst () (setq dsC (/ (distance pt1 pt2) 2)) (setq angC (+ (angle pt1 pt2) (/ pi 2))) (setq ptC (polar pt1 (angle pt1 pt2) dsC)) (command "pline" pt1 pt2 "" "-text" "J" "MC" (polar ptC angC 5.5) 7.2 (angle pt1 pt2) (fix (distance pt1 pt2))) ) (MdatDst) (setvar "aunits" au*) (setvar "osmode" osm*) ) Is there a better way to apply this function to given couples of points (about 100) inside a bigger routine, than to write the same formula again and again? Thank you, Kostas