Created
April 29, 2020 00:13
-
-
Save tiagovla/eadecde4fee80c4561332b82044b65cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun c:lines_arc(/ obj ang1 dist ptt inc pt pts) | |
(princ "\nSelect an Arc: ") | |
(setq obj (ssget ":S")) | |
(princ "\nSelect a Point: ") | |
(setq ptt (getpoint)) | |
(if obj | |
(progn | |
(setq obj (vlax-EName->vla-Object (ssname obj 0)) | |
inc 10.0 | |
pts () | |
rp (vlax-get obj 'center) | |
) | |
(setq nearpt (vlax-curve-getclosestpointto obj ptt)) | |
(setq distobj (- (vlax-curve-getDistAtPoint obj nearpt) 45.0)) | |
(repeat 9 (setq pt (vlax-Curve-GetPointAtDist obj distobj)) | |
(setq pts (append pts (list pt)) | |
distobj (+ distobj inc) | |
) | |
(princ "hell") | |
) | |
(foreach pt pts | |
;(princ (strcat "\nX: " (rtos (car pt) 2 2) ", Y:" (rtos (cadr pt) 2 2))) | |
;(command "_.point" "_none" (polar pt (angle pt rp) 10)) | |
(command "_.line" "_none" (polar pt (angle pt rp) 10.0) pt "") | |
(command "_.line" "_none" (polar pt (angle pt rp) -10.0) pt "") | |
) | |
) | |
) | |
(princ) | |
) | |
(princ) | |
;;https://www.augi.com/forums/showthread.php?112951-LISP-TO-GET-COORD-POINTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment