inf926k

Untitled

Nov 10th, 2016
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. (command "_.Layer" "_Make" "main_lines" "_Color" "250" "" "LType" "Continuous" "" "")
  2. (command "_erase" "All" "")
  3. (command "_.Layer" "_Make" "dimens" "_Color" "64" "" "LType" "Continuous" "" "")
  4. (command "_erase" "All" "")
  5. ;(command "ïðèâÿçêà" "îòêë") (command "_Layer" "set" laynme "")
  6. (command "_.Layer" "_Make" "main_lines" "_Color" "250" "" "LType" "Continuous" "" "")
  7. (setq
  8. p1 (GetPoint " Ââåäèòå íà÷àëüíûå êîîðäèíàòû ")
  9. x (nth 0 p1)
  10. y (nth 1 p1)
  11. )
  12. (setq dl (GetReal "\nÂâåäèòå dl (70): "))
  13. (if (= dl nil)
  14. (progn (setq dl 70))
  15. )
  16. (setq sh (GetReal "\nÂâåäèòå sh (35): "))
  17. (if (= sh nil)
  18. (progn (setq sh 35))
  19. )
  20. (setq vi (GetReal "\nÂâåäèòå vi (34): "))
  21. (if (= vi nil)
  22. (progn (setq vi 34))
  23. )
  24. (setq shkv1 (GetReal "\nÂâåäèòå shkv1 (16): "))
  25. (if (= shkv1 nil)
  26. (progn (setq shkv1 16))
  27. )
  28. (setq shkv2 (GetReal "\nÂâåäèòå shkv2 (24): "))
  29. (if (= shkv2 nil)
  30. (progn (setq shkv2 24))
  31. )
  32. (setq dlvn (GetReal "\nÂâåäèòå dlvn (56): "))
  33. (if (= dlvn nil)
  34. (progn (setq dlvn 56))
  35. )
  36. ; Âû÷èñëåíèå òî÷åê
  37. ; Ãëàâíûé âèä
  38. (setq p2 (polar p1 0 dl))
  39. (setq p3 (polar p2 (* 3 (/ Pi 2)) (/ (- vi shkv1) 2)))
  40. (setq p4 (polar p3 Pi (/ (- dl dlvn) 2)))
  41. (setq p5 (polar p4 (* 3 (/ Pi 2)) shkv1))
  42. (setq p6 (polar p5 0 (/ (- dl dlvn) 2) ))
  43. (setq p7 (polar p6 (* 3 (/ Pi 2)) (/ (- vi shkv1) 2)))
  44. (setq p8 (polar p7 Pi dl))
  45. (setq p9 (polar p8 (/ Pi 2) (/ (- vi shkv1) 2) ))
  46. (setq p10 (polar p9 0 (/ (- dl dlvn) 2) ))
  47. (setq p11 (polar p10 (/ Pi 2) shkv1 ))
  48. (setq p12 (polar p11 Pi (/ (- dl dlvn) 2)) )
  49.  
  50. (setq pcx (polar p1 0 (- (/ dl 2) (/ shkv2 2)) ))
  51. (setq pc1 (polar pcx (* 3 (/ Pi 2)) (- (/ vi 2) (/ shkv2 2)) ))
  52. (setq pc2 (polar pc1 0 shkv2 ))
  53. (setq pc3 (polar pc2 (* 3 (/ Pi 2)) shkv2 ))
  54. (setq pc4 (polar pc3 Pi shkv2 ))
  55.  
  56.  
  57. (setq p13 (polar p12 0 (- (/ dl 2) (/ shkv2 2)) ))
  58. (setq p14 (polar p13 (* 3 (/ Pi 2)) shkv1 ))
  59. (setq p15 (polar p3 (- 0 Pi) (- (/ dl 2) (/ shkv2 2)) ))
  60. (setq p16 (polar p15 (* 3 (/ Pi 2)) shkv1 ))
  61.  
  62. (setq phatch1 (polar pc2 (/ Pi 4) 3))
  63. (setq phatch2 (polar pc3 0 3))
  64.  
  65.  
  66.  
  67. ; Îòðèñîâêà ëèíèé
  68. (command "_line" p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p1"")
  69.  
  70. (command "_line" p11 p13 "")
  71. (command "_line" p10 p14"")
  72. (command "_line" p4 p15 "")
  73. (command "_line" p5 p16"")
  74.  
  75. (command "_line" pc1 pc2 pc3 pc4 pc1 "")
  76.  
  77. (command "_bhatch" "_a" "" "_p" "_ansi31" "0.5" "30" phatch1 "" "")
  78. (command "_bhatch" "_a" "" "_p" "_ansi31" "0.5" "30" phatch2 "" "")
  79.  
  80. ;;;(command "_bhatch" "Ñ" "ANSI31" "0.5" "30" phatch1 "" "")
  81. ;;;(command "_bhatch" "Ñ" "ANSI31" "0.5" "30" phatch2 "" "")
  82. (command "_.Layer" "_Make" "dimens" "_Color" "64" "" "LType" "Continuous" "" "")
  83.  
  84. (command "dimlinear" p1 p2 (polar p1 (/ Pi 2) 5 ) )
  85. (command "dimlinear" p10 p5 (polar p10 (* 3 (/ Pi 2)) 15 ) )
  86. (command "dimlinear" p9 p12 (polar p9 0 -5 ) )
  87. (command "dimlinear" p1 p8 (polar p1 0 -10 ) )
  88. (command "dimlinear" p16 p15 (polar p16 0 -5 ) )
  89.  
  90. (command "_.Layer" "_Make" "point_names" "_Color" "17" "" "LType" "Continuous" "" "")
  91. (command "_text" p1 "2" "0" "p1" "")
  92. (command "_text" p2 "2" "0" "p2" "")
  93. (command "_text" p3 "2" "0" "p3" "")
  94. (command "_text" p4 "2" "0" "p4" "")
  95. (command "_text" p5 "2" "0" "p5" "")
  96. (command "_text" p6 "2" "0" "p6" "")
  97. (command "_text" p7 "2" "0" "p7" "")
  98. (command "_text" p8 "2" "0" "p8" "")
  99. (command "_text" p9 "2" "0" "p9" "")
  100. (command "_text" p10 "2" "0" "p10" "")
  101. (command "_text" p11 "2" "0" "p11" "")
  102. (command "_text" p12 "2" "0" "p12" "")
  103. (command "_text" p13 "2" "0" "p13" "")
  104. (command "_text" p14 "2" "0" "p14" "")
  105. (command "_text" p15 "2" "0" "p15" "")
  106. (command "_text" p16 "2" "0" "p16" "")
  107.  
  108. (command "_text" pc1 "2" "0" "pc1" "")
  109. (command "_text" pc2 "2" "0" "pc2" "")
  110. (command "_text" pc3 "2" "0" "pc3" "")
  111. (command "_text" pc4 "2" "0" "pc4" "")
  112.  
  113. ;(command "_linetype" "Load" "ACAD_ISO10W100" "")
  114. (command "_.Layer" "_Make" "axiss1" "_Color" "250" "" "LType" "ACAD_ISO10W100" "" "")
  115.  
  116. ; X axis
  117. (setq cax1 (polar p1 (* 3 (/ Pi 2)) (/ vi 2)))
  118. (setq cax2 (polar cax1 0 dl))
  119. (setq cax1r (polar cax1 0 -30))
  120. (setq cax2r (polar cax2 0 30))
  121. (command "_line" cax1r cax2r "")
  122. ; Y axis
  123. (setq cay1 (polar p1 0 (/ dl 2)))
  124. (setq cay2 (polar cay1 (* 3 (/ Pi 2)) vi))
  125. (setq cay1r (polar cay1 (/ Pi 2) 30))
  126. (setq cay2r (polar cay2 (/ Pi 2) -30))
  127. (command "_line" cay1r cay2r "")
Add Comment
Please, Sign In to add comment