Aller au contenu

Bibli Lisp 2D en 3D?


kohen.g

Messages recommandés

Salut Usegomme,

je pense revenir à des blocs "bride", mais créé si absent dans le dessin par le lisp.

J'attends ça avec impatiente

 

c´est à Bonuscad que l´on doit bride.lsp

Toutes mes confuses à Mr Bonuscad

HPZ400 Workstation

Intel Xeon W3550 3.07 GHz

6 Go ram

QUADRO FX 1800

Lien vers le commentaire
Partager sur d’autres sites

  • Réponses 58
  • Créé
  • Dernière réponse

Meilleurs contributeurs dans ce sujet

Salut , voilà ça a fini par arriver .

J'ai également remodifier BRIDE.lsp au dessus.

Et à cette adresse on retrouve les lisps pour la tuyauterie et chaudronnerie 3 D dont celui ci-dessous .

 


;;; 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 
;;; dernières modifications:      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)

(defun erreurbride (msg)
 (setvar "delobj" delobjet)
 (if sv_dm (setvar "DYNMODE" sv_dm))
 (setvar "CMDECHO" 1)
 (setq *error* m:err m:err nil)
 (princ)
)

(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)
 (setq delobjet (getvar "delobj"))
 (setvar "delobj" 2)
 
 (setq PN6
   '(
     (10 . (75.0 50.0 11.0 4 17.20 18.00 12 nil nil nil 8 10 nil 28 nil nil nil nil nil 35.0 2 nil ))
     (15 . (80.0 55.0 11.0 4 21.30 22.00 12 nil nil nil 8 10 nil 30 nil nil nil nil nil 40.0 2 nil ))
     (20 . (90.0 65.0 11.0 4 26.90 27.50 14 nil nil nil 10 10 nil 32 nil nil nil nil nil 50.0 2 nil ))
     (25 . (100.0 75.0 11.0 4 33.70 34.50 14 nil nil nil 10 12 nil 35 nil nil nil nil nil 60.0 2 nil ))
     (32 . (120.0 90.0 14.0 4 42.40 43.50 16 nil nil nil 10 12 nil 35 nil nil nil nil nil 70.0 2 nil ))
     (40 . (130.0 100.0 14.0 4 48.30 49.00 16 nil nil nil 10 12 nil 38 nil nil nil nil nil 80.0 3 nil ))
     (50 . (140.0 110.0 14.0 4 60.30 61.50 16 nil nil nil 12 12 nil 38 nil nil nil nil nil 90.0 3 nil ))
     (65 . (160.0 130.0 14.0 4 76.10 77.50 16 nil nil nil 12 12 nil 38 nil nil nil nil nil 110.0 3 nil ))
     (80 . (190.0 150.0 18.0 4 88.90 90.50 18 nil nil nil 14 14 nil 42 nil nil nil nil nil 128.0 3 nil ))
     (100 . (210.0 170.0 18.0 4 114.30 116.00 18 nil nil nil 14 14 nil 45 nil nil nil nil nil 148.0 3 nil ))
     (125 . (240.0 200.0 18.0 8 139.70 141.50 20 nil nil nil 14 14 nil 48 nil nil nil nil nil 178.0 3 nil ))
     (150 . (265.0 225.0 18.0 8 168.30 170.50 20 nil nil nil 14 14 nil 48 nil nil nil nil nil 202.0 3 nil ))
     (200 . (320.0 280.0 18.0 8 219.10 222.00 22 nil nil nil 16 16 nil 55 nil nil nil nil nil 258.0 3 nil ))
     (250 . (375.0 335.0 18.0 12 273.00 276.50 24 nil nil nil 18 20 nil 60 nil nil nil nil nil 312.0 3 nil ))
     (300 . (440.0 395.0 22.0 12 323.90 327.50 24 nil nil nil 18 24 nil 62 nil nil nil nil nil 365.0 4 nil ))
     (350 . (490.0 445.0 22.0 12 355.60 359.50 26 nil nil nil 18 26 nil 62 nil nil nil nil nil 415.0 4 nil ))
     (400 . (540.0 495.0 22.0 16 406.40 411.00 28 nil nil nil 20 28 nil 65 nil nil nil nil nil 465.0 4 nil ))
     (450 . (595.0 550.0 22.0 16 457.00 462.50 30 nil nil nil 20 30 nil 65 nil nil nil nil nil 520.0 4 nil ))
     (500 . (645.0 600.0 22.0 20 508.00 513.50 30 nil nil nil 22 32 nil 68 nil nil nil nil nil 570.0 4 nil ))
     (600 . (755.0 705.0 26.0 20 610.00 616.50 30 nil nil nil 22 36 nil 70 nil nil nil nil nil 670.0 5 nil ))
   )
 )
 (setq PN10
   '(
     (10 . (90.0 60.0 14.0 4 17.20 18.00 14 14 16 14 10 14 20 35 6 28.0 30.0 30.0 6.10 40.0 2 2.0 ))
     (15 . (95.0 65.0 14.0 4 21.30 22.00 14 14 16 14 10 14 20 35 6 32.0 35.0 37.0 12.70 45.0 2 2.0 ))
     (20 . (105.0 75.0 14.0 4 26.90 27.50 16 16 18 16 12 16 24 38 6 40.0 45.0 44.0 19.00 58.0 2 2.0 ))
     (25 . (115.0 85.0 14.0 4 33.70 34.50 16 16 18 16 12 16 24 38 6 45.0 52.0 53.0 25.40 68.0 2 2.3 ))
     (32 . (140.0 100.0 18.0 4 42.40 43.50 16 16 18 18 12 16 26 40 6 56.0 60.0 60.0 31.80 78.0 2 2.6 ))
     (40 . (150.0 110.0 18.0 4 48.30 49.00 16 16 18 18 12 16 26 42 7 64.0 70.0 68.0 38.00 88.0 3 2.6 ))
     (50 . (165.0 125.0 18.0 4 60.30 61.50 18 18 18 18 14 16 28 45 8 75.0 85.0 80.0 50.80 102.0 3 2.9 ))
     (65 . (185.0 145.0 18.0 4 76.10 77.50 18 18 18 20 14 18 32 45 10 90.0 105.0 93.0 63.50 122.0 3 2.9 ))
     (80 . (200.0 160.0 18.0 8 88.90 90.50 22 20 20 20 16 18 34 50 10 105.0 118.0 110.0 76.20 138.0 3 3.2 ))
     (100 . (220.0 180.0 18.0 8 114.30 116.00 22 20 20 22 16 18 38 52 12 131.0 140.0 130.0 101.60 158.0 3 3.6 ))
     (125 . (250.0 210.0 18.0 8 139.70 141.50 24 22 22 22 18 18 44 55 12 156.0 168.0 159.0 127.00 188.0 3 4.0 ))
     (150 . (285.0 240.0 22.0 8 168.30 170.50 24 22 22 24 18 18 44 55 12 184.0 195.0 184.0 152.40 212.0 3 4.5 ))
     (200 . (340.0 295.0 22.0 8 219.10 222.00 24 24 24 24 20 20 44 62 16 235.0 247.0 236.0 203.20 268.0 3 5.6 ))
     (250 . (395.0 350.0 22.0 12 273.00 276.50 26 26 26 26 22 22 46 68 16 292.0 300.0 290.0 254.00 320.0 3 6.3 ))
     (300 . (445.0 400.0 22.0 12 323.90 327.50 26 26 26 26 22 26 46 68 16 344.0 352.0 342.0 304.80 370.0 4 7.1 ))
     (350 . (505.0 460.0 22.0 16 355.60 359.50 28 26 26 26 22 28 53 68 16 385.0 398.0 396.0 355.60 430.0 4 8.0 ))
     (400 . (565.0 515.0 26.0 16 406.40 411.00 32 26 26 28 24 32 57 72 16 440.0 448.0 448.0 406.40 482.0 4 8.8 ))
     (450 . (615.0 565.0 26.0 20 457.00 462.50 38 28 28 28 24 34 62 72 16 488.0 502.0 498.0 457.20 532.0 4 10.0 ))
     (500 . (670.0 620.0 26.0 20 508.00 513.50 38 28 28 30 26 38 67 75 16 542.0 552.0 552.0 508.00 585.0 4 11.0 ))
     (600 . (780.0 725.0 30.0 20 610.00 616.50 40 28 30 34 26 44 75 80 18 642.0 658.0 652.0 609.60 685.0 5 12.5 ))
   )
 )
 (setq PN16
   '(
     (10 . (90.0 60.0 14.0 4 17.20 18.00 14 14 16 14 10 14 20 35 6 28.0 30.0 30.0 6.10 40.0 2 2.0 ))
     (15 . (95.0 65.0 14.0 4 21.30 22.00 14 14 16 14 10 14 20 35 6 32.0 35.0 37.0 12.70 45.0 2 2.0 ))
     (20 . (105.0 75.0 14.0 4 26.90 27.50 16 16 18 16 12 16 24 38 6 40.0 45.0 44.0 19.00 58.0 2 2.0 ))
     (25 . (115.0 85.0 14.0 4 33.70 34.50 16 16 18 16 12 16 24 38 6 45.0 52.0 53.0 25.40 68.0 2 2.3 ))
     (32 . (140.0 100.0 18.0 4 42.40 43.50 16 16 18 18 12 16 26 40 6 56.0 60.0 60.0 31.80 78.0 2 2.6 ))
     (40 . (150.0 110.0 18.0 4 48.30 49.00 16 16 18 18 12 16 26 42 7 64.0 70.0 68.0 38.00 88.0 3 2.6 ))
     (50 . (165.0 125.0 18.0 4 60.30 61.50 18 18 18 18 14 16 28 45 8 75.0 85.0 80.0 50.80 102.0 3 2.9 ))
     (65 . (185.0 145.0 18.0 4 76.10 77.50 18 18 18 20 14 18 32 45 10 90.0 105.0 93.0 63.50 122.0 3 2.9 ))
     (80 . (200.0 160.0 18.0 8 88.90 90.50 22 20 20 20 16 18 34 50 10 105.0 118.0 110.0 76.20 138.0 3 3.2 ))
     (100 . (220.0 180.0 18.0 8 114.30 116.00 22 20 20 22 16 18 38 52 12 131.0 140.0 130.0 101.60 158.0 3 3.6 ))
     (125 . (250.0 210.0 18.0 8 139.70 141.50 24 22 22 22 18 18 44 55 12 156.0 168.0 159.0 127.00 188.0 3 4.0 ))
     (150 . (285.0 240.0 22.0 8 168.30 170.50 24 22 22 24 18 18 44 55 12 184.0 195.0 184.0 152.40 212.0 3 4.5 ))
     (200 . (340.0 295.0 22.0 12 219.10 222.00 26 24 24 26 20 20 44 62 16 235.0 247.0 236.0 203.20 268.0 3 5.6 ))
     (250 . (405.0 355.0 26.0 12 273.00 276.50 32 26 26 26 22 24 46 70 16 292.0 300.0 290.0 254.00 320.0 3 6.3 ))
     (300 . (460.0 410.0 26.0 12 323.90 327.50 32 28 28 28 24 28 46 78 16 344.0 355.0 348.0 304.80 378.0 4 7.1 ))
     (350 . (520.0 470.0 26.0 16 355.60 359.50 36 30 30 30 26 32 57 82 16 390.0 400.0 396.0 355.60 438.0 4 8.0 ))
     (400 . (580.0 525.0 30.0 16 406.40 411.00 38 32 32 32 28 36 63 85 16 445.0 456.0 448.0 406.40 490.0 4 8.8 ))
     (450 . (640.0 585.0 30.0 20 457.00 462.50 42 34 36 36 30 40 68 85 16 490.0 502.0 516.0 457.20 550.0 4 10.0 ))
     (500 . (715.0 650.0 33.0 20 508.00 513.50 44 34 36 40 32 44 73 90 16 548.0 559.0 554.0 508.00 610.0 4 11.0 ))
     (600 . (840.0 770.0 36.0 20 610.00 616.50 48 36 40 44 0 0 83 95 18 652.0 658.0 660.0 609.60 725.0 5 12.5 ))
   )
 )
 (setq PN20
   '(
     (15 . (89.0 60.30 15.80 4 21.30 22.40 12 11.2 11.5 nil nil nil 16 48 6.4 30.0 nil nil 12.70 34.90 1.6 2.6 ))
     (20 . (99.0 69.80 15.80 4 26.90 27.70 14 12.7 13.0 nil nil nil 16 52 6.4 38.0 nil nil 19.00 42.90 1.6 2.9 ))
     (25 . (108.0 79.40 15.80 4 33.70 34.50 16 14.3 14.5 nil nil nil 17 56 6.4 49.0 nil nil 25.40 50.80 1.6 3.2 ))
     (32 . (117.0 88.90 15.80 4 42.40 43.20 18 15.9 16.0 nil nil nil 21 57 6.4 59.0 nil nil 31.80 63.50 1.6 3.6 ))
     (40 . (127.0 98.40 15.80 4 48.30 49.50 19 17.5 17.5 nil nil nil 22 62 6.4 65.0 nil nil 38.00 73.00 1.6 3.6 ))
     (50 . (152.0 120.60 19.00 4 60.30 62.00 21 19.1 15.9 nil nil nil 25 63 6.4 78.0 nil nil 50.80 92.10 1.6 4.0 ))
     (65 . (178.0 139.70 19.00 4 76.10 77.80 24 22.3 17.5 nil nil nil 29 70 6.4 90.0 nil nil 63.50 104.80 1.6 4.5 ))
     (80 . (190.0 152.40 19.00 4 88.90 90.70 26 23.9 19.1 nil nil nil 30 70 6.4 108.0 nil nil 76.20 127.00 1.6 5.0 ))
     (100 . (229.0 190.50 19.00 8 114.30 116.10 27 23.9 23.9 nil nil nil 33 76 6.4 135.0 nil nil 101.60 157.20 1.6 5.6 ))
     (125 . (254.0 215.90 22.20 8 139.70 142.20 28 23.9 23.9 nil nil nil 37 89 6.4 164.0 nil nil 127.00 185.70 1.6 6.3 ))
     (150 . (279.0 241.30 22.20 8 168.30 170.70 31 25.4 25.4 nil nil nil 40 89 6.4 192.0 nil nil 152.40 215.90 1.6 7.1 ))
     (200 . (343.0 298.40 22.20 8 219.10 221.50 34 28.6 28.6 nil nil nil 44 102 6.4 246.0 nil nil 203.20 269.90 1.6 8.0 ))
     (250 . (406.0 362.00 25.40 12 273.00 276.40 38 30.2 30.2 nil nil nil 49 102 6.4 305.0 nil nil 254.00 323.80 1.6 8.8 ))
     (300 . (483.0 431.80 25.40 12 323.90 327.20 42 31.8 31.8 nil nil nil 56 114 6.4 365.0 nil nil 304.80 381.00 1.6 10.0 ))
     (350 . (533.0 476.20 28.50 12 355.60 359.20 43 35.0 35.0 nil nil nil 57 127 6.4 400.0 nil nil 355.60 412.80 1.6 11.0 ))
     (400 . (597.0 539.80 28.50 16 406.40 410.50 48 36.6 36.6 nil nil nil 63 127 6.4 457.0 nil nil 406.40 469.90 1.6 12.5 ))
     (450 . (635.0 577.80 31.80 16 457.00 461.80 52 39.7 39.7 nil nil nil 68 140 6.4 505.0 nil nil 457.20 533.40 1.6 14.2 ))
     (500 . (698.0 635.00 31.80 20 508.00 513.10 56 42.9 42.9 nil nil nil 73 144 6.4 559.0 nil nil 508.00 584.20 1.6 16.0 ))
     (600 . (813.0 749.30 35.00 20 610.00 616.00 62 47.7 47.7 nil nil nil 83 152 6.4 664.0 nil nil 609.60 692.20 1.6 17.5 ))
   )
 )
 (setq PN25
   '(
     (10 . (90.0 60.0 14.0 4 17.20 18.20 nil nil 16 14 12 16 22 35 6 28.0 30.0 30.0 6.10 40.0 2 2.3 ))
     (15 . (95.0 65.0 14.0 4 21.30 22.00 nil nil 16 14 12 16 22 38 6 32.0 35.0 37.0 12.70 45.0 2 2.6 ))
     (20 . (105.0 75.0 14.0 4 26.90 27.50 nil nil 18 16 14 16 26 40 6 40.0 45.0 44.0 19.00 58.0 2 2.9 ))
     (25 . (115.0 85.0 14.0 4 33.70 34.50 nil nil 18 16 14 18 28 40 6 46.0 52.0 53.0 25.40 68.0 2 3.2 ))
     (32 . (140.0 100.0 18.0 4 42.40 43.50 nil nil 18 18 14 18 30 42 6 56.0 60.0 60.0 31.80 78.0 2 3.6 ))
     (40 . (150.0 110.0 18.0 4 48.30 49.00 nil nil 18 18 14 18 32 45 7 64.0 70.0 68.0 38.00 88.0 3 3.6 ))
     (50 . (165.0 125.0 18.0 4 60.30 61.50 nil nil 20 20 16 20 34 48 8 75.0 85.0 80.0 50.80 102.0 3 4.0 ))
     (65 . (185.0 145.0 18.0 8 76.10 77.50 nil nil 22 22 16 20 38 52 10 90.0 105.0 99.0 63.50 122.0 3 4.5 ))
     (80 . (200.0 160.0 18.0 8 88.90 90.50 nil nil 24 24 18 22 40 58 12 105.0 118.0 116.0 76.20 138.0 3 5.0 ))
     (100 . (235.0 190.0 22.0 8 114.30 116.00 nil nil 24 26 20 22 44 65 12 134.0 145.0 136.0 101.60 162.0 3 5.6 ))
     (125 . (270.0 220.0 26.0 8 139.70 141.50 nil nil 26 28 22 24 48 68 12 162.0 170.0 165.0 127.00 188.0 3 6.3 ))
     (150 . (300.0 250.0 26.0 8 168.30 170.50 nil nil 28 30 22 24 52 75 12 192.0 200.0 192.0 152.40 218.0 3 7.1 ))
     (200 . (360.0 310.0 26.0 12 219.10 222.00 nil nil 30 32 24 26 52 80 16 244.0 256.0 246.0 203.20 278.0 3 8.0 ))
     (250 . (425.0 370.0 30.0 12 273.00 276.50 nil nil 32 32 26 30 60 88 18 298.0 310.0 298.0 254.00 335.0 3 8.8 ))
     (300 . (485.0 430.0 30.0 16 323.90 327.50 nil nil 34 34 28 34 67 92 18 352.0 364.0 352.0 304.80 395.0 4 10.0 ))
     (350 . (555.0 490.0 33.0 16 355.60 359.50 nil nil 38 38 32 38 72 100 20 398.0 418.0 408.0 355.60 450.0 4 11.0 ))
     (400 . (620.0 550.0 36.0 16 406.40 411.00 nil nil 40 40 34 42 78 110 20 452.0 472.0 460.0 406.40 505.0 4 12.5 ))
     (450 . (670.0 600.0 36.0 20 457.00 462.50 nil nil 42 44 0 0 84 110 20 500.0 520.0 520.0 457.20 550.0 4 14.2 ))
     (500 . (730.0 660.0 36.0 20 508.00 513.50 nil nil 44 48 38 50 90 125 20 558.0 580.0 566.0 508.00 615.0 4 16.0 ))
     (600 . (845.0 770.0 39.0 20 610.00 616.50 nil nil 46 54 0 0 100 125 20 660.0 684.0 670.0 609.60 720.0 5 17.5 ))
   )
 )
 (setq PN40
   '(
     (10 . (90.0 60.0 14.0 4 17.20 18.20 nil nil 16 14 12 16 22 35 6 28.0 30.0 30.0 6.10 40.0 2 2.3 ))
     (15 . (95.0 65.0 14.0 4 21.30 22.00 nil nil 16 14 12 16 22 38 6 32.0 35.0 37.0 12.70 45.0 2 2.6 ))
     (20 . (105.0 75.0 14.0 4 26.90 27.50 nil nil 18 16 14 16 26 40 6 40.0 45.0 44.0 19.00 58.0 2 2.9 ))
     (25 . (115.0 85.0 14.0 4 33.70 34.50 nil nil 18 16 14 18 28 40 6 46.0 52.0 53.0 25.40 68.0 2 3.2 ))
     (32 . (140.0 100.0 18.0 4 42.40 43.50 nil nil 18 18 14 18 30 42 6 56.0 60.0 60.0 31.80 78.0 2 3.6 ))
     (40 . (150.0 110.0 18.0 4 48.30 49.00 nil nil 18 18 14 18 32 45 7 64.0 70.0 68.0 38.00 88.0 3 3.6 ))
     (50 . (165.0 125.0 18.0 4 60.30 61.50 nil nil 20 20 16 20 34 48 8 75.0 85.0 80.0 50.80 102.0 3 4.0 ))
     (65 . (185.0 145.0 18.0 8 76.10 77.50 nil nil 22 22 16 20 38 52 10 90.0 105.0 99.0 63.50 122.0 3 4.5 ))
     (80 . (200.0 160.0 18.0 8 88.90 90.50 nil nil 24 24 18 22 40 58 12 105.0 118.0 116.0 76.20 138.0 3 5.0 ))
     (100 . (235.0 190.0 22.0 8 114.30 116.00 nil nil 24 26 20 22 44 65 12 134.0 145.0 136.0 101.60 162.0 3 5.6 ))
     (125 . (270.0 220.0 26.0 8 139.70 141.50 nil nil 26 28 22 24 48 68 12 162.0 170.0 165.0 127.00 188.0 3 6.3 ))
     (150 . (300.0 250.0 26.0 8 168.30 170.50 nil nil 28 30 22 24 52 75 12 192.0 200.0 192.0 152.40 218.0 3 7.1 ))
     (200 . (375.0 320.0 30.0 12 219.10 222.00 nil nil 32 36 26 30 52 88 16 244.0 260.0 252.0 203.20 285.0 3 8.0 ))
     (250 . (450.0 385.0 33.0 12 273.00 276.50 nil nil 38 38 30 36 60 105 18 306.0 320.0 308.0 254.00 345.0 3 8.8 ))
     (300 . (515.0 450.0 33.0 16 323.90 327.50 nil nil 42 42 34 40 67 115 18 362.0 380.0 364.0 304.80 410.0 4 10.0 ))
     (350 . (580.0 510.0 36.0 16 355.60 359.50 nil nil 46 46 38 46 72 125 20 408.0 424.0 420.0 355.60 465.0 4 11.0 ))
     (400 . (660.0 585.0 39.0 16 406.40 411.00 nil nil 50 50 42 50 78 135 20 462.0 478.0 476.0 406.40 535.0 4 12.5 ))
     (450 . (685.0 610.0 39.0 20 457.00 462.50 nil nil 50 54 46 50 84 135 20 500.0 522.0 526.0 457.20 560.0 4 14.2 ))
     (500 . (755.0 670.0 42.0 20 508.00 513.50 nil nil 52 60 50 60 90 140 20 562.0 576.0 578.0 508.00 615.0 4 16.0 ))
     (600 . (890.0 795.0 48.0 20 610.00 616.50 nil nil 60 70 0 0 100 150 20 666.0 686.0 690.0 609.60 735.0 5 17.5 ))
   )
 )
 (setq PN50
   '(
     (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 ))
   )
 )
 (setq PN100
   '(
     (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 ))
   )
 )
 (setq PN150
   '(
     (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 ))
   )
 )
 (setq PN250
   '(
     (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 ))
   )
 )
 (setq PN420
   '(
     (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 sv_dm (getvar "DYNMODE"))
 (cond ((< sv_dm 0) (setq dm (* sv_dm -1)) (setvar "DYNMODE" dm))
           (t (setq sv_dm nil dm nil))
 )
 
 (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 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)))))
   "]?: "))
 )
 
 ;; definition de l'unité de dessin , en cas d'erreur de choix réinitialisé "users5" à valeur " " 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] : ")))
       (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))))
   
 )
 
 (setvar "CMDECHO" 0)
 (setq l_val (cdr (assoc (atoi (substr model_brd 3)) l_data)))
 (initget 1)
 (setq pt_ins (getpoint "\nPoint d'insertion?: ") js_add (ssadd) js_remove (ssadd))
 ;; orientation bride 
 (if pt_ins (setq pf ( getpoint  pt_ins "\n direction de la bride <>: ")))
 (cond
   ((and pt_ins pf)
     (command "_ucs" "_zaxis" "_none" pt_ins "_none" pf)
     (setq pt_ins '(0. 0. 0.))
   )
   (pt_ins (command "_ucs" "_none" pt_ins "") (setq pt_ins '(0. 0. 0.)))
 )
 
 (initget 1 "PLATE TOURNANTE COLLERETTE SLIP-ON LWN")
 (setq typ_brd (getkword "\nType de bride [PLATE/TOURNANTE/COLLERETTE/SLIP-ON/LWN]?: "))
 (setq d_tuy (* 0.5 (nth 4 l_val) unit_draw))
 
 (cond
   ((eq typ_brd "PLATE")
     (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")
     (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) talon nil
          nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd  ))
           (progn
             (setq j (* 0.5 (nth 4 l_val) unit_draw) talon T)
             (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
       ((and (nth 10 l_val)(/= PN_brd "PN6"))  
         (initget "2 4")
         (setq typ_collet (getkword "\nType de collets [2/4]?: "))
         (setq e1 (* (nth 11 l_val) unit_draw))
 
  (setq nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd "_" "collet_" typ_collet ))
 
       )
       ((nth 10 l_val)                                       
         (setq e1 (* (nth 11 l_val) unit_draw))
  (setq nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd "_" "collet_"      ))
       )
     )
   )
   
   ((eq typ_brd "SLIP-ON")
    (setq nomb (strcat "BRIDE" "_" typ_brd  "_" model_brd  "_" PN_brd  ))
   )
   
   ((eq typ_brd "LWN")
    (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")
         (if (eq typ_collet "4")
           (progn 
             (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) "")             
             ;;;;;;;;;;;;;;;;;;;;    
           )
         )
  );;; fin tournante

  ((eq typ_brd "SLIP-ON")
     (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))
       )
     )
   )  ;;; fin SLIP-ON

  ((eq typ_brd "LWN")
     (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)
       (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 18 l_val)))
         (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
     (command "_.circle" "_none" pt_ins (* (nth 19 l_val) 0.5 unit_draw))
     (command "_.extrude" (entlast) "" (+ e1 (if (eq typ_brd "TOURNANTE") (* (nth 10 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") (* (nth 10 l_val) unit_draw) (* (nth 20 l_val) unit_draw))) (* (car l_val) 0.5 unit_draw))
     (command "_.extrude" (entlast) "" e1)
     (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 
       (if (eq typ_brd "LWN")
         (* 0.5 (nth 18 l_val)) 
         (if (eq typ_brd "COLLERETTE")
           (- (* 0.5 (nth 4 l_val) unit_draw) j) 
           (if (eq typ_collet "4")  (- (* 0.5 (nth 4 l_val) unit_draw) (* (nth 21 l_val) unit_draw) )   d_tuy )       
         )
       )
     ) 
     (command "_.extrude" (entlast) "" (+ e1 (if (eq typ_brd "TOURNANTE") (* (nth 10 l_val) unit_draw) (* (nth 20 l_val) unit_draw))))
     (setq js_remove (ssadd (entlast) js_remove))
     ;; trous boulons
     (command "_.circle" "_none" (polar (list (car pt_ins) (cadr pt_ins) (if (eq typ_brd "TOURNANTE") (* (nth 10 l_val) unit_draw) (* (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 "")
     (setq bridesolide (entlast))

     ;; 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)
       (command "._-block" nomb "_non" '(0. 0. 0.) att1 att2 att3 att4 att5 att6 att7 bridesolide "")
(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)))
 (setvar "delobj" delobjet)
 (setq *error* m:err m:err nil)
 (setvar "CMDECHO" 1)
 (prin1)
)








[Edité le 30/3/2010 par usegomme]

 

[Edité le 21/1/2011 par usegomme]

Lien vers le commentaire
Partager sur d’autres sites

  • 6 mois après...

:( Bonjour à tous,

 

J'ai un petit souci avec le lisp bbride d'usegomme, les boites de dialogue pour choisir le pn, le dn et le type de bride ne s'ouvrent plus.

Je suis obligé de rentrer tout à la main.

Je pense que cet une variable, mais laquelle?

 

Merci d'avance

HPZ400 Workstation

Intel Xeon W3550 3.07 GHz

6 Go ram

QUADRO FX 1800

Lien vers le commentaire
Partager sur d’autres sites

  • 2 mois après...

Sinon pour Fraxa , j'espère que tu as résolu ton mystérieux souci de boite de dialogue... ?

 

Merci de t'inquiéter pour moi, problème résolu.

Ce que je prenais pour "une boite de dialogue " n'était autre que la saisie dynamique active.

HPZ400 Workstation

Intel Xeon W3550 3.07 GHz

6 Go ram

QUADRO FX 1800

Lien vers le commentaire
Partager sur d’autres sites

  • 1 an après...

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é