;;;Wind3d.lsp <(c) by ARKlisp System_2000 - F. Battistini_2201> ;;; ;;; Descrizione: Questa routine è stata estratta da modulo "ARKsolid" ;;; integrato nell'Applicativo ARKlisp, il cui download ;;; gratuito lo trovi all'indirizzo seguente: ;;; ;;; http://members.xoom.it/Gothaweb/arklisp.htm ;;; ;;; ;;; La routine si attiva con WIND . ;;; ;;;********************************************************************************* ;;; YOU ARE ALLOWED TO FREELY DISTRIBUTE AND MODIFY THIS VERSION ;;;********************************************************************************* ;;; ;;;********************************************************************************* ;;; TI E' CONSENTITO DISTRIBUIRE E MODIFICARE LIBERAMENTE QUESTA VERSIONE ;;;********************************************************************************* ;;; ;;; ;;; (Alert "WIND to launch ! -Window builder- Edited by ARKlisp-(C) F. Battistini *Freeware release*") ;;; ;;;Routine WIND ;;; Internal error handler (defun WFerror (m) ; If an error (such as CTRL-C) occurs ; while this command is active... (setvar "cmdecho" 0) (command "_.Redraw") (if (/= m "Function cancelled") (princ (strcat "\nError: " m)) ) (princ"\n Command cancelled: Please enter WIND again!.") (setvar "cmdecho" 1) (setq *error* olderr) ; Restore old *error* handler (princ) ) ;;; ;;; ;;; (DEFUN C:WIND(/ S S1 S2 SX1 SX2 SX2b SX22 Sa1 HH PP Pt1 Pt2 Pt3 Pt4 pt5 Pt6 Pt7 Pt8 Pt9 K3 K4 HI LI Sa2 Sv P PP Pv L L1 L2 L3 H1 H2 K K2 k3 k4 KG HM PtA PtM PtM1 PtM2 PtM3 PtM4 las PtG LG var) (setq olderr *error* *error* WFerror) (prompt" Questa LISP crea il telaio di una finestra in 3d.")(setq L (Getdist "\nInserisci la LARGHEZZA della finestra<1300>: "))(IF (null L) (setq L 1300))(setq HH (Getdist "\nInserisci l'ALTEZZA della finestra<1300>: ")) (IF (null HH) (setq HH 1300))(setq K (getdist "\nInserisci lo SPESSORE del telaio<80>: ")) (IF (null K) (setq K 80))(setq KG (* (/ K 8) 3))(setq P (Getdist "\nInserisci la PROFONDITA' del telaio<80>: "))(IF (null P) (setq P 80))(setq Pv (- 0 (/ P 2) ))(setvar "CMDECHO" 0)(setq var (getvar "OSMODE"))(setvar "OSMODE" 0)(setq PP (- 0 P))(setq K2 (/ K 2)) (setq pt1 (Getpoint "\nSeleziona il punto inf. sin. dell'apertura: "))(command "_UCS" "_o" Pt1)(command "_ucs" "_X" 90) (command "_ucsicon" "_OR" )(setq Pt1 (list 0 0 0))(setq Pt2 (list (+ (nth 0 Pt1) K)(nth 1 Pt1)))(setq H2 (- HH K))(setq Pt3 (list (nth 0 Pt2)(+ (nth 1 Pt2) H2)))(setq L2 (/ L 2))(setq Pt4 (list (+ (nth 0 Pt1) L2)(+ (nth 1 Pt1) H2))) (setq pt5 (list (+ (nth 0 Pt1) L2)(nth 1 Pt1)))(setq L3 (- L2 K))(setq Pt6 (list (+ (nth 0 Pt5) L3)(nth 1 Pt5)))(setq Pt7 (list (nth 0 Pt2)(+ (nth 1 Pt2) K)))(setq K3 (- L (* 2 K))) (setq K4 (- L2 K2))(setq HI (- HH (* 2 K)))(setq LI (- L (* 2 K)))(setq Pt8 (list (+ (nth 0 Pt1) K4)(+ (nth 1 Pt1) K))) (setq Pt9 (list (nth 0 Pt5)(+ (nth 1 Pt5) K)))(command "_BOX" Pt1 "_Length" K HH PP)(command "_BOX" Pt2 "_Length" K3 K PP) (command "_BOX" Pt3 "_Length" L3 K PP)(command "_BOX" Pt4 "_Length" L3 K PP)(command "_BOX" Pt5 "_Length" L3 K PP)(command "_BOX" Pt6 "_Length" K HH PP)(command "_BOX" Pt8 "_Length" K2 HI PP)(command "_BOX" Pt9 "_Length" K2 HI PP)(setq Sv (- 0 (/ K 8) ))(command "_ELEV" Pv"" )(command "_BOX" Pt7 "_Length" LI HI Sv) (setvar "ELEVATION" 0)(command "_ucs" "_X" -90)(command "_ucs" "z" -90)(command "_WEDGE" Pt1 "_Length" KG L KG)(command "_ucs" "_W")(command "_REDRAW" )(setvar "OSMODE" var)(setvar "CMDECHO" 1)(prompt"\n La finestra 3d con ACIS é pronta; visualizza in 3D!") (setq *error* olderr) (princ)) ;;; ;;; (princ"WIND . Per costruire un finestra 3d con la modellazione solida. (C) ARKlisp") ;;; ;;;