© Dipl.-Wirtschaftsing. (FH) Franz Ertl Am Sportplatz 9 83365 Nußdorf Internet www.ertls.de Mailto: franz@ertls.de

 

 

(defun c:bohr()

  (setq p1 (getpoint "Linken unteren Eckpunkt eingeben:"))(terpri)

  (setq Laenge (getdist p1 "Länge eingeben:")) (Terpri)

  (setq p2 (polar p1 0 laenge))

  (setq Breite (getdist p2 "Breite eingeben:")) (Terpri)

 

  (setq p3 (polar p2 (* 0.5 pi)breite))

  (setq p4 (polar p1 (* 0.5 pi)breite))

 

;Bohrungsabstand und Radius der Bohrungen

  (setq Ba (Getdist "Bohrungsabstand:")) (Terpri)

  (Setq radius(getdist "Radius:")) (Terpri)

 

;Bohrungszentren berechnen

  ;Bohrungszentren

(setq p5 (list (+  (car p1) ba) (+ (cadr p1) ba)))

(setq p7 (list (- (car p3) ba) (- (cadr p3) ba)))

 

 

;Erstellen der Bohrungen

(command "kreis" p5 radius)

(command "-reihe" "L" "" "R" "2" "2" p5 p7)

 

;Für Bemaßung

(setq p6 (list (-  (car p2) ba) (+ (cadr p2) ba)))

(setq p8 (list (+  (car p4) ba) (- (cadr p4) ba)))

 

;Symmetrielinien

(setq p9 (list (+  (car p1) (/ laenge 2)) (- (cadr p1) 5)))

(setq p10 (list (car p9) (+ (cadr p4) 5)))

(setq p11 (list ( - (car p1) 5) (+ (cadr p1) (/ breite 2)) ))

(setq p12 (list (+ (car p2) 5) (cadr p11)))

(command "Plinie" p1 p2 p3 p4 "s")

 

  ;Layer lesen

(setq la (getvar "clayer"))

(setq of (getvar "osmode"))

(setvar "osmode" 0)

 

  ;Layer machen: d.h. neu anlegen, falls nicht vorhanden oder setzen, falls vorhanden 

 (command "-layer" "m" "bem_025" "fa" "rot" "" "")

 

  ; setzt Layer oder erzeugt Layer, wenn nicht vorhanden

(command "bemlinear" p5 p6 (polar p1 (* pi 1.5) 10))

(command "bemlinear" p5 p8 (polar p1 pi 10))

(command "bemlinear" p1 p2 (polar p1 (* pi 1.5) 17))

(command "bemlinear" p1 p4 (polar p1 pi 17))

(setvar "filedia" 0)

(command "-layer" "m" "axe_025" "fa" "cyan" "" "")

(setvar "filedia" 1)

 

  ; setzt Layer oder erzeugt Layer, wenn nicht vorhanden

(command "Linie" p9 p10 "")

(command "Linie" p11 p12 "")

(setvar "osmode" of)

(setvar "clayer" la)

)