Enregistrez le texte ci-dessous dans un fichier nommé naca.lsp
Déposez le dans la directorie LSP d'Autocad.
Dans autocad taper la commande _appload
Charger naca.lsp
Répondez aux paramètres
Votre naca se trace automatiquement.
---------------------------------------------------
(defun cal (a)
(* corde (* b (-(+(-(-(* 0.2969(sqrt a))(* 0.126 a))(* 0.3516(expt a 2)))(* 0.2843(expt a 3)))(* 0.1015(expt a 4)))))
)
(defun c:naca ()
(setq b (getreal "epaisseur relative: "))
(setq corde (getreal "Corde: "))
(setq pd (getpoint "\nPoint: "))
(setq x (nth 0 pd))
(setq y (nth 1 pd))
(setq b (/ b 0.2))
(command "polylign"
(setq p pd)
(setq p (list (+ x (* corde 0.002))(+ y (cal 0.002))))
(setq p (list (+ x (* corde 0.005))(+ y (cal 0.005))))
(setq p (list (+ x (* corde 0.01))(+ y (cal 0.01))))
(setq p (list (+ x (* corde 0.02))(+ y (cal 0.02))))
(setq p (list (+ x (* corde 0.05))(+ y (cal 0.05))))
(setq p (list (+ x (* corde 0.07))(+ y (cal 0.07))))
(setq p (list (+ x (* corde 0.1))(+ y (cal 0.1))))
(setq p (list (+ x (* corde 0.15))(+ y (cal 0.15))))
(setq p (list (+ x (* corde 0.2))(+ y (cal 0.2))))
(setq p (list (+ x (* corde 0.3))(+ y (cal 0.3))))
(setq p (list (+ x (* corde 0.4))(+ y (cal 0.4))))
(setq p (list (+ x (* corde 0.5))(+ y (cal 0.5))))
(setq p (list (+ x (* corde 0.6))(+ y (cal 0.6))))
(setq p (list (+ x (* corde 0.7))(+ y (cal 0.7))))
(setq p (list (+ x (* corde 0.
)(+ y (cal 0.
)))
(setq p (list (+ x (* corde 0.9))(+ y (cal 0.9))))
(setq p (list (+ x (* corde 1.0))(+ y (cal 1.0))))
)
(command "")
(command "pedit" "d" "l" "")
(command "miroir" "d" "" (setq pd pd)(setq p(list (+ x 20) y))
"")
)