# TheSwamp

## Code Red => AutoLISP (Vanilla / Visual) => Topic started by: domenicomaria on May 01, 2019, 02:26:24 PM

Title: is there somebody able to TRANSLATE the comments of 3d_lib ?
Post by: domenicomaria on May 01, 2019, 02:26:24 PM
is there somebody able to TRANSLATE the COMMENTS of 3d_lib ?

Because I am not able, for instance,
to understand
what
this (and all the others) function does :

; Рассчет центрального угла дуги
;-------------------------------
;Параметры
; Pn, Pk, Pc - начальная, конечная и центральная точки дуги
; WNorm - вектор нормали к плоскости дуги
; Возвращает центральный угол дуги в радианах
(defun 3d_arcnkc_ang (Pn Pk Pc WNorm / Ang Pc_)
(setq WNorm (3d_ort WNorm)
Pc_ (trans Pc 0 WNorm)
Ang (- (angle Pc_ (trans Pk 0 WNorm)) (angle Pc_ (trans Pn 0 WNorm)))
)
(if (or (< (abs Ang) \$Dopusk) (equal (abs Ang) 2Pi \$Dopusk)) (setq Ang 0.0))
(if (minusp Ang) (+ Ang 2Pi) Ang)
)
Title: Re: is there somebody able to TRANSLATE the comments of 3d_lib ?
Post by: Master_Shake on May 01, 2019, 02:51:49 PM
Try this (http://www.theswamp.org/index.php?topic=37319.msg423645#msg423645)
Title: Re: is there somebody able to TRANSLATE the comments of 3d_lib ?
Post by: domenicomaria on May 01, 2019, 03:34:16 PM
... But it is the same !
I need to understand
what the function does
and what kind of arguments
I have to pass to it
. . .
But it is not possible to understand this !
I can only suppose something !

; Точка пересечения прямой и плоскости
;-------------------------------------
;Параметры:
;P1, P2 - точки на прямой
;Ppl - точка в плоскости
;WNorm - вектор нормали к плоскости
;Возвращает: точку пересечения прямой и плоскости или nil
(defun 3d_inters_lnpl (P1 P2 Ppl WNorm / A B C D L M N Tpr V)
(mapcar 'set '(L M N) (mapcar '- P2 P1)) ; вектор прямой
(mapcar 'set '(A B C) WNorm)
(if (not (equal (setq V (+ (* A L) (* B M) (* C N))) 0.0 \$Dopusk))
(progn
(setq D (- (+ (* A (car Ppl)) (* B (cadr Ppl)) (* C (caddr Ppl))))
Tpr (- (/ (+ (* A (car P1)) (* B (cadr P1)) (* C (caddr P1)) D) V))
)
(list (+ (car P1) (* Tpr L)) (+ (cadr P1) (* Tpr M)) (+ (caddr P1) (* Tpr N)))
)
)
)
Title: Re: is there somebody able to TRANSLATE the comments of 3d_lib ?
Post by: VovKa on May 01, 2019, 03:52:59 PM
copy text to clipboard
paste
translate from Russian to your language
Title: Re: is there somebody able to TRANSLATE the comments of 3d_lib ?
Post by: domenicomaria on May 01, 2019, 04:15:17 PM
Yes !
It works.

thank you.

Title: Re: is there somebody able to TRANSLATE the comments of 3d_lib ?
Post by: domenicomaria on May 02, 2019, 04:06:09 PM
only 1 file

completely translated
in English