Abdulellah Posted December 11, 2019 Posted December 11, 2019 (edited) i am sorry i need this lisp urgently , i have heavy work in my job or i fail lisp senario attached below . i hope some body help me . this is my final requier , please there is an lisp file can draw equal line parts of line midell point , can make modify to get newest lisp have required sinario سيناريو رسم خط من جهتين.txt line from midpoint.lsp Edited December 11, 2019 by Abdulellah Quote
Emmanuel Delay Posted December 11, 2019 Posted December 11, 2019 Something like this ;; 1 - pick point (core point) ;; 2 - click left or right ;; 3 - user sets distance ;; 4 - enter right factor ;; 5 - calculate dist ;; 5b - draw line ;; 6->9 - Now repeat for the other side. Press enter for the same value ;; 10 - Repeat all (defun drawLine (p1 p2) (entmakex (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2))) ) ;; Draw Left Right (defun c:dlr ( / pt_core fact dist a ang) ;; 10 - Repeat all (while T ;; 1 - pick point (core point) (setq pt_core (getpoint "\nPick core point: ")) ;; 2 - click left or right (setq a (getpoint "\nLeft or right side? Pick a point: : ")) (if (> (nth 0 a) (nth 0 pt_core)) ;; see if x-value is bigger or smaller (setq ang 0) ;; right (setq ang pi) ;; left ) ;; 3 - user sets distance (setq dist (getdist "\nSet distance (enter value or click 2 points): ")) ;; 4 - enter right factor (setq fact (getreal "\nEnter factor: ")) ;; 5 - calculate dist - draw line (drawLine pt_core (polar pt_core ang (/ dist fact) )) ;; 6->9 - Now repeat for the other side. ;; opposite angle (if (= 0 ang) (setq ang pi) (setq ang 0) ) (princ "\nNow the other side") (setq a (getdist "\nSet distance (enter value or click 2 points or press enter for the previous distance): ")) (if a (setq dist a) ;; else the dist stays the same ) (setq a (getreal "\nEnter factor or press enter for the previous distance: ")) (if a (setq fact a) ) (drawLine pt_core (polar pt_core ang (/ dist fact) )) (princ "\nNew lines") ) ) Quote
Abdulellah Posted December 11, 2019 Author Posted December 11, 2019 thanks bro , can i get .lsp file , i do not have internet connection for my pc . i use mobile browser can not test your lisp . kinddly if you upload lisp file Quote
BIGAL Posted December 12, 2019 Posted December 12, 2019 Copy what is posted and paste/save to a Text file, with extension .lsp Quote
hanhphuc Posted December 12, 2019 Posted December 12, 2019 (edited) $0.02 unless I misunderstood? why not just (setvar 'orthomode 1) during LINE command use transparent command: 'CAL 'cal >>>> expression : 10*0.3048 or you can preset global variable (setq f 0.3048) 'cal >>>> expression : 10*f or polarmode =1 ? @10<90d not sure this helps? Edited December 12, 2019 by hanhphuc Quote
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.