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

  1.  
  2. ; *******  ParaDraft Application  ********
  3. ; Parametric Geomtry Program generated by PgPg! 
  4. ; Authored by   : User
  5. ; Application name : Flange
  6. ; Dated         : Monday , 20-5-1991
  7. ; Started at    :  --  15:07:01
  8. ; Finished at   :  --  15:10:07
  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 rad15 nil L1 nil L2 nil L3 nil L4 nil L5 nil L6 nil L7 nil L8 nil L9 nil L10 nil L11 nil L12 nil L13 nil L14 nil  ) 
  13. (take-value 'rad15 "rad15" 7.92750179)
  14. (take-value 'L1 "L1" 98.60333)
  15. (take-value 'L2 "L2" 8.0272)
  16. (take-value 'L3 "L3" 8.02725)
  17. (take-value 'L4 "L4" 129.824487)
  18. (take-value 'L5 "L5" 162.042641)
  19. (take-value 'L6 "L6" 201.78947)
  20. (take-value 'L7 "L7" 16.8033)
  21. (take-value 'L8 "L8" 16.803314)
  22. (take-value 'L9 "L9" 127.642263)
  23. (take-value 'L10 "L10" 13.7333)
  24. (take-value 'L11 "L11" 66.01699958)
  25. (take-value 'L12 "L12" 21.12253096)
  26. (take-value 'L13 "L13" 3.16683096)
  27. (take-value 'L14 "L14" 136.04389)
  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 L16 (/ L1 2.0)  )
  42. (setq L17 L16 )
  43. (setq L18 (/ L4 2.0)  )
  44. (setq L19 L18 )
  45. (setq L20 (/ L5 2.0)  )
  46. (setq L21 L20 )
  47. (setq L22 (/ L6 2.0)  )
  48. (setq L23 L22 )
  49. (setq L24 (/ L9 2.0)  )
  50. (setq L25 L24 )
  51. (setq L26 (/ L14 2.0)  )
  52. (setq L27 L26 )
  53. (setq L28 (/ L8 2.0)  )
  54. (setq L29 L28 )
  55. (setq L30 (/ L7 2.0)  )
  56. (setq L31 L30 )
  57. (setq L32 rad15 )
  58. (setq L33 rad15 )
  59.  
  60. (setq pt1(delta refpt 
  61.                         0.0
  62.                         0.0
  63.         ))
  64. (setq pt4(delta refpt 
  65.                         (x-of pt1)
  66.                         ( + (y-of pt1) L11) 
  67.         ))
  68. (setq pt53(polar 
  69.                          pt1 
  70.                          0.0 
  71.                         L20
  72.         ))
  73. (setq pt11(delta refpt 
  74.                         ( + (x-of pt1) L16) 
  75.                         ( + (y-of pt1) L11) 
  76.         ))
  77. (setq pt12(delta refpt 
  78.                         ( + (x-of pt1) L18) 
  79.                         (y-of pt1)
  80.         ))
  81. (setq pt13(delta refpt 
  82.                         ( + (x-of pt1) L26) 
  83.                         ( + (y-of pt1) L13) 
  84.         ))
  85. (setq pt49(polar 
  86.                          pt1 
  87.                          1.57079633 
  88.                         L13
  89.         ))
  90. (setq pt50(polar 
  91.                          pt1 
  92.                          1.57079633 
  93.                         L12
  94.         ))
  95. (setq pt54(polar 
  96.                          pt1 
  97.                          0.0 
  98.                         L16
  99.         ))
  100. (setq pt22(delta refpt 
  101.                         ( + (x-of pt1) L22) 
  102.                         ( + (y-of pt1) L12) 
  103.         ))
  104. (setq pt25(delta refpt 
  105.                         ( + (x-of pt1) L22) 
  106.                         ( + (y-of pt1) L13) 
  107.         ))
  108. (setq pt30(delta refpt 
  109.                         ( + (x-of pt1) ( - L23 )) 
  110.                         ( + (y-of pt1) L12) 
  111.         ))
  112. (setq pt31(delta refpt 
  113.                         ( + (x-of pt1) ( - L23 )) 
  114.                         ( + (y-of pt1) L13) 
  115.         ))
  116. (setq pt32(delta refpt 
  117.                         ( + (x-of pt1) ( - L17 )) 
  118.                         ( + (y-of pt1) L11) 
  119.         ))
  120. (setq pt33(delta refpt 
  121.                         ( + (x-of pt1) ( - L19 )) 
  122.                         (y-of pt1)
  123.         ))
  124. (setq pt34(delta refpt 
  125.                         ( + (x-of pt1) ( - L27 )) 
  126.                         ( + (y-of pt1) L13) 
  127.         ))
  128. (setq pt55(polar 
  129.                          pt1 
  130.                          0.0 
  131.                         ( - L17 )
  132.         ))
  133. (setq pt56(polar 
  134.                          pt1 
  135.                          0.0 
  136.                         ( - L21 )
  137.         ))
  138. (setq pt43(delta refpt 
  139.                         ( + (x-of pt1) ( - L25 )) 
  140.                         ( + (y-of pt1) L12) 
  141.         ))
  142. (setq pt44(delta refpt 
  143.                         ( + (x-of pt1) L24) 
  144.                         ( + (y-of pt1) L12) 
  145.         ))
  146. (setq pt51(delta refpt 
  147.                         ( + (x-of pt1) L20) 
  148.                         ( + (y-of pt1) L12) 
  149.         ))
  150. (setq pt52(delta refpt 
  151.                         ( + (x-of pt1) ( - L21 )) 
  152.                         ( + (y-of pt1) L12) 
  153.         ))
  154. (setq pt45(delta refpt 
  155.                         ( + (x-of pt1) L16) 
  156.                         ( + ( - L10 ) (y-of pt4)) 
  157.         ))
  158. (setq pt46(delta refpt 
  159.                         ( + (x-of pt1) ( - L17 )) 
  160.                         ( + ( - L10 ) (y-of pt4)) 
  161.         ))
  162. (setq pt14(delta refpt 
  163.                         ( + ( - L29 ) (x-of pt53)) 
  164.                         ( + (y-of pt1) L13) 
  165.         ))
  166. (setq pt15(delta refpt 
  167.                         ( + ( - L29 ) (x-of pt53)) 
  168.                         ( + (y-of pt1) L12) 
  169.         ))
  170. (setq pt23(delta refpt 
  171.                         ( + L28 (x-of pt53)) 
  172.                         ( + (y-of pt1) L12) 
  173.         ))
  174. (setq pt24(delta refpt 
  175.                         ( + L28 (x-of pt53)) 
  176.                         ( + (y-of pt1) L13) 
  177.         ))
  178. (setq pt5(delta refpt 
  179.                         ( + ( - L3 ) (x-of pt11)) 
  180.                         ( + (y-of pt1) L11) 
  181.         ))
  182. (setq pt8(polar 
  183.                          pt32 
  184.                          0.0 
  185.                         L2
  186.         ))
  187. (setq pt26(delta refpt 
  188.                         ( + L30 (x-of pt56)) 
  189.                         ( + (y-of pt1) L13) 
  190.         ))
  191. (setq pt27(delta refpt 
  192.                         ( + ( - L31 ) (x-of pt56)) 
  193.                         ( + (y-of pt1) L13) 
  194.         ))
  195. (setq pt28(delta refpt 
  196.                         ( + L30 (x-of pt56)) 
  197.                         ( + (y-of pt1) L12) 
  198.         ))
  199. (setq pt29(delta refpt 
  200.                         ( + ( - L31 ) (x-of pt56)) 
  201.                         ( + (y-of pt1) L12) 
  202.         ))
  203. (setq pt57(polar 
  204.                          pt50 
  205.                          1.57079633 
  206.                         L32
  207.         ))
  208. (setq pt58(polar 
  209.                          pt43 
  210.                         (chg-quad (+ 1.5707963(calc-angle  pt43  pt46 )))
  211.                         L33
  212.         ))
  213. (setq pt6(intersect 
  214.                         (make-line  pt1  0.0 )
  215.                         (make-line  pt5  1.57079633 )
  216.                          Nil 
  217.         ))
  218. (setq pt7(intersect 
  219.                         (make-line  pt1  0.0 )
  220.                         (make-line  pt8  1.57079633 )
  221.                          Nil 
  222.         ))
  223. (princ "Computed points\n")(gc)
  224. (make_layer "cen" 1)
  225. (make_layer "0" 1)
  226. (make_layer "dim" 1)
  227. (make_layer "0" 1)
  228. (command "LINE" pt4 pt5 "" )
  229. (command "LINE" pt6 pt1 "" )
  230. (command "LINE" pt7 pt1 "" )
  231. (command "LINE" pt8 pt7 "" )
  232. (command "LINE" pt4 pt8 "" )
  233. (command "LINE" pt11 pt5 "" )
  234. (setq ent1 (entlast))(command "LINE" pt5 pt6 "" )
  235. (setq ent2 (entlast))(command "LINE" pt6 pt12 "" )
  236. (setq ent3 (entlast))(command "LINE" pt12 pt13 "" )
  237. (setq ent4 (entlast))(command "LINE" pt13 pt14 "" )
  238. (setq ent5 (entlast))(command "LINE" pt14 pt15 "" )
  239. (setq ent6 (entlast))(command "LINE" pt15 pt44 "" )
  240. (setq ent7 (entlast))(setq ent7 (entlast))(command "LINE" pt44 pt45 "" )
  241. (setq ent8 (entlast))(setq ent8 (entlast))(command "LINE" pt45 pt11 "" )
  242. (setq ent9 (entlast))(setq ent9 (entlast))(command "LINE" pt22 pt23 "" )
  243. (setq ent10 (entlast))(command "LINE" pt23 pt24 "" )
  244. (setq ent11 (entlast))(command "LINE" pt24 pt25 "" )
  245. (setq ent12 (entlast))(command "LINE" pt25 pt22 "" )
  246. (setq ent13 (entlast))(command "LINE" pt15 pt23 "" )
  247. (command "LINE" pt14 pt24 "" )
  248. (command "LINE" pt26 pt27 "" )
  249. (command "LINE" pt28 pt29 "" )
  250. (command "LINE" pt30 pt29 "" )
  251. (setq ent14 (entlast))(command "LINE" pt29 pt27 "" )
  252. (setq ent15 (entlast))(command "LINE" pt27 pt31 "" )
  253. (setq ent16 (entlast))(command "LINE" pt31 pt30 "" )
  254. (setq ent17 (entlast))(command "LINE" pt32 pt8 "" )
  255. (setq ent18 (entlast))(command "LINE" pt8 pt7 "" )
  256. (setq ent19 (entlast))(command "LINE" pt7 pt33 "" )
  257. (setq ent20 (entlast))(command "LINE" pt33 pt34 "" )
  258. (setq ent21 (entlast))(command "LINE" pt34 pt26 "" )
  259. (setq ent22 (entlast))(command "LINE" pt26 pt28 "" )
  260. (setq ent23 (entlast))(command "LINE" pt28 pt43 "" )
  261. (setq ent24 (entlast))(setq ent24 (entlast))(command "LINE" pt43 pt46 "" )
  262. (setq ent25 (entlast))(setq ent25 (entlast))(command "LINE" pt46 pt32 "" )
  263. (setq ent26 (entlast))(setq ent26 (entlast))
  264. (command "FILLET""R"rad15
  265. "FILLET"( ssadd  ent7 ( ssadd  ent8 ( ssadd))) ) 
  266. (setq ent27 (entlast))
  267. (setq ent28 (entlast))
  268.  
  269. (command "FILLET""R"rad15
  270. "FILLET"( ssadd  ent8 ( ssadd  ent9 ( ssadd))) ) 
  271. (setq ent29 (entlast))
  272. (setq ent30 (entlast))
  273.  
  274. (command "FILLET""R"rad15
  275. "FILLET"( ssadd  ent24 ( ssadd  ent25 ( ssadd))) ) 
  276. (setq ent31 (entlast))
  277. (setq ent32 (entlast))
  278.  
  279. (command "FILLET""R"rad15
  280. "FILLET"( ssadd  ent25 ( ssadd  ent26 ( ssadd))) ) 
  281. (setq ent33 (entlast))
  282. (setq ent34 (entlast))
  283.  
  284. (draw-cline  pt4 178.21888 1.57079633  ) 
  285. (draw-cline  pt51 93.48006 1.57079633  ) 
  286. (draw-cline  pt52 95.46461 1.57079633  ) 
  287. (setq *detailing* T) (init refpt)
  288. (setq L34 19.02159868 )
  289. (command "DIM1""HORIZ" pt32  pt11 (setq pt59(polar 
  290.                          pt11 
  291.                          1.57079633 
  292.                         L34
  293.         )) "")
  294. (setq L35 7.92740031 )
  295. (command "DIM1""HORIZ" pt32  pt8 (setq pt60(polar 
  296.                          pt8 
  297.                          1.57079633 
  298.                         L35
  299.         )) "")
  300. (setq L36 8.98300031 )
  301. (command "DIM1""HORIZ" pt5  pt11 (setq pt61(polar 
  302.                          pt11 
  303.                          1.57079633 
  304.                         L36
  305.         )) "")
  306. (setq L37 16.37228826 )
  307. (command "DIM1""HORIZ" pt33  pt12 (setq pt62(polar 
  308.                          pt33 
  309.                          1.57079633 
  310.                         ( - L37 )
  311.         )) "")
  312. (setq L38 35.92176 )
  313. (command "DIM1""HORIZ" pt56  pt53 (setq pt63(polar 
  314.                          pt53 
  315.                          1.57079633 
  316.                         ( - L38 )
  317.         )) "")
  318. (setq L39 47.5334613 )
  319. (command "DIM1""HORIZ" pt31  pt25 (setq pt64(polar 
  320.                          pt31 
  321.                          1.57079633 
  322.                         ( - L39 )
  323.         )) "")
  324. (setq L40 22.18850035 )
  325. (command "DIM1""HORIZ" pt29  pt28 (setq pt65(polar 
  326.                          pt28 
  327.                          1.57079633 
  328.                         L40
  329.         )) "")
  330. (setq L41 8.97266829 )
  331. (command "DIM1""HORIZ" pt43  pt44 (setq pt66(polar 
  332.                          pt43 
  333.                          1.57079633 
  334.                         ( - L41 )
  335.         )) "")
  336. (setq L42 5.28322 )
  337. (command "DIM1""VERT" pt11  pt45 (setq pt67(polar 
  338.                          pt45 
  339.                          0.0 
  340.                         L42
  341.         )) "")
  342. (setq L43 54.702753 )
  343. (command "DIM1""VERT" pt11  pt12 (setq pt68(polar 
  344.                          pt12 
  345.                          0.0 
  346.                         L43
  347.         )) "")
  348. (setq L44 12.99187 )
  349. (command "DIM1""VERT" pt12  pt22 (setq pt69(polar 
  350.                          pt22 
  351.                          0.0 
  352.                         L44
  353.         )) "")
  354. (setq L45 15.87408 )
  355. (command "DIM1""VERT" pt12  pt25 (setq pt70(polar 
  356.                          pt25 
  357.                          0.0 
  358.                         L45
  359.         )) "")
  360. (setq L46 29.57775818 )
  361. (command "DIM1""HORIZ" pt34  pt13 (setq pt71(polar 
  362.                          pt34 
  363.                          1.57079633 
  364.                         ( - L46 )
  365.         )) "")
  366.  
  367. (command "DIM1""radius" (list ent32  pt43 )(strcat  "R" (rtos rad15 2) " TYP."))
  368.  
  369. (command "DIM1""DIMASZ" 3.0 )
  370. (command "DIM1""DIMTXT" 3.0 )
  371. (command "DIM1""UPDATE"(getset) "" )
  372. ( command "CHANGE""P" "" "LAYER" *dim-layer* )
  373.  
  374. (command "PEDIT"(list ent1 pt1 ) "Y""J"
  375.   ent1 
  376.   ent2 
  377.   ent3 
  378.   ent4 
  379.   ent5 
  380.   ent6 
  381.   ent7 
  382.   ent27 
  383.   ent8 
  384.   ent29 
  385.   ent9  "" "X")
  386. (setq ent35 (entlast))
  387. (command "PEDIT"(list ent10 pt1 ) "Y""J"
  388.   ent10 
  389.   ent11 
  390.   ent12 
  391.   ent13  "" "X")
  392. (setq ent36 (entlast))
  393. (command "PEDIT"(list ent14 pt1 ) "Y""J"
  394.   ent14 
  395.   ent15 
  396.   ent16 
  397.   ent17  "" "X")
  398. (setq ent37 (entlast))
  399. (command "PEDIT"(list ent18 pt1 ) "Y""J"
  400.   ent18 
  401.   ent19 
  402.   ent20 
  403.   ent21 
  404.   ent22 
  405.   ent23 
  406.   ent24 
  407.   ent31 
  408.   ent25 
  409.   ent33 
  410.   ent26  "" "X")
  411. (setq ent38 (entlast))(command "SELECT" ent35  ent36  ent37  ent38  "" )
  412. (command "HATCH""U""45.0" "2.0" "" "P" "" )
  413.  
  414.  
  415.  
  416. (rotate-it refpt refangle)
  417. (princ "\n Drawing created by a ParaDraft application")(mode 1) ( setq refpt nil 
  418.  pt1 nil 
  419.  pt2 nil 
  420.  pt3 nil 
  421.  pt4 nil 
  422.  pt5 nil 
  423.  pt6 nil 
  424.  pt7 nil 
  425.  pt8 nil 
  426.  pt9 nil 
  427.  pt10 nil 
  428.  pt11 nil 
  429.  pt12 nil 
  430.  pt13 nil 
  431.  pt14 nil 
  432.  pt15 nil 
  433.  pt16 nil 
  434.  pt17 nil 
  435.  pt18 nil 
  436.  pt19 nil 
  437.  pt20 nil 
  438.  pt21 nil 
  439.  pt22 nil 
  440.  pt23 nil 
  441.  pt24 nil 
  442.  pt25 nil 
  443.  pt26 nil 
  444.  pt27 nil 
  445.  pt28 nil 
  446.  pt29 nil 
  447.  pt30 nil 
  448.  pt31 nil 
  449.  pt32 nil 
  450.  pt33 nil 
  451.  pt34 nil 
  452.  pt35 nil 
  453.  pt36 nil 
  454.  pt37 nil 
  455.  pt38 nil 
  456.  pt39 nil 
  457.  pt40 nil 
  458.  pt41 nil 
  459.  pt42 nil 
  460.  pt43 nil 
  461.  pt44 nil 
  462.  pt45 nil 
  463.  pt46 nil 
  464.  pt48 nil 
  465.  pt49 nil 
  466.  pt50 nil 
  467.  pt51 nil 
  468.  pt52 nil 
  469.  pt53 nil 
  470.  pt54 nil 
  471.  pt55 nil 
  472.  pt56 nil 
  473.  pt57 nil 
  474.  pt58 nil 
  475.  pt59 nil 
  476.  pt60 nil 
  477.  pt61 nil 
  478.  pt62 nil 
  479.  pt63 nil 
  480.  pt64 nil 
  481.  pt65 nil 
  482.  pt66 nil 
  483.  pt67 nil 
  484.  pt68 nil 
  485.  pt69 nil 
  486.  pt70 nil 
  487.  pt71 nil 
  488.  L1 nil 
  489.  L2 nil 
  490.  L3 nil 
  491.  L4 nil 
  492.  L5 nil 
  493.  L6 nil 
  494.  L7 nil 
  495.  L8 nil 
  496.  L9 nil 
  497.  L10 nil 
  498.  L11 nil 
  499.  L12 nil 
  500.  L13 nil 
  501.  L14 nil 
  502.  L16 nil 
  503.  L17 nil 
  504.  L18 nil 
  505.  L19 nil 
  506.  L20 nil 
  507.  L21 nil 
  508.  L22 nil 
  509.  L23 nil 
  510.  L24 nil 
  511.  L25 nil 
  512.  L26 nil 
  513.  L27 nil 
  514.  L28 nil 
  515.  L29 nil 
  516.  L30 nil 
  517.  L31 nil 
  518.  L32 nil 
  519.  L33 nil 
  520.  L34 nil 
  521.  L35 nil 
  522.  L36 nil 
  523.  L37 nil 
  524.  L38 nil 
  525.  L39 nil 
  526.  L40 nil 
  527.  L41 nil 
  528.  L42 nil 
  529.  L43 nil 
  530.  L44 nil 
  531.  L45 nil 
  532.  L46 nil 
  533.  ) 
  534. (gc) (princ) ; Program generated at  :  --  15:10:20
  535.