
usegomme
Membres-
Compteur de contenus
621 -
Inscription
-
Dernière visite
Tout ce qui a été posté par usegomme
-
https://1drv.ms/f/s!Am_FKRdjqVRZhBDwYE_rP_oGJoJE https://drive.google.com/drive/folders/10GVboAodPx9Qkny7yNTYXxL7slXj7gVV?usp=sharing Salut tout le monde Bonuscad a vu juste, je suis à la retraite depuis 2019 et surtout, à partir de 2014, je n'ai plus vraiment travaillé avec Autocad. J'ai toutefois eu ensuite à ma disposition un Autocad 2015. Tout ça pour dire que je ne sais pas si mes lisp fonctionnent correctement au delà de la version 2015. J'ai encore sur un vieux PC un 2013, il ne faudra donc pas compter sur moi pour corriger des bugs. Les deux liens au dessus envoient sur OneDrive de Microsoft ou le Drive Google qui contiennent les mêmes fichiers. Avec la dernière version de Tuyau3d, on peut tout faire en "solide" comme avant, mais aussi tout en éléments "bloc" avec des attributs, sauf le calorifuge. Pour faciliter la création des tuyaux en bloc, j'avais rajouter une case de dialogue avec laquelle on peut aussi copier les propriétés d' un tube existant (cde CTUB). Il y a 2 fichiers additionnel pour faire fonctionner la case de dialogue. La difficulté avec les blocs, c'est qu'il faut pouvoir étirer les tubes en cas de modif. Aussi j'avais rajouté la cde ETUB pour étire tube, qui en réalité remplace le bloc par un autre. Si le changement de longueur est fait par une autre méthode , il y a un petit lisp pour mettre à jour l' attribut de longueur du tube (matlg.lsp). Vous trouverez aussi dans les lisp les raccords, les profilés métalliques etc.. Quand il y a un "B" devant ou derrière le nom, c'est que le lisp crée des blocs. Il y a aussi les lisp Bride et BBride initialement crée par Bonuscad avec un structure un peu sophistiqué qui m'a mis en difficulté pour le faire évoluer. J'avais fait une mise à jour de la normalisation, grosse galère mais importante. Mes remerciements à tous ceux qui bossent et cotisent pour ma retraite car je n'ai pas prévu de mourir de sitôt , et désolé pour la votre de retraite, mais je plaide non coupable car je n'ai pas voté Manu et j'ai cotisé de 18 à 64 ans avec une formation professionnelle chemin faisant. Au plaisir
-
https://1drv.ms/f/s!Am_FKRdjqVRZhBDwYE_rP_oGJoJE https://drive.google.com/drive/folders/10GVboAodPx9Qkny7yNTYXxL7slXj7gVV?usp=sharing
-
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) )
-
Charmante photo, mais la main tendue est impossible dans le cas présent. Ce serait les soutenir et ils te trancheraient la main sitôt qu'ils ne verraient plus d'intérêt à l'alliance. Ce serait revenir à l'époque de Vichy.
-
Un petit mot pour dire que je suis impressionné par la "une" du journal, un tel humanisme après pareille sauvagerie mérite le respect, bravo. Ce sont eux les vrais chrétiens. Ceux qui saccagent tout une fois de plus pour leur prophète sont des ânes stupides qui ne comprennent rien à rien et surtout rien à Dieu. Je suis Charlie et je m'abonne!
-
Réduction Iso Inox roulé soudé pour 3 D
usegomme a répondu à un(e) sujet de usegomme dans Routines LISP
Salut Titi95 Voilà, tu peux le tester, n'hésite pas pour les améliorations et autres. Je n'ai pas creusé pour l'épaisseur et l'option "autre DN" n'est pas disponible, a voir si c'est utile. ; Réduction Inox Iso en 3D et en bloc ; usegomme ; 09/04/2015 création de bloc ; 29/04/2015 correction orientation ; 30/04/2015 creation "catalogue" reduction ; 20/05/2015 rajout attributs "type" & "DN" (defun c:RedIB (/ pd pdd pdir pf pfd r1 r1i r2 r2i a h d1 d2 sv_dm dm dn1 dn2 ta gdn reduc st tsize af ht it att1 att2) (command "_undo" "_be") (setq pd (getpoint "\nPoint de départ de la reduction :")) (if pd (setq pdir (getpoint pd "\n direction de la réduction <>: "))) (cond ((and pd pdir) (command "_ucs" "_zaxis" "_non" pd "_non" pdir) (setq pd '(0. 0. 0.)) ) ) (cond (pd (setq sv_dm (getvar "DYNMODE")) (cond ((< sv_dm 0) (setq dm (* sv_dm -1)) (setvar "DYNMODE" dm)) (t (setq sv_dm nil dm nil)) ) (setq d1 nil d2 nil) (while (not d1) (initget "Autre 8 10 15 20 25 32 40 50 65 80 100 125 150 200 250 300") (setq dn (getkword "\n DN [Autre/8/10/15/20/25/32/40/50/65/80/100/125/150/200/250/300]:")) (cond ((= dn "8") (setq d1 13.5)) ((= dn "10") (setq d1 17.2)) ((= dn "15") (setq d1 21.3)) ((= dn "20") (setq d1 26.9)) ((= dn "25") (setq d1 33.7)) ((= dn "32") (setq d1 42.4)) ((= dn "40") (setq d1 48.3)) ((= dn "50") (setq d1 60.3)) ((= dn "65") (setq d1 76.1)) ((= dn "80") (setq d1 88.9)) ((= dn "100") (setq d1 114.3)) ((= dn "125") (setq d1 139.7)) ((= dn "150") (setq d1 168.3)) ((= dn "200") (setq d1 219.1)) ((= dn "250") (setq d1 273)) ((= dn "300") (setq d1 323.9)) ((= dn "Autre") (setq d1 (getdist "\nDiamètre de la reduction en mm:"))) (t (princ)) ) ) (setq dn1 dn) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (while (not d2) (cond ((= dn "8") (initget "10 15 20 25") (setq dn (getkword "\n DN [10/15/20/25]:")) (cond ((= dn "10")(setq d2 17.2 h 11 ))((= dn "15")(setq d2 21.3 h 23 )) ((= dn "20")(setq d2 26.9 h 40 ))((= dn "25")(setq d2 33.7 h 60 )) ) ) ((= dn "10") (initget "8 15 20 25 32 40 50") (setq dn (getkword "\n DN [8/15/20/25/32/40/50]:")) (cond ((= dn "8")(setq d2 13.5 h 11 ))((= dn "15")(setq d2 21.3 h 12 )) ((= dn "20")(setq d2 26.9 h 29 ))((= dn "25")(setq d2 33.7 h 49 ))((= dn "32")(setq d2 42.4 h 75 )) ((= dn "40")(setq d2 48.3 h 93 ))((= dn "50") (setq d2 60.3 h 129)) ) ) ((= dn "15") (initget "8 10 20 25 32 40 50") (setq dn (getkword "\n DN [8/10/20/25/32/40/50]:")) (cond ((= dn "8")(setq d2 13.5 h 23 )) ((= dn "10")(setq d2 17.2 h 12 )) ((= dn "20")(setq d2 26.9 h 17 ))((= dn "25")(setq d2 33.7 h 37 ))((= dn "32")(setq d2 42.4 h 63 )) ((= dn "40")(setq d2 48.3 h 81 )) ((= dn "50")(setq d2 60.3 h 117 )) ) ) ((= dn "20") (initget "8 10 15 25 32 40 50 65 80") (setq dn (getkword "\n DN [8/10/15/25/32/40/50/65/80]:")) (cond ((= dn "8")(setq d2 13.5 h 40 ))((= dn "10")(setq d2 17.2 h 29 )) ((= dn "15")(setq d2 21.3 h 17 ))((= dn "25")(setq d2 33.7 h 20 )) ((= dn "32")(setq d2 42.4 h 46 ))((= dn "40")(setq d2 48.3 h 64 )) ((= dn "50")(setq d2 60.3 h 100 ))((= dn "65")(setq d2 76.1 h 149 ))((= dn "80")(setq d2 88.9 h 185 )) ) ) ((= dn "25") (initget "8 10 15 20 32 40 50 65 80") (setq dn (getkword "\n DN [8/10/15/20/32/40/50/65/80]:")) (cond ((= dn "8")(setq d2 13.5 h 60 ))((= dn "10")(setq d2 17.2 h 49 ))((= dn "15")(setq d2 21.3 h 37)) ((= dn "20")(setq d2 26.9 h 20 ))((= dn "32")(setq d2 42.4 h 26 ))((= dn "40")(setq d2 48.3 h 44 )) ((= dn "50")(setq d2 60.3 h 80 ))((= dn "65")(setq d2 76.1 h 127 ))((= dn "80")(setq d2 88.9 h 166 )) ) ) ((= dn "32") (initget "8 10 15 20 25 40 50 65") (setq dn (getkword "\n DN [8/10/15/20/25/40/50/65]:")) (cond ((= dn "8")(setq d2 13.5 h 87 ))((= dn "10")(setq d2 17.2 h 75 ))((= dn "15")(setq d2 21.3 h 63)) ((= dn "20")(setq d2 26.9 h 46 ))((= dn "25")(setq d2 33.7 h 26 ))((= dn "40")(setq d2 48.3 h 18 )) ((= dn "50")(setq d2 60.3 h 54 ))((= dn "65")(setq d2 76.1 h 101)) ) ) ((= dn "40") (initget "10 15 20 25 32 50 65 80") (setq dn (getkword "\n DN [10/15/20/25/32/50/65/80]:")) (cond ((= dn "10")(setq d2 17.2 h 93 ))((= dn "15")(setq d2 21.3 h 81)) ((= dn "20")(setq d2 26.9 h 64 ))((= dn "25")(setq d2 33.7 h 44 ))((= dn "32")(setq d2 42.4 h 18 )) ((= dn "50")(setq d2 60.3 h 36 ))((= dn "65")(setq d2 76.1 h 83 ))((= dn "80")(setq d2 88.9 h 122 )) ((= dn "100")(setq d2 114.3 h 198 )) ) ) ((= dn "50") (initget "10 15 20 25 32 40 65 80 100") (setq dn (getkword "\n DN [10/15/20/25/32/40/65/80/100]:")) (cond ((= dn "10")(setq d2 17.2 h 129))((= dn "15")(setq d2 21.3 h 117))((= dn "20")(setq d2 26.9 h 100)) ((= dn "25")(setq d2 33.7 h 80 ))((= dn "32")(setq d2 42.4 h 54 ))((= dn "40")(setq d2 48.3 h 36 )) ((= dn "65")(setq d2 76.1 h 63 ))((= dn "80")(setq d2 88.9 h 86 ))((= dn "100")(setq d2 114.3 h 162)) ((= dn "150")(setq d2 168.3 h 324)) ) ) ((= dn "65") (initget "20 25 32 40 50 80 100") (setq dn (getkword "\n DN [20/25/32/40/50/80/100]:")) (cond ((= dn "20")(setq d2 26.9 h 149))((= dn "25")(setq d2 33.7 h 127)) ((= dn "32")(setq d2 42.4 h 101))((= dn "40")(setq d2 48.3 h 83 ))((= dn "50")(setq d2 60.3 h 63 )) ((= dn "80")(setq d2 88.9 h 38 ))((= dn "100")(setq d2 114.3 h 115 )) ) ) ((= dn "80") (initget "20 25 32 40 50 65 100 125 150") (setq dn (getkword "\n DN [20/25/32/40/50/65/100/125/150]:")) (cond ((= dn "20")(setq d2 26.9 h 185))((= dn "25")(setq d2 33.7 h 166))((= dn "32")(setq d2 42.4 h 139)) ((= dn "40")(setq d2 48.3 h 122 ))((= dn "50")(setq d2 60.3 h 86 ))((= dn "65")(setq d2 76.1 h 38 )) ((= dn "100")(setq d2 114.3 h 76 ))((= dn "125")(setq d2 139.7 h 152 ))((= dn "150")(setq d2 168.3 h 238 )) ) ) ((= dn "100") (initget "20 25 32 40 50 65 80 125 150 200") (setq dn (getkword "\n DN [20/25/32/40/50/65/80/125/150/200]:")) (cond ((= dn "20")(setq d2 26.9 h 262))((= dn "25")(setq d2 33.7 h 240))((= dn "32")(setq d2 42.4 h 216)) ((= dn "40")(setq d2 48.3 h 198 )) ((= dn "50")(setq d2 60.3 h 162 ))((= dn "65")(setq d2 76.1 h 115 ))((= dn "80")(setq d2 88.9 h 76 )) ((= dn "125")(setq d2 139.7 h 152))((= dn "150")(setq d2 168.3 h 162 ))((= dn "200")(setq d2 219.1 h 315 )) ) ) ((= dn "125") (initget "50 65 80 100 150 200") (setq dn (getkword "\n DN [50/65/80/100/150/200]:")) (cond ((= dn "50")(setq d2 60.3 h 238 ))((= dn "65")(setq d2 76.1 h 191 )) ((= dn "80")(setq d2 88.9 h 152 ))((= dn "100")(setq d2 114.3 h 76 ))((= dn "150")(setq d2 168.3 h 86 )) ((= dn "200")(setq d2 219.1 h 238 )) ) ) ((= dn "150") (initget "50 65 80 100 125 200 250") (setq dn (getkword "\n DN [50/65/80/100/125/200/250]:")) (cond ((= dn "50")(setq d2 60.3 h 324 ))((= dn "65")(setq d2 76.1 h 276 )) ((= dn "80")(setq d2 88.9 h 238 ))((= dn "100")(setq d2 114.3 h 162 ))((= dn "125")(setq d2 139.7 h 86 )) ((= dn "200")(setq d2 219.1 h 152 ))((= dn "250")(setq d2 273 h 314 )) ) ) ((= dn "200") (initget "100 125 150 250 300") (setq dn (getkword "\n DN [100/125/150/250/300]:")) (cond ((= dn "100")(setq d2 114.3 h 315 ))((= dn "125")(setq d2 139.7 h 238 )) ((= dn "150")(setq d2 168.3 h 152 ))((= dn "250")(setq d2 273 h 161 )) ((= dn "300")(setq d2 323.9 h 312 )) ) ) ((= dn "250") (initget "150 200 300") (setq dn (getkword "\n DN [150/200/300]:")) (cond ((= dn "150")(setq d2 168.3 h 314 ))((= dn "200")(setq d2 219.1 h 161 )) ((= dn "300")(setq d2 323.9 h 152 )) ) ) ((= dn "300") (initget "200 250") (setq dn (getkword "\n DN [200/250]:")) (cond ((= dn "200")(setq d2 219.1 h 312 ))((= dn "250")(setq d2 273 h 152 )) ) ) ) ) (setq dn2 dn) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if sv_dm (setvar "DYNMODE" sv_dm)) ) ) (cond (d2 (if (> d1 d2) (setq gdn dn1 dn dn2) (setq gdn dn2 dn dn1)) ;; pour nom bloc (if (= d1 d2) (setq h nil) (setq h (* 3 (abs (- d1 d2))))) (setq pf (list (car pd)(cadr pd) h)) (setq r1 (/ d1 2) r2 (/ d2 2)) ;;; cercles pour visualisation (command "_circle" "_non" pd r1) (setq b (entlast)) (command "_circle" "_non" pf r2) (setq b2 (entlast)) (if (< d1 d2) (command "_ucs" "_zaxis" "_non" pf "_non" pd)) (initget "Aucun") (if (> d1 d2) (setq ta (getpoint pf "\nSi excentrique TANGENT de quel coté?[<Aucun>]:")) (setq ta (getpoint '(0. 0. 0.) "\nSi excentrique TANGENT de quel coté?[<Aucun>]:")) ) (if (= ta "Aucun")(setq ta nil)) (if ta (if (and (= 0 (car ta))(= 0 (cadr ta)))(setq ta nil))) (if ta (setq a (angle pf ta))(setq a 0.0)) (if (< d1 d2) (command "_ucs" "_p")) ;;; supprime cercles pour visualisation (entdel B) (entdel b2) (if ta (setq nomb (strcat "REDUCT" "_" "EXC" "_" "ISO" "_DN" gdn "x" dn )) (setq nomb (strcat "REDUCT" "_" "CONC" "_" "ISO" "_DN" gdn "x" dn )) ) (if (tblsearch "block" nomb) ;; recherche bloc dans dessin (progn ;;;; insertion bloc (if (< d1 d2) (command "_ucs" "_zaxis" "_non" pf "_non" pd)) (command "_-insert" nomb "_non" '(0. 0. 0.) "" "" (* a (/ 180 pi))) (if (and (< d1 d2) ta)(command "_move" (entlast) "" "_non" '(0. 0. 0.) "_non" (polar '(0. 0. 0.) a (- r1 r2)))) (if (< d1 d2) (command "_ucs" "_p")) ) (progn ;; le bloc n´existe pas ;;;; creation solide 3 d ;; si excentré tangent sur angle 0 (cond ((and ta (< r1 r2)) (setq pdd (polar pd (* 2 pi) (- r1 r2))) (command "_circle" "_non" pdd r1) (setq b (entlast)) (command "_circle" "_non" pf r2) (setq b2 (entlast)) ) ((and ta (> r1 r2)) (setq pfd (polar pf 0 (- r1 r2))) (command "_circle" "_non" pd r1) (setq b (entlast)) (command "_circle" "_non" pfd r2) (setq b2 (entlast)) ) (t (command "_circle" "_non" pd r1) (setq b (entlast)) (command "_circle" "_non" pf r2) (setq b2 (entlast)) ) ) (command "_loft" b b2 "" "") (setq trc (entlast)) (setq epr 2) ;;;;;;;;;;;;;;;;;;;;;;;;;; EPAISSEUR PAR DEFAUT (setq r1i (- r1 epr)) (if (and ta (< r1 r2)) (command "_circle" "_non" pdd r1i) (command "_circle" "_non" pd r1i)) (setq b (entlast)) (setq r2i (- r2 epr)) (if (and ta (> r1 r2)) (command "_circle" "_non" pfd r2i) (command "_circle" "_non" pf r2i)) (setq b2 (entlast)) (command "_loft" b b2 "" "") (command "_subtract" trc "" "_L" "") (setq reduc (entlast)) ;;; change le calque du solide pour création bloc dans calque "0" (setq lent (entget reduc)) (setq lent (subst (cons 8 "0") (assoc 8 lent) lent)) (entmod lent) ;; création attributs (setq st (getvar "textstyle")) (setvar "textstyle" "standard") (setq tsize (getvar "textsize")) (setq af (getvar "aflags")) (setq ht (* 0.07 d1 )) ; hauteur texte (setq it (* 1.3 ht)) ; intervale ligne texte (setvar "aflags" 9) ;;; prédéfini et invisible (command "_-attdef" "" "TYPE" "TYPE" (strcat "REDUCT_" (if ta "EXC" "CONC") "_ISO") "_non" '(0. 0. 0.) ht "0") (setq att1 (entlast)) (command "_-attdef" "" "DN" "DN" (strcat gdn " x " dn) "_non" (polar '(0. 0. 0.) (* 1.5 pi) (+ (* 1 it) (* 0.2 ht))) ht "0") (setq att2 (entlast)) (setvar "aflags" af) (setvar "textsize" tsize ) (setvar "textstyle" st) ;; change calque attributs (command "_change" att1 att2 "" "_p" "_la" "0" "_c" "DUBLOC" "") ;; création bloc (if (< r1 r2) (command "_ucs" "_zaxis" "_non" pf "_non" pd)) (command "_-block" nomb "_non" '(0. 0. 0.) att1 att2 reduc "") (if (< r1 r2) (command "_ucs" "_p")) ;;;; insertion bloc (if (< d1 d2) (command "_ucs" "_zaxis" "_non" pf "_non" pd)) (command "_-insert" nomb "_non" '(0. 0. 0.) "" "" (* a (/ 180 pi))) (if (and (< d1 d2) ta)(command "_move" (entlast) "" "_non" '(0. 0. 0.) "_non" (polar '(0. 0. 0.) a (- r1 r2)))) (if (< d1 d2) (command "_ucs" "_p")) ) ) ) ) (gc) (if pdir (command "_ucs" "_p")) (command "_undo" "_e") (princ "Longueur ")(princ h) (princ) ) -
Bravo, super lisp qui pourra être bien utile.
-
Merci pour le retour. J'aurais du le faire, maintenant c'est fait, j'ai mis un point devant toutes les commandes. Bonne journée
-
Bien le bonjour Voici une nouvelle version du tuyau 3d "tuy.lsp". Cette fois-ci j'ai la possibilité d'avoir les tubes en blocs avec attributs en + des coudes et d'avoir les axes qui vont jusqu'aux points d'épure. Je n'ai mis que l'entête du lisp car il commence à être long. Il faut le récupérer à cette adresse . ;; commandes: TUY: tuyau 3D, TSA: tuyau sans axe, TU: tube depuis axe, CDT: coude seul et CD: axe coude, CALOS: calo depuis axe ou 2 points. ;; version 4 le 12-6-2011 ajout commande CDB pour relier 2 lignes par un coude en bloc avec attributs (pas de coude emboité sauf si déjà créé avec tuyb ou tuycb) ;; version 5 le 01-7-2011 ajout commande TUB pour génèrer le tube en bloc avec attributs à partir de la ligne sélectionné ;; version 6 le 28-8-2011 ajout commande TUYCB et TSACB = TUY ou TSA avec coudes en bloc et attributs ;; version 6.1 correction bug dans division par 45 ;; 6.2 restauration rayon de raccord ;; " Amélioration "coudbloc" et "tub", bloc créé dans calque 0 et couleur "dubloc" ;; version 7 le 07-12-2013 ajout commande TUYB et TSAB avec tubes et coudes en bloc avec attribut ;; le 16-01-2014 (setq epure T) ;;;;Axes jusqu'aux points d'épure (variable à désactiver si on n'en veut pas) ;;;Récap des commandes dispo: TUY ,TSA ,TU ,CD, CDT, CALOS ou avec des blocs TUYB, TUYCB,TSAB,TSACB, TUB, CDB Comme indiqué ci-dessus il y a 2 nouvelles commandes pour avoir tout en blocs : TUYB ou TSAB. Et pour les axes jusqu'aux points d'épure, c'est la variable "epure" qui le gère:(setq epure T) pour rester dans l'ancien mode écrire (setq epure nil) ou mettre un ; devant par exemple dans: (defun c:tuy (/ ftrad delobjet epure) (setq m:err *error* *error* erreurtuy) (setq ftrad (getvar "filletrad")) (setq delobjet (getvar "delobj")) (setvar "delobj" 1) ;;; avec des axes ;; CI-DESSOUS (setq epure T) ;;;tracé des axes jusqu'aux points d'épure (tuy) (setvar "delobj" delobjet) (setvar "FILLETRAD" ftrad) (setq *error* m:err m:err nil) (princ) ) Bon tuyautage
-
Bonjour Voici la version 2.11, qu'elle est la dernière ? ;;;================================================================= ;;; ;;; OU.LSP V2.11 ;;; ;;; Localiser des blocs ;;; ;;; Copyright (C) Patrick_35 ;;; ;;;================================================================= (defun c:ou(/ bas cle doc ent fic lst nbl pos pt sel tbl tot totg xd xt dessine_ligne msgbox recherche_nom) ;;;--------------------------------------------------------------- ;;; ;;; Message ;;; ;;;--------------------------------------------------------------- (defun MsgBox (Titre Bouttons Message / Reponse WshShell) (vl-load-com) (setq WshShell (vlax-create-object "WScript.Shell")) (setq Reponse (vlax-invoke WshShell 'Popup Message 0 Titre (itoa Bouttons))) (vlax-release-object WshShell) Reponse ) ;;;--------------------------------------------------------------- ;;; ;;; Filtre les blocs anonymes et ceux associés aux xrefs ;;; ;;;--------------------------------------------------------------- (defun recherche_nom(ent) (or (wcmatch (vla-get-name ent) "`**,*|*") (eq (vla-get-isxref ent) :vlax-true) (setq tbl (cons (vla-get-name ent) tbl)) ) ) ;;;--------------------------------------------------------------- ;;; ;;; Dessine une ligne de 0,0 au point d'insertion du bloc ;;; ;;;--------------------------------------------------------------- (defun dessine_ligne(ent / bl lay) (setq lay (vla-item (vla-get-layers doc) (vla-get-layer ent))) (if (vlax-property-available-p ent 'EffectiveName) (setq bl (vla-get-effectivename ent)) (setq bl (vla-get-name ent)) ) (if (eq nbl bl) (setq totg (1+ totg)) ) (and (eq (vla-get-freeze lay) :vlax-false) (eq (vla-get-layeron lay) :vlax-true) (eq (vla-get-lock lay) :vlax-false) (eq nbl bl) (not (member (vlax-make-variant (vla-get-name lay)) lst)) (entmake (list (cons 0 "LINE") (cons 8 (vla-get-name lay)) (cons 10 (trans pt 1 0)) (cons 11 (vlax-get ent 'insertionpoint)) (cons 410 (vla-get-name (vla-get-layout (vla-objectidtoobject (vla-get-database ent)(vla-get-ownerid ent))))) ) ) (setq tot (1+ tot)) ) (princ) ) ;;;--------------------------------------------------------------- ;;; ;;; Routine principale ;;; ;;;--------------------------------------------------------------- (vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object)) cle "HKEY_CURRENT_USER\\Software\\Autodesk\\Autocad\\Patrick_35" ) (if (vl-registry-read cle "Base_Ou_X") (setq pt (list (atof (vl-registry-read cle "Base_Ou_X")) (atof (vl-registry-read cle "Base_Ou_Y")) (atof (vl-registry-read cle "Base_Ou_Z")) ) ) (setq pt '(0.0 0.0 0.0)) ) (vla-startundomark doc) (while (not bas) (initget "Choix Origine") (setq sel (entsel "\nSélectionnez un Bloc / Choix / Origine : ")) (if (eq sel "Origine") (progn (if (setq bas (getpoint (strcat "\nVeuillez saisir le point d'origine (" (rtos (car pt) (getvar "lunits") 2) "," (rtos (cadr pt) (getvar "lunits") 2) "," (rtos (caddr pt) (getvar "lunits") 2) ") : "))) (progn (setq pt bas) (vl-registry-write cle "Base_Ou_X" (rtos (car pt))) (vl-registry-write cle "Base_Ou_Y" (rtos (cadr pt))) (vl-registry-write cle "Base_Ou_Z" (rtos (caddr pt))) ) ) (setq bas nil) ) (setq bas T) ) ) (if (eq sel "Choix") (if (setq fic (findfile "ou.dcl")) (progn (setq fic (load_dialog fic) pos "0") (vlax-map-collection (vla-get-blocks doc) 'recherche_nom) (new_dialog "ou" fic "") (start_list "bl") (mapcar 'add_list (setq tbl (acad_strlsort tbl))) (end_list) (set_tile "titre" "OU V2.11") (set_tile "bl" pos) (mode_tile "cancel" 2) (action_tile "bl" "(setq pos $value)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (if (eq (start_dialog) 1) (setq nbl (nth (atoi pos) tbl)) ) (unload_dialog fic) ) (msgbox "OU" 16 "Le fichier OU.DCL est introuvable.") ) (if sel (if (eq (cdr (assoc 0 (entget (car sel)))) "INSERT") (progn (setq ent (vlax-ename->vla-object (car sel))) (if (not (vlax-property-available-p ent 'Path)) (if (vlax-property-available-p ent 'EffectiveName) (setq nbl (vla-get-effectivename ent)) (setq nbl (vla-get-name ent)) ) ) ) (princ "\nCe n'est pas un bloc.") ) ) ) (if nbl (if (ssget "x" (list (cons 0 "INSERT") (cons 2 (strcat nbl ",`**")))) (progn (if (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-get-activepviewport (list doc)))) (progn (vla-getxdata (vla-get-activepviewport doc) "" 'xt 'xd) (setq lst (vlax-safearray->list xd)) ) ) (setq totg 0 tot 0) (vlax-map-collection (setq sel (vla-get-activeselectionset doc)) 'dessine_ligne) (vla-delete sel) (princ (strcat "\n" (itoa totg) " " nbl " trouvé(s) et " (itoa tot) " ligne(s) de dessinée(s).")) ) ) ) (vla-endundomark doc) (princ) ) (setq nom_lisp "OU") (if (/= app nil) (if (= (strcase (substr app (1+ (- (strlen app) (strlen nom_lisp))) (strlen nom_lisp))) nom_lisp) (princ (strcat "..." nom_lisp " chargé.")) (princ (strcat "\n" nom_lisp ".LSP Chargé.....Tapez " nom_lisp " pour l'éxecuter."))) (princ (strcat "\n" nom_lisp ".LSP Chargé......Tapez " nom_lisp " pour l'éxecuter."))) (setq nom_lisp nil) (princ) et la boite de dialogue // ================================================================= // // OU.DCL V2.11 // // Copyright (C) Patrick_35 // // ================================================================= ou : dialog { key = "titre"; fixed_width = true; alignment = centered; is_cancel = true; width = 40; : list_box {label= "Bloc(s)" ; key="bl"; height = 15; multiple_select = false;} spacer; ok_cancel; }
-
Bonjour même chose que pour etrier.lsp, j'ai fait une modif pour que le bloc soit créé sur le calque 0 et de la couleur DUBLOC. ;; création bloc (command "_change" att1 att2 tube "" "_p" "_la" "0" "_c" "DUBLOC" "")
-
Bonjour J'ai fait une petite modif pour que le bloc soit correctement créé sur le caque 0 et de la couleur DUBLOC. C'est une remarque que m'a fait Philsogood à propos de mon lisp pour la tuyauterie 3D. ;; création bloc (command "_change" att1 etrier "" "_p" "_la" "0" "_c" "DUBLOC" "")
-
Bonjour, A tester. ;;version 09 12 2013 ;; ;; PHILIPPE B (defun c:TUBE (/ p1 p2 dia dn rm lgt ss1 ss2 tube p2_SCG nle lda) (setq p1 (getpoint "\nPoint de départ du tube :")) (setq p2 (getpoint p1 "\nPoint d'arrivée du tube :")) (initget "Autre 10 15 20 25 32 40 50 65 80 100 125 150 200 250 300") (setq dn (getkword "\n dn [10/15/20/25/32/40/50/65/80/100/125/150/200/250/300]:")) (cond ((= dn "10") (setq dia 17.2) (setq rm 25)) ((= dn "15") (setq dia 21.3) (setq rm 28)) ((= dn "20") (setq dia 26.9) (setq rm 28.5)) ((= dn "25") (setq dia 33.7) (setq rm 38)) ((= dn "32") (setq dia 42.4) (setq rm 47.5)) ((= dn "40") (setq dia 48.3) (setq rm 57)) ((= dn "50") (setq dia 60.3) (setq rm 76)) ((= dn "65") (setq dia 76.1) (setq rm 95)) ((= dn "80") (setq dia 88.9) (setq rm 114.5)) ((= dn "100") (setq dia 114.3) (setq rm 152)) ((= dn "125") (setq dia 139.7) (setq rm 190)) ((= dn "150") (setq dia 168.3) (setq rm 228)) ((= dn "200") (setq dia 219.1) (setq rm 304)) ((= dn "250") (setq dia 273) (setq rm 380 )) ((= dn "300") (setq dia 323.9) (setq rm 456)) ((= dn "Autre") (setq dn (getdist "\nDiamètre en mm:"))) (t (princ)) ) (setq lgt (distance p1 p2)) ;; longueur tube (setq p2_scg (trans p2 1 0)) (command "_.ucs" "_non" p1 "_non" (trans p2_SCG 0 1 ) "") (setq nomb (strcat "TUBE_DN" dn)) (if (not (tblsearch "block" nomb)) ;; recherche bloc dans dessin (progn ;; le bloc n´existe pas ;;;; creation solide 3 d (setvar "cmdecho" 0) (command "_line" "_non" '(0. 0. 0.) "_non" '(1. 0. 0.) "") (setq ss1 (entlast)) (command "_circle" '(0. 0. 0.) (* dia 0.5)) (setq ss2 (entlast)) (command "_sweep" ss2 "" ss1) (setq tube (entlast)) ;; suppression de l'axe si: (if (or (= 0 (getvar "DELOBJ"))(= 1 (getvar "DELOBJ"))) (entdel SS1)) ;; création attributs (setq st (getvar "textstyle")) (setvar "textstyle" "standard") (setq af (getvar "aflags")) (setq ht (* 0.07 dia )) ; hauteur texte (setvar "aflags" 9) ;;; prédéfini et invisible (command "_-attdef" "" "Désignation" "Désignation" (strcat "TUBE DN" dn) "_non" '(0. 0. 0.) ht "0") (setq att1 (entlast)) (command "_-attdef" "" "LONG" "Longueur" "" "_non" (polar '(0. 0. 0.)(* 1.5 pi)(+ 1.3 ht)) ht "0") (setq att2 (entlast)) (setvar "aflags" af) (setvar "textstyle" st) ;; création bloc (command "_change" att1 att2 tube "" "_p" "_la" "0" "_c" "DUBLOC" "") (command "_-block" nomb "_non" '(0. 0. 0.) att1 att2 tube "") ) ) ;;;; insertion bloc (command "._-insert" nomb "X" lgt "Y" 1 "Z" 1 "_non" '(0. 0. 0.) "0" ) (setvar "cmdecho" 1) ;;;;;;;; modif attribut longueur du tube ;;;;;;;;;;;; (setq nle (entlast)) (while (and (/= (cdr (assoc 2 (setq lda (entget (setq nle (entnext nle)))))) "LONG") (/= "SEQEND" (cdr (assoc 0 lda))) ) ) (setq lda (subst (cons 1 (rtos lgt 2 2)) (assoc 1 lda) lda)) ;liste données attribut (entmod lda) (entupd nle) ;attribut LONG mise à jour (prin1) )
-
Bonjour, Je t'ai fait la modification, mais testé rapidement. Fait quand même attention à ce que tu recopies, j'ai fait vite et je n'ai pas tout bien nettoyé. ;;version 09 12 2013 ;; ;; PHILIPPE B (defun c:ETRIER (/ pdir l1 l2 p1 R dn d1 d2 sv_dm dm poi prix af ht ETRIER diam_n st) (setq p1 (getpoint "\nPoint de départ de l'etrier :")) (if p1 (setq pdir (getpoint p1 "\n direction de l'étrier <>: "))) (cond ((and p1 pdir) (command "_ucs" "_zaxis" "_none" p1 "_none" pdir) (setq p1 '(0. 0. 0.)) ) ) (initget "Autre 10 15 20 25 32 40 50 65 80 100 125 150 200 250 300") (setq diam_n (setq dn (getkword "\n dn [10/15/20/25/32/40/50/65/80/100/125/150/200/250/300]:"))) (cond ((= dn "10") (setq dn 17.2) (setq l2 27.4) (setq d1 6) (setq poi 0.020) (setq prix 0.82)) ((= dn "15") (setq dn 21.3) (setq l2 29.35) (setq d1 6)) ((= dn "20") (setq dn 26.9) (setq l2 36.55) (setq d1 8)) ((= dn "25") (setq dn 33.7) (setq l2 38.15) (setq d1 8)) ((= dn "32") (setq dn 42.4) (setq l2 46.8) (setq d1 8)) ((= dn "40") (setq dn 48.3) (setq l2 45.85) (setq d1 8)) ((= dn "50") (setq dn 60.3) (setq l2 49.85) (setq d1 8)) ((= dn "65") (setq dn 76.1) (setq l2 61.95) (setq d1 8)) ((= dn "80") (setq dn 88.9) (setq l2 70.55) (setq d1 10)) ((= dn "100") (setq dn 114.3) (setq l2 98.85) (setq d1 10)) ((= dn "125") (setq dn 139.7) (setq l2 104.15) (setq d1 10)) ((= dn "150") (setq dn 168.3) (setq l2 118.85) (setq d1 12)) ((= dn "200") (setq dn 219.1)) ((= dn "250") (setq dn 273)) ((= dn "300") (setq dn 323.9)) ((= dn "Autre") (setq dn (getdist "\nDiamètre en mm:"))) (t (princ)) ) (setq nomb (strcat "ETRIER_DN" diam_n)) (if (tblsearch "block" nomb) ;; recherche bloc dans dessin ;;;; insertion bloc (command "_-insert" nomb "_non" '(0. 0. 0.) "" "" "0" ) (progn ;; le bloc n´existe pas ;;;; creation solide 3 d (setvar "cmdecho" 0) (setq l1 (+ dn d1)) (command "_pline" (list (- (nth 0 p1) (/ l1 2)) (- (nth 1 p1) l2) (nth 2 p1)) (list (- (nth 0 p1) (/ l1 2)) (nth 1 p1) (nth 2 p1)) "_A" "_CE" p1 "_A" -180 "_LI" (list (+ (nth 0 p1) (/ l1 2)) (- (nth 1 p1) l2) (nth 2 p1)) "") (setq ss1 (entlast)) (setq R (/ d1 2)) (command "_circle" p1 R) (setq ss2 (entlast)) (command "_sweep" ss2 "" ss1) (setq etrier (entlast)) ;; création attributs (setq st (getvar "textstyle")) (setvar "textstyle" "standard") (setq af (getvar "aflags")) (setq ht (* 0.07 dn )) ; hauteur texte (setvar "aflags" 9) ;;; prédéfini et invisible (command "_-attdef" "" "Désignation" "Désignation" (strcat "ETRIER DN" diam_n) "_non" '(0. 0. 0.) ht "0") (setq att1 (entlast)) (setvar "aflags" af) (setvar "textstyle" st) ;; création bloc (command "_change" att1 etrier "" "_p" "_la" "0" "_c" "DUBLOC" "") (command "_-block" nomb "_non" '(0. 0. 0.) att1 etrier "") ;;;; insertion bloc (command "_-insert" nomb "_non" '(0. 0. 0.) "" "" "0" ) (setvar "cmdecho" 1) ) ) (prin1) )
-
Geler l'affichage lors de l'exécution d'une routines.
usegomme a répondu à un(e) sujet de stugeol dans LISP et Visual LISP
Bonjour Ne serait-ce pas UCSFOLLOW qui serait en cause ? -
Bonjour Ca été long, mais je n'ai pu me remettre sur le sujet que ce weekend. Le bug est mystèrieux car il vient d'une division par 45 que j'ai remplacé comme suit. Dans (defun deterdmin ( / a a90 p) remplacer (setq dmin (- (- l90 emboit) (* (/ (- (- l90 emboit)(- l45 emboit)) 45)(- at 90)))) par (setq dmin (- (- l90 emboit) (* (* (- (- l90 emboit)(- l45 emboit)) 0.022222)(- at 90)))) Ce que j'ai fait sur le lisp publié page 1. Si tu fournis les dimensions des coudes, je rajoute volontier ton cuivre au lisp, pas que j'en ai besoin pour l'instant, mais ça enrichi le lisp et ça peut servir à d'autres.
-
Effectivement, il y a un truc, je cherche, mais je suis un peu rouillé sur ce lisp et le restau à midi ça aide pas. :)
-
Bonjour, En fait c'est simple, mais tu as pris le modèle le plus compliqué. setq diam dn -> le diamètre est égal à la valeur DN (en mm) car c'est du PVC d'écoulement L87 309 -> 309 c'est la longueur totale du coude pour un angle de 87° ET OUI! Car en écoulement, il y a des pentes et les coudes PVC ne sont pas à 90° Dans ton cas remplace L87 par L90, fait la comparaison avec les autres types de tube emboité. L45 210 -> 210 c'est la longueur totale du coude pour un angle de 45° (du point d'épure à l'extrémité) Pour les valeurs angulaires intermédiaire la longueur est recalculée proportionnellement à l'angle pour l'aspect visuel. Sauf si des valeurs sont indiquées comme ici ((= dn 40) (setq diam dn L87 58 L45 40 L30 38 L20 33.5 emboit 27)) emboit 124 -> c'est la longueur de la partie droite du coude Ce calcul de L90 ne te sert à rien, si tu modifies comme indiqué plus haut. (setq rayo (- L90 emboit) -> rayon du coude non donné sur catalogue = longueur - emboitement epemboit 2 -> surépaisseur de la longueur droite par rapport au diamètre du tuyau epcd 0 -> surépaisseur du coude par rapport au diamètre du tuyau ecart 5 -> distance mini entre deux coudes pour la correction automatique. Voilà, j'espère que c'est clair.
-
Un autre version de "percer.lsp". J'ai fait aussi quelques petites mises à jour dans les lisps précédents ;; perçages multiples de un ou plusieurs solides ;; fonctionne avec SCU Dyn si actif ;; les centres de perçage doivent être validés au fur et à mesure ;; sinon ils sont pris pour des points de repèrage temporaires ;; usegomme ;; 02-10-2012 (defun c:PRC (/ solides cyl n nb i p ce erprc) (defun erprc (msg) (if n (repeat n (command "_ucs" "_p"))) (setvar "cmdecho" 1) (setq *error* m:err m:err nil) (princ) ) (setq m:err *error* *error* erprc) (princ " Sélectionnez les solides à percer.") (setq solides (ssget '((0 . "3DSOLID")))) (cond (solides (setvar "CMDECHO" 0) (prompt "\n Specifiez le point de départ:") (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 n 1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;*** FACULTATIF *** 1er option demande axe X et Y scu ; (if (= 0 (getvar "ucsdetect")) ; (progn ; (setq n 2)(setvar "CMDECHO" 1) ; (command "_ucs" "_non" '(0. 0. 0.)) ; (while (not (zerop (getvar "cmdactive")))(command pause)) ; ) ; ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;*** FACULTATIF *** 2eme option demande axe Z scu (if (= 0 (getvar "ucsdetect")) (progn (setq n 2 p (getpoint '(0. 0. 0.) "\nDirection perçage(s) ou <Valider axe Z>: ")) (if p (command "_ucs" "_zaxis" "" "_non" p) (setq n 1)) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; fin options (setq ce '(0. 0. 0.) i 1) (while ce (while (setq p (getpoint ce "\n Nouveau point ou <valider centre>:")) (if p (progn (grdraw p ce -1) (setq ce p))) ) (setvar "cmdecho" 1) (command "_cylinder" "_non" ce) (if (= i 1) (while (not (zerop (getvar "cmdactive")))(command pause)) (command "" "") ) (setq i (1+ i)) (setvar "cmdecho" 0) (setq cyl (entlast)) (repeat (setq nb (sslength solides)) (cond ((> nb 1) (command "_copy" cyl "" "" "") (command "_subtract" (ssname solides (setq nb (1- nb))) "" "_last" "") ) (t (command "_subtract" (ssname solides (1- nb)) "" cyl "")) ) ) (setq p (getpoint ce "\n Nouveau point ou <Arret>:")) (if p (progn (grdraw p ce -1) (setq ce p))(setq ce nil)) );; while ce (repeat n (command "_ucs" "_p")) ) ) (setq *error* m:err m:err nil) (setvar "cmdecho" 1) (princ) )
-
Grouper des éléments créés par un lisp
usegomme a répondu à un(e) sujet de waakabayashi dans Débuter en LISP
Expose tout de même les cas de figure pour lesquels tu souhaites une modif. C'est peut être pas si terrible. -
Grouper des éléments créés par un lisp
usegomme a répondu à un(e) sujet de waakabayashi dans Débuter en LISP
Modifier oui, mais c'est vraiment beaucoup plus long car pas forcement simple, en tout cas pour moi qui ne lispe qu'occasionnellement. -
Grouper des éléments créés par un lisp
usegomme a répondu à un(e) sujet de waakabayashi dans Débuter en LISP
Bonjour J'ai modifié le lisp pour que la gaine soit en bloc, c'était pour moi le plus simple et le plus rapide puisque j'ai déjà fait cela pour d'autres lisp. ;============================================================================= ; P.CHIALE en 99 modifié le 08-01-2010 ;; version 21 11 2012 _ gaine en bloc ; SP permet de tracer une gaine en souple à partir de la sélection ; de l'axe du trajet. ;;------------- change la couleur de la dernière entite créée------------- (defun chgcolastent () (command "_change" "_l" "" "_pr" "_co" "8" "") ) ;------------- Transformation d'un angle de radians en degres --------------- (defun DGR (a) (* 180 (/ a PI)) ) ; Fin de defun ;------------- Recouvrement des extrémités ----------------------------------- (defun EXT () (setq Ex1D1 (cdr (assoc 10 (entget D1)))) (setq Ex2D1 (cdr (assoc 11 (entget D1)))) (setq Ex1D2 (cdr (assoc 10 (entget D2)))) (setq Ex2D2 (cdr (assoc 11 (entget D2)))) ) ; Fin de defun ;------------- Constitution de la sélection pour le réseau ------------------- (defun AJED () (ssadd (entlast) rsel) ) ; Fin de defun ;============= Commande SCU ================================================== (defun SP:SCU (rep / PTP vers lang) (cond ((= rep "SG") (setq PTP (trans pt1 1 0)) (command "_ucs" "") (setq PT1 (trans ptp 0 1)) (setq TSCU T) ;SCU General ) ((= rep "S30") (setq PTP (trans pt1 1 0)) (command "_ucs" "_z" 30) (setq PT1 (trans ptp 0 1)) (setq TSCU T) ;SCU Z 30 ) ((= rep "S45") (setq PTP (trans pt1 1 0)) (command "_ucs" "_z" 45) (setq PT1 (trans ptp 0 1)) (setq TSCU T) ;SCU Z 45 ) ((= rep "S60") (setq PTP (trans pt1 1 0)) (command "_ucs" "_z" 60) (setq PT1 (trans ptp 0 1)) (setq TSCU T) ;SCU Z 60 ) ((= rep "SCu") (initget "Entite Z General") (setq repsc (getkword "\nSCU : [Entite/Z/] :")) (if (= nil repsc) (setq repsc "General") ) ;if (cond ((= repsc "Entite") (setvar "osmode" 512) (setq ptsc (getpoint "\nChoix d'objet correspondant au SCU :")) (setq Etsc (ssget ptsc)) (setq PTP (trans pt1 1 0)) (command "_ucs" "_e" Etsc) (setq PT1 (trans ptp 0 1)) (setq TSCU T) (setvar "osmode" osmd) ; (setvar "osmode" 0) ) ((= repsc "Z") (setq D1 (getreal "\n Angle de rotation autour de l'axe Z :")) (setq PTP (trans pt1 1 0)) (command "_ucs" "_z" D1) (setq PT1 (trans ptp 0 1)) (setq TSCU T) ) ((= repsc "General") (setq PTP (trans pt1 1 0)) (command "_ucs" "") (setq PT1 (trans ptp 0 1)) (setq TSCU T) ;SCU General ) ) ; Fin de cond ) ) ;Fin de cond ) ;Fin de defun ;============== Dessin d'une partie rectiligne ================================ (defun LG (D / vers lang a1 a2 a3 a4 b1 b2 b3 b4 Ex1D Ex2D lgD angD1 Nbr) (setq rsel nil) (setq rsel (ssadd)) ; Creation de la selection pour le reseau (command "_ucs" "") (setq Ex1D (cdr (assoc 10 (entget D)))) (setq Ex2D (cdr (assoc 11 (entget D)))) (setq lgD (distance Ex1D Ex2D)) (setq angD1 (angle Ex1D Ex2D)) (setq Nbr (atoi (rtos (/ LgD pasR) 2 0))) (if (<= Nbr 0) (setq Nbr 1) ) ;if (setq sp_p (/ lgD Nbr)) (setq A1 (polar Ex1D (+ angD1 (/ PI 2)) (/ diam 2))) (setq B1 (polar Ex1D (- angD1 (/ PI 2)) (/ diam 2))) (command "_line" "_non" A1 "_non" B1 "") (chgcolastent) (AJED) (setq IpD (polar Ex1D angD1 (/ sp_p 2))) (setq A2 (polar IpD (+ angD1 (/ PI 2)) (/ (+ diam ep) 2))) (setq B2 (polar IpD (- angD1 (/ PI 2)) (/ (+ diam ep) 2))) (command "_line" "_non" A1 "_non" A2 "") (AJED) (command "_line" "_non" B1 "_non" B2 "") (AJED) (command "_line" "_non" A2 "_non" B2 "") (chgcolastent) (AJED) (setq IpD (polar Ex1D angD1 sp_p)) (setq A3 (polar IpD (+ angD1 (/ PI 2)) (/ diam 2))) (setq B3 (polar IpD (- angD1 (/ PI 2)) (/ diam 2))) (command "_line" "_non" A2 "_non" A3 "") (AJED) (command "_line" "_non" B2 "_non" B3 "") (AJED) (command "_ucs" "_e" D) (command "_change" D "" "_pr" "_lt" "axes2" "") ;(command "_erase" D "") (if (/= Nbr 1) (command "_array" rsel "" "_r" 1 Nbr sp_p) ) (command "_ucs" "") (setq A4 (polar Ex2D (+ angD1 (/ PI 2)) (/ diam 2))) (setq B4 (polar Ex2D (- angD1 (/ PI 2)) (/ diam 2))) (command "_line" "_non" A4 "_non" B4 "") (chgcolastent) ) ; Fin de defun ;============== Dessin d'une partie arrondie ================================== (defun AR (C / vers lang a1 a2 a3 a4 b1 b2 b3 b4 Ag1C Ag2C rayC cenC AgC Ag2C Ag1C lgC Nbr sp_p agpas Ex1C AngC IpD) (setq rsel nil) (setq rsel (ssadd)) ; Creation de la selection pour le reseau (command "_ucs" "") (setq Ag1C (cdr (assoc 50 (entget C)))) (setq Ag2C (cdr (assoc 51 (entget C)))) (setq rayC (cdr (assoc 40 (entget C)))) (setq cenC (cdr (assoc 10 (entget C)))) (setq AgC (- Ag2C Ag1C)) (if (= T (< AgC 0)) (setq AgC (+ AgC (* 2 PI))) ) ;if (setq lgC (* rayc AgC)) (setq Nbr (atoi (rtos (/ lgC pasA) 2 0))) (if (<= Nbr 0) (setq Nbr 1) ) ;if (setq sp_p (/ lgC Nbr)) (setq agpas (/ AgC Nbr 2)) (setq Ex1C (polar cenc Ag1C rayc)) (setq AngC (angle CenC Ex1C)) (setq A1 (polar Ex1C AngC (/ diam 2))) (setq B1 (polar Ex1C (+ AngC PI) (/ diam 2))) (command "_line" "_non" A1 "_non" B1 "") (chgcolastent) (AJED) (setq IpD (polar cenC (+ Ag1C agpas) rayc)) (setq A2 (polar IpD (+ ag1C agpas) (/ (+ diam ep) 2))) (setq B2 (polar IpD (+ ag1C agpas) (- (/ (+ diam ep) 2)))) (command "_line" "_non" A1 "_non" A2 "") (AJED) (command "_line" "_non" B1 "_non" B2 "") (AJED) (command "_line" "_non" A2 "_non" B2 "") (chgcolastent) (AJED) (setq IpD (polar cenC (+ Ag1C (* agpas 2)) rayc)) (setq A3 (polar IpD (+ ag1C (* agpas 2)) (/ diam 2))) (setq B3 (polar IpD (+ ag1C (* agpas 2)) (- (/ diam 2)))) (command "_line" "_non" A2 "_non" A3 "") (AJED) (command "_line" "_non" B2 "_non" B3 "") (AJED) (command "_change" C "" "_pr" "_lt" "axes2" "") ;(command "_erase" C "") (if (/= Nbr 1) (command "_array" rsel "" "_p" "_non" cenC Nbr (DGR (- AgC (* agpas 2))) "_y" ) ) ;if (setq Ex2C (polar cenc Ag2C rayc)) (setq A4 (polar Ex2C Ag2C (/ diam 2))) (setq B4 (polar Ex2C (+ Ag2C PI) (/ diam 2))) (command "_line" "_non" A4 "_non" B4 "") (chgcolastent) ) ; Fin de defun ;============== Début du programme ========================================== (defun C:SP (/ ct r sel k nom typ sb D1 D2 testw vers lang elast nom nomb i ) (setq elast (entlast)) ;;;;;;;;;; (setq cmde (getvar "cmdecho")) (setq blip (getvar "blipmode")) (setq pdmd (getvar "pdmode")) (setq pdsz (getvar "pdsize")) (setq osmd (getvar "osmode")) (setvar "cmdecho" 0) (setvar "blipmode" 0) (command "_ucs" "") ;-------------- Vérification de l'échelle de dessin du menu CLIM ------------ (if (= nil echt) (progn (princ "\n** ATTENTION : Echelle de dessin non definie **") (initget 1 "ME CM MM") (setq echt (getkword "\nVeuillez preciser l'echelle de travail [ME/CM/MM] : " ) ) (cond ((= echt "ME") (setq echt 0.001) ) ((= echt "CM") (setq echt 0.1) ) ((= echt "MM") (setq echt 1) ) ) ;cond ) ; Fin de progn ) ; Fin de if ;-------------- Test de l'existance d'une valeur pour le diamètre ----------- (if (= nil sp_d) (setq diam 125) (setq diam sp_d) ) ;-------------- Saisie de la valeur du diamètre de la gaine souple ---------- (setq tx (strcat "\nDiamètre de la gaine <" (rtos diam 2 0) ">:")) (setq rep (getreal tx)) (if (= nil rep) (setq diam (* echt diam)) (setq diam (* echt rep)) ) (setq sp_d (/ diam echt)) ;============== Initialisation des variables configurables ================= ; pasR : Pas d'une spire complète en mm en rectiligne ; pasA : Pas d'une spire complète en mm en arrondi ; ep : Epaisseur de débordement sur le diamètre en mm ; coef : Coefficient de tracé du coude (Coef x Diamètre) (setq pasR (* (+ (* 0.36 sp_d) 0.0011) echt)) (if (< (/ pasR echt) 45.0011) (setq pasR (* 45.0011 echt)) ) (setq pasA (- pasR echt)) (setq ep (- pasA echt)) (setq coef 1.5) (setq e1 (entlast)) ;------------- Dessin par trajet et sélection d'entités ---------------------- (setq sel nil selE nil ) (setq sel (ssadd) selE (ssadd) ) (initget "Entite") (setq pt1 (getpoint "\nPoint de départ ou [Entite] :")) (cond ((= "Entite" pt1) (setq selE (ssget)) (setq testW "Fin") ) ) ; Fin de cond (while (/= "Fin" testw) (initget 32 "SCu SG S30 S45 S60") (setq rep (getpoint pt1 "\nPoint suivant ou [sCu/SG/S30/S45/S60] :")) (SP:SCU rep) (cond ((/= T TSCU) (setq pt rep) (if (/= nil pt) (progn (command "_line" "_non" pt1 "_non" pt "") (ssadd (entlast) sel) (redraw (entlast) 3) (setq prov pt1 pt1 pt pt prov ) ) ; fin de progn (setq testw "Fin") ) ) ; fin de if et condition ) ; Fin de cond (setq TSCU nil) ) ; Fin de while (setq testw nil) (command "_ucs" "") ;------------- Tri de la sélection entre trajet et Entités ------------------- (if (/= 0 (sslength sel)) (progn ;------------- Création des coudes à partir des entités croisées ------------- (setq k 0) (setq lgsel (sslength sel)) (setvar "FILLETRAD" (* coef diam)) (while (< k (- lgsel 1)) (setq D1 (ssname sel k)) (setq D2 (ssname sel (+ k 1))) (EXT) ; recouvrement des extrémités (if (/= nil (inters Ex1D1 Ex2D1 Ex1D2 Ex2D2)) (progn (command "_fillet" D1 D2) (ssadd (entlast) sel) ) ; Fin de progn ) ; Fin de if (setq k (1+ k)) ) ;Fin de while ) ; Fin de progn (setq sel selE) ) ; Fin de if ;============= Vérification de la sélection ================================== (princ "\nTraitement en cours, patientez s.v.p...\n") (setq lst (list (list "LINE") (list "ARC"))) (setq selt (ssadd)) (setq k 0) (while (< k (sslength sel)) (setq nom (ssname sel k) typ (entget nom) ) (if (/= nil (assoc (cdr (assoc 0 typ)) lst)) (ssadd nom selt) ) ;Fin de if (setq k (1+ k)) ) ;Fin de while (setq pts (assoc 10 (entget (ssname selt 0)))) ;============= Traitement de la sélection ==================================== (setq k 0) (while (< k (sslength sel)) (setq nom (ssname sel k) typ (entget nom) ) (if (= "LINE" (cdr (assoc 0 typ))) (LG nom) ) (if (= "ARC" (cdr (assoc 0 typ))) (AR nom) ) (setq k (1+ k)) ) ;Fin de while (command "_ucs" "") ;============== Fin du Traitement ============================================ ;;;;;;;;;;;;;;; création du bloc ;;;;;;;;;;;;;;;;;;;;;;;;; (setq nom (strcat "Gaine_Souple_" (rtos diam) "-" (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4)) "_")) (setq nomb (strcat nom "1")) (setq i 1 ) (while (tblsearch "block" nomb) (setq i (1+ i)) (setq nomb (strcat nom (itoa i))) ) (setq sel nil sel (ssadd)) (if elast (while (entnext elast) (ssadd (entnext elast) sel) (setq elast (entnext elast)) ) (setq sel (ssget "_x")) ) (command "_-block" nomb "_non" '(0. 0. 0.) sel "") (command "_-insert" nomb "_non" '(0. 0. 0.) "" "" "0" ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (princ) ) -
Salut Je n'ai pas de collections de blocs pour ce que tu demandes, mais comme l'a indiqué Lili2006 des lisps dont certains avec base de données, tu trouveras la liste dans CE POST. A noter que je n'ai pas testé ces lisps avec ta version d'Autocad.
-
probleme de lisp bride petro
usegomme a répondu à un(e) sujet de nounours44 dans Pour aller plus loin en LISP
A ma connaissance, ce genre d'erreur vient d'une mauvaise syntaxe de commande et j'en ai trouvé une, deux fois: (command "_ucs" "" "G" "") il faut écrire (command "_ucs" "") ou (command "_ucs" "G" "") J'espère pour toi qu'il n'y a pas autre chose de plus compliqué. Salut