Parametryk podkladka


(defun podkladka()
(setq tabela "D:/")
(setq nr (getint "\nPodaj numer wiersza (1-20):"))
(setq c (open (strcat tabela "tablica.txt") "r")) ; otwarcie pliku DANE
(setq A 0)
(while (> nr A)
(setq we (read-line c))
(setq A (+ 1 A)))


(setq d0 (atof (substr we 1 6))) ;1-numer kolumny,6-liczba czytanych cyfr
(setq D (atof (substr we 7 6)))
(setq b (atof (substr we 14 6)))
(setq l (atof (substr we 21 6)))
(setq l1 (atof (substr we 28 6)))
(setq g (atof (substr we 35 6)))
(setq R (atof (substr we 42 6)))

(setq p0 (getpoint "\nWskazanie punktu poczatkowego:"))
(setq p1 (list (car p0) (+ (cadr p0) (/ b 2))))
(setq p2 (list (+ (car p0) (/ l 2)) (+ (cadr p0) (/ b 2)))))
(setq p3 (list (+ (car p2) (/ b 10)) (+ (cadr p1) (/ b 10))))
(setq p12 (list (+ (car p3) (/ b 2)) (cadr p0)))
(setq p4 (list (+ (car p3) (/ b 2)) (+ (cadr p12) ( / D 2))))
(setq p6 (list (car p0) (- (cadr p0) (/ b 2))))
(setq p7 (list (+ (car p0) (/ l 2)) (- (cadr p0) (/ b 2))))
(setq p8 (list (+ (car p7) (/ b 10)) (- (cadr p6) (/ b 10))))
(setq p9 (list (car p3) (- (cadr p0) l1)))
(setq p10 (list (+ (car p8) b) (cadr p9)))
(setq p11 (list (car p10) (cadr p8)))
(setq p5 (list (+ (car p11) (/ b 10)) (cadr p6)))

(setq okrag (list (car p12) (+ (cadr p12) (/ D 2))))

(setq p13 (list (- (car p0) 5) (cadr p0))) ;wspol do osi podkladki
(setq p14 (list (+ (car p5) 4) (cadr p0)))
(setq p15 (list (car p4) (+ (cadr p4) 12)))
(setq p16 (list (car p4) (- (cadr p9) 2)))

(setq p17 (list (- (car p0) 8) (cadr p0)))
(setq p18 (list (car p2) (+ (cadr p4) 2)))
(setq p19 (list (+ (car p14) 8) (cadr p0)))
(setq p20 (list (+ (car p11) 7) (cadr p8)))
(setq p21 (list (- (car p10) 4) (- (cadr p9) 6)))
(setq p22 (list (car p14) (cadr p0)))
(setq p23 (list (car p12) (+ (cadr p12) (/ d0 2))))
(setq p24 (list (car p12) (- (cadr p12) (/ d0 2)))) ;wspolrzedne do wstawiania wymiarow

(setq p25 (list (car p4) (+ (cadr p4) 8))) ;wspolrzedne przekroju
(setq p26 (list (- (car p12) (/ d0 2)) (cadr p25)))
(setq p27 (list (car p0) (cadr p25)))
(setq p28 (list (car p0) (+ (cadr p25) g)))
(setq p29 (list (car p26) (cadr p28)))
(setq p30 (list (+ (car p25) (/ d0 2)) (cadr p28)))
(setq p31 (list (+ (car p25) (/ D 2)) (cadr p28)))
(setq p32 (list (car p31) (cadr p25)))
(setq p33 (list (+ (car p25) (/ d0 2)) (cadr p27)))

(setq p34 (list (+ (car p32) 4) (cadr p25)))

(command "_layer" "_s" "0" "")
(command "_layer" "_s" "0" "")
(command "_pline" p0 p1 p2"")
(command "_pline" p0 p6 p7"")
(command "_pline" p8 p9 p10 p11"")
(command "_arc" p2 "_e" p3 "_r" R)
(command "_arc" p3 p4 p5 "_r" ( / D 2))
(command "_arc" p7 "_e" p8 "_r" ( / D 2))
(command "_arc" p11 "_e" p5 "_r" R)
(command "_circle" p12 "_d" d0)


(command "_layer" "_s" "1" "")
(command "_layer" "_s" "1" "")
(command "_line" p13 p14"") ;osie symetrii
(command "_line" p15 p16"")

(command "_layer" "_s" "0" "")
(command "_layer" "_s" "0" "")
(command "_pline" p26 p27 p28 p29 p26"")
(command "_pline" p30 p31 p32 p33 p30"")
(command "_line" p26 p29"")
(command "_line" p30 p33"")
(command "_line" p26 p33"")
(command "_line" p29 p30"")

(command "_layer" "_s" "3" "")
(command "_layer" "_s" "3" "")
(command "_hatch" "_u" 45 1 "_n" p27"")
(command "_hatch" "_u" 45 1 "_n" p32"")

;wymiarowanie
(command "_layer" "_s" "2" "")
(command "_layer" "_s" "2" "")
(Command "_.DIM"
"_ver" p1 p6 p17 (rtos b 2 1)
"_ver" p10 p22 p20 (rtos l1 2 1)
"_ver" p23 p24 p19 (rtos d0 2 1)
"_ver" p31 p32 p34 (rtos g 2 1)
"_hor" p1 p4 p18 (rtos l 2 1)
"_hor" p9 p10 p21 (rtos b 2 1)

"_exit")

)



Wyszukiwarka

Podobne podstrony:
1 parametry technniczne wymiary tablic zal nr1id?43
Cw 6 Parametryczny stabilizator napiecia
Oszacowanie parametrów charakterystyk podatnych połączeń stalowych za pomocą sieci neuro rozmytej
kernel parameters
3 2 invocation parameters
parametryw
Algorytm obliczania parametrów termodynamicznych
klotoida przyklad doboru parametru
Modyfikacja paramentrow kontraktow terminowych split
Source Parametre List DI
Ćw 7 Optymalizacja parametrów skrawania
dobór parametrów przekładni zębatej

więcej podobnych podstron