(defun C:get-bl-ug-karta-1m (/ 1m-b_s 1m-l_w 100k-srt 100k-kolum 100k-b_s 100k-l_w FalseEasting L0 list-xy list-xy_
			     100k-b_e 100k-b_n list-x list-y max-x max-y min-x min-y n-x n-y ne_xy nw_xy se_xy sw_xy)
  (setq 1m-b_s(*(-(ascii "M")65)4.0)); южная рамка листа 1m
  (setq 1m-l_w(*(-(atoi "38")31)6.0)); западная рамка листа 1m
  (setq L0 (+ 1m-l_w 3.0))
  (setq FalseEasting (+(*(1+(-(atoi "38")31))1000000.0)500000.0))
;;;  (setq a 6378245.000)
;;;  (setq b 6356863.019)
  
  (setq 100k-srt (- 12 (1+(fix (/ (atoi "21") 12))))); "строка" в разграфке листа 1m
  (setq 100k-kolum (-(rem  (atoi "21") 12)1)); "колонна" в разграфке листа 1m
  (setq 100k-b_s(+ 1m-b_s (* 100k-srt (/ 4.0 12.0)))); южная рамка листа 100k
  (setq 100k-l_w(+ 1m-l_w (* 100k-kolum (/ 6.0 12.0)))); западная рамка листа 100k
  (setq 100k-b_n(+ 100k-b_s (/ 4.0 12.0)))
  (setq 100k-b_e(+ 100k-l_w (/ 6.0 12.0)))
  (setq sw_xy (mapcar '+ (calculation-bl-to-xy-gaus (convert-grad-rad 100k-b_s) (convert-grad-rad 100k-l_w) (convert-grad-rad L0) 6378245.000 6356863.019) (list FalseEasting 0.0)))
  (setq nw_xy (mapcar '+ (calculation-bl-to-xy-gaus (convert-grad-rad 100k-b_n) (convert-grad-rad 100k-l_w) (convert-grad-rad L0) 6378245.000 6356863.019) (list FalseEasting 0.0)))
  (setq ne_xy (mapcar '+ (calculation-bl-to-xy-gaus (convert-grad-rad 100k-b_n) (convert-grad-rad 100k-b_e) (convert-grad-rad L0) 6378245.000 6356863.019) (list FalseEasting 0.0)))
  (setq se_xy (mapcar '+ (calculation-bl-to-xy-gaus (convert-grad-rad 100k-b_s) (convert-grad-rad 100k-b_e) (convert-grad-rad L0) 6378245.000 6356863.019) (list FalseEasting 0.0)))
  (setq min-x (apply 'min (mapcar 'car (list sw_xy nw_xy ne_xy se_xy))))
  (setq min-y (apply 'min (mapcar 'cadr (list sw_xy nw_xy ne_xy se_xy))))
  (setq max-x (apply 'max (mapcar 'car (list sw_xy nw_xy ne_xy se_xy))))
  (setq max-y (apply 'max (mapcar 'cadr (list sw_xy nw_xy ne_xy se_xy))))
  (setq min-x (*(1+(fix(/ min-x 2000.0)))2000.0))
  (setq max-x (*(fix(/ max-x 2000.0))2000.0))
  (setq min-y (*(1+(fix(/ min-y 2000.0)))2000.0))
  (setq max-y (*(fix(/ max-y 2000.0))2000.0))
  (setq n-x (fix(/(- max-x min-x)2000.0)))
  (setq n-y (fix(/(- max-y min-y)2000.0)))
  (setq list-x (list min-x))
  (repeat n-x
    (setq list-x (append list-x (list (+(last list-x)2000.0))))
    )
  (setq list-y (list min-y))
  (repeat n-y
    (setq list-y (append list-y (list (+(last list-y)2000.0))))
    )
  (repeat (fix (/(/ 6.0 12.0)(/ 1.0 36000.0)))
    (setq list-xy (append list-xy (list (mapcar '+ (calculation-bl-to-xy-gaus (convert-grad-rad 100k-b_s) (convert-grad-rad 100k-l_w) (convert-grad-rad L0) 6378245.000 6356863.019) (list FalseEasting 0.0)))))
    (setq 100k-l_w (+ 100k-l_w (/ 1.0 36000.0)))
    )
  (draw-lwpolyline-vla-by-list-property
    (list(cons "spece" (if (eq (getvar "CTAB")"Model")model_spece paper_spece))
	 (cons "Coordinates" list-xy)
	 (cons "Closed" -1)
	 ))
;;;  (draw-lwpolyline-vla-by-list-property
;;;    (list(cons "spece" (if (eq (getvar "CTAB")"Model")model_spece paper_spece))
;;;	 (cons "Coordinates" (list sw_xy nw_xy ne_xy se_xy))
;;;	 (cons "Closed" -1)
;;;	 ))
;;;  (draw-lwpolyline-vla-by-list-property
;;;    (list(cons "spece" (if (eq (getvar "CTAB")"Model")model_spece paper_spece))
;;;	 (cons "Coordinates" (list (list min-x min-y  ) (list max-x min-y  ) (list max-x max-y  ) (list min-x max-y  )))
;;;	 (cons "Closed" -1)
;;;	 ))
;;;  (foreach x list-xy
;;;    (setq list-xy_ (append list-xy_ (list (strcat (rtos (nth 0 x) 2 3)","(rtos (nth 1 x) 2 3)))))
;;;    )
;;;  (file_write_list_to_file "d:\\test.txt" list-xy_)
;;;  (princ
;;;  (setq xy(mapcar '+ (calculation-bl-to-xy-gaus (convert-grad-rad 100k-b_s) (convert-grad-rad 1m-l_w) (convert-grad-rad L0) 6378245.000 6356863.019) (list FalseEasting 0.0)))
;;;  )
  (princ)
  )


