Aller au contenu

Bride et BBbride.lsp norme 2007


Messages recommandés

Posté(e)

Enfin presque, puisque je me suis arrêté au PN40, la suite viendra si je retrouve du courage.

 

 

BRIDE.LSP --> bride en solide 3D

 

 ;;; bonuscad 22-12-2008     ;;  norme NF E 29-203  1986 (périmée)
;;;dernières modifications:
;; usegomme         28/02/2010 corrigé choix unité dessin
;;;                 27/03/2010 changé affichage DN
;;;                 08/11/2010 orientation bride 8 trous et +
;;;                 21/01/2011 gestion erreur et delobj     + scu
;;;
;;;                 ************************** Passage à la norme EN 1092-1:2007 jusqu' à PN 40 *****
;;;                 12/02/2011  ajout Tampon plein
;;;                 15/02/2011  bride tournante -->2007
;;;                 09 05 2012 compléter tableau PN10 pour br plate dn700 à 1200
;;;                 31 07 2012 accepte "m2p" milieu entre 2 points.              


(defun erreurbride (msg)
 (setvar "delobj" delobjet)
 (if sv_dm (setvar "DYNMODE" sv_dm))
 (setvar "CMDECHO" 1)
 (if (not (zerop (getvar "cmdactive")))(command))
 (command "_undo" "_e")
 (command "_u")
 (setq *error* m:err m:err nil)
 (princ "\nPas de valeur dans base données pour ce type de bride")
 (prin1)
)


(defun c:bride ( / PN6 PN10 PN20 PN25 PN40 PN50 PN100 PN150 PN250 PN420 joint
 sv_mnu typ_brd l_data l_str model_brd unit_key unit_draw l_val  pt_ins js_add js_remove e1 j d1 d2 typ_collet axebride  PN_brd talon)

 (setq m:err *error* *error* erreurbride)

 (command "_undo" "_g")
 (setq delobjet (getvar "delobj"))
 (setvar "delobj" 2)
 (setvar "CMDECHO" 0)
 (setq  js_add (ssadd) js_remove (ssadd))
 (initget 1)
 ;(setq pt_ins (getpoint "\nPoint d'insertion?: ") js_add (ssadd) js_remove (ssadd))
 (prompt "\n Specifiez le point d'insertion")
 (command "_ucs" pause )
 
;; ligne ci-dessous pour "m2p" si problème mettre un ; devant pour la désactiver. 
 (while (not (equal  (getvar "lastpoint") '(0.0 0.0 0.0) 0.01))(command pause))

 (command "")
 (setq pt_ins '(0. 0. 0.)) 
 ;; orientation bride 
 (prompt "\n Direction de la bride <>")
  (command "_ucs" "_zaxis" "" pause)



 (setq sv_dm (getvar "DYNMODE"))
    (cond ((< sv_dm 0) (setq dm (* sv_dm -1)) (setvar "DYNMODE" dm))
           (t (setq sv_dm nil dm nil))
    )

;; definition de l'unité de dessin , en cas d'erreur de choix réinitialisé "users5" via la ligne de commande
 
 (if (or (eq (getvar "USERS5") "") (not (eq (substr (getvar "USERS5") 1 2) "qz")))
   (progn
     
     (initget "ME CM MM")
     (if (not (setq unit_key (getkword "\nDessin réalisé en [ME/CM/MM] <MM>: ")))
       (setq unit_key "MM")
     )
     (cond
       ((eq unit_key "ME")
 (setq unit_draw 1000)
       )
       ((eq unit_key "CM")
 (setq unit_draw 10)
       )
       ((eq unit_key "MM")
         (setq unit_draw 1)
       )
     )
    
     (setvar "USERS5" (strcat "qz" (itoa unit_draw)))
     (setq unit_draw (/ 1.0 unit_draw))
       
   )
   
   (setq unit_draw (/ 1.0 (atoi (substr (getvar "USERS5") 3))))
   
 )
 
 (initget 1 "PN6 PN10 PN16 PN20 PN25 PN40 PN50 PN100 PN150 PN250 PN420")
 ;(setq PN_brd (getkword "\nType de bride [PN6/PN10/PN16/PN20/PN25/PN40/PN50/PN100/PN150/PN250/PN420]?: "))

 (setq PN_brd (getkword "\nType de bride [PN6/PN10/PN16/PN25/PN40]?: "))  ;; norme 2007 en cours de maj
 
 ;(setq matrice '(dn . (D K L nb A1 B1 c1 c2 c3 c4 c5 c6 h1 h2 h3 N1 N2 N3 B6 d1 f1 s )))
                     ; (0 1 2 3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20 21)
(cond
((= PN_brd "PN6") 
 (setq PN6
   '(
     ;;      0                                                F  c1                                 20 21  22   H4   H4  25  26  27  28   29  30  
     ;;;;    D     K     L    nb  A     B1     c1 c2  c3  c4  c5 c6 h1  h2 h3  N1  N2  N3  B6  d1   f1 s11 F35  35   36  h5  F36 F37 s35 s36  s37 
     
     (10 .  (75.0  50.0  11.0 4  17.20  18.00  12 12  12  12  10 10 20  28 6   26  25  20  nil 35.0  2 2   5    28   35  7   2   2.5  3   2    2))
     (15 .  (80.0  55.0  11.0 4  21.30  22.00  12 12  12  12  10 10 20  30 6   30  30  26  nil 40.0  2 2   5    30   38  7   2   2.5  3   2    2))
     (20 .  (90.0  65.0  11.0 4  26.90  27.50  14 14  14  14  10 10 24  32 6   38  40  34  nil 50.0  2 2.3 6    32   40  8   2.5 3    3  2.6   2))
     (25 .  (100.0 75.0  11.0 4  33.70  34.50  14 14  14  14  10 12 24  35 6   42  50  44  nil 60.0  2 2.6 7    35   40  10  2.5 3    3  2.6   2))
     (32 .  (120.0 90.0  14.0 4  42.40  43.50  16 16  14  14  10 12 26  35 6   55  60  54  nil 70.0  2 2.6 8    35   42  12  3   3    3  3.2   2))
     (40 .  (130.0 100.0 14.0 4  48.30  49.00  16 16  14  14  10 12 26  38 7   62  70  64  nil 80.0  3 2.6 8    38   45  15  3   3    3  3.2   2))
     (50 .  (140.0 110.0 14.0 4  60.30  61.50  16 16  14  14  12 12 28  38 8   74  80  74  nil 90.0  3 2.9 8    38   45  20  3   3    3  3.2   2))
     (65 .  (160.0 130.0 14.0 4  76.10  77.50  16 16  14  14  12 12 32  38 9   88  100 94  nil 110.0 3 2.9 8    38   45  20  3   3    4  3.2   2))
     (80 .  (190.0 150.0 18.0 4  88.90  90.50  18 18  16  16  12 14 34  42 10  102 110 110 nil 128.0 3 3.2 10   42   50  25  3   4    4  3.2   2))
     (100 . (210.0 170.0 18.0 4  114.30 116.00 18 18  16  16  14 14 40  45 10  130 130 130 nil 148.0 3 3.6 10   45   52  25  4   4    4  3.2   3.2))
     (125 . (240.0 200.0 18.0 8  139.70 141.50 20 20  18  18  14 14 44  48 10  155 160 160 nil 178.0 3 4   10   48   55  25  4   4    5   4    3.2))
     (150 . (265.0 225.0 18.0 8  168.30 170.50 20 20  18  18  14 14 44  48 12  184 185 182 nil 202.0 3 4.5 10   48   55  25  5   4    6   5    3.5))
     (200 . (320.0 280.0 18.0 8  219.10 221.50 22 22  20  20  16 16 44  55 15  236 240 238 nil 258.0 3 6.3 11   55   62  30  5   5    6   5    4.5))
     (250 . (375.0 335.0 18.0 12 273.00 276.50 24 24  22  22  18 20 44  60 15  290 295 284 nil 312.0 3 6.3 12   60   68  nil 8   nil  8   8    nil))
     (300 . (440.0 395.0 22.0 12 323.90 327.50 24 24  22  22  18 24 44  62 15  342 355 342 nil 365.0 4 7.1 12   62   68  nil 8   nil  8   8    nil))
     (350 . (490.0 445.0 22.0 12 355.60 359.50 26 26  22  22  18 26 nil 62 15  385 nil 392 nil 415.0 4 7.1 13   62   68  nil 8   nil  8   8    nil))
     (400 . (540.0 495.0 22.0 16 406.40 411.00 28 28  22  22  20 28 nil 65 15  438 nil 442 nil 465.0 4 7.1 14   65   72  nil 8   nil  8   8    nil))
     (450 . (595.0 550.0 22.0 16 457.00 462.00 30 30  22  24  20 30 nil 65 15  492 nil 494 nil 520.0 4 7.1 15   72   72  nil 8   nil  8   8    nil))
     
     (500 . (645.0 600.0 22.0 20 508.00 513.50 30 24  24  24  22 32 nil 68 15  538 nil 544 nil 570.0   4 7.1 16  75  75  nil 8))
     (600 . (755.0 705.0 26.0 20 610.00 616.50 32 30  30  30  22 36 nil 70 16  640 nil 642 nil 670.0   5 7.1 16  70 ))
     (700 . (860.0 810.0 26.0 24 711.00 717.00 40 30  30  40  nil 36 nil 76 16  740 nil 746 nil 775    5 8.0 16  70 ))
     (800 . (975.0 920.0 30.0 24 813.00 819.00 40 30  30  44  nil 36 nil 76 16  842 nil 850 nil 880    5 8.0 16  70 ))
     (900 . (1075  1020  30.0 24 914.00 920.00 48 34  34  48  nil 36 nil 78 16  942 nil 950 nil  980   5 8.0 16  70 ))
     (1000 . (1175 1120  30.0 28 1016   1022   52 38  38  52  nil 36 nil 82 16  1045 nil 1050 nil 1080 5 8.0 18  70 ))
     (1200 . (1405 1340  33.0 32 1219   1025   60 42  42  60  nil 36 nil 104 20 1248 nil 1264 nil 1295 5 8.8 20  90 ))
     (1400 . (1630 1560  36.0 36 1422   1428   72 56  56  68  nil 36 nil 114 20 1452 nil 1480 nil 1510 5 8.8 nil nil ))
     (1600 . (1830 1760  36.0 40 1626   1632   80 63  63  76  nil 36 nil 119 20 1655 nil 1680 nil 1710 5 10.0 nil nil ))
     (1800 . (2045 1970  39.0 44 1829   1835   88 69  69  84  nil 36 nil 133 20 1855 nil 1878 nil 1920 5 11.0 nil nil ))
     (2000 . (2265 2180  42.0 48 2032   2038   96 74  74  92  nil 36 nil 146 25 2058 nil 2082 nil 2125 5 12.5 nil nil ))

   )
 )
)
((= PN_brd "PN10")
 (setq PN10
   '(
     ;;      0                                            F32 c1                                    20 21  22   H4   H4  25  26  27  28   29  30  
     ;;;;    D     K      L   nb  A     B1     c1 c2 c3 c4 c5 c6 h1 h2 h3 N1    N2    N3   B6  d1   f1 s11 F35  35   36  h5  F36 F37 s35 s36  s37 
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14 16 16 16 12 14 22 35 6  28.0  30.0  28.0  t  40.0  2 2.0 5    35   35  7   2  2.5  3   2    2))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14 16 16 16 12 14 22 35 6  32.0  35.0  32.0  t  45.0  2 2.0 5    38   38  7   2  2.5  3   2    2))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16 18 18 18 14 16 26 40 6  40.0  45.0  40.0  t  58.0  2 2.3 6    40   40  8  2.5   3  3   2.6  2))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16 18 18 18 14 16 26 40 6  46.0  52.0  50.0  t  68.0  2 2.6 7    40   40  10 2.5   3  3   2.6  2))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18 18 18 18 14 18 28 42 6  56.0  60.0  60.0  t  78.0  2 2.6 8    42   42  12  3    3  3   3.2  2))
     (40 .  (150.0 110.0 18.0 4  48.30  49.50  18 18 18 18 14 18 32 45 7  64.0  70.0  70.0  t  88.0  3 2.6 8    45   45  15  3    3  3   3.2  2))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20 18 18 18 16 20 28 45 8  74.0  85.0  84.0  t  102.0 3 2.9 8    45   45  20  3    4  3   3.2  2))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  20 18 18 18 16 20 32 45 10 92.0  104.0 104.0 t  122.0 3 2.9 8    45   45  20  3    4  4   3.2  2))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  20 20 20 20 16 20 34 50 10 105.0 118.0 120.0 t  138.0 3 3.2 10   50   50  25  3    4  4   3.2  2))
     (100 . (220.0 180.0 18.0 8  114.30 116.00 22 20 20 20 18 22 40 52 12 131.0 140.0 140.0 t  158.0 3 3.6 10   52   52  25  4    4  4   3.2  3.2))
     (125 . (250.0 210.0 18.0 8  139.70 141.50 22 22 22 22 18 22 44 55 12 156.0 168.0 170.0 t  188.0 3 4.0 10   55   55  25  4    4  5   4    3.2))
     (150 . (285.0 240.0 22.0 8  168.30 170.50 24 22 22 22 20 24 44 55 12 184.0 195.0 190.0 t  212.0 3 4.5 10   55   55  25  4    4  6   5    3.5))
     (200 . (340.0 295.0 22.0 8  219.10 221.50 24 24 24 24 20 24 44 62 16 234.0 246.0 246.0 t  268.0 3 6.3 11   62   62  30  5    4  6   5    4.5))
     (250 . (395.0 350.0 22.0 12 273.00 276.50 26 26 26 26 22 26 46 68 16 292.0 298.0 298.0 t  320.0 3 6.3 12   68   68 nil  8  nil  8   8))
     (300 . (445.0 400.0 22.0 12 323.90 327.50 26 26 26 26 22 26 46 68 16 342.0 350.0 348.0 t  370.0 4 7.1 12   68   68 nil  8  nil  8   8))
     (350 . (505.0 460.0 22.0 16 355.60 359.50 30 26 26 26 22 30 53 68 16 385.0 400.0 408.0 t  430.0 4 7.1 13   68   68 nil  8  nil  8   8))
     (400 . (565.0 515.0 26.0 16 406.40 411.00 32 26 26 26 24 32 57 72 16 440.0 456.0 456.0 t  482.0 4 7.1 14   72   72 nil  8  nil  8   8))
     (450 . (615.0 565.0 26.0 20 457.00 462.50 36 28 28 28 24 36 63 72 16 488.0 502.0 502.0 t  532.0 4 7.1 15   72  nil nil nil nil  8   8))
     (500 . (670.0 620.0 26.0 20 508.00 513.50 38 28 28 28 26 38 67 75 16 542.0 559.0 559.0 t  585.0 4 7.1 16   75  nil nil nil nil  8   8))
     (600 . (780.0 725.0 30.0 20 610.00 616.50 42 30 34 34 26 42 75 82 18 642.0 658.0 658.0 t  685.0 5 8.0 18   80  nil nil nil nil 10   nil))

     (700 .  (895.0  840  30 24 711.00  711.00 50 35 35 38 nil 50 nil 85 18 746.0 nil 772.0 t  800   5 8.8   26  100  nil nil nil nil 10  nil))
     (800 .  (1015.0 950  33 24 813.00  813.00 56 38 38 48 nil 56 nil 96 18 850.0 nil 876.0 t  905   5 8.8   28  105  nil nil nil nil 12  nil))
     (900 .  (1115.0 1050 33 28 914.00  914.00 62 38 38 50 nil 62 nil 99 20 950.0 nil 976.0 t  1005  5 12.5 30  110  nil nil nil nil 12  nil))
     (1000 . (1230.0 1160 36 28 1016.00 1016.0 70 44 44 54 nil 70 nil 105 20 1052 nil 1080  t  1110  5 12.5 35  120  nil nil nil nil 12  nil))
     (1200 . (1455.0 1380 39 32 1219.00 1219.0 83 55 55 66 nil 83 nil 132 25 1256 nil 1292  t  1330  5 12.5 nil nil  nil nil nil nil 16  nil))
     (1400 . (1675.0 1590 42 36 1422.00 1422.0 95 65 65 nil nil 95 nil 143 25 1460 nil 1496 t  1535  5 14.2 nil nil  nil nil nil nil nil nil))
     (1600 . (1915.0 1820 48 40 1626.00 1626.0 95 75 75 nil nil 95 nil 159 25 1666 nil 1712 t  1760  5 16.0 nil nil  nil nil nil nil nil nil))
     (1800 . (2115.0 2020 48 44 1829.00 1829.0 95 85 85 nil nil 95 nil 175 30 1868 nil 1910 t  1960  5 17.5 nil nil  nil nil nil nil nil nil))
   )
 )
)
((= PN_brd "PN16")
 (setq PN16
   '(
     ;;                                                    F32  c1                                     20 21   22   H4  H4  25  26  27  28   29  30   
     ;;;;    D     K     L    nb  A     B1     c1 c2 c3  c4 c5  c6 h1 h2  h3 N1    N2    N3    B6 d1   f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37 
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14 16 16  16 12  14 22 35  6  28.0  30.0  28.0  t  40.0  2 2.0   5   35  35  7   2   2.5  3  2.0  2.0))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14 16 16  16 12  14 22 38  6  32.0  35.0  32.0  t  45.0  2 2.0   5   38  38  7   2   2.5  3  2.0  2.0))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16 18 18  18 14  16 26 40  6  40.0  45.0  40.0  t  58.0  2 2.3   6   40  40  8   2.5 3    3  2.6  2.0))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16 18 18  18 14  16 28 40  6  46.0  52.0  50.0  t  68.0  2 2.6   7   40  40  10  2.5 3    3  2.6  2.0))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18 18 18  18 14  18 30 42  6  56.0  60.0  60.0  t  78.0  2 2.6   8   42  42  12  3   3    3  3.2  2.0))
     (40 .  (150.0 110.0 18.0 4  48.30  49.50  18 18 18  18 14  18 32 45  7  64.0  70.0  70.0  t  88.0  3 2.6   8   45  45  15  3   3    3  3.2  2.0))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20 18 18  18 16  20 28 45  8  74.0  84.0  84.0  t  102.0 3 2.9   8   45  45  20  3   4    3  3.2  2.0))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  20 18 18  18 16  20 32 45  10 92.0  104.0 104.0 t  122.0 3 2.9   8   45  45  20  3   4    4  3.2  2.0))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  20 20 20  20 16  20 34 50  10 105.0 118.0 120.0 t  138.0 3 3.2   10  50  50  25  3   4    4  3.2  3.2))
     (100 . (220.0 180.0 18.0 8  114.3  116.00 22 20 20  20 18  22 40 52  12 131.0 140.0 140.0 t  158.0 3 3.6   10  52  52  25  4   4    4  3.2  3.2))
     (125 . (250.0 210.0 18.0 8  139.7  141.50 22 22 22  22 18  22 44 55  12 156.0 168.0 170.0 t  188.0 3 4.0   10  55  55  25  4   4    5  3.2  3.5))
     (150 . (285.0 240.0 22.0 8  168.3  170.50 24 22 22  22 20  24 44 55  12 184.0 195.0 190.0 t  212.0 3 4.5   10  55  55  25  5   5    6  3.2  4.5))
     (200 . (340.0 295.0 22.0 12 219.1  221.50 26 24 24  24 20  26 44 62  16 235.0 246.0 246.0 t  268.0 3 6.3   11  62  62  30  6   6    6  3.2  5.6))
     (250 . (405.0 355.0 26.0 12 273.0  276.50 29 26 26  26 22  29 46 70  16 292.0 298.0 296.0 t  320.0 3 6.3   12  70  68  nil 10  nil  8  3.2  nil))
     (300 . (460.0 410.0 26.0 12 323.9  327.50 32 28 28  28 24  32 46 78  16 344.0 350.0 350.0 t  378.0 4 7.1   14  78  68  nil 10  nil  10 4.0  nil))
     (350 . (520.0 470.0 26.0 16 355.6  359.00 35 30 30  30 26  35 57 82  16 390.0 400.0 410.0 t  438.0 4 8.0   18  82  68  nil 10  nil  10 4.0  nil))
     (400 . (580.0 525.0 30.0 16 406.4  411.00 38 32 32  32 28  38 63 85  16 445.0 456.0 458.0 t  490.0 4 8.0   20  85  72  nil 10  nil  12 4.0  nil))
     (450 . (640.0 585.0 30.0 20 457.0  462.50 42 34 40  40 30  42 68 83  16 490.0 502.0 516.0 t  550.0 4 8.0   22  87  nil nil 10  nil  12 nil  nil))
     (500 . (715.0 650.0 33.0 20 508.0  513.50 46 36 44  44 32  46 73 84  16 548.0 559.0 576.0 t  610.0 4 8.0   22  90  nil nil nil nil  12 nil  nil))
     (600 . (840.0 770.0 36.0 20 610.0  616.50 55 40 54  54 32  55 83 88  18 670.0 658.0 690.0 t  725.0 5 10.0  24  95  nil nil nil nil  12 nil  nil))
     (700 . (910.0 840.0 36.0 24 711.0  711.0  63 40 nil 58 nil 63 83 104 18 755.0 760.0 760.0 t  795.0 5 10.0  26  100 nil nil nil nil  14 nil  nil)); b1
     (800 . (1025  950.0 39.0 24 813.0  813.00 74 41 nil 62 nil 74 90 108 20 855.0 864.0 862.0 t  900.0 5 12.5  28  105 nil nil nil nil  16 nil  nil)); b1

     (900 . (1125 1050.0 39.0 28 914.0  914.00 82 48 nil 64 nil 82 94 118 20 955.0 968    962  t  1000  5 12.5  30  110 nil nil nil nil  18 nil  nil))
    (1000 . (1255 1170.0 42.0 28 1016   1016   90 59 nil 68 nil 90 100 137 22 1058 1072   1076 t  1115  5 12.5  35  110 nil nil nil nil  18 nil  nil))
    (1200 . (1485 1390.0 48.0 32 1219   1219  100 78 nil nil nil 100 nil 160 30 1262 nil  1282 t  1330  5 14.2 nil  110 nil nil nil nil nil nil  nil))
    (1400 . (1685 1590.0 48.0 36 1422   1422  110 84 nil nil nil 110 nil 177 30 1465 nil  1482 t  1530  5 16.0 nil  110 nil nil nil nil nil nil  nil))
    (1600 . (1930 1820.0 56.0 40 1626   1626  120 102 nil nil nil 120 nil 204 35 1668 nil 1696 t  1750  5 17.5 nil  110 nil nil nil nil nil nil  nil))
    (1800 . (2130 2020.0 56.0 44 1829   1829  130 110 nil nil nil 130 nil 218 35 1870 nil 1896 t  1950  5 20.0 nil  110 nil nil nil nil nil nil  nil))
    (2000 . (2345 2230.0 62.0 48 2032   2032  140 124 nil nil nil 140 nil 238 40 2072 nil 2100 t  2150  5 22.0 nil  110 nil nil nil nil nil nil  nil))
   )
 )
)

((= PN_brd "PN25")
 (setq PN25
   '(

     ;;                                                       F32  c1                                            20 21   22   H4  H4  25 26  27  28   29  30   
     ;;;;    D     K     L    nb  A     B1     c1  c2  c3  c4  c5  c6 h1  h2  h3   N1    N2    N3    B6     d1   f1 s11  F35  35  36  h5 F36 F37 s35 s36 s37 
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14  16  16  16  12  14 22  35  6    28.0  30.0  28.0  6.10   40.0  2 2.0  5    35 nil nil nil nil 3))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14  16  16  16  12  14 22  38  6    32.0  35.0  32.0  12.70  45.0  2 2.0  5    38 nil nil nil nil 3))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16  18  18  18  14  16 26  40  6    40.0  45.0  40.0  19.00  58.0  2 2.3  6    40 nil nil nil nil 3))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16  18  18  18  14  16 28  40  6    46.0  52.0  50.0  25.40  68.0  2 2.6  7    40 nil nil nil nil 3))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18  18  18  18  14  18 30  42  6    56.0  60.0  60.0  31.80  78.0  2 2.6  8    42 nil nil nil nil 3))
     (40 .  (150.0 110.0 18.0 4  48.30  49.50  18  18  18  18  14  18 32  45  7    64.0  70.0  70.0  38.00  88.0  3 2.6  8    45 nil nil nil nil 3))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20  20  20  20  16  20 34  48  8    75.0  84.0  84.0  50.80  102.0 3 2.9  10   48 nil nil nil nil 4))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  22  22  22  22  16  22 38  52  10   90.0 104.0 104.0  63.50  122.0 3 2.9  11   52 nil nil nil nil 5))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  24  24  24  24  18  24 40  58  12  105.0 118.0 120.0  76.20  138.0 3 3.2  12   58 nil nil nil nil 6))
     (100 . (235.0 190.0 22.0 8  114.3  116.00 26  24  24  24  20  26 44  65  12  134.0 145.0 142.0 101.60  162.0 3 3.6  14   65 nil nil nil nil 6))
     (125 . (270.0 220.0 26.0 8  139.7  141.50 28  26  26  26  22  28 48  68  12  162.0 170.0 162.0 127.00  188.0 3 4.0  16   68 nil nil nil nil 6))
     (150 . (300.0 250.0 26.0 8  168.3  170.50 30  28  28  28  24  30 52  75  12  192.0 200.0 192.0 152.40  218.0 3 4.5  18   75 nil nil nil nil 8))
     (200 . (360.0 310.0 26.0 12 219.1  221.50 32  30  30  30  26  32 52  80  16  244.0 256.0 252.0 203.20  278.0 3 6.3  18   80 nil nil nil nil 8))
     (250 . (425.0 370.0 30.0 12 273.0  276.50 35  32  32  32  26  35 60  88  18  298.0 310.0 304.0 254.00  335.0 3 7.1  18   88 nil nil nil nil 10))
     (300 . (485.0 430.0 30.0 16 323.9  327.50 38  34  34  34  28  38 67  92  18  352.0 364.0 364.0 304.80  395.0 4 8.0  20   92 nil nil nil nil 10))
     (350 . (555.0 490.0 33.0 16 355.6  359.50 42  38  38  38  32  42 72  100 20  398.0 418.0 418.0 355.60  450.0 4 8.0  22  100 nil nil nil nil 12))
     (400 . (620.0 550.0 36.0 16 406.4  411.00 48  40  40  40  34  48 78  110 20  452.0 472.0 472.0 406.40  505.0 4 8.8  24  110 nil nil nil nil 14))
     (450 . (670.0 600.0 36.0 20 457.0  462.00 54  46  46  50  36  54 84  110 20  500.0 520.0 520.0 457.20  555.0 4 8.8  26  110 nil nil nil nil 15))
     (500 . (730.0 660.0 36.0 20 508.0  513.50 58  48  48  51  38  58 90  125 20  558.0 580.0 580.0 508.00  615.0 4 10.0 28  125 nil nil nil nil 16))
     (600 . (845.0 770.0 39.0 20 610.0  616.50 68  48  58  66  40  68 100 125 20  660.0 684.0 684.0 609.60  720.0 5 11.0 30  115 nil nil nil nil 18))
     (700 . (960.0 875.0 42.0 24 711.0  714.00 85  50  nil nil nil 85 nil 129 20  760.0 nil   780.0 nil     820.0 5 14.2 30  125 nil nil nil nil 20))
     (800 . (1085  990.0 48.0 24 813.0  816.00 95  53  nil nil nil 95 nil 138 22  864.0 nil   882.0 nil     930.0 5 16.0 35  135 nil nil nil nil 20))
     (900 . (1185  1090  48.0 28 914.0  nil   100  57  nil nil nil 95 nil 148 24  968.0 nil   982.0 nil     1030  5 17.5 nil nil nil nil nil nil nil))
    (1000 . (1320  1210  56.0 28 1016.0 nil   100  63  nil nil nil 95 nil 160 24  1070  nil   1086  nil     1140  5 20.0 nil nil nil nil nil nil nil))
   )
 )
)
((= PN_brd "PN40")
 (setq PN40                                                                                                 
   '(                                                       ;F  c1                                          21   22  H4  H4  25  26  27  28   
     ;;;;    D     K     L    nb  A     B1     c1  c2  c3 c4 c5 c6 h1  h2  h3  N1    N2    N3    B6 d1   f1 s11  F35 35  36  h5  F36 F37 s35
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14  16  16 16 12 16 22  35  6   28.0  30.0  28.0  t  40.0  2 1.8  5   35))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14  16  16 16 12 16 22  38  6   32.0  35.0  32.0  t  45.0  2 2.0  5   38))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16  18  18 18 14 16 26  40  6   40.0  45.0  40.0  t  58.0  2 2.3  6   40))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16  18  18 18 14 18 28  40  6   46.0  52.0  50.0  t  68.0  2 2.6  7   40))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18  18  18 18 14 18 30  42  6   56.0  60.0  60.0  t  78.0  2 2.6  8   42))
     (40 .  (150.0 110.0 18.0 4  48.30  49.00  18  18  18 18 14 18 32  45  7   64.0  70.0  70.0  t  88.0  3 2.6  8   45))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20  20  20 20 16 20 34  48  8   75.0  84.0  84.0  t  102.0 3 2.9  10  48))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  22  22  22 22 16 20 38  52  10  90.0  104.0 104.0 t  122.0 3 2.9  11  52))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  24  24  24 24 18 22 40  58  12  105.0 118.0 120.0 t  138.0 3 3.2  12  58))
     (100 . (235.0 190.0 22.0 8  114.30 116.00 26  24  24 24 20 22 44  65  12  134.0 145.0 142.0 t  162.0 3 3.6  14  65))
     (125 . (270.0 220.0 26.0 8  139.70 141.50 28  26  26 26 22 24 48  68  12  162.0 170.0 162.0 t  188.0 3 4.0  16  68))
     (150 . (300.0 250.0 26.0 8  168.30 170.50 30  28  28 28 22 24 52  75  12  192.0 200.0 192.0 t  218.0 3 4.5  18  75))
     (200 . (375.0 320.0 30.0 12 219.10 221.50 36  34  34 36 26 30 52  88  16  244.0 260.0 254.0 t  285.0 3 6.3  20  88))
     (250 . (450.0 385.0 33.0 12 273.00 276.50 42  38  38 38 30 36 60  105 18  306.0 312.0 312.0 t  345.0 3 7.1  22  105))
     (300 . (515.0 450.0 33.0 16 323.90 327.50 52  42  42 42 34 40 67  115 18  362.0 380.0 378.0 t  410.0 4 8.0  25  115))
     (350 . (580.0 510.0 36.0 16 355.60 359.50 58  46  46 46 38 46 72  125 20  408.0 424.0 432.0 t  465.0 4 8.8  28  125))
     (400 . (660.0 585.0 39.0 16 406.40 411.00 65  50  50 50 42 50 78  135 20  462.0 478.0 498.0 t  535.0 4 11.0 32  135))

     (450 . (685.0 610.0 39.0 20 457.00 462.00 75  57  57 57 46 75 84  135 20  500.0 522.0 522.0 t  560.0 4 12.5 nil nil))
     (500 . (755.0 670.0 42.0 20 508.00 513.50 85  57  57 57 50 85 90  140 20  562.0 576.0 576.0 t  615.0 4 14.2 nil nil))
     (600 . (890.0 795.0 48.0 20 610.00 610.50 95  72  72 72 54 95 100 150 20  666.0 686.0 686.0 t  735.0 5 16.0 nil nil))
   
   )
 )
)
((= PN_brd "PN50")
 (setq PN50
   '(
     ;;;;    D     K       L    nb  A     B1     c1  c2   c3  c4  c5  c6  h1  h2  h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (95.0  66.70  15.80 4  21.30  22.40  nil 14.2 nil nil nil nil 22  52  6.4 38.0  nil nil 12.70  34.90  1.6 2.6 ))
     (20 .  (117.0 82.60  19.00 4  26.90  27.70  nil 15.7 nil nil nil nil 25  57  6.4 48.0  nil nil 19.00  42.90  1.6 2.9 ))
     (25 .  (124.0 88.90  19.00 4  33.70  34.50  nil 17.5 nil nil nil nil 27  62  6.4 54.0  nil nil 25.40  50.80  1.6 3.2 ))
     (32 .  (133.0 98.40  19.00 4  42.40  43.20  nil 19.0 nil nil nil nil 27  65  6.4 63.0  nil nil 31.80  63.50  1.6 3.6 ))
     (40 .  (156.0 114.30 22.20 4  48.30  49.50  nil 20.6 nil nil nil nil 30  68  6.4 70.0  nil nil 38.00  73.00  1.6 3.6 ))
     (50 .  (165.0 127.00 19.00 8  60.30  62.00  nil 22.4 nil nil nil nil 33  70  6.4 84.0  nil nil 50.80  92.10  1.6 4.0 ))
     (65 .  (190.0 149.20 22.20 8  76.10  77.80  nil 25.4 nil nil nil nil 38  76  6.4 100.0 nil nil 63.50  104.80 1.6 4.5 ))
     (80 .  (210.0 168.30 22.20 8  88.90  90.70  nil 28.4 nil nil nil nil 43  79  6.4 117.0 nil nil 76.20  127.00 1.6 5.0 ))
     (100 . (254.0 200.00 22.20 8  114.30 116.10 nil 31.8 nil nil nil nil 48  86  6.4 146.0 nil nil 101.60 157.20 1.6 5.6 ))
     (125 . (279.0 235.00 22.20 8  139.70 142.20 nil 35.0 nil nil nil nil 51  98  6.4 178.0 nil nil 127.00 185.70 1.6 6.3 ))
     (150 . (318.0 269.90 22.20 12 168.30 170.70 nil 36.6 nil nil nil nil 52  98  6.4 206.0 nil nil 152.40 215.90 1.6 7.1 ))
     (200 . (381.0 330.20 25.40 12 219.10 221.50 nil 41.1 nil nil nil nil 62  111 6.4 260.0 nil nil 203.20 269.90 1.6 8.0 ))
     (250 . (444.0 387.40 28.50 16 273.00 276.40 nil 47.8 nil nil nil nil 66  117 6.4 320.0 nil nil 254.00 323.80 1.6 8.8 ))
     (300 . (521.0 450.80 31.80 16 323.90 327.20 nil 50.8 nil nil nil nil 73  130 6.4 375.0 nil nil 304.80 381.00 1.6 10.0 ))
     (350 . (584.0 514.40 31.80 20 355.60 359.20 nil 53.8 nil nil nil nil 76  143 6.4 425.0 nil nil 355.60 412.80 1.6 11.0 ))
     (400 . (648.0 571.50 35.00 20 406.40 410.50 nil 57.2 nil nil nil nil 83  146 6.4 483.0 nil nil 406.40 469.90 1.6 12.5 ))
     (450 . (711.0 628.60 35.00 24 457.00 461.80 nil 60.5 nil nil nil nil 89  159 6.4 533.0 nil nil 457.20 533.40 1.6 14.2 ))
     (500 . (775.0 685.80 35.00 24 508.00 513.10 nil 63.5 nil nil nil nil 95  162 6.4 587.0 nil nil 508.00 584.20 1.6 16.0 ))
     (600 . (914.0 812.80 41.10 24 610.00 616.00 nil 69.9 nil nil nil nil 106 168 6.4 701.0 nil nil 609.60 692.20 1.6 17.5 ))
   )
 )
)
((= PN_brd "PN100")
 (setq PN100
   '(
     ;;;;    D     K       L    nb  A     B1     c1  c2    c3  c4  c5  c6  h1  h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (95.0  66.70  15.80 4  21.30  22.40  nil 14.2  nil nil nil nil 22  58.40  6.4 38.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (117.0 82.60  19.00 4  26.90  27.70  nil 15.7  nil nil nil nil 25  63.40  6.4 48.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (124.0 88.90  19.00 4  33.70  34.50  nil 17.5  nil nil nil nil 27  68.40  6.4 54.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (133.0 98.40  19.00 4  42.40  43.20  nil 20.6  nil nil nil nil 29  73.40  6.4 64.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (156.0 114.30 22.20 4  48.30  49.50  nil 22.4  nil nil nil nil 32  76.40  6.4 70.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (165.0 127.00 19.00 8  60.30  62.00  nil 25.4  nil nil nil nil 37  79.40  6.4 84.0  nil nil 50.80  92.10  6.4 nil ))
     (65 .  (190.0 149.20 22.20 8  76.10  77.80  nil 28.4  nil nil nil nil 41  85.40  6.4 100.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (210.0 168.30 22.20 8  88.90  90.70  nil 31.8  nil nil nil nil 46  89.40  6.4 118.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (273.0 215.90 25.40 8  114.30 116.10 nil 38.1  nil nil nil nil 54  108.40 6.4 152.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (330.0 266.70 28.50 8  139.70 142.20 nil 44.5  nil nil nil nil 60  120.40 6.4 189.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (356.0 292.10 28.50 12 168.30 170.70 nil 47.8  nil nil nil nil 67  123.40 6.4 222.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (419.0 349.20 31.80 12 219.10 221.50 nil 55.6  nil nil nil nil 76  139.40 6.4 273.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (508.0 431.80 35.00 16 273.00 276.40 nil 63.5  nil nil nil nil 86  158.40 6.4 343.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (559.0 489.00 35.00 20 323.90 327.20 nil 66.5  nil nil nil nil 92  162.40 6.4 400.0 nil nil 304.80 381.00 6.4 nil ))
     (350 . (603.0 527.00 38.10 20 355.60 359.20 nil 69.9  nil nil nil nil 94  171.40 6.4 432.0 nil nil 355.60 412.80 6.4 nil ))
     (400 . (686.0 603.20 41.10 20 406.40 410.50 nil 76.2  nil nil nil nil 106 184.40 6.4 495.0 nil nil 406.40 469.90 6.4 nil ))
     (450 . (743.0 654.00 44.50 20 457.00 461.80 nil 82.6  nil nil nil nil 117 190.40 6.4 546.0 nil nil 457.20 533.40 6.4 nil ))
     (500 . (813.0 723.90 44.50 24 508.00 513.10 nil 88.9  nil nil nil nil 127 196.40 6.4 610.0 nil nil 508.00 584.20 6.4 nil ))
     (600 . (940.0 838.20 50.80 24 610.00 616.00 nil 101.6 nil nil nil nil 140 209.40 6.4 718.0 nil nil 609.60 692.20 6.4 nil ))
   )
 )
)
((= PN_brd "PN150")
 (setq PN150
   '(
     ;;;;    D      K       L    nb  A     B1     c1  c2    c3  c4  c5  c6  h1  h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (121.0  82.60  22.20 4  21.30  22.40  nil 22.4  nil nil nil nil 32  66.40  6.4 38.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (130.0  88.90  22.20 4  26.90  27.70  nil 25.4  nil nil nil nil 35  76.40  6.4 44.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (149.0  101.60 25.40 4  33.70  34.50  nil 28.4  nil nil nil nil 41  79.40  6.4 52.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (159.0  111.10 25.40 4  42.40  43.20  nil 28.4  nil nil nil nil 41  79.40  6.4 63.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (178.0  123.80 28.50 4  48.30  49.50  nil 31.8  nil nil nil nil 44  89.40  6.4 70.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (216.0  165.10 25.40 8  60.30  62.00  nil 38.1  nil nil nil nil 57  108.40 6.4 105.0 nil nil 50.80  92.10  6.4 nil ))
     (65 .  (244.0  190.50 28.50 8  76.10  77.80  nil 41.1  nil nil nil nil 63  111.40 6.4 124.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (241.0  190.50 25.40 8  88.90  90.70  nil 38.1  nil nil nil nil 54  108.40 6.4 127.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (292.0  235.00 31.80 8  114.30 116.10 nil 44.5  nil nil nil nil 70  120.40 6.4 159.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (349.0  279.40 35.00 8  139.70 142.20 nil 50.8  nil nil nil nil 79  133.40 6.4 190.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (381.0  317.50 31.80 12 168.30 170.70 nil 55.6  nil nil nil nil 86  146.40 6.4 235.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (470.0  393.70 38.10 12 219.10 221.50 nil 63.5  nil nil nil nil 102 168.40 6.4 298.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (546.0  469.90 38.10 16 273.00 276.40 nil 69.9  nil nil nil nil 108 190.40 6.4 368.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (610.0  533.40 38.10 20 323.90 327.20 nil 79.2  nil nil nil nil 117 206.40 6.4 419.0 nil nil 304.80 381.00 6.4 nil ))
     (350 . (641.0  558.80 41.10 20 355.60 359.20 nil 85.9  nil nil nil nil 130 219.40 6.4 451.0 nil nil 355.60 412.80 6.4 nil ))
     (400 . (705.0  616.00 44.50 20 406.40 410.50 nil 88.9  nil nil nil nil 133 222.40 6.4 508.0 nil nil 406.40 469.90 6.4 nil ))
     (450 . (787.0  685.80 50.80 20 457.00 461.80 nil 101.6 nil nil nil nil 152 235.40 6.4 565.0 nil nil 457.20 533.40 6.4 nil ))
     (500 . (857.0  749.30 53.80 20 508.00 513.10 nil 108.0 nil nil nil nil 159 254.40 6.4 622.0 nil nil 508.00 584.20 6.4 nil ))
     (600 . (1041.0 901.70 66.50 20 610.00 616.00 nil 139.7 nil nil nil nil 203 298.40 6.4 749.0 nil nil 609.60 692.20 6.4 nil ))
   )
 )
)
((= PN_brd "PN250")
 (setq PN250
   '(
     ;;;;    D      K       L    nb  A     B1     c1 c2    c3  c4  c5  c6  h1 h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (121.0  82.60  22.20 4  21.30  22.40 nil 22.4  nil nil nil nil 32 66.40  6.4 38.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (130.0  88.90  22.20 4  26.90  27.70 nil 25.4  nil nil nil nil 35 76.40  6.4 44.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (149.0  101.60 25.40 4  33.70  34.50 nil 28.4  nil nil nil nil 41 79.40  6.4 52.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (159.0  111.10 25.40 4  42.40  43.20 nil 28.4  nil nil nil nil 41 79.40  6.4 63.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (178.0  123.80 28.50 4  48.30  49.50 nil 31.8  nil nil nil nil 44 89.40  6.4 70.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (216.0  165.10 25.40 8  60.30  62.00 nil 38.1  nil nil nil nil 57 108.40 6.4 105.0 nil nil 50.80  92.10  6.4 nil ))
     (65 .  (244.0  190.50 28.50 8  76.10  77.80 nil 41.1  nil nil nil nil 63 111.40 6.4 124.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (267.0  203.20 31.80 8  88.90  0     nil 47.8  nil nil nil nil 0  124.40 6.4 133.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (311.0  241.30 35.00 8 114.30  0     nil 53.8  nil nil nil nil 0  130.40 6.4 162.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (375.0  292.10 41.10 8 139.70  0     nil 73.2  nil nil nil nil 0  161.40 6.4 197.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (394.0  317.50 38.10 12 168.30 0     nil 82.6  nil nil nil nil 0  177.40 6.4 229.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (483.0  393.70 44.50 12 219.10 0     nil 91.9  nil nil nil nil 0  219.40 6.4 292.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (584.0  482.60 50.80 12 273.00 0     nil 108.0 nil nil nil nil 0  260.40 6.4 368.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (673.0  571.50 53.80 16 323.90 0     nil 124.0 nil nil nil nil 0  289.40 6.4 451.0 nil nil 304.80 381.00 6.4 nil ))
     (350 . (749.0  635.00 60.50 16 355.60 0     nil 133.4 nil nil nil nil 0  304.40 6.4 495.0 nil nil 355.60 412.80 6.4 nil ))
     (400 . (826.0  704.80 66.50 16 406.40 0     nil 146.0 nil nil nil nil 0  317.40 6.4 552.0 nil nil 406.40 469.90 6.4 nil ))
     (450 . (914.0  774.70 73.20 16 457.00 0     nil 162.0 nil nil nil nil 0  333.40 6.4 597.0 nil nil 457.20 533.40 6.4 nil ))
     (500 . (984.0  831.80 79.20 16 508.00 0     nil 177.6 nil nil nil nil 0  362.40 6.4 641.0 nil nil 508.00 584.20 6.4 nil ))
     (600 . (1168.0 990.60 91.90 16 610.00 0     nil 203.2 nil nil nil nil 0  412.40 6.4 762.0 nil nil 609.60 692.20 6.4 nil ))
   )
 )
)
((= PN_brd "PN420")
 (setq PN420
   '(
     ;;;;    D     K       L    nb  A     B1  c1  c2    c3  c4  c5  c6  h1  h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (133.0 88.90  22.20 4  21.30  nil nil 30.2  nil nil nil nil nil 79.40  6.4 43.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (140.0 95.30  22.20 4  26.90  nil nil 31.8  nil nil nil nil nil 85.40  6.4 51.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (159.0 108.00 25.40 4  33.70  nil nil 35.0  nil nil nil nil nil 95.40  6.4 57.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (184.0 130.00 28.50 4  42.40  nil nil 38.1  nil nil nil nil nil 101.40 6.4 73.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (203.0 146.00 31.80 4  48.30  nil nil 44.5  nil nil nil nil nil 117.40 6.4 79.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (235.0 171.50 28.50 8  60.30  nil nil 50.8  nil nil nil nil nil 133.40 6.4 95.0  nil nil 50.80  92.10  6.4 nil ))
     (65 .  (267.0 196.90 31.80 8  76.10  nil nil 57.2  nil nil nil nil nil 149.60 6.4 114.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (305.0 228.60 35.00 8  88.90  nil nil 66.5  nil nil nil nil nil 174.40 6.4 133.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (356.0 273.00 41.10 8  114.30 nil nil 76.2  nil nil nil nil nil 196.40 6.4 165.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (419.0 323.90 47.80 8  139.70 nil nil 91.9  nil nil nil nil nil 235.40 6.4 203.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (483.0 368.30 53.80 8  168.30 nil nil 108.0 nil nil nil nil nil 279.40 6.4 235.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (552.0 438.20 53.80 12 219.10 nil nil 127.0 nil nil nil nil nil 323.40 6.4 305.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (673.0 539.80 66.50 12 273.00 nil nil 165.1 nil nil nil nil nil 425.40 6.4 375.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (762.0 619.30 73.20 12 323.90 nil nil 184.2 nil nil nil nil nil 470.40 6.4 441.0 nil nil 304.80 381.00 6.4 nil ))
   )
  )
 )
) 
 
 (setq l_data (eval (read PN_brd))) 
 (setq l_str nil)
 (initget 1 (apply 'strcat (mapcar 'strcat (repeat (length l_data) (setq l_str (cons "DN" l_str))) (mapcar 'itoa (mapcar 'car l_data)) (repeat (length l_data) (setq l_str (cons " " l_str))))))
 (setq l_str nil)
 (setq model_brd (getkword (strcat "\nDiamètre Nominal ["
       (apply 'strcat (mapcar 'strcat (repeat (length l_data) (setq l_str (cons "DN" l_str))) (mapcar 'itoa (mapcar 'car l_data)) (repeat (length l_data) (setq l_str (cons "/" l_str)))))
   "]?: "))
 )
 
 
 (setq l_val (cdr (assoc (atoi (substr model_brd 3)) l_data)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
 
 (initget 1 "PLATE TOURNANTE COLLERETTE SLIP-ON LWN TAMPON")
 (setq typ_brd (getkword "\nType de bride [PLATE/TAMPON/TOURNANTE/COLLERETTE/SLIP-ON]?: "))
; (setq typ_brd (getkword "\nType de bride [PLATE/TOURNANTE/COLLERETTE/SLIP-ON/LWN]?: "))
 
 (cond
   ((eq typ_brd "TAMPON")   ;;;; type 05
     (setq e1 (* (nth 9 l_val) unit_draw))
     (if (not ep:joint) (setq ep:joint 3))  
     (setq joint (getdist (strcat "\n   Entrer l'épaisseur de joint <"(rtos ep:joint)"> :")))
     (if (not joint) (setq joint ep:joint))
   ) 
   ((eq typ_brd "PLATE")   ;;;; type 01
     (if (and (nth 5 l_val) (nth 6 l_val))
       (setq e1 (- (* (nth 6 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
     )
   )
   ((eq typ_brd "COLLERETTE")  ;;;; type 11
     (cond
       ((or (nth 7 l_val) (nth 8 l_val))
         (if (nth 7 l_val)
           (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
           (setq e1 (- (* (nth 8 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
         )
         (if (member PN_brd '("PN100" "PN150" "PN250" "PN420"))              
           (setq e1 (+ (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
         )
          
         (if (nth 21 l_val)
           (setq j (* (nth 21 l_val) unit_draw))
           (progn
             (setq j (* 0.5 (nth 4 l_val) unit_draw))
             (while (>= j (* 0.5 (nth 4 l_val) unit_draw))
               (initget 1)
               (setq j (getdist "\nEntrer l'épaisseur du talon :"))
             )
           )
         )
         
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (* 0.5 (nth 15 l_val) unit_draw))
         (setq
           d1 (- (* (nth 13 l_val) unit_draw) (+ e1 (* (nth 20 l_val) unit_draw) (* (nth 14 l_val) unit_draw)))
           d2 (- (* 0.5 (nth 15 l_val) unit_draw) (* 0.5 (nth 4 l_val) unit_draw))
         )
         (command "_.extrude" (entlast) "" "_taper" (angtos (atan (/ d2 d1)) (getvar "AUNITS") 12) d1)
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 d1 (* (nth 20 l_val) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw))
         (command "_.extrude" (entlast) "" (* (nth 14 l_val) unit_draw))
         (command "_.union" js_add (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (- (* 0.5 (nth 4 l_val) unit_draw) j))
         (command "_.extrude" (entlast) "" (+ d1 (* (nth 14 l_val) unit_draw)))
         (command "_.subtract" js_add "" (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))
       )
     )
   )

 
   ((eq typ_brd "TOURNANTE")
     (cond
       ((nth 10 l_val)  ;; (and (nth 10 l_val)) 
 
  (cond
    ((or (= PN_brd "PN25")(= PN_brd "PN40"))
            (initget "32 35 34")
            (setq typ_collet (getkword "\nType de collets [32/35/34]?: "))
    )
    ((or (= PN_brd "PN10")(= PN_brd "PN16"))
            (initget "32 35 36 37 34")
            (setq typ_collet (getkword "\nType de collets [32/35/36/37/34]?: "))
    )
    (t                                
            (initget "32 35 36 37")
            (setq typ_collet (getkword "\nType de collets [32/35/36/37]?: "))  ;; PN6
    )
  )
         (setq e1 (* (nth 6 l_val) unit_draw))
         (cond  
           ((eq typ_collet "34") 
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 10 l_val) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw))
             (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) (* (nth 10 l_val) unit_draw) e1))
             ;;;;;;;;;;;;;;;;;;;;;  modif alésage collet 09-01-09  
             (setq js_add (ssadd (entlast) js_add))               
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 10 l_val) unit_draw)))(- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 21 l_val) unit_draw) ))  ;; talon
             (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) (* (nth 10 l_val) unit_draw) e1))
             (command "_.subtract" js_add "" (entlast) "")             
             ;;;;;;;;;;;;;;;;;;;;    
           )
    
     ;;;;  e1 -> epaisseur bride hors portée de joint
     ;;;;    0   1   2  3   4  5   6  7  8   9   F  c1 12 13  14 15  16  17  18  19 20 21   22   H4  H4  25  26  27  28  29  30 
     ;;;;    D   K   L  nb  A  B1  c1 c2 c3  c4 c5  c6 h1 h2  h3 N1  N2  N3  B6  d1 f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37 
    
           ((or (eq typ_collet "35") (eq typ_collet "36") (eq typ_collet "37"))  ;; concerne la partie tubulaire du collet
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins)
		(+ e1 (* (cond ((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val))) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw)
      )
             (command "_.extrude" (entlast) "" (- (* (cond ((eq typ_collet "35") (nth 23 l_val)) ((eq typ_collet "36") (nth 24 l_val)) ((eq typ_collet "37") (nth 25 l_val))) unit_draw)
					   (* (cond ((eq typ_collet "35") (nth 22 l_val)) ((eq typ_collet "36") (nth 26 l_val)) ((eq typ_collet "37") (nth 27 l_val))) unit_draw) e1)
      )
             ;;;;;;;;;;;;;;;;;;;;;  alésage collet  
             (setq js_add (ssadd (entlast) js_add))               
             (command "_.circle" "_none"
	 (list (car pt_ins) (cadr pt_ins) (+ e1 (* (cond ((eq typ_collet "35")(nth 22 l_val)) ((eq typ_collet "36")(nth 26 l_val)) ((eq typ_collet "37")(nth 27 l_val))) unit_draw)))
	     (- (* 0.5 (nth 4 l_val) unit_draw) (* (cond ((eq typ_collet "35")(nth 28 l_val)) ((eq typ_collet "36")(nth 29 l_val)) ((eq typ_collet "37")(nth 30 l_val))) unit_draw))
      )   
             (command "_.extrude" (entlast) "" (- (* (cond ((eq typ_collet "35")(nth 23 l_val))((eq typ_collet "36")(nth 24 l_val))((eq typ_collet "37")(nth 25 l_val))) unit_draw)
					   (* (cond ((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val))) unit_draw) e1)
      )
             (command "_.subtract" js_add "" (entlast) "")             
             ;;;;;;;;;;;;;;;;;;;;    
           )

    
         )
       )
      ; ((nth 10 l_val)                                       
       ;  (setq e1 (* (nth 11 l_val) unit_draw))   
      ; )
     )
   )
   ((eq typ_brd "SLIP-ON")  ;;;  type 12
     (if (nth 12 l_val)
       (progn
         (if (not (nth 7 l_val))
           (setq e1 (- (* (nth 8 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
           (if (member PN_brd '("PN100" "PN150" "PN250" "PN420"))
             (setq e1 (* (nth 7 l_val) unit_draw))
             (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
           )
         )
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (if (not (nth 16 l_val)) (* 0.5 (nth 15 l_val) unit_draw) (* 0.5 (nth 16 l_val) unit_draw)))
         (command "_.extrude" (entlast) "" (- (* (nth 12 l_val) unit_draw) e1))
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (* 0.5 (nth 5 l_val) unit_draw))
         (command "_.extrude" (entlast) "" (- (* (nth 12 l_val) unit_draw) e1))
         (command "_.subtract" js_add "" (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))
       )
     )
   )
   ((eq typ_brd "LWN") ;;; type 21
     (if (member PN_brd '("PN100" "PN150" "PN250" "PN420"))
       (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
     )
     (if (and (not (nth 7 l_val)) (nth 8 l_val))
       (setq e1 (- (* (nth 8 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
       (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
     )
     (if (nth 18 l_val) ;; valeur --> (- (nth 4 l_val) (* 2 (nth 21 l_val)))
       (progn
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (if (not (nth 17 l_val)) (* 0.5 (nth 15 l_val) unit_draw) (* 0.5 (nth 17 l_val) unit_draw)))
         (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) e1))
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (* 0.5 (- (nth 4 l_val) (* 2 (nth 21 l_val)))  unit_draw))
         (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) e1))
         (command "_.subtract" js_add "" (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))
       )
     )
   )
 )
 
     ;;;;  e1 -> epaisseur bride hors portée de joint
     ;;;;    0   1   2  3   4  5   6  7  8   9   F  c1 12 13  14 15  16  17  18  19 20 21   22   H4  H4  25  26  27  28  29  30 
     ;;;;    D   K   L  nb  A  B1  c1 c2 c3  c4 c5  c6 h1 h2  h3 N1  N2  N3  B6  d1 f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37 

 (if e1
   (progn
    (if (not (eq typ_brd "TAMPON"))
     (progn 
     ;;; d1 (19) portee de joint ; F (10) ou f1 (20) hauteur
     (command "_.circle" "_none" pt_ins (* (nth 19 l_val) 0.5 unit_draw))
     (command "_.extrude" (entlast) ""
       (+ e1
	(if (eq typ_brd "TOURNANTE")
	  (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
	    unit_draw)
	  (* (nth 20 l_val) unit_draw)
	)
       )
     )
     (setq js_add (ssadd (entlast) js_add))
     
     (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins)
(if (eq typ_brd "TOURNANTE")
  (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
     unit_draw)
  (* (nth 20 l_val) unit_draw))) (* (car l_val)	0.5 unit_draw)
     )
     (command "_.extrude" (entlast) "" e1)  ;;;;  e1 -> epaisseur bride hors portée de joint
     
     (command "_.union" js_add (entlast) "")
     (setq js_add (ssadd) js_add (ssadd (entlast) js_add))
     
     ;;;;;;; alésage bride ou collet
     (command "_.circle" "_none" pt_ins
      (cond
 ((eq typ_brd "LWN") (* 0.5 (- (nth 4 l_val) (* 2 (nth 21 l_val)))  unit_draw))
        ((eq typ_brd "COLLERETTE") (- (* 0.5 (nth 4 l_val) unit_draw) j))
 ((eq typ_collet "34")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 21 l_val) unit_draw)))
 ((eq typ_collet "35")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 28 l_val) unit_draw)))
 ((eq typ_collet "36")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 29 l_val) unit_draw)))
 ((eq typ_collet "37")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 30 l_val) unit_draw)))
        (t (* 0.5 (nth 4 l_val) unit_draw))

      )	       
     ;;;;  e1 -> epaisseur bride hors portée de joint
     ;;;;    0   1   2  3   4  5   6  7  8   9   F  c1 12 13  14 15  16  17  18  19 20 21   22   H4  H4  25  26  27  28  29  30 
     ;;;;    D   K   L  nb  A  B1  c1 c2 c3  c4 c5  c6 h1 h2  h3 N1  N2  N3  B6  d1 f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37	
     )
     (command "_.extrude" (entlast) ""
(+ e1 (if (eq typ_brd "TOURNANTE")
  	 (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
   unit_draw)
 (* (nth 20 l_val) unit_draw))
)
     )
     (setq js_remove (ssadd (entlast) js_remove))
     
     ;;; alesage complementaire pour bride sur collet "32" et "37"
      (if (or (eq typ_collet "32") (eq typ_collet "37"))
       (progn                                                                                                                                   ;; environ                                   
  (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (* (if (eq typ_collet "37")(nth 25 l_val) (nth 10 l_val)) unit_draw)) (* 0.5 (+ 5  (nth 4 l_val)) unit_draw))			    
  (command "_.extrude" (entlast) "" e1)
  (setq js_remove (ssadd (entlast) js_remove))
)  
      ); if
     
     ) ; progn      
     ;; si "TAMPON"
     (progn
(command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (* joint unit_draw)) (* (car l_val) 0.5 unit_draw))
(command "_.extrude" (entlast) "" e1) ;; e1 ayant la valeur c4
(setq js_add (ssadd) js_add (ssadd (entlast) js_add))
     ) 
    ) ; if
    
     ;; trous boulons 
     (command "_.circle" "_none"
       (polar (list (car pt_ins) (cadr pt_ins)
	 (cond
	   ((eq typ_brd "TOURNANTE")
	    (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
	       unit_draw))
	   ((eq typ_brd "TAMPON") (* joint unit_draw))
	   (t (* (nth 20 l_val) unit_draw))
	 )
	)		
	 (/ pi (cadddr l_val)) (* (cadr l_val) 0.5 unit_draw)
       )
       (* (caddr l_val) 0.5 unit_draw)
     )
     (command "_.extrude" (entlast) "" e1)
     (setq js_remove (ssadd (entlast) js_remove))
     (setq e_name (entlast))
     (command "_.array" (entlast) "" "_polar" "_none" pt_ins (cadddr l_val) "" "_yes")
     (while (setq e_name (entnext e_name)) (setq js_remove (ssadd e_name js_remove)))
     (command "_.subtract" js_add "" js_remove "")
     ;;; fin trous boulons
   )
   (princ "\nPas de valeur dans base données pour ce type de bride")
 )
 (if sv_dm (setvar "DYNMODE" sv_dm))
 
 ;(cond (pt_ins  (command "_ucs" "_p")  (setq pf nil)))
 (repeat 2 (command "_ucs" "_p"))
 
 (setvar "delobj" delobjet)
 (command "_undo" "_e")
 (setq *error* m:err m:err nil)
 (setvar "CMDECHO" 1)
 (prin1)
)









  • 3 ans après...
Posté(e)

Bonjour

Tête en l'air que je suis, c'est un oubli !

 


;;; BBRIDE.lsp insère ou crée puis insère des blocs de bride pour tuyauterie 3D
;;; avec attributs invisibles et prédéfinis selon la bride.
;;; ce lisp est une adaptation de BRIDE.lsp de Bonuscad
;;; Usegomme le 30-03-2010 
;;; 08/11/2010  orientation bride 8 trous et +
;;; 21/01/2011  gestion erreur et delobj     + scu

;; suivant norme NF E 29-203  1986 (périmée)

;; 31/03/2011 passage à la norme EN 1092-1:2007 jusqu' à PN40
;; 09/05/2012 scu dynamique utilisable, compléter tableau PN10  pour br plate dn700 à 1200
;; 31 07 2012 accepte "m2p" milieu entre 2 points.
;; 02 04 2015 ajouté chg calque->0 pour création bloc

(defun erreurbride (msg)
 (setvar "delobj" delobjet)
 (if sv_dm (setvar "DYNMODE" sv_dm))
 (setvar "CMDECHO" 1)
 (if (not (zerop (getvar "cmdactive")))(command))
 (command "_undo" "_e")
 (command "_u")
 (setq *error* m:err m:err nil)
 (princ "\nPas de valeur dans base données pour ce type de bride")
 (prin1)
)

(defun c:bbride ( / PN6 PN10 PN20 PN25 PN40 PN50 PN100 PN150 PN250 PN420
 sv_mnu typ_brd l_data l_str model_brd unit_key unit_draw l_val  pt_ins js_add js_remove e1
	 j d1 d2 typ_collet axebride PN_brd talon atdia af tsize st)
 
 (setq m:err *error* *error* erreurbride)
 
 (command "_undo" "_g")
 (setq delobjet (getvar "delobj"))
 (setvar "delobj" 2)
 (setvar "CMDECHO" 0)
 (setq  js_add (ssadd) js_remove (ssadd))
 (initget 1)
 ;(setq pt_ins (getpoint "\nPoint d'insertion?: ") js_add (ssadd) js_remove (ssadd))
 (prompt "\n Specifiez le point d'insertion")
 (command "_ucs" pause )
 
;; ligne ci-dessous pour "m2p" si problème mettre un ; devant pour la désactiver. 
(while (not (equal  (getvar "lastpoint") '(0.0 0.0 0.0) 0.01))(command pause))

 (command "")
 (setq pt_ins '(0. 0. 0.)) 
 ;; orientation bride 
 (prompt "\n Direction de la bride <>")
  (command "_ucs" "_zaxis" "" pause)

 (setq sv_dm (getvar "DYNMODE"))
    (cond ((< sv_dm 0) (setq dm (* sv_dm -1)) (setvar "DYNMODE" dm))
           (t (setq sv_dm nil dm nil))
    )

;; definition de l'unité de dessin , en cas d'erreur de choix réinitialisé "users5" via la ligne de commande
 
 (if (or (eq (getvar "USERS5") "") (not (eq (substr (getvar "USERS5") 1 2) "qz")))
   (progn
     
     (initget "ME CM MM")
     (if (not (setq unit_key (getkword "\nDessin réalisé en [ME/CM/MM] <MM>: ")))
       (setq unit_key "MM")
     )
     (cond
       ((eq unit_key "ME")
 (setq unit_draw 1000)
       )
       ((eq unit_key "CM")
 (setq unit_draw 10)
       )
       ((eq unit_key "MM")
         (setq unit_draw 1)
       )
     )
    
     (setvar "USERS5" (strcat "qz" (itoa unit_draw)))
     (setq unit_draw (/ 1.0 unit_draw))
       
   )
   
   (setq unit_draw (/ 1.0 (atoi (substr (getvar "USERS5") 3))))
   
 )
 
 (initget 1 "PN6 PN10 PN16 PN20 PN25 PN40 PN50 PN100 PN150 PN250 PN420")
 ;(setq PN_brd (getkword "\nType de bride [PN6/PN10/PN16/PN20/PN25/PN40/PN50/PN100/PN150/PN250/PN420]?: "))

 (setq PN_brd (getkword "\nType de bride [PN6/PN10/PN16/PN25/PN40]?: "))  ;; norme 2007 en cours de maj
 
 ;(setq matrice '(dn . (D K L nb A1 B1 c1 c2 c3 c4 c5 c6 h1 h2 h3 N1 N2 N3 B6 d1 f1 s )))
                     ; (0 1 2 3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20 21)
(cond
((= PN_brd "PN6") 
 (setq PN6
   '(
     ;;      0                                                F  c1                                 20 21  22   H4   H4  25  26  27  28   29  30  
     ;;;;    D     K     L    nb  A     B1     c1 c2  c3  c4  c5 c6 h1  h2 h3  N1  N2  N3  B6  d1   f1 s11 F35  35   36  h5  F36 F37 s35 s36  s37 
     
     (10 .  (75.0  50.0  11.0 4  17.20  18.00  12 12  12  12  10 10 20  28 6   26  25  20  nil 35.0  2 2   5    28   35  7   2   2.5  3   2    2))
     (15 .  (80.0  55.0  11.0 4  21.30  22.00  12 12  12  12  10 10 20  30 6   30  30  26  nil 40.0  2 2   5    30   38  7   2   2.5  3   2    2))
     (20 .  (90.0  65.0  11.0 4  26.90  27.50  14 14  14  14  10 10 24  32 6   38  40  34  nil 50.0  2 2.3 6    32   40  8   2.5 3    3  2.6   2))
     (25 .  (100.0 75.0  11.0 4  33.70  34.50  14 14  14  14  10 12 24  35 6   42  50  44  nil 60.0  2 2.6 7    35   40  10  2.5 3    3  2.6   2))
     (32 .  (120.0 90.0  14.0 4  42.40  43.50  16 16  14  14  10 12 26  35 6   55  60  54  nil 70.0  2 2.6 8    35   42  12  3   3    3  3.2   2))
     (40 .  (130.0 100.0 14.0 4  48.30  49.00  16 16  14  14  10 12 26  38 7   62  70  64  nil 80.0  3 2.6 8    38   45  15  3   3    3  3.2   2))
     (50 .  (140.0 110.0 14.0 4  60.30  61.50  16 16  14  14  12 12 28  38 8   74  80  74  nil 90.0  3 2.9 8    38   45  20  3   3    3  3.2   2))
     (65 .  (160.0 130.0 14.0 4  76.10  77.50  16 16  14  14  12 12 32  38 9   88  100 94  nil 110.0 3 2.9 8    38   45  20  3   3    4  3.2   2))
     (80 .  (190.0 150.0 18.0 4  88.90  90.50  18 18  16  16  12 14 34  42 10  102 110 110 nil 128.0 3 3.2 10   42   50  25  3   4    4  3.2   2))
     (100 . (210.0 170.0 18.0 4  114.30 116.00 18 18  16  16  14 14 40  45 10  130 130 130 nil 148.0 3 3.6 10   45   52  25  4   4    4  3.2   3.2))
     (125 . (240.0 200.0 18.0 8  139.70 141.50 20 20  18  18  14 14 44  48 10  155 160 160 nil 178.0 3 4   10   48   55  25  4   4    5   4    3.2))
     (150 . (265.0 225.0 18.0 8  168.30 170.50 20 20  18  18  14 14 44  48 12  184 185 182 nil 202.0 3 4.5 10   48   55  25  5   4    6   5    3.5))
     (200 . (320.0 280.0 18.0 8  219.10 221.50 22 22  20  20  16 16 44  55 15  236 240 238 nil 258.0 3 6.3 11   55   62  30  5   5    6   5    4.5))
     (250 . (375.0 335.0 18.0 12 273.00 276.50 24 24  22  22  18 20 44  60 15  290 295 284 nil 312.0 3 6.3 12   60   68  nil 8   nil  8   8    nil))
     (300 . (440.0 395.0 22.0 12 323.90 327.50 24 24  22  22  18 24 44  62 15  342 355 342 nil 365.0 4 7.1 12   62   68  nil 8   nil  8   8    nil))
     (350 . (490.0 445.0 22.0 12 355.60 359.50 26 26  22  22  18 26 nil 62 15  385 nil 392 nil 415.0 4 7.1 13   62   68  nil 8   nil  8   8    nil))
     (400 . (540.0 495.0 22.0 16 406.40 411.00 28 28  22  22  20 28 nil 65 15  438 nil 442 nil 465.0 4 7.1 14   65   72  nil 8   nil  8   8    nil))
     (450 . (595.0 550.0 22.0 16 457.00 462.00 30 30  22  24  20 30 nil 65 15  492 nil 494 nil 520.0 4 7.1 15   72   72  nil 8   nil  8   8    nil))
     
     (500 . (645.0 600.0 22.0 20 508.00 513.50 30 24  24  24  22 32 nil 68 15  538 nil 544 nil 570.0   4 7.1 16  75  75  nil 8))
     (600 . (755.0 705.0 26.0 20 610.00 616.50 32 30  30  30  22 36 nil 70 16  640 nil 642 nil 670.0   5 7.1 16  70 ))
     (700 . (860.0 810.0 26.0 24 711.00 717.00 40 30  30  40  nil 36 nil 76 16  740 nil 746 nil 775    5 8.0 16  70 ))
     (800 . (975.0 920.0 30.0 24 813.00 819.00 40 30  30  44  nil 36 nil 76 16  842 nil 850 nil 880    5 8.0 16  70 ))
     (900 . (1075  1020  30.0 24 914.00 920.00 48 34  34  48  nil 36 nil 78 16  942 nil 950 nil  980   5 8.0 16  70 ))
     (1000 . (1175 1120  30.0 28 1016   1022   52 38  38  52  nil 36 nil 82 16  1045 nil 1050 nil 1080 5 8.0 18  70 ))
     (1200 . (1405 1340  33.0 32 1219   1025   60 42  42  60  nil 36 nil 104 20 1248 nil 1264 nil 1295 5 8.8 20  90 ))
     (1400 . (1630 1560  36.0 36 1422   1428   72 56  56  68  nil 36 nil 114 20 1452 nil 1480 nil 1510 5 8.8 nil nil ))
     (1600 . (1830 1760  36.0 40 1626   1632   80 63  63  76  nil 36 nil 119 20 1655 nil 1680 nil 1710 5 10.0 nil nil ))
     (1800 . (2045 1970  39.0 44 1829   1835   88 69  69  84  nil 36 nil 133 20 1855 nil 1878 nil 1920 5 11.0 nil nil ))
     (2000 . (2265 2180  42.0 48 2032   2038   96 74  74  92  nil 36 nil 146 25 2058 nil 2082 nil 2125 5 12.5 nil nil ))

   )
 )
)
((= PN_brd "PN10")
 (setq PN10
   '(
     ;;      0                                            F32 c1                                    20 21  22   H4   H4  25  26  27  28   29  30  
     ;;;;    D     K      L   nb  A     B1     c1 c2 c3 c4 c5 c6 h1 h2 h3 N1    N2    N3   B6  d1   f1 s11 F35  35   36  h5  F36 F37 s35 s36  s37 
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14 16 16 16 12 14 22 35 6  28.0  30.0  28.0  t  40.0  2 2.0 5    35   35  7   2  2.5  3   2    2))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14 16 16 16 12 14 22 35 6  32.0  35.0  32.0  t  45.0  2 2.0 5    38   38  7   2  2.5  3   2    2))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16 18 18 18 14 16 26 40 6  40.0  45.0  40.0  t  58.0  2 2.3 6    40   40  8  2.5   3  3   2.6  2))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16 18 18 18 14 16 26 40 6  46.0  52.0  50.0  t  68.0  2 2.6 7    40   40  10 2.5   3  3   2.6  2))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18 18 18 18 14 18 28 42 6  56.0  60.0  60.0  t  78.0  2 2.6 8    42   42  12  3    3  3   3.2  2))
     (40 .  (150.0 110.0 18.0 4  48.30  49.50  18 18 18 18 14 18 32 45 7  64.0  70.0  70.0  t  88.0  3 2.6 8    45   45  15  3    3  3   3.2  2))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20 18 18 18 16 20 28 45 8  74.0  85.0  84.0  t  102.0 3 2.9 8    45   45  20  3    4  3   3.2  2))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  20 18 18 18 16 20 32 45 10 92.0  104.0 104.0 t  122.0 3 2.9 8    45   45  20  3    4  4   3.2  2))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  20 20 20 20 16 20 34 50 10 105.0 118.0 120.0 t  138.0 3 3.2 10   50   50  25  3    4  4   3.2  2))
     (100 . (220.0 180.0 18.0 8  114.30 116.00 22 20 20 20 18 22 40 52 12 131.0 140.0 140.0 t  158.0 3 3.6 10   52   52  25  4    4  4   3.2  3.2))
     (125 . (250.0 210.0 18.0 8  139.70 141.50 22 22 22 22 18 22 44 55 12 156.0 168.0 170.0 t  188.0 3 4.0 10   55   55  25  4    4  5   4    3.2))
     (150 . (285.0 240.0 22.0 8  168.30 170.50 24 22 22 22 20 24 44 55 12 184.0 195.0 190.0 t  212.0 3 4.5 10   55   55  25  4    4  6   5    3.5))
     (200 . (340.0 295.0 22.0 8  219.10 221.50 24 24 24 24 20 24 44 62 16 234.0 246.0 246.0 t  268.0 3 6.3 11   62   62  30  5    4  6   5    4.5))
     (250 . (395.0 350.0 22.0 12 273.00 276.50 26 26 26 26 22 26 46 68 16 292.0 298.0 298.0 t  320.0 3 6.3 12   68   68 nil  8  nil  8   8))
     (300 . (445.0 400.0 22.0 12 323.90 327.50 26 26 26 26 22 26 46 68 16 342.0 350.0 348.0 t  370.0 4 7.1 12   68   68 nil  8  nil  8   8))
     (350 . (505.0 460.0 22.0 16 355.60 359.50 30 26 26 26 22 30 53 68 16 385.0 400.0 408.0 t  430.0 4 7.1 13   68   68 nil  8  nil  8   8))
     (400 . (565.0 515.0 26.0 16 406.40 411.00 32 26 26 26 24 32 57 72 16 440.0 456.0 456.0 t  482.0 4 7.1 14   72   72 nil  8  nil  8   8))
     (450 . (615.0 565.0 26.0 20 457.00 462.50 36 28 28 28 24 36 63 72 16 488.0 502.0 502.0 t  532.0 4 7.1 15   72  nil nil nil nil  8   8))
     (500 . (670.0 620.0 26.0 20 508.00 513.50 38 28 28 28 26 38 67 75 16 542.0 559.0 559.0 t  585.0 4 7.1 16   75  nil nil nil nil  8   8))
     (600 . (780.0 725.0 30.0 20 610.00 616.50 42 30 34 34 26 42 75 82 18 642.0 658.0 658.0 t  685.0 5 8.0 18   80  nil nil nil nil 10   nil))

     (700 .  (895.0  840  30 24 711.00  711.00 50 35 35 38 nil 50 nil 85 18 746.0 nil 772.0 t  800   5 8.8   26  100  nil nil nil nil 10  nil))
     (800 .  (1015.0 950  33 24 813.00  813.00 56 38 38 48 nil 56 nil 96 18 850.0 nil 876.0 t  905   5 8.8   28  105  nil nil nil nil 12  nil))
     (900 .  (1115.0 1050 33 28 914.00  914.00 62 38 38 50 nil 62 nil 99 20 950.0 nil 976.0 t  1005  5 12.5 30  110  nil nil nil nil 12  nil))
     (1000 . (1230.0 1160 36 28 1016.00 1016.0 70 44 44 54 nil 70 nil 105 20 1052 nil 1080  t  1110  5 12.5 35  120  nil nil nil nil 12  nil))
     (1200 . (1455.0 1380 39 32 1219.00 1219.0 83 55 55 66 nil 83 nil 132 25 1256 nil 1292  t  1330  5 12.5 nil nil  nil nil nil nil 16  nil))
     (1400 . (1675.0 1590 42 36 1422.00 1422.0 95 65 65 nil nil 95 nil 143 25 1460 nil 1496 t  1535  5 14.2 nil nil  nil nil nil nil nil nil))
     (1600 . (1915.0 1820 48 40 1626.00 1626.0 95 75 75 nil nil 95 nil 159 25 1666 nil 1712 t  1760  5 16.0 nil nil  nil nil nil nil nil nil))
     (1800 . (2115.0 2020 48 44 1829.00 1829.0 95 85 85 nil nil 95 nil 175 30 1868 nil 1910 t  1960  5 17.5 nil nil  nil nil nil nil nil nil))
   )
 )
)
((= PN_brd "PN16")
 (setq PN16
   '(
     ;;                                                    F32  c1                                     20 21   22   H4  H4  25  26  27  28   29  30   
     ;;;;    D     K     L    nb  A     B1     c1 c2 c3  c4 c5  c6 h1 h2  h3 N1    N2    N3    B6 d1   f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37 
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14 16 16  16 12  14 22 35  6  28.0  30.0  28.0  t  40.0  2 2.0   5   35  35  7   2   2.5  3  2.0  2.0))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14 16 16  16 12  14 22 38  6  32.0  35.0  32.0  t  45.0  2 2.0   5   38  38  7   2   2.5  3  2.0  2.0))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16 18 18  18 14  16 26 40  6  40.0  45.0  40.0  t  58.0  2 2.3   6   40  40  8   2.5 3    3  2.6  2.0))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16 18 18  18 14  16 28 40  6  46.0  52.0  50.0  t  68.0  2 2.6   7   40  40  10  2.5 3    3  2.6  2.0))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18 18 18  18 14  18 30 42  6  56.0  60.0  60.0  t  78.0  2 2.6   8   42  42  12  3   3    3  3.2  2.0))
     (40 .  (150.0 110.0 18.0 4  48.30  49.50  18 18 18  18 14  18 32 45  7  64.0  70.0  70.0  t  88.0  3 2.6   8   45  45  15  3   3    3  3.2  2.0))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20 18 18  18 16  20 28 45  8  74.0  84.0  84.0  t  102.0 3 2.9   8   45  45  20  3   4    3  3.2  2.0))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  20 18 18  18 16  20 32 45  10 92.0  104.0 104.0 t  122.0 3 2.9   8   45  45  20  3   4    4  3.2  2.0))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  20 20 20  20 16  20 34 50  10 105.0 118.0 120.0 t  138.0 3 3.2   10  50  50  25  3   4    4  3.2  3.2))
     (100 . (220.0 180.0 18.0 8  114.3  116.00 22 20 20  20 18  22 40 52  12 131.0 140.0 140.0 t  158.0 3 3.6   10  52  52  25  4   4    4  3.2  3.2))
     (125 . (250.0 210.0 18.0 8  139.7  141.50 22 22 22  22 18  22 44 55  12 156.0 168.0 170.0 t  188.0 3 4.0   10  55  55  25  4   4    5  3.2  3.5))
     (150 . (285.0 240.0 22.0 8  168.3  170.50 24 22 22  22 20  24 44 55  12 184.0 195.0 190.0 t  212.0 3 4.5   10  55  55  25  5   5    6  3.2  4.5))
     (200 . (340.0 295.0 22.0 12 219.1  221.50 26 24 24  24 20  26 44 62  16 235.0 246.0 246.0 t  268.0 3 6.3   11  62  62  30  6   6    6  3.2  5.6))
     (250 . (405.0 355.0 26.0 12 273.0  276.50 29 26 26  26 22  29 46 70  16 292.0 298.0 296.0 t  320.0 3 6.3   12  70  68  nil 10  nil  8  3.2  nil))
     (300 . (460.0 410.0 26.0 12 323.9  327.50 32 28 28  28 24  32 46 78  16 344.0 350.0 350.0 t  378.0 4 7.1   14  78  68  nil 10  nil  10 4.0  nil))
     (350 . (520.0 470.0 26.0 16 355.6  359.00 35 30 30  30 26  35 57 82  16 390.0 400.0 410.0 t  438.0 4 8.0   18  82  68  nil 10  nil  10 4.0  nil))
     (400 . (580.0 525.0 30.0 16 406.4  411.00 38 32 32  32 28  38 63 85  16 445.0 456.0 458.0 t  490.0 4 8.0   20  85  72  nil 10  nil  12 4.0  nil))
     (450 . (640.0 585.0 30.0 20 457.0  462.50 42 34 40  40 30  42 68 83  16 490.0 502.0 516.0 t  550.0 4 8.0   22  87  nil nil 10  nil  12 nil  nil))
     (500 . (715.0 650.0 33.0 20 508.0  513.50 46 36 44  44 32  46 73 84  16 548.0 559.0 576.0 t  610.0 4 8.0   22  90  nil nil nil nil  12 nil  nil))
     (600 . (840.0 770.0 36.0 20 610.0  616.50 55 40 54  54 32  55 83 88  18 670.0 658.0 690.0 t  725.0 5 10.0  24  95  nil nil nil nil  12 nil  nil))
     (700 . (910.0 840.0 36.0 24 711.0  711.0  63 40 nil 58 nil 63 83 104 18 755.0 760.0 760.0 t  795.0 5 10.0  26  100 nil nil nil nil  14 nil  nil)); b1
     (800 . (1025  950.0 39.0 24 813.0  813.00 74 41 nil 62 nil 74 90 108 20 855.0 864.0 862.0 t  900.0 5 12.5  28  105 nil nil nil nil  16 nil  nil)); b1

     (900 . (1125 1050.0 39.0 28 914.0  914.00 82 48 nil 64 nil 82 94 118 20 955.0 968    962  t  1000  5 12.5  30  110 nil nil nil nil  18 nil  nil))
    (1000 . (1255 1170.0 42.0 28 1016   1016   90 59 nil 68 nil 90 100 137 22 1058 1072   1076 t  1115  5 12.5  35  110 nil nil nil nil  18 nil  nil))
    (1200 . (1485 1390.0 48.0 32 1219   1219  100 78 nil nil nil 100 nil 160 30 1262 nil  1282 t  1330  5 14.2 nil  110 nil nil nil nil nil nil  nil))
    (1400 . (1685 1590.0 48.0 36 1422   1422  110 84 nil nil nil 110 nil 177 30 1465 nil  1482 t  1530  5 16.0 nil  110 nil nil nil nil nil nil  nil))
    (1600 . (1930 1820.0 56.0 40 1626   1626  120 102 nil nil nil 120 nil 204 35 1668 nil 1696 t  1750  5 17.5 nil  110 nil nil nil nil nil nil  nil))
    (1800 . (2130 2020.0 56.0 44 1829   1829  130 110 nil nil nil 130 nil 218 35 1870 nil 1896 t  1950  5 20.0 nil  110 nil nil nil nil nil nil  nil))
    (2000 . (2345 2230.0 62.0 48 2032   2032  140 124 nil nil nil 140 nil 238 40 2072 nil 2100 t  2150  5 22.0 nil  110 nil nil nil nil nil nil  nil))
   )
 )
)

((= PN_brd "PN25")
 (setq PN25
   '(

     ;;                                                       F32  c1                                            20 21   22   H4  H4  25 26  27  28   29  30   
     ;;;;    D     K     L    nb  A     B1     c1  c2  c3  c4  c5  c6 h1  h2  h3   N1    N2    N3    B6     d1   f1 s11  F35  35  36  h5 F36 F37 s35 s36 s37 
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14  16  16  16  12  14 22  35  6    28.0  30.0  28.0  6.10   40.0  2 2.0  5    35 nil nil nil nil 3))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14  16  16  16  12  14 22  38  6    32.0  35.0  32.0  12.70  45.0  2 2.0  5    38 nil nil nil nil 3))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16  18  18  18  14  16 26  40  6    40.0  45.0  40.0  19.00  58.0  2 2.3  6    40 nil nil nil nil 3))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16  18  18  18  14  16 28  40  6    46.0  52.0  50.0  25.40  68.0  2 2.6  7    40 nil nil nil nil 3))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18  18  18  18  14  18 30  42  6    56.0  60.0  60.0  31.80  78.0  2 2.6  8    42 nil nil nil nil 3))
     (40 .  (150.0 110.0 18.0 4  48.30  49.50  18  18  18  18  14  18 32  45  7    64.0  70.0  70.0  38.00  88.0  3 2.6  8    45 nil nil nil nil 3))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20  20  20  20  16  20 34  48  8    75.0  84.0  84.0  50.80  102.0 3 2.9  10   48 nil nil nil nil 4))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  22  22  22  22  16  22 38  52  10   90.0 104.0 104.0  63.50  122.0 3 2.9  11   52 nil nil nil nil 5))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  24  24  24  24  18  24 40  58  12  105.0 118.0 120.0  76.20  138.0 3 3.2  12   58 nil nil nil nil 6))
     (100 . (235.0 190.0 22.0 8  114.3  116.00 26  24  24  24  20  26 44  65  12  134.0 145.0 142.0 101.60  162.0 3 3.6  14   65 nil nil nil nil 6))
     (125 . (270.0 220.0 26.0 8  139.7  141.50 28  26  26  26  22  28 48  68  12  162.0 170.0 162.0 127.00  188.0 3 4.0  16   68 nil nil nil nil 6))
     (150 . (300.0 250.0 26.0 8  168.3  170.50 30  28  28  28  24  30 52  75  12  192.0 200.0 192.0 152.40  218.0 3 4.5  18   75 nil nil nil nil 8))
     (200 . (360.0 310.0 26.0 12 219.1  221.50 32  30  30  30  26  32 52  80  16  244.0 256.0 252.0 203.20  278.0 3 6.3  18   80 nil nil nil nil 8))
     (250 . (425.0 370.0 30.0 12 273.0  276.50 35  32  32  32  26  35 60  88  18  298.0 310.0 304.0 254.00  335.0 3 7.1  18   88 nil nil nil nil 10))
     (300 . (485.0 430.0 30.0 16 323.9  327.50 38  34  34  34  28  38 67  92  18  352.0 364.0 364.0 304.80  395.0 4 8.0  20   92 nil nil nil nil 10))
     (350 . (555.0 490.0 33.0 16 355.6  359.50 42  38  38  38  32  42 72  100 20  398.0 418.0 418.0 355.60  450.0 4 8.0  22  100 nil nil nil nil 12))
     (400 . (620.0 550.0 36.0 16 406.4  411.00 48  40  40  40  34  48 78  110 20  452.0 472.0 472.0 406.40  505.0 4 8.8  24  110 nil nil nil nil 14))
     (450 . (670.0 600.0 36.0 20 457.0  462.00 54  46  46  50  36  54 84  110 20  500.0 520.0 520.0 457.20  555.0 4 8.8  26  110 nil nil nil nil 15))
     (500 . (730.0 660.0 36.0 20 508.0  513.50 58  48  48  51  38  58 90  125 20  558.0 580.0 580.0 508.00  615.0 4 10.0 28  125 nil nil nil nil 16))
     (600 . (845.0 770.0 39.0 20 610.0  616.50 68  48  58  66  40  68 100 125 20  660.0 684.0 684.0 609.60  720.0 5 11.0 30  115 nil nil nil nil 18))
     (700 . (960.0 875.0 42.0 24 711.0  714.00 85  50  nil nil nil 85 nil 129 20  760.0 nil   780.0 nil     820.0 5 14.2 30  125 nil nil nil nil 20))
     (800 . (1085  990.0 48.0 24 813.0  816.00 95  53  nil nil nil 95 nil 138 22  864.0 nil   882.0 nil     930.0 5 16.0 35  135 nil nil nil nil 20))
     (900 . (1185  1090  48.0 28 914.0  nil   100  57  nil nil nil 95 nil 148 24  968.0 nil   982.0 nil     1030  5 17.5 nil nil nil nil nil nil nil))
    (1000 . (1320  1210  56.0 28 1016.0 nil   100  63  nil nil nil 95 nil 160 24  1070  nil   1086  nil     1140  5 20.0 nil nil nil nil nil nil nil))
   )
 )
)
((= PN_brd "PN40")
 (setq PN40                                                                                                 
   '(                                                       ;F  c1                                          21   22  H4  H4  25  26  27  28   
     ;;;;    D     K     L    nb  A     B1     c1  c2  c3 c4 c5 c6 h1  h2  h3  N1    N2    N3    B6 d1   f1 s11  F35 35  36  h5  F36 F37 s35
     (10 .  (90.0  60.0  14.0 4  17.20  18.00  14  16  16 16 12 16 22  35  6   28.0  30.0  28.0  t  40.0  2 1.8  5   35))
     (15 .  (95.0  65.0  14.0 4  21.30  22.00  14  16  16 16 12 16 22  38  6   32.0  35.0  32.0  t  45.0  2 2.0  5   38))
     (20 .  (105.0 75.0  14.0 4  26.90  27.50  16  18  18 18 14 16 26  40  6   40.0  45.0  40.0  t  58.0  2 2.3  6   40))
     (25 .  (115.0 85.0  14.0 4  33.70  34.50  16  18  18 18 14 18 28  40  6   46.0  52.0  50.0  t  68.0  2 2.6  7   40))
     (32 .  (140.0 100.0 18.0 4  42.40  43.50  18  18  18 18 14 18 30  42  6   56.0  60.0  60.0  t  78.0  2 2.6  8   42))
     (40 .  (150.0 110.0 18.0 4  48.30  49.00  18  18  18 18 14 18 32  45  7   64.0  70.0  70.0  t  88.0  3 2.6  8   45))
     (50 .  (165.0 125.0 18.0 4  60.30  61.50  20  20  20 20 16 20 34  48  8   75.0  84.0  84.0  t  102.0 3 2.9  10  48))
     (65 .  (185.0 145.0 18.0 8  76.10  77.50  22  22  22 22 16 20 38  52  10  90.0  104.0 104.0 t  122.0 3 2.9  11  52))
     (80 .  (200.0 160.0 18.0 8  88.90  90.50  24  24  24 24 18 22 40  58  12  105.0 118.0 120.0 t  138.0 3 3.2  12  58))
     (100 . (235.0 190.0 22.0 8  114.30 116.00 26  24  24 24 20 22 44  65  12  134.0 145.0 142.0 t  162.0 3 3.6  14  65))
     (125 . (270.0 220.0 26.0 8  139.70 141.50 28  26  26 26 22 24 48  68  12  162.0 170.0 162.0 t  188.0 3 4.0  16  68))
     (150 . (300.0 250.0 26.0 8  168.30 170.50 30  28  28 28 22 24 52  75  12  192.0 200.0 192.0 t  218.0 3 4.5  18  75))
     (200 . (375.0 320.0 30.0 12 219.10 221.50 36  34  34 36 26 30 52  88  16  244.0 260.0 254.0 t  285.0 3 6.3  20  88))
     (250 . (450.0 385.0 33.0 12 273.00 276.50 42  38  38 38 30 36 60  105 18  306.0 312.0 312.0 t  345.0 3 7.1  22  105))
     (300 . (515.0 450.0 33.0 16 323.90 327.50 52  42  42 42 34 40 67  115 18  362.0 380.0 378.0 t  410.0 4 8.0  25  115))
     (350 . (580.0 510.0 36.0 16 355.60 359.50 58  46  46 46 38 46 72  125 20  408.0 424.0 432.0 t  465.0 4 8.8  28  125))
     (400 . (660.0 585.0 39.0 16 406.40 411.00 65  50  50 50 42 50 78  135 20  462.0 478.0 498.0 t  535.0 4 11.0 32  135))

     (450 . (685.0 610.0 39.0 20 457.00 462.00 75  57  57 57 46 75 84  135 20  500.0 522.0 522.0 t  560.0 4 12.5 nil nil))
     (500 . (755.0 670.0 42.0 20 508.00 513.50 85  57  57 57 50 85 90  140 20  562.0 576.0 576.0 t  615.0 4 14.2 nil nil))
     (600 . (890.0 795.0 48.0 20 610.00 610.50 95  72  72 72 54 95 100 150 20  666.0 686.0 686.0 t  735.0 5 16.0 nil nil))
   
   )
 )
)
((= PN_brd "PN50")
 (setq PN50
   '(
     ;;;;    D     K       L    nb  A     B1     c1  c2   c3  c4  c5  c6  h1  h2  h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (95.0  66.70  15.80 4  21.30  22.40  nil 14.2 nil nil nil nil 22  52  6.4 38.0  nil nil 12.70  34.90  1.6 2.6 ))
     (20 .  (117.0 82.60  19.00 4  26.90  27.70  nil 15.7 nil nil nil nil 25  57  6.4 48.0  nil nil 19.00  42.90  1.6 2.9 ))
     (25 .  (124.0 88.90  19.00 4  33.70  34.50  nil 17.5 nil nil nil nil 27  62  6.4 54.0  nil nil 25.40  50.80  1.6 3.2 ))
     (32 .  (133.0 98.40  19.00 4  42.40  43.20  nil 19.0 nil nil nil nil 27  65  6.4 63.0  nil nil 31.80  63.50  1.6 3.6 ))
     (40 .  (156.0 114.30 22.20 4  48.30  49.50  nil 20.6 nil nil nil nil 30  68  6.4 70.0  nil nil 38.00  73.00  1.6 3.6 ))
     (50 .  (165.0 127.00 19.00 8  60.30  62.00  nil 22.4 nil nil nil nil 33  70  6.4 84.0  nil nil 50.80  92.10  1.6 4.0 ))
     (65 .  (190.0 149.20 22.20 8  76.10  77.80  nil 25.4 nil nil nil nil 38  76  6.4 100.0 nil nil 63.50  104.80 1.6 4.5 ))
     (80 .  (210.0 168.30 22.20 8  88.90  90.70  nil 28.4 nil nil nil nil 43  79  6.4 117.0 nil nil 76.20  127.00 1.6 5.0 ))
     (100 . (254.0 200.00 22.20 8  114.30 116.10 nil 31.8 nil nil nil nil 48  86  6.4 146.0 nil nil 101.60 157.20 1.6 5.6 ))
     (125 . (279.0 235.00 22.20 8  139.70 142.20 nil 35.0 nil nil nil nil 51  98  6.4 178.0 nil nil 127.00 185.70 1.6 6.3 ))
     (150 . (318.0 269.90 22.20 12 168.30 170.70 nil 36.6 nil nil nil nil 52  98  6.4 206.0 nil nil 152.40 215.90 1.6 7.1 ))
     (200 . (381.0 330.20 25.40 12 219.10 221.50 nil 41.1 nil nil nil nil 62  111 6.4 260.0 nil nil 203.20 269.90 1.6 8.0 ))
     (250 . (444.0 387.40 28.50 16 273.00 276.40 nil 47.8 nil nil nil nil 66  117 6.4 320.0 nil nil 254.00 323.80 1.6 8.8 ))
     (300 . (521.0 450.80 31.80 16 323.90 327.20 nil 50.8 nil nil nil nil 73  130 6.4 375.0 nil nil 304.80 381.00 1.6 10.0 ))
     (350 . (584.0 514.40 31.80 20 355.60 359.20 nil 53.8 nil nil nil nil 76  143 6.4 425.0 nil nil 355.60 412.80 1.6 11.0 ))
     (400 . (648.0 571.50 35.00 20 406.40 410.50 nil 57.2 nil nil nil nil 83  146 6.4 483.0 nil nil 406.40 469.90 1.6 12.5 ))
     (450 . (711.0 628.60 35.00 24 457.00 461.80 nil 60.5 nil nil nil nil 89  159 6.4 533.0 nil nil 457.20 533.40 1.6 14.2 ))
     (500 . (775.0 685.80 35.00 24 508.00 513.10 nil 63.5 nil nil nil nil 95  162 6.4 587.0 nil nil 508.00 584.20 1.6 16.0 ))
     (600 . (914.0 812.80 41.10 24 610.00 616.00 nil 69.9 nil nil nil nil 106 168 6.4 701.0 nil nil 609.60 692.20 1.6 17.5 ))
   )
 )
)
((= PN_brd "PN100")
 (setq PN100
   '(
     ;;;;    D     K       L    nb  A     B1     c1  c2    c3  c4  c5  c6  h1  h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (95.0  66.70  15.80 4  21.30  22.40  nil 14.2  nil nil nil nil 22  58.40  6.4 38.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (117.0 82.60  19.00 4  26.90  27.70  nil 15.7  nil nil nil nil 25  63.40  6.4 48.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (124.0 88.90  19.00 4  33.70  34.50  nil 17.5  nil nil nil nil 27  68.40  6.4 54.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (133.0 98.40  19.00 4  42.40  43.20  nil 20.6  nil nil nil nil 29  73.40  6.4 64.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (156.0 114.30 22.20 4  48.30  49.50  nil 22.4  nil nil nil nil 32  76.40  6.4 70.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (165.0 127.00 19.00 8  60.30  62.00  nil 25.4  nil nil nil nil 37  79.40  6.4 84.0  nil nil 50.80  92.10  6.4 nil ))
     (65 .  (190.0 149.20 22.20 8  76.10  77.80  nil 28.4  nil nil nil nil 41  85.40  6.4 100.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (210.0 168.30 22.20 8  88.90  90.70  nil 31.8  nil nil nil nil 46  89.40  6.4 118.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (273.0 215.90 25.40 8  114.30 116.10 nil 38.1  nil nil nil nil 54  108.40 6.4 152.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (330.0 266.70 28.50 8  139.70 142.20 nil 44.5  nil nil nil nil 60  120.40 6.4 189.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (356.0 292.10 28.50 12 168.30 170.70 nil 47.8  nil nil nil nil 67  123.40 6.4 222.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (419.0 349.20 31.80 12 219.10 221.50 nil 55.6  nil nil nil nil 76  139.40 6.4 273.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (508.0 431.80 35.00 16 273.00 276.40 nil 63.5  nil nil nil nil 86  158.40 6.4 343.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (559.0 489.00 35.00 20 323.90 327.20 nil 66.5  nil nil nil nil 92  162.40 6.4 400.0 nil nil 304.80 381.00 6.4 nil ))
     (350 . (603.0 527.00 38.10 20 355.60 359.20 nil 69.9  nil nil nil nil 94  171.40 6.4 432.0 nil nil 355.60 412.80 6.4 nil ))
     (400 . (686.0 603.20 41.10 20 406.40 410.50 nil 76.2  nil nil nil nil 106 184.40 6.4 495.0 nil nil 406.40 469.90 6.4 nil ))
     (450 . (743.0 654.00 44.50 20 457.00 461.80 nil 82.6  nil nil nil nil 117 190.40 6.4 546.0 nil nil 457.20 533.40 6.4 nil ))
     (500 . (813.0 723.90 44.50 24 508.00 513.10 nil 88.9  nil nil nil nil 127 196.40 6.4 610.0 nil nil 508.00 584.20 6.4 nil ))
     (600 . (940.0 838.20 50.80 24 610.00 616.00 nil 101.6 nil nil nil nil 140 209.40 6.4 718.0 nil nil 609.60 692.20 6.4 nil ))
   )
 )
)
((= PN_brd "PN150")
 (setq PN150
   '(
     ;;;;    D      K       L    nb  A     B1     c1  c2    c3  c4  c5  c6  h1  h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (121.0  82.60  22.20 4  21.30  22.40  nil 22.4  nil nil nil nil 32  66.40  6.4 38.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (130.0  88.90  22.20 4  26.90  27.70  nil 25.4  nil nil nil nil 35  76.40  6.4 44.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (149.0  101.60 25.40 4  33.70  34.50  nil 28.4  nil nil nil nil 41  79.40  6.4 52.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (159.0  111.10 25.40 4  42.40  43.20  nil 28.4  nil nil nil nil 41  79.40  6.4 63.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (178.0  123.80 28.50 4  48.30  49.50  nil 31.8  nil nil nil nil 44  89.40  6.4 70.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (216.0  165.10 25.40 8  60.30  62.00  nil 38.1  nil nil nil nil 57  108.40 6.4 105.0 nil nil 50.80  92.10  6.4 nil ))
     (65 .  (244.0  190.50 28.50 8  76.10  77.80  nil 41.1  nil nil nil nil 63  111.40 6.4 124.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (241.0  190.50 25.40 8  88.90  90.70  nil 38.1  nil nil nil nil 54  108.40 6.4 127.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (292.0  235.00 31.80 8  114.30 116.10 nil 44.5  nil nil nil nil 70  120.40 6.4 159.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (349.0  279.40 35.00 8  139.70 142.20 nil 50.8  nil nil nil nil 79  133.40 6.4 190.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (381.0  317.50 31.80 12 168.30 170.70 nil 55.6  nil nil nil nil 86  146.40 6.4 235.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (470.0  393.70 38.10 12 219.10 221.50 nil 63.5  nil nil nil nil 102 168.40 6.4 298.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (546.0  469.90 38.10 16 273.00 276.40 nil 69.9  nil nil nil nil 108 190.40 6.4 368.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (610.0  533.40 38.10 20 323.90 327.20 nil 79.2  nil nil nil nil 117 206.40 6.4 419.0 nil nil 304.80 381.00 6.4 nil ))
     (350 . (641.0  558.80 41.10 20 355.60 359.20 nil 85.9  nil nil nil nil 130 219.40 6.4 451.0 nil nil 355.60 412.80 6.4 nil ))
     (400 . (705.0  616.00 44.50 20 406.40 410.50 nil 88.9  nil nil nil nil 133 222.40 6.4 508.0 nil nil 406.40 469.90 6.4 nil ))
     (450 . (787.0  685.80 50.80 20 457.00 461.80 nil 101.6 nil nil nil nil 152 235.40 6.4 565.0 nil nil 457.20 533.40 6.4 nil ))
     (500 . (857.0  749.30 53.80 20 508.00 513.10 nil 108.0 nil nil nil nil 159 254.40 6.4 622.0 nil nil 508.00 584.20 6.4 nil ))
     (600 . (1041.0 901.70 66.50 20 610.00 616.00 nil 139.7 nil nil nil nil 203 298.40 6.4 749.0 nil nil 609.60 692.20 6.4 nil ))
   )
 )
)
((= PN_brd "PN250")
 (setq PN250
   '(
     ;;;;    D      K       L    nb  A     B1     c1 c2    c3  c4  c5  c6  h1 h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (121.0  82.60  22.20 4  21.30  22.40 nil 22.4  nil nil nil nil 32 66.40  6.4 38.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (130.0  88.90  22.20 4  26.90  27.70 nil 25.4  nil nil nil nil 35 76.40  6.4 44.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (149.0  101.60 25.40 4  33.70  34.50 nil 28.4  nil nil nil nil 41 79.40  6.4 52.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (159.0  111.10 25.40 4  42.40  43.20 nil 28.4  nil nil nil nil 41 79.40  6.4 63.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (178.0  123.80 28.50 4  48.30  49.50 nil 31.8  nil nil nil nil 44 89.40  6.4 70.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (216.0  165.10 25.40 8  60.30  62.00 nil 38.1  nil nil nil nil 57 108.40 6.4 105.0 nil nil 50.80  92.10  6.4 nil ))
     (65 .  (244.0  190.50 28.50 8  76.10  77.80 nil 41.1  nil nil nil nil 63 111.40 6.4 124.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (267.0  203.20 31.80 8  88.90  0     nil 47.8  nil nil nil nil 0  124.40 6.4 133.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (311.0  241.30 35.00 8 114.30  0     nil 53.8  nil nil nil nil 0  130.40 6.4 162.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (375.0  292.10 41.10 8 139.70  0     nil 73.2  nil nil nil nil 0  161.40 6.4 197.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (394.0  317.50 38.10 12 168.30 0     nil 82.6  nil nil nil nil 0  177.40 6.4 229.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (483.0  393.70 44.50 12 219.10 0     nil 91.9  nil nil nil nil 0  219.40 6.4 292.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (584.0  482.60 50.80 12 273.00 0     nil 108.0 nil nil nil nil 0  260.40 6.4 368.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (673.0  571.50 53.80 16 323.90 0     nil 124.0 nil nil nil nil 0  289.40 6.4 451.0 nil nil 304.80 381.00 6.4 nil ))
     (350 . (749.0  635.00 60.50 16 355.60 0     nil 133.4 nil nil nil nil 0  304.40 6.4 495.0 nil nil 355.60 412.80 6.4 nil ))
     (400 . (826.0  704.80 66.50 16 406.40 0     nil 146.0 nil nil nil nil 0  317.40 6.4 552.0 nil nil 406.40 469.90 6.4 nil ))
     (450 . (914.0  774.70 73.20 16 457.00 0     nil 162.0 nil nil nil nil 0  333.40 6.4 597.0 nil nil 457.20 533.40 6.4 nil ))
     (500 . (984.0  831.80 79.20 16 508.00 0     nil 177.6 nil nil nil nil 0  362.40 6.4 641.0 nil nil 508.00 584.20 6.4 nil ))
     (600 . (1168.0 990.60 91.90 16 610.00 0     nil 203.2 nil nil nil nil 0  412.40 6.4 762.0 nil nil 609.60 692.20 6.4 nil ))
   )
 )
)
((= PN_brd "PN420")
 (setq PN420
   '(
     ;;;;    D     K       L    nb  A     B1  c1  c2    c3  c4  c5  c6  h1  h2     h3  N1    N2  N3  B6     d1     f1  s
     (15 .  (133.0 88.90  22.20 4  21.30  nil nil 30.2  nil nil nil nil nil 79.40  6.4 43.0  nil nil 12.70  34.90  6.4 nil ))
     (20 .  (140.0 95.30  22.20 4  26.90  nil nil 31.8  nil nil nil nil nil 85.40  6.4 51.0  nil nil 19.00  42.90  6.4 nil ))
     (25 .  (159.0 108.00 25.40 4  33.70  nil nil 35.0  nil nil nil nil nil 95.40  6.4 57.0  nil nil 25.40  50.80  6.4 nil ))
     (32 .  (184.0 130.00 28.50 4  42.40  nil nil 38.1  nil nil nil nil nil 101.40 6.4 73.0  nil nil 31.80  63.50  6.4 nil ))
     (40 .  (203.0 146.00 31.80 4  48.30  nil nil 44.5  nil nil nil nil nil 117.40 6.4 79.0  nil nil 38.00  73.00  6.4 nil ))
     (50 .  (235.0 171.50 28.50 8  60.30  nil nil 50.8  nil nil nil nil nil 133.40 6.4 95.0  nil nil 50.80  92.10  6.4 nil ))
     (65 .  (267.0 196.90 31.80 8  76.10  nil nil 57.2  nil nil nil nil nil 149.60 6.4 114.0 nil nil 63.50  104.80 6.4 nil ))
     (80 .  (305.0 228.60 35.00 8  88.90  nil nil 66.5  nil nil nil nil nil 174.40 6.4 133.0 nil nil 76.20  127.00 6.4 nil ))
     (100 . (356.0 273.00 41.10 8  114.30 nil nil 76.2  nil nil nil nil nil 196.40 6.4 165.0 nil nil 101.60 157.20 6.4 nil ))
     (125 . (419.0 323.90 47.80 8  139.70 nil nil 91.9  nil nil nil nil nil 235.40 6.4 203.0 nil nil 127.00 185.70 6.4 nil ))
     (150 . (483.0 368.30 53.80 8  168.30 nil nil 108.0 nil nil nil nil nil 279.40 6.4 235.0 nil nil 152.40 215.90 6.4 nil ))
     (200 . (552.0 438.20 53.80 12 219.10 nil nil 127.0 nil nil nil nil nil 323.40 6.4 305.0 nil nil 203.20 269.90 6.4 nil ))
     (250 . (673.0 539.80 66.50 12 273.00 nil nil 165.1 nil nil nil nil nil 425.40 6.4 375.0 nil nil 254.00 323.80 6.4 nil ))
     (300 . (762.0 619.30 73.20 12 323.90 nil nil 184.2 nil nil nil nil nil 470.40 6.4 441.0 nil nil 304.80 381.00 6.4 nil ))
   )
  )
 )
) 
 
 (setq l_data (eval (read PN_brd))) 
 (setq l_str nil)
 (initget 1 (apply 'strcat (mapcar 'strcat (repeat (length l_data) (setq l_str (cons "DN" l_str))) (mapcar 'itoa (mapcar 'car l_data)) (repeat (length l_data) (setq l_str (cons " " l_str))))))
 (setq l_str nil)
 (setq model_brd (getkword (strcat "\nDiamètre Nominal ["
       (apply 'strcat (mapcar 'strcat (repeat (length l_data) (setq l_str (cons "DN" l_str))) (mapcar 'itoa (mapcar 'car l_data)) (repeat (length l_data) (setq l_str (cons "/" l_str)))))
   "]?: "))
 )
 
 
 (setq l_val (cdr (assoc (atoi (substr model_brd 3)) l_data)))
 
 ;;;;;;;;;;;;

 (initget 1 "PLATE TOURNANTE COLLERETTE SLIP-ON LWN TAMPON")
 (setq typ_brd (getkword "\nType de bride [PLATE/TAMPON/TOURNANTE/COLLERETTE/SLIP-ON]?: "))
 
 (setq d_tuy (* 0.5 (nth 4 l_val) unit_draw))
 
 (cond
   ((eq typ_brd "TAMPON")   ;;;; type 05
     (setq e1 (* (nth 9 l_val) unit_draw) nomb (strcat  typ_brd  "_" model_brd  "_" PN_brd  ))
     (if (not ep:joint) (setq ep:joint 3))  
     (setq joint (getdist (strcat "\n   Entrer l'épaisseur de joint <"(rtos ep:joint)"> :")))
     (if (not joint) (setq joint ep:joint))
   )
   
   ((eq typ_brd "PLATE")   ;;;; type 01
     (if (and (nth 5 l_val) (nth 6 l_val))
       (setq e1 (- (* (nth 6 l_val) unit_draw) (* (nth 20 l_val) unit_draw))
      nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd  ))
     )
   )
   
   ((eq typ_brd "COLLERETTE")  ;;;; type 11
     (cond
       ((or (nth 7 l_val) (nth 8 l_val))
         (if (nth 7 l_val)
           (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
           (setq e1 (- (* (nth 8 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
         )
         (if (member PN_brd '("PN100" "PN150" "PN250" "PN420"))              
           (setq e1 (+ (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
         )

         (if (nth 21 l_val)
           (setq j (* (nth 21 l_val) unit_draw) nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd  ))
           (progn
             (setq j (* 0.5 (nth 4 l_val) unit_draw))
             (while (>= j (* 0.5 (nth 4 l_val) unit_draw))
               (initget 1)
               (setq j (getdist "\nEntrer l'épaisseur du talon :"))
             )
      (setq nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd "_" "talon_" (rtos j 2 2) ))
           )
         )
 
         

         ;;;;;;;; deplace plus bas	 
      
       )
     )
   )
   ((eq typ_brd "TOURNANTE")
     (cond
       ((nth 10 l_val)   ;; (and (nth 10 l_val))
 
  (cond
    ((or (= PN_brd "PN25")(= PN_brd "PN40"))
            (initget "32 35 34")
            (setq typ_collet (getkword "\nType de collets [32/35/34]?: "))
    )
    ((or (= PN_brd "PN10")(= PN_brd "PN16"))
            (initget "32 35 36 37 34")
            (setq typ_collet (getkword "\nType de collets [32/35/36/37/34]?: "))
    )
    (t                                
            (initget "32 35 36 37")
            (setq typ_collet (getkword "\nType de collets [32/35/36/37]?: "))  ;; PN6
    )
  )
         (setq e1 (* (nth 6 l_val) unit_draw))
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
         (cond  
           ((eq typ_collet "34") 
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 10 l_val) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw))
             (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) (* (nth 10 l_val) unit_draw) e1))
             ;;;;;;;;;;;;;;;;;;;;;  modif alésage collet 09-01-09  
             (setq js_add (ssadd (entlast) js_add))               
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 10 l_val) unit_draw)))(- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 21 l_val) unit_draw) ))  ;; talon
             (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) (* (nth 10 l_val) unit_draw) e1))
             (command "_.subtract" js_add "" (entlast) "")             
             ;;;;;;;;;;;;;;;;;;;;    
           )
    
     ;;;;  e1 -> epaisseur bride hors portée de joint
     ;;;;    0   1   2  3   4  5   6  7  8   9   F  c1 12 13  14 15  16  17  18  19 20 21   22   H4  H4  25  26  27  28  29  30 
     ;;;;    D   K   L  nb  A  B1  c1 c2 c3  c4 c5  c6 h1 h2  h3 N1  N2  N3  B6  d1 f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37 
    
           ((or (eq typ_collet "35") (eq typ_collet "36") (eq typ_collet "37"))  ;; concerne la partie tubulaire du collet
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins)
		(+ e1 (* (cond ((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val))) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw)
      )
             (command "_.extrude" (entlast) "" (- (* (cond ((eq typ_collet "35") (nth 23 l_val)) ((eq typ_collet "36") (nth 24 l_val)) ((eq typ_collet "37") (nth 25 l_val))) unit_draw)
					   (* (cond ((eq typ_collet "35") (nth 22 l_val)) ((eq typ_collet "36") (nth 26 l_val)) ((eq typ_collet "37") (nth 27 l_val))) unit_draw) e1)
      )
             ;;;;;;;;;;;;;;;;;;;;;  alésage collet  
             (setq js_add (ssadd (entlast) js_add))               
             (command "_.circle" "_none"
	 (list (car pt_ins) (cadr pt_ins) (+ e1 (* (cond ((eq typ_collet "35")(nth 22 l_val)) ((eq typ_collet "36")(nth 26 l_val)) ((eq typ_collet "37")(nth 27 l_val))) unit_draw)))
	     (- (* 0.5 (nth 4 l_val) unit_draw) (* (cond ((eq typ_collet "35")(nth 28 l_val)) ((eq typ_collet "36")(nth 29 l_val)) ((eq typ_collet "37")(nth 30 l_val))) unit_draw))
      )   
             (command "_.extrude" (entlast) "" (- (* (cond ((eq typ_collet "35")(nth 23 l_val))((eq typ_collet "36")(nth 24 l_val))((eq typ_collet "37")(nth 25 l_val))) unit_draw)
					   (* (cond ((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val))) unit_draw) e1)
      )
             (command "_.subtract" js_add "" (entlast) "")             
             ;;;;;;;;;;;;;;;;;;;;    
           )

    
         )
       )
       
     )
     (setq nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd "_" "collet_" typ_collet ))
   ) 


  ((eq typ_brd "SLIP-ON")  ;;;  type 12
     (if (nth 12 l_val)
       (progn
         (if (not (nth 7 l_val))
           (setq e1 (- (* (nth 8 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
           (if (member PN_brd '("PN100" "PN150" "PN250" "PN420"))
             (setq e1 (* (nth 7 l_val) unit_draw))
             (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
           )
         )
         
  (setq nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd  ))
       )
     )
   )

   ((eq typ_brd "LWN") ;;; type 21
     (if (member PN_brd '("PN100" "PN150" "PN250" "PN420"))
       (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
     )
     (if (and (not (nth 7 l_val)) (nth 8 l_val))
       (setq e1 (- (* (nth 8 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
       (setq e1 (- (* (nth 7 l_val) unit_draw) (* (nth 20 l_val) unit_draw)))
     )
     
     (setq nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd ))
   )
    
 )

 
  (if (tblsearch "block"  nomb) ;; recherche bloc dans dessin
    (progn
      ;;;; insertion bloc
      (setq atdia (getvar "attdia"))
      (setvar "attdia" 1)
      (command "._-insert" nomb "_non" '(0. 0. 0.) "" "" "0" )
      (setvar "attdia" atdia)
    )

   (progn  ;; le bloc n´existe pas
 ;;;; reprise type bride avec creation solide 3 d
 
 (cond
  ((eq typ_brd "COLLERETTE")
   (cond
     ((or (nth 7 l_val) (nth 8 l_val))
      
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (* 0.5 (nth 15 l_val) unit_draw))
         (setq
           d1 (- (* (nth 13 l_val) unit_draw) (+ e1 (* (nth 20 l_val) unit_draw) (* (nth 14 l_val) unit_draw)))
           d2 (- (* 0.5 (nth 15 l_val) unit_draw) (* 0.5 (nth 4 l_val) unit_draw))
         )
         (command "_.extrude" (entlast) "" "_taper" (angtos (atan (/ d2 d1)) (getvar "AUNITS") 12) d1)
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 d1 (* (nth 20 l_val) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw))
         (command "_.extrude" (entlast) "" (* (nth 14 l_val) unit_draw))
         (command "_.union" js_add (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (- (* 0.5 (nth 4 l_val) unit_draw) j))
         (command "_.extrude" (entlast) "" (+ d1 (* (nth 14 l_val) unit_draw)))
         (command "_.subtract" js_add "" (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))

     )
   )	 
  )  ;;; fin collerette
  
  ((eq typ_brd "TOURNANTE")  ;; suite
            
         (cond  
           ((eq typ_collet "34") 
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 10 l_val) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw))
             (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) (* (nth 10 l_val) unit_draw) e1))
             ;;;;;;;;;;;;;;;;;;;;;  modif alésage collet 09-01-09  
             (setq js_add (ssadd (entlast) js_add))               
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 10 l_val) unit_draw)))(- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 21 l_val) unit_draw) ))  ;; talon
             (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) (* (nth 10 l_val) unit_draw) e1))
             (command "_.subtract" js_add "" (entlast) "")             
             ;;;;;;;;;;;;;;;;;;;;    
           )
    
     ;;;;  e1 -> epaisseur bride hors portée de joint
     ;;;;    0   1   2  3   4  5   6  7  8   9   F  c1 12 13  14 15  16  17  18  19 20 21   22   H4  H4  25  26  27  28  29  30 
     ;;;;    D   K   L  nb  A  B1  c1 c2 c3  c4 c5  c6 h1 h2  h3 N1  N2  N3  B6  d1 f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37 
    
           ((or (eq typ_collet "35") (eq typ_collet "36") (eq typ_collet "37"))  ;; concerne la partie tubulaire du collet
             (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins)
		(+ e1 (* (cond ((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val))) unit_draw))) (* 0.5 (nth 4 l_val) unit_draw)
      )
             (command "_.extrude" (entlast) "" (- (* (cond ((eq typ_collet "35") (nth 23 l_val)) ((eq typ_collet "36") (nth 24 l_val)) ((eq typ_collet "37") (nth 25 l_val))) unit_draw)
					   (* (cond ((eq typ_collet "35") (nth 22 l_val)) ((eq typ_collet "36") (nth 26 l_val)) ((eq typ_collet "37") (nth 27 l_val))) unit_draw) e1)
      )
             ;;;;;;;;;;;;;;;;;;;;;  alésage collet  
             (setq js_add (ssadd (entlast) js_add))               
             (command "_.circle" "_none"
	 (list (car pt_ins) (cadr pt_ins) (+ e1 (* (cond ((eq typ_collet "35")(nth 22 l_val)) ((eq typ_collet "36")(nth 26 l_val)) ((eq typ_collet "37")(nth 27 l_val))) unit_draw)))
	     (- (* 0.5 (nth 4 l_val) unit_draw) (* (cond ((eq typ_collet "35")(nth 28 l_val)) ((eq typ_collet "36")(nth 29 l_val)) ((eq typ_collet "37")(nth 30 l_val))) unit_draw))
      )   
             (command "_.extrude" (entlast) "" (- (* (cond ((eq typ_collet "35")(nth 23 l_val))((eq typ_collet "36")(nth 24 l_val))((eq typ_collet "37")(nth 25 l_val))) unit_draw)
					   (* (cond ((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val))) unit_draw) e1)
      )
             (command "_.subtract" js_add "" (entlast) "")             
             ;;;;;;;;;;;;;;;;;;;;    
           )

    
         )
         
   );;; fin tournante

  ((eq typ_brd "SLIP-ON") ;; suite
     (if (nth 12 l_val)
       (progn
         
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (if (not (nth 16 l_val)) (* 0.5 (nth 15 l_val) unit_draw) (* 0.5 (nth 16 l_val) unit_draw)))
         (command "_.extrude" (entlast) "" (- (* (nth 12 l_val) unit_draw) e1))
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (* 0.5 (nth 5 l_val) unit_draw))
         (command "_.extrude" (entlast) "" (- (* (nth 12 l_val) unit_draw) e1))
         (command "_.subtract" js_add "" (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))
  
       )
     )
   )  ;;; fin SLIP-ON

  ((eq typ_brd "LWN") ;;; suite
     
     (if (nth 18 l_val) ;; valeur --> (- (nth 4 l_val) (* 2 (nth 21 l_val)))
       (progn
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (if (not (nth 17 l_val)) (* 0.5 (nth 15 l_val) unit_draw) (* 0.5 (nth 17 l_val) unit_draw)))
         (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) e1))
         (setq js_add (ssadd (entlast) js_add))
         (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (+ e1 (* (nth 20 l_val) unit_draw))) (* 0.5 (- (nth 4 l_val) (* 2 (nth 21 l_val)))  unit_draw))
         (command "_.extrude" (entlast) "" (- (* (nth 13 l_val) unit_draw) e1))
         (command "_.subtract" js_add "" (entlast) "")
         (setq js_add (ssadd))
         (setq js_add (ssadd (entlast) js_add))
       )
     )
     
   )  ;;;fin LWN
  
 )

 
 (if e1
   (progn
     (if (not (eq typ_brd "TAMPON"))
     (progn 
     ;;; d1 (19) portee de joint ; F (10) ou f1 (20) hauteur
     (command "_.circle" "_none" pt_ins (* (nth 19 l_val) 0.5 unit_draw))
     (command "_.extrude" (entlast) ""
       (+ e1
	(if (eq typ_brd "TOURNANTE")
	  (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
	    unit_draw)
	  (* (nth 20 l_val) unit_draw)
	)
       )
     )
     (setq js_add (ssadd (entlast) js_add))
     
     (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins)
(if (eq typ_brd "TOURNANTE")
  (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
     unit_draw)
  (* (nth 20 l_val) unit_draw))) (* (car l_val)	0.5 unit_draw)
     )
     (command "_.extrude" (entlast) "" e1)  ;;;;  e1 -> epaisseur bride hors portée de joint
     
     (command "_.union" js_add (entlast) "")
     (setq js_add (ssadd) js_add (ssadd (entlast) js_add))
     
     ;;;;;;; alésage bride ou collet
     (command "_.circle" "_none" pt_ins
      (cond
 ((eq typ_brd "LWN") (* 0.5 (- (nth 4 l_val) (* 2 (nth 21 l_val)))  unit_draw))
        ((eq typ_brd "COLLERETTE") (- (* 0.5 (nth 4 l_val) unit_draw) j))
 ((eq typ_collet "34")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 21 l_val) unit_draw)))
 ((eq typ_collet "35")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 28 l_val) unit_draw)))
 ((eq typ_collet "36")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 29 l_val) unit_draw)))
 ((eq typ_collet "37")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 30 l_val) unit_draw)))
        (t (* 0.5 (nth 4 l_val) unit_draw))

      )	       
     ;;;;  e1 -> epaisseur bride hors portée de joint
     ;;;;    0   1   2  3   4  5   6  7  8   9   F  c1 12 13  14 15  16  17  18  19 20 21   22   H4  H4  25  26  27  28  29  30 
     ;;;;    D   K   L  nb  A  B1  c1 c2 c3  c4 c5  c6 h1 h2  h3 N1  N2  N3  B6  d1 f1 s11  F35  35  36  h5  F36 F37 s35 s36 s37	
     )
     (command "_.extrude" (entlast) ""
(+ e1 (if (eq typ_brd "TOURNANTE")
  	 (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
   unit_draw)
 (* (nth 20 l_val) unit_draw))
)
     )
     (setq js_remove (ssadd (entlast) js_remove))
     
     ;;; alesage complementaire pour bride sur collet "32" et "37"
      (if (or (eq typ_collet "32") (eq typ_collet "37"))
       (progn                                                                                                                                   ;; environ                                   
  (command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (* (if (eq typ_collet "37")(nth 25 l_val) (nth 10 l_val)) unit_draw)) (* 0.5 (+ 5  (nth 4 l_val)) unit_draw))			    
  (command "_.extrude" (entlast) "" e1)
  (setq js_remove (ssadd (entlast) js_remove))
)  
      ); if
     
     ) ; progn      
     ;; si "TAMPON"
     (progn
(command "_.circle" "_none" (list (car pt_ins) (cadr pt_ins) (* joint unit_draw)) (* (car l_val) 0.5 unit_draw))
(command "_.extrude" (entlast) "" e1) ;; e1 ayant la valeur c4
(setq js_add (ssadd) js_add (ssadd (entlast) js_add))
     ) 
    ) ; if
    
     ;; trous boulons 
     (command "_.circle" "_none"
       (polar (list (car pt_ins) (cadr pt_ins)
	 (cond
	   ((eq typ_brd "TOURNANTE")
	    (* (cond ((or (eq typ_collet "32")(eq typ_collet "34"))(nth 10 l_val))((eq typ_collet "35")(nth 22 l_val))((eq typ_collet "36")(nth 26 l_val))((eq typ_collet "37")(nth 27 l_val)))
	       unit_draw))
	   ((eq typ_brd "TAMPON") (* joint unit_draw))
	   (t (* (nth 20 l_val) unit_draw))
	 )
	)		
	 (/ pi (cadddr l_val)) (* (cadr l_val) 0.5 unit_draw)
       )
       (* (caddr l_val) 0.5 unit_draw)
     )
     (command "_.extrude" (entlast) "" e1)
     (setq js_remove (ssadd (entlast) js_remove))
     (setq e_name (entlast))
     (command "_.array" (entlast) "" "_polar" "_none" pt_ins (cadddr l_val) "" "_yes")
     (while (setq e_name (entnext e_name)) (setq js_remove (ssadd e_name js_remove)))
     (command "_.subtract" js_add "" js_remove "")
     ;;; fin trous boulons
     (setq bridesolide (entlast))

      ;;; change le calque du solide pour création bloc dans calque "0" 
     (setq lent (entget bridesolide)) (setq lent (subst (cons 8 "0") (assoc 8 lent) lent))
     (entmod lent) 

     ;;;;;;;;
     (cond
      ((= "10" model_brd) (setq pouce "1/4")) ((= "15" model_brd) (setq pouce "1/2")) ((= "20" model_brd) (setq pouce "3/4"))
      ((= "25" model_brd) (setq pouce "1")) ((= "32" model_brd) (setq pouce "1 1/4")) ((= "40" model_brd) (setq pouce "1 1/2"))
      ((= "50" model_brd) (setq pouce "2")) ((= "65" model_brd) (setq pouce "2 1/2")) ((= "100" model_brd) (setq pouce "4"))
      ((= "125" model_brd) (setq pouce "5")) ((= "150" model_brd) (setq pouce "6"))   ((= "200" model_brd) (setq pouce "8"))
      ((= "250" model_brd) (setq pouce "10")) ((= "300" model_brd) (setq pouce "12")) ((= "350" model_brd) (setq pouce "14"))
      ((= "400" model_brd) (setq pouce "16")) ((= "450" model_brd) (setq pouce "18")) ((= "500" model_brd) (setq pouce "20"))
      ((= "600" model_brd) (setq pouce "24")) ((= "700" model_brd) (setq pouce "28")) ((= "800" model_brd) (setq pouce "32"))
      ((= "900" model_brd) (setq pouce "36")) ((= "1000" model_brd) (setq pouce "40"))
     )

     ;; création attributs

    (setq st (getvar "textstyle"))
    (setvar "textstyle" "standard")
    (setq tsize (getvar "textsize"))   
    (setq af (getvar "aflags"))           
    (setq ht (* 0.07 d_tuy (/ 1.0 unit_draw))) ; hauteur texte
    (setq it (* 1.3 ht))          ; intervale ligne texte

    (setvar "aflags" 9)  ;;; prédéfini et invisible
    (command "._-attdef" "" "TYPE" "TYPE" (strcat "BRIDE" " " typ_brd)  "_non" '(0. 0. 0.)  ht "0")
    (setq att1 (entlast))
    (command "._-attdef" "" "DN" "DN" model_brd  "_non" (polar '(0. 0. 0.)(* 1.5 pi)(+ it ht))  ht "0")
    (setq att2 (entlast))
    (command "._-attdef" "" "PN" "PN" PN_brd  "_non" (polar '(0. 0. 0.)(* 1.5 pi)(* 2 (+ it ht)))  ht "0")
    (setq att3 (entlast))
    (command "._-attdef" "" "MATIERE" "MATIERE" ""  "_non" (polar '(0. 0. 0.)(* 1.5 pi)(* 3 (+ it ht)))  ht "0")
    (setq att4 (entlast)) 
    (command "._-attdef" "" "FLUIDE" "FLUIDE" ""  "_non" (polar '(0. 0. 0.)(* 1.5 pi)(* 4 (+ it ht)))  ht "0")
    (setq att5 (entlast))
    (command "._-attdef" "" "REPERE" "REPERE" ""  "_non" (polar '(0. 0. 0.)(* 1.5 pi)(* 5 (+ it ht)))  ht "0")
    (setq att6 (entlast))
    (if  typ_collet (progn
     (command "._-attdef" "" "COLLET" "TYPE" typ_collet  "_non" (polar '(0. 0. 0.)(* 1.5 pi)(* 6 (+ it ht)))  ht "0")
     (setq att7 (entlast))		       
    ))
    (if  talon (progn
     (command "._-attdef" "" "TALON" "EPAISSEUR" (rtos j 2 2)  "_non" (polar '(0. 0. 0.)(* 1.5 pi)(* 6 (+ it ht)))  ht "0")
     (setq att7 (entlast))		       
    ))


     ;;;; creation bloc
     

     (if (or talon typ_collet)
      (progn 
       (command "_change"                          att1 att2 att3 att4 att5 att6 att7  "" "_p" "_la" "0" "_c" "DUBLOC" "")  
       (command "._-block" nomb "_non" '(0. 0. 0.) att1 att2 att3 att4 att5 att6 att7 bridesolide "")
      )
      (progn 
       (command "_change"                          att1 att2 att3 att4 att5 att6  "" "_p" "_la" "0" "_c" "DUBLOC" "") 
(command "._-block" nomb "_non" '(0. 0. 0.) att1 att2 att3 att4 att5 att6 bridesolide "")
      )
     )	
     
     ;;;; insertion bloc
     (setq atdia (getvar "attdia"))
     (setvar "attdia" 1)
     (command "._-insert" nomb "_non" '(0. 0. 0.) "" "" "0" )
     (setvar "attdia" atdia)

     (setvar "aflags" af)
     (setvar "textsize" tsize )  
     (setvar "textstyle" st)
     
   )
   (princ "\nPas de valeur dans base données pour ce type de bride")
 )

 )) ;;; fin if tblsearch bloc
 
 (if sv_dm (setvar "DYNMODE" sv_dm))
  
 ;(cond (pt_ins  (command "_.ucs" "_p")  (setq pf nil)))
 (repeat 2 (command "_ucs" "_p"))
 (setvar "delobj" delobjet)
 (command "_undo" "_e")
 (setq *error* m:err m:err nil)
 (setvar "CMDECHO" 1)
 (prin1)
)









Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer. Politique de confidentialité