; Define local FUNCTIONs
(dfnc dist_half(/ x_refl y_refl) ;; UCS distance X to Point
(/ (sqrt(+ (expt x_refl 2.0) (expt y_refl 2.0))) 2.0) ;; SquareRoot of X^2 + Y^2 = Hypotenuse
)
(dfnc c:distz-hgt(/ fo_hgt_z reflhgtz) ;; UCS distance Y to Point
(- fo_hgt_z reflhgtz)
)
;; TESTing 20160911
; Create UCS "ReflNN_1" tipped towards Point
(setq point2 '(dist_half(20.8125 20.8125) distz-hgt(0.625) 0) );; use FUNCTION of distance : from UCS 'horizonatally' to the
(command "_.ucs" "_3p" (0 0 0) point2 (0 0 1)) ;; UCS Origin , Positive X Axis , Positive Y Orientation _ the Refel Center , Tip the UCS towards THE Point , UCS Positive Z direction unit ; still need to 'flip '
(command "_.ucs" "_na" "_s" "Refl25_1_TEST")
;; end_TESTing 20160911
any help is _pre_appreciated
; Define local FUNCTIONs
(defun dist_half ( x_refl y_refl ) ;; UCS distance X to Point
(/ (sqrt (+ (expt x_refl 2.0) (expt y_refl 2.0))) -2.0) ;; SquareRoot of X^2 + Y^2 = Hypotenuse
)
(defun distz-hgt ( fo_hgt_z reflhgtz ) ;; UCS distance Y to Point
(- fo_hgt_z reflhgtz)
)
;; TESTing 20160911
; Create UCS "ReflNN_1" tipped towards Point
(setq point2 (list (dist_half 20.8125 20.8125) (distz-hgt 63.0 0.625) 0.0));; use FUNCTION of distance : from UCS 'horizonatally' to the
(command "_.ucs" "_3p" "_non" '(0.0 0.0 0.0) "_non" point2 "_non" '(0.0 0.0 1.0)) ;; UCS Origin , Positive X Axis , Positive Y Orientation _ the Refel Center , Tip the UCS towards THE Point , UCS Positive Z direction unit ; still need to 'flip '
(command "_.ucs" "_na" "_s" "Refl25_1_TEST")
;; end_TESTing 20160911
Just guessing, but according to your later numerical interpretation, maybe it should look like this :Thank you _ am just learning - it (mostly) was the need for list (which allows evaluative statements ) ,Code - Auto/Visual Lisp: [Select]
; Define local FUNCTIONs ) (- fo_hgt_z reflhgtz) ) ;; TESTing 20160911 ; Create UCS "ReflNN_1" tipped towards Point (command "_.ucs" "_3p" "_non" '(0.0 0.0 0.0) "_non" point2 "_non" '(0.0 0.0 1.0)) ;; UCS Origin , Positive X Axis , Positive Y Orientation _ the Refel Center , Tip the UCS towards THE Point , UCS Positive Z direction unit ; still need to 'flip ' ;; end_TESTing 20160911
And I would set point2 variable at the end to nil or localize point2 variable inside main function that haven't yet been defined...
HTH, M.R.
Interesting did a quick copy and paste to see what was happening.I gather that the ' acts like the AutoLISP function quote
Command: (setq point2 '((/ (sqrt(+ (expt 20.8125 2.0) (expt 20.8125 2.0))) 2.0) (- 63.0 0.625) 0))
((/ (SQRT (+ (EXPT 20.8125 2.0) (EXPT 20.8125 2.0))) 2.0) (- 63.0 0.625) 0)
Command: !point2
((/ (SQRT (+ (EXPT 20.8125 2.0) (EXPT 20.8125 2.0))) 2.0) (- 63.0 0.625) 0)
Just got back from Lee Mac's amazing site, and the explanation for use of the apostrophe and the quote function is described in depth.
http://www.lee-mac.com/quote.html (http://www.lee-mac.com/quote.html)
Thanks again, Lee Mac!