home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / autocad / param2.arj / ABASEPLT.LSP < prev    next >
Encoding:
Lisp/Scheme  |  1991-05-20  |  14.8 KB  |  566 lines

  1.  
  2. ; *******  ParaDraft Application  ********
  3. ; Parametric Geomtry Program generated by PgPg! 
  4. ; Authored by   : User
  5. ; Application name : Baseplate Drawing with section
  6. ; Dated         : Monday , 20-5-1991
  7. ; Started at    :  --  15:00:21
  8. ; Finished at   :  --  15:04:26
  9. ; ****************************************
  10. (princ "\nParaDraft application generated on Monday , 20-5-1991 with Professional Version 1.0P")
  11. (mode 0)(command "VSLIDE"(strcat *pgpg-dir* *pg-name*))
  12. (setq dia4 nil dia5 nil dia6 nil dia7 nil dia8 nil rad15 nil L1 nil L2 nil L3 nil L9 nil L10 nil L11 nil L12 nil L13 nil L14 nil  ) 
  13. (take-value 'dia4 "dia4" 28.5488544)
  14. (take-value 'dia5 "dia5" 10.051647)
  15. (take-value 'dia6 "dia6" 10.05166764)
  16. (take-value 'dia7 "dia7" 10.05161242)
  17. (take-value 'dia8 "dia8" 10.05164847)
  18. (take-value 'rad15 "rad15" 7.45771217)
  19. (take-value 'L1 "L1" 136.12)
  20. (take-value 'L2 "L2" 108.3023)
  21. (take-value 'L3 "L3" 74.7725)
  22. (take-value 'L9 "L9" 24.78791)
  23. (take-value 'L10 "L10" 9.53042011)
  24. (take-value 'L11 "L11" 4.1446)
  25. (take-value 'L12 "L12" 18.41899855)
  26. (take-value 'L13 "L13" 46.95490001)
  27. (take-value 'L14 "L14" 42.55948963)
  28. (command "REDRAW")
  29. (initget 1)
  30. (setq refpt (getpoint "\nInsertion point :"))
  31. (setq refangle (getval "\nInsertion angle:" 0.0))
  32.  
  33. (princ "Computing points ..please wait")
  34.  
  35. (setq *en* 
  36. (init refpt))(setq *dim-layer* "dim")(setq *cen-layer* "cen")
  37. (setq err 0.0)
  38. (command "COLOR""BYLAYER")
  39. (command "DIM1""DIMASZ" 0.01 )
  40. (command "DIM1""DIMTXT" 0.01 )
  41. (setvar "CMDECHO" 0)(MAKE_LAYER "CEN" 2)(setq RAD4(/ DIA4 2.0))
  42. (setq RAD5(/ DIA5 2.0))
  43. (setq RAD6(/ DIA6 2.0))
  44. (setq RAD7(/ DIA7 2.0))
  45. (setq RAD8(/ DIA8 2.0))
  46. (setq L16 (/ L1 2.0)  )
  47. (setq L17 L16 )
  48. (setq L18 (/ L2 2.0)  )
  49. (setq L19 L18 )
  50. (setq L20 (/ L3 2.0)  )
  51. (setq L21 L20 )
  52. (setq L22 (/ L13 2.0)  )
  53. (setq L23 L22 )
  54. (setq L24 rad15 )
  55. (setq L25 rad15 )
  56. (setq L26 rad5 )
  57. (setq L27 rad5 )
  58.  
  59. (setq pt1(delta refpt 
  60.                         0.0
  61.                         0.0
  62.         ))
  63. (setq pt62(delta refpt 
  64.                         ( + (x-of pt1) rad4) 
  65.                         (y-of pt1)
  66.         ))
  67. (setq pt86(polar 
  68.                          pt1 
  69.                          1.57079633 
  70.                         L21
  71.         ))
  72. (setq pt87(polar 
  73.                          pt1 
  74.                          0.0 
  75.                         L16
  76.         ))
  77. (setq pt88(polar 
  78.                          pt1 
  79.                          1.57079633 
  80.                         ( - L20 )
  81.         ))
  82. (setq pt89(polar 
  83.                          pt1 
  84.                          0.0 
  85.                         ( - L17 )
  86.         ))
  87. (setq pt10(delta refpt 
  88.                         ( + (x-of pt1) ( - L19 )) 
  89.                         ( + (y-of pt1) L22) 
  90.         ))
  91. (setq pt11(delta refpt 
  92.                         ( + (x-of pt1) L18) 
  93.                         ( + (y-of pt1) L22) 
  94.         ))
  95. (setq pt12(delta refpt 
  96.                         ( + (x-of pt1) ( - L19 )) 
  97.                         ( + (y-of pt1) ( - L23 )) 
  98.         ))
  99. (setq pt13(delta refpt 
  100.                         ( + (x-of pt1) L18) 
  101.                         ( + (y-of pt1) ( - L23 )) 
  102.         ))
  103. (setq pt90(polar 
  104.                          pt1 
  105.                          0.0 
  106.                         ( - L19 )
  107.         ))
  108. (setq pt49(polar 
  109.                          pt1 
  110.                          0.0 
  111.                         L18
  112.         ))
  113. (setq pt50(polar 
  114.                          pt1 
  115.                          1.57079633 
  116.                         L22
  117.         ))
  118. (setq pt79(polar 
  119.                          pt1 
  120.                          1.57079633 
  121.                         ( - L23 )
  122.         ))
  123. (setq pt59(delta refpt 
  124.                         (x-of pt1)
  125.                         ( + (y-of pt1) L12) 
  126.         ))
  127. (setq pt82(delta refpt 
  128.                         ( + (x-of pt1) L16) 
  129.                         ( + (y-of pt1) L21) 
  130.         ))
  131. (setq pt83(delta refpt 
  132.                         ( + (x-of pt1) L16) 
  133.                         ( + (y-of pt1) ( - L20 )) 
  134.         ))
  135. (setq pt84(delta refpt 
  136.                         ( + (x-of pt1) ( - L17 )) 
  137.                         ( + (y-of pt1) ( - L20 )) 
  138.         ))
  139. (setq pt85(delta refpt 
  140.                         ( + (x-of pt1) ( - L17 )) 
  141.                         ( + (y-of pt1) L21) 
  142.         ))
  143. (setq pt51(delta refpt 
  144.                         ( + (x-of pt62) L11) 
  145.                         (y-of pt62)
  146.         ))
  147. (setq pt46(polar 
  148.                          pt88 
  149.                          1.57079633 
  150.                         ( - L14 )
  151.         ))
  152. (setq pt42(delta refpt 
  153.                         ( + (x-of pt1) L18) 
  154.                         ( + ( - L14 ) (y-of pt88)) 
  155.         ))
  156. (setq pt47(delta refpt 
  157.                         ( + (x-of pt1) L16) 
  158.                         ( + ( - L14 ) (y-of pt88)) 
  159.         ))
  160. (setq pt55(delta refpt 
  161.                         ( + (x-of pt62) L11) 
  162.                         ( + ( - L14 ) (y-of pt88)) 
  163.         ))
  164. (setq pt67(delta refpt 
  165.                         ( + (x-of pt1) ( - L17 )) 
  166.                         ( + ( - L14 ) (y-of pt88)) 
  167.         ))
  168. (setq pt91(delta refpt 
  169.                         ( + (x-of pt10) rad5) 
  170.                         (y-of pt10)
  171.         ))
  172. (setq pt92(delta refpt 
  173.                         ( + (x-of pt11) rad8) 
  174.                         (y-of pt11)
  175.         ))
  176. (setq pt93(delta refpt 
  177.                         ( + (x-of pt12) rad6) 
  178.                         (y-of pt12)
  179.         ))
  180. (setq pt64(delta refpt 
  181.                         ( + (x-of pt13) rad7) 
  182.                         (y-of pt13)
  183.         ))
  184. (setq pt40(polar 
  185.                          pt46 
  186.                          1.57079633 
  187.                         ( - L9 )
  188.         ))
  189. (setq pt44(delta refpt 
  190.                         ( + (x-of pt1) L18) 
  191.                         ( + ( - L9 ) (y-of pt46)) 
  192.         ))
  193. (setq pt48(delta refpt 
  194.                         ( + (x-of pt1) L16) 
  195.                         ( + ( - L9 ) (y-of pt46)) 
  196.         ))
  197. (setq pt94(polar 
  198.                          pt46 
  199.                          1.57079633 
  200.                         ( - L10 )
  201.         ))
  202. (setq pt66(delta refpt 
  203.                         ( + (x-of pt1) ( - L17 )) 
  204.                         ( + ( - L9 ) (y-of pt46)) 
  205.         ))
  206. (setq pt68(delta refpt 
  207.                         ( + (x-of pt62) L11) 
  208.                         ( + ( - L10 ) (y-of pt46)) 
  209.         ))
  210. (setq pt95(polar 
  211.                          pt86 
  212.                          1.57079633 
  213.                         ( - L24 )
  214.         ))
  215. (setq pt96(polar 
  216.                          pt89 
  217.                          0.0 
  218.                         L25
  219.         ))
  220. (setq pt97(polar 
  221.                          pt10 
  222.                          0.0 
  223.                         ( - L26 )
  224.         ))
  225. (setq pt36(intersect 
  226.                         (make-line  pt46  0.0 )
  227.                         (make-line  pt97  1.57079633 )
  228.                          Nil 
  229.         ))
  230. (setq pt37(intersect 
  231.                         (make-line  pt46  0.0 )
  232.                         (make-line  pt91  1.57079633 )
  233.                          Nil 
  234.         ))
  235. (setq pt38(intersect 
  236.                         (make-line  pt40  0.0 )
  237.                         (make-line  pt97  1.57079633 )
  238.                          Nil 
  239.         ))
  240. (setq pt43(intersect 
  241.                         (make-line  pt46  0.0 )
  242.                         (make-line  pt64  1.57079633 )
  243.                          Nil 
  244.         ))
  245. (setq pt39(intersect 
  246.                         (make-line  pt40  0.0 )
  247.                         (make-line  pt91  1.57079633 )
  248.                          Nil 
  249.         ))
  250. (setq pt41(intersect 
  251.                         (make-line  pt40  0.0 )
  252.                         (make-line  pt62  1.57079633 )
  253.                          Nil 
  254.         ))
  255. (setq pt45(intersect 
  256.                         (make-line  pt40  0.0 )
  257.                         (make-line  pt64  1.57079633 )
  258.                          Nil 
  259.         ))
  260. (setq pt58(intersect 
  261.                         (make-line  pt62  1.57079633 )
  262.                         (make-line  pt94  0.0 )
  263.                          Nil 
  264.         ))
  265. (setq pt52(intersect 
  266.                         (make-arc  pt1  pt51 )
  267.                         (make-line  pt1  0.0 )
  268.                          '- 
  269.         ))
  270. (princ "Computed points\n")(gc)
  271. (make_layer "0" 1)
  272. (make_layer "cen" 1)
  273. (make_layer "DIM" 1)
  274. (make_layer "dim" 1)
  275. (make_layer "07PIPE" 1)
  276. (make_layer "0" 1)
  277. (command "LINE" pt85 pt82 "" )
  278. (setq ent1 (entlast))(command "LINE" pt82 pt83 "" )
  279. (setq ent2 (entlast))(command "LINE" pt83 pt84 "" )
  280. (setq ent3 (entlast))(command "LINE" pt84 pt85 "" )
  281. (setq ent4 (entlast))(command "LINE" pt36 pt37 "" )
  282. (command "LINE" pt38 pt39 "" )
  283. (command "LINE" pt40 pt41 "" )
  284. (command "LINE" pt42 pt43 "" )
  285. (command "LINE" pt44 pt45 "" )
  286. (command "LINE" pt46 pt55 "" )
  287. (command "LINE" pt38 pt66 "" )
  288. (setq ent5 (entlast))(command "LINE" pt66 pt67 "" )
  289. (setq ent6 (entlast))(command "LINE" pt67 pt36 "" )
  290. (setq ent7 (entlast))(command "LINE" pt36 pt38 "" )
  291. (setq ent8 (entlast))(command "LINE" pt40 pt39 "" )
  292. (setq ent9 (entlast))(command "LINE" pt39 pt37 "" )
  293. (setq ent10 (entlast))(command "LINE" pt37 pt46 "" )
  294. (setq ent11 (entlast))(command "LINE" pt46 pt40 "" )
  295. (setq ent12 (entlast))(command "LINE" pt44 pt41 "" )
  296. (setq ent13 (entlast))(command "LINE" pt41 pt58 "" )
  297. (setq ent14 (entlast))(command "LINE" pt58 pt68 "" )
  298. (setq ent15 (entlast))(command "LINE" pt68 pt55 "" )
  299. (setq ent16 (entlast))(command "LINE" pt55 pt42 "" )
  300. (setq ent17 (entlast))(command "LINE" pt42 pt44 "" )
  301. (setq ent18 (entlast))(command "LINE" pt48 pt45 "" )
  302. (setq ent19 (entlast))(command "LINE" pt45 pt43 "" )
  303. (setq ent20 (entlast))(command "LINE" pt43 pt47 "" )
  304. (setq ent21 (entlast))(command "LINE" pt47 pt48 "" )
  305. (setq ent22 (entlast))(command "CIRCLE" pt1  rad4)
  306. (setq ent23 (entlast))(command "CIRCLE" pt10  rad5)
  307. (setq ent24 (entlast))(command "CIRCLE" pt11  rad8)
  308. (setq ent25 (entlast))(command "CIRCLE" pt12  rad6)
  309. (setq ent26 (entlast))(command "CIRCLE" pt13  rad7)
  310. (setq ent27 (entlast))(command "ARC""C" pt1 pt51 pt52)
  311.  
  312. (command "FILLET""R"rad15
  313. "FILLET"( ssadd  ent2 ( ssadd  ent1 ( ssadd))) ) 
  314. (setq ent28 (entlast))
  315. (setq ent29 (entlast))
  316.  
  317. (command "FILLET""R"rad15
  318. "FILLET"( ssadd  ent3 ( ssadd  ent2 ( ssadd))) ) 
  319. (setq ent30 (entlast))
  320. (setq ent31 (entlast))
  321.  
  322. (command "FILLET""R"rad15
  323. "FILLET"( ssadd  ent4 ( ssadd  ent3 ( ssadd))) ) 
  324. (setq ent32 (entlast))
  325. (setq ent33 (entlast))
  326.  
  327. (command "FILLET""R"rad15
  328. "FILLET"( ssadd  ent1 ( ssadd  ent4 ( ssadd))) ) 
  329. (setq ent34 (entlast))
  330. (setq ent35 (entlast))
  331.  
  332. (draw-cline  pt46 204.17525 1.57079633  ) 
  333. (draw-cline  pt1 275.2967 0.0  ) (make-cline  pt1  rad4)
  334. (make-cline  pt10  rad5)
  335. (make-cline  pt11  rad8)
  336. (make-cline  pt12  rad6)
  337. (make-cline  pt13  rad7)
  338.  
  339. (setq *detailing* T) (command "INSERT"(strcat ins_path  "SECA1") 
  340. (delta  pt10 0.0
  341. 0.0
  342. )  ""  ""  "" )
  343. (command "INSERT"(strcat ins_path  "SEC3") 
  344. (delta  pt13 24.0037
  345. 3.7535
  346. )  ""  ""  "" )
  347. (command "INSERT"(strcat ins_path  "SECI-L") 
  348. (delta  pt13 0.0
  349. 0.0
  350. )  ""  ""  "" )
  351. (command "INSERT"(strcat ins_path  "SECAA") 
  352. (delta  pt41 -14.2744
  353. 0.0
  354. )  ""  ""  "" )
  355. (init refpt)
  356. (setq L28 13.79998818 )
  357. (command "DIM1""HORIZ" pt84  pt47 (setq pt98(polar 
  358.                          pt47 
  359.                          1.57079633 
  360.                         L28
  361.         )) "")
  362. (setq L29 33.25259855 )
  363. (command "DIM1""HORIZ" pt12  pt13 (setq pt99(polar 
  364.                          pt12 
  365.                          1.57079633 
  366.                         ( - L29 )
  367.         )) "")
  368. (setq L30 48.0127 )
  369. (command "DIM1""VERT" pt82  pt83 (setq pt100(polar 
  370.                          pt83 
  371.                          0.0 
  372.                         L30
  373.         )) "")
  374. (setq L31 17.0425 )
  375. (command "DIM1""VERT" pt47  pt48 (setq pt101(polar 
  376.                          pt48 
  377.                          0.0 
  378.                         L31
  379.         )) "")
  380. (setq L32 64.5695 )
  381. (command "DIM1""VERT" pt58  pt55 (setq pt102(polar 
  382.                          pt55 
  383.                          0.0 
  384.                         L32
  385.         )) "")
  386. (setq L33 6.78061031 )
  387. (command "DIM1""HORIZ" pt58  pt55 (setq pt103(polar 
  388.                          pt55 
  389.                          1.57079633 
  390.                         L33
  391.         )) "")
  392. (setq L34 44.8348 )
  393. (command "DIM1""VERT" pt13  pt11 (setq pt104(polar 
  394.                          pt11 
  395.                          0.0 
  396.                         L34
  397.         )) "")
  398.  
  399. (command "DIM1""diameter" (list ent23 (polar  pt1 0.78539816 10.0))"")
  400.  
  401. (command "DIM1""diameter" (list ent24 (polar  pt10 0.78539816 10.0))"")
  402.  
  403. (command "DIM1""radius" (list ent35  pt85 )(strcat  "R" (rtos rad15 2) " TYP."))
  404.  
  405. (command "DIM1""DIMASZ" 3.0 )
  406. (command "DIM1""DIMTXT" 3.0 )
  407. (command "DIM1""UPDATE"(getset) "" )
  408. ( command "CHANGE""P" "" "LAYER" *dim-layer* )
  409.  
  410. (command "PEDIT"(list ent5 pt1 ) "Y""J"
  411.   ent5 
  412.   ent6 
  413.   ent7 
  414.   ent8  "" "X")
  415. (setq ent36 (entlast))
  416. (command "PEDIT"(list ent9 pt1 ) "Y""J"
  417.   ent9 
  418.   ent10 
  419.   ent11 
  420.   ent12  "" "X")
  421. (setq ent37 (entlast))
  422. (command "PEDIT"(list ent13 pt1 ) "Y""J"
  423.   ent13 
  424.   ent14 
  425.   ent15 
  426.   ent16 
  427.   ent17 
  428.   ent18  "" "X")
  429. (setq ent38 (entlast))
  430. (command "PEDIT"(list ent19 pt1 ) "Y""J"
  431.   ent19 
  432.   ent20 
  433.   ent21 
  434.   ent22  "" "X")
  435. (setq ent39 (entlast))(command "SELECT" ent36  ent37  ent38  ent39  "" )
  436. (command "HATCH""U""45.0" "2.0" "" "P" "" )
  437.  
  438.  
  439.  
  440. (rotate-it refpt refangle)
  441. (princ "\n Drawing created by a ParaDraft application")(mode 1) ( setq refpt nil 
  442.  pt1 nil 
  443.  pt2 nil 
  444.  pt4 nil 
  445.  pt6 nil 
  446.  pt8 nil 
  447.  pt10 nil 
  448.  pt11 nil 
  449.  pt12 nil 
  450.  pt13 nil 
  451.  pt14 nil 
  452.  pt15 nil 
  453.  pt16 nil 
  454.  pt17 nil 
  455.  pt18 nil 
  456.  pt19 nil 
  457.  pt20 nil 
  458.  pt21 nil 
  459.  pt22 nil 
  460.  pt23 nil 
  461.  pt24 nil 
  462.  pt25 nil 
  463.  pt26 nil 
  464.  pt27 nil 
  465.  pt28 nil 
  466.  pt29 nil 
  467.  pt30 nil 
  468.  pt31 nil 
  469.  pt32 nil 
  470.  pt33 nil 
  471.  pt34 nil 
  472.  pt35 nil 
  473.  pt36 nil 
  474.  pt37 nil 
  475.  pt38 nil 
  476.  pt39 nil 
  477.  pt40 nil 
  478.  pt41 nil 
  479.  pt42 nil 
  480.  pt43 nil 
  481.  pt44 nil 
  482.  pt45 nil 
  483.  pt46 nil 
  484.  pt47 nil 
  485.  pt48 nil 
  486.  pt49 nil 
  487.  pt50 nil 
  488.  pt51 nil 
  489.  pt52 nil 
  490.  pt53 nil 
  491.  pt54 nil 
  492.  pt55 nil 
  493.  pt56 nil 
  494.  pt57 nil 
  495.  pt58 nil 
  496.  pt59 nil 
  497.  pt60 nil 
  498.  pt61 nil 
  499.  pt62 nil 
  500.  pt64 nil 
  501.  pt66 nil 
  502.  pt67 nil 
  503.  pt68 nil 
  504.  pt69 nil 
  505.  pt70 nil 
  506.  pt75 nil 
  507.  pt76 nil 
  508.  pt77 nil 
  509.  pt78 nil 
  510.  pt79 nil 
  511.  pt80 nil 
  512.  pt81 nil 
  513.  pt82 nil 
  514.  pt83 nil 
  515.  pt84 nil 
  516.  pt85 nil 
  517.  pt86 nil 
  518.  pt87 nil 
  519.  pt88 nil 
  520.  pt89 nil 
  521.  pt90 nil 
  522.  pt91 nil 
  523.  pt92 nil 
  524.  pt93 nil 
  525.  pt94 nil 
  526.  pt95 nil 
  527.  pt96 nil 
  528.  pt97 nil 
  529.  pt98 nil 
  530.  pt99 nil 
  531.  pt100 nil 
  532.  pt101 nil 
  533.  pt102 nil 
  534.  pt103 nil 
  535.  pt104 nil 
  536.  L1 nil 
  537.  L2 nil 
  538.  L3 nil 
  539.  L9 nil 
  540.  L10 nil 
  541.  L11 nil 
  542.  L12 nil 
  543.  L13 nil 
  544.  L14 nil 
  545.  L16 nil 
  546.  L17 nil 
  547.  L18 nil 
  548.  L19 nil 
  549.  L20 nil 
  550.  L21 nil 
  551.  L22 nil 
  552.  L23 nil 
  553.  L24 nil 
  554.  L25 nil 
  555.  L26 nil 
  556.  L27 nil 
  557.  L28 nil 
  558.  L29 nil 
  559.  L30 nil 
  560.  L31 nil 
  561.  L32 nil 
  562.  L33 nil 
  563.  L34 nil 
  564.  ) 
  565. (gc) (princ) ; Program generated at  :  --  15:04:42
  566.