; Programm: "3D_Behälter.lsp" ; ; erstellt einen 3D Behälter ; Programmiert von : Hans Jürgen Scheeren ; am : 11.03.2008 ; ;**************************************************************** (defun C:3DBE() (setvar "cmdecho" 0) (command "osmode" "0" ) (setq EFP(getpoint "\nEinfügepunk... ")) (setq MA(getreal "\nDurchmesser: ")) (setq MB(getreal "\nBehälterhöhe: ")) (setq MC(getreal "\nHöhe vom Boden: ")) (setq MBa (+ MC MB));;Höhe Behälter plus Höhe vom Boden (setq MAa (* MA 0.1));;Radius (setq MD (/ MA 2));;halber Durchmesser (setq MDa (- MD MAa));;halber Durchmesser minus Radius (setq MBb (- MBa MAa));;Höhe Behälter plus Höhe vom Boden minus Radius (setq ME (* MA 0.2));;Klöpperbodenhöhe (setq MBc (- MBa ME));;Höhe Behälter plus Höhe vom Boden minus Klöpperbodenhöhe (setq MF (+ MC ME));;Höhe vom Boden plus Klöpperbodenhöhe (setq MBd (+ MC MAa));;Höhe vom Boden plus Radius (setq MBe (* MBd 1.1));;Höhe Behälterfüße (setq MAb (* MA 0.05));;Durchmesser Behälterfüße ; Konstruktionspunkte (setq PT2(list(+(car EFP)0)(+(cadr EFP)0))) (setq PT3(list(+(car EFP)0)(+(cadr EFP)MC))) (setq PT4(list(+(car EFP)0)(+(cadr EFP)MBa))) (setq PT5(list(-(car EFP)MDa)(+(cadr EFP)MBb))) (setq PT6(list(-(car EFP)MD)(+(cadr EFP)MBc))) (setq PT7(list(-(car EFP)MD)(+(cadr EFP)MF))) (setq PT8(list(-(car EFP)MDa)(+(cadr EFP)MBd))) (setq PT9(list(-(car EFP)MD)(+(cadr EFP)0))) (setq PT10(list(-(car EFP)MDa)(+(cadr EFP)MBe))) ; zeichnen ; Umrisse (command "_line" PT3 PT4 "") (setq e1 (entlast)) (command "_arc" PT4 "_e" PT5 "Radius" MA "") (setq e2 (entlast)) (command "_line" PT6 PT7 "") (setq e3 (entlast)) (command "_arc" PT8 "_e" PT3 "Radius" MA "") (setq e4 (entlast)) (command "_fillet" "radius" MAa "" "") (command "_fillet" e2 PT6 ) (setq e5 (entlast)) (command "_fillet" e4 PT7 ) (setq e6 (entlast)) ; in Polyline umwandeln und Voloumenkörper erstellen (command "pedit" e1 "" "v" e2 e3 e4 e5 e6 "" "") (setq e7 (entlast)) (command "_revolve" e7 "" PT3 PT4 "") (setq e8 (entlast)) ; Basispunkt und Mittellinie zeichnen (command "_color" "1" "") (command "_line" PT3 PT4 "")(setq e9 (entlast)) (command "_point" PT2 "") (command "_color" "_bylayer" "") ; Behälterfüße erstellen (command "_line" PT10 PT9 "") (setq e10 (entlast)) (command "_circle" PT9 MAb "") (command "_rotate3d" "_last" "" "x" PT9 "90" "") (command "_extrude" "_last" "" "Pfad" e10 ) (setq e11 (entlast)) (command "_erase" e10 "") ;Behälter zusammensetzen ;Behälterfüße (command "_rotate3d" e11 "" "x" PT2 "90" "") (command "_rotate" "_last" "" PT2 "k" "" "120") (command "_rotate" "_last" "" PT2 "k" "" "120") ;Behälter (command "_rotate3d" e8 e9 "" "x" PT2 "90" "") (setvar "cmdecho" 1) (princ))