Home

La única referencia que el MANUAL DEL USUARIO DE AutoCAD

image

Contents

1. chr 127 nl chr 160 prompt nNombre bloque no v lido BLOC setq Q0 0 001 ECO getvar CMDECHO QUASI SENSE RASTRE ALTERNATIVA suprimir esta l nea y activar todas las que M SENSE RASTRE comienzan con borrando estos caracteres if BLOC command BLOQUE progn prompt nIndique bloque s a enumerar lt gt setvar CMDECHO 1 PAUSE if or not tblsearch BLOCK BLOC progn initget Si No setq REDEF getkword strcat nEl bloque BLOC N ya existe Desea volver a definirlo S No N REDEF Si progn setq CAPA getvar CLAYER OSN getvar OSMODE AFL getvar AFLAGS I initget 1 I getpoint nPrecise punto base de inserci n SA ssget SS ssadd ULT entlast command CLAYER 0 OSMODE 0 AFLAGS 9 COPIA SA wi 0 0 0 W ATRDEF W BLOQUEOK wu mm I wu mm DESIGNA entlast SA AFLAGS AFL SCP DE I while ULT if setq ULT entnext ULT ssadd ULT SS ssdel entlast SS setq SCP getvar WORLDUCS 0 if SCP progn ALINEAR command SCP eval append command BLOQUE BLOC if REDEF S 70 0 0 pr if SCP command SCP PR command SCP PR BORRA SS W AFLAGS AFL OSMODE OSN CLAYER CAPA command DESHACER F setvar CMDECHO ECO princ 3 Conclusiones Dada su naturaleza instrumental creo que es el lector quien deb
2. if or NLIEX NL2EX NORM MNLOC T if or BLIEX BL2EX not NORM MBLOC T if 00 4 progn if not tblsearch BLOCK BLOC NUL MAKEBLOC BLOC NUL setq J 0 foreach O reverse 00 4 MAKEBLOC strcat ATRIBATIP itoa setq J 14 J DE BI T list O setq 00 4 length 00 4 if or BLIEX 00 4 REDEF BLOC S if not atom 00 4 setq 00 4 length 00 4 setvar CECOLOR COL setvar CELTYPE TLIN setvar CELWEIGHT GLIN defun CALCULA U V OV AGUT UX U OU OU V setq A polar O angle O V PI 2 OV W if AGUT angle A U angle U A B mapcar mapcar H A U 2 2 2 W angle O polar B W distance O B set U inters U polar U W 1 O B set U inters O polar O W PI 2 1 U eval U set OU distance O eval U set OU distance O eval U set V inters V polar V W 1 O eval U defun FIX M N itoa if gt M setq N fix M 0 5 1 N N defun INSERT BLOC X Y Z G JJ KK SSAA command INSERT strcat ATRIBSATIPS DE BLOC O XYZ X Y Z G DESCOMP entlast SCP WW setq SSAA ssget P JJ 0 KK 1 repeat 00 4 setq JJ 1 JJ BLOC strcat ATRIBATIP itoa JJ DE BL LE entget cdr assoc 2 tblsearch BLOCK BLOC ICVP cdr assoc 70 LE WWAA 1 if logand ICVP 8 0 list car WWAA 2 WWAA 2 if WWAA 1 cdr WWAA 2 WWAA 2 WW if and WWAA 1 logand ICVP 4 4
3. 0 progn setq El AJUSTA E El E2 AJUSTA E E2 El strcat El itoa NE NE 1 NE 00 2 append 00 2 list list 0 ATTDEF 8 0 70 9 2 NO BLOQUEOK 3 I T 1 L 72 0 74 0 10 0 0 0 210 0 0 1 assoc 7 LE assoc 40 LE assoc 41 LE AVIS BLOK LE if C 72 4 subst cons 72 setq C 72 1 cons 72 4 subst cons 74 setq C 74 2 assoc 74 LE LE LE LE if and C 72 3 C 74 0 subst cons 74 0 assoc 74 LE subst cons 11 LINIA BASE assoc 11 LE LE LE OZ last cdr assoc 10 LE Z cdr assoc 210 LE VAL ATRIBS 1 LE if and equal OZ 0 00 equal Z 0 0 1 00 setq LLAA if logand ICVP 8 0 cons cons T car LLAA cdr LLAA LLAA El strcat El itoa NE 00 2 cons LE 00 2 setq LLAA if logand ICVP 8 0 cons cons car LLAA cdr LLAA LLAA E2 strcat E2 itoa NE 00 3 cons PUNT list 0 0 OZ 00 3 00 3 cons PUNT list 1 0 OZ 00 3 00 3 cons PUNT list 0 1 OZ 00 3 C 10 assoc 10 LE C 11 assoc 11 LE 00 4 cons subst list 10 cadr C 10 caddr C 10 0 C 10 subst list 11 cadr C 11 caddr C 11 0 C 11 subst 210 0 0 1 assoc 210 LE LE 00 4 setq 00 1 cons LE 00 1 AT C if AT C T AT setq E entnext E VAL ATRIBS 2 if or 00 4 not NORM progn command REGENT CECOLOR PORCAPA CELTYPE PORCAPA CELWEIGHT 1 WWAA BLOC
4. El read strcat cdr assoc 1 E1 WW car El El cdr El E2 read strcat cdr assoc 1 E2 N 1 EE repeat K setq EE cons nth setq N 1 N E2 EE E2 reverse EE EE append El E2 OO NO OO repeat K setq OO cons entget cdr assoc 2 ATRIB ATIPIC N 00 OO reverse append OO 00 2 EEOO mapcar cons EE OO N 1 repeat length 00 2 J setq N 1 N EO cdr assoc N EEOO OORD cons EO OORD VAL ATRIBS OORD T T foreach E El if setq N nth E WWAA setq WWAA 1 append WWAA 1 list N foreach E E2 if setq N nth E WWAA setq WWAA 2 append WWAA 2 list N defun WWAA gt BLOC 01 O2 setq O1 last 00 1 if and cdr assoc 0 O1 ATTDEF cdr assoc 2 01 WWAA 1 cdr assoc 70 01 3 setq 00 1 reverse cdr cdr reverse 00 1 if 00 4 setq O1 list 0 ATTDEF 8 0 70 3 2 WWAA 1 3 cons 1 El 72 0 74 0 10 0 0 0 210 0 0 1 7 Standard 40 1 41 1 02 subst cons 1 E2 cons 1 El subst 2 WWAA 2 2 WWAA 1 01 00 1 append 00 1 list O2 01 defun SEGR PUNTS E setq SA ssadd repeat 3 00 4 setq E ssname SS 1 ssadd E SA ssdel E SS defun PRO DESHACER I F if 00 2 eval append command BLOQUE BLOC 2 if tblsearch BLOCK BLOC 2 S O ssdel E SS progn entmake list 0 BLOCK cons 2 BLOC 2 c
5. SA setq BLOC 1 BLOC 1 BLOC 2 BLOC 2 if 00 4 progn setq BLOC 1 BLOC 1 BLOC 2 BLOC 2 00 2 T J 0 setvar ATTREQ 0 repeat 00 4 setq J 14 J BLOC 2 strcat ATRIBATIP itoa J DE BL tblnext BLOCK T while setq LB tblnext BLOCK if wcmatch setq BLOC cdr assoc 2 LB strcat BLOC 2 M progn setq BLOC 1 BLOC NUL E cdr assoc 2 LB LE entget E K cdr assoc 41 LE INSPARCIAL K K K cdr assoc 50 LE 180 PI command BLOQUE BLOC S O SS setq BLOC 1 BLOC 1 BLOC 2 BLOC 2 setvar ATTREQ if ATREQ 1 0 setvar CLAYER CAPA defun J PUNTS LB setq E cdr assoc 2 LB J 0 while E setq J if cdr assoc 0 entget E POINT 1 J J E entnext E J defun AVIS alert strcat ATENCION n nComo BLOC V se cre con la orden BLOQUE y no con BLOQUEOK VnVnlos atributos no justificados sobre la l nea base pueden aparecer movidos defun AJUSTA E E if E progn setq OZ mapcar 1 read strcat E E nm foreach Z OZ setq E strcat E itoa Z defun SEGR ATRIBS NORM NLOC 1 NLOC 2 NLIEX NL2EX BLIEX BL2EX BLOK AT AT C NE E1 E2 EXT INI LLAA C 10 C 11 C 72 C 74 00 3 OZ Z setq NORM and NORM XY NORM Z NLOC 1 strcat BLOC AMB ATRIBSTIPS NLIEX tblsearch BLOCK NLOC 1 NLOC 2 strcat ATRIBSATIPS DE BLOC NL2EX tblsearch BLOCK NLOC 2 BLOC 1 strcat BLOC SENSE ATR
6. bloques con atributos no s lo situados en el plano base sino ubicados y orientados libremente Palabras clave AutoCAD BLOQUE INSERT Programaci n AutoLISP Geometr a afinidad ABSTRACT If we reference an orthogonal unit square to a 2D block the block can immediately be inserted in such a way that the orthogonal unit square adapts to any existing rectangular frame in the drawing However this immediacy is lost if we wish to perform a series of insertions in such a way that in addition to a simple combination of scaling rotating and translating they implicitly include a shearing transformation when the receiving frame is an oblique parallelogram This is because if we rotate the block and then insert it convert the insertion into a block and reinsert this time using a non uniform scale factor the figure resulting from this transformation of the original reference square will be a parallelogram However the question we wish to tackle is the following Given a specific rhomboid frame exactly what rotation do we need when making the first insertion and what rotation and scale factors must we apply when inserting for the second time in order to ensure that the reference square fits the frame exactly The problem becomes more complicated if we wish to use the result of the first insertion and adapt it for other parallelograms creating a non redundant system of intermediate insertions An AutoLISP program has been designed which solves the
7. cadr U car V defun VATR W N M VD setq W W N N M M VD VD V if ATREQ getstring strcat In if M N M DEFECTE VD T n V if V VD V defun VAL ATRIBS 1 LA N M V if logand ICVP 8 0 progn if and ATREQ not INI setq INI not prompt nIndique valores de atributo VATR logand ICVP 4 4 cdr assoc 2 LA cdr assoc 3 LA cdr assoc 1 LA setq LLAA cons list W N M V LLAA defun VAL ATRIBS 2 Wl N M V setq INI W foreach LA reverse LLAA if not EXT setq W1 car LA LA cdr LA if car LA progn if and ATREQ not INI setq INI not prompt XnVerificar valores de atributo VATR if or Wl and EXT not PRED cons W W cadr LA caddr LA last LA setq V last LA setq V list V if EXT setq WWAA append WWAA V if W1 setq WWAA 1 append WWAA 1 V setq WWAA 2 append WWAA 2 V if EXT if PRED repeat WW setq W cons W setq El strcat itoa length W E1 setq WW W defun VAL ATRIBS 00 EXT PRED foreach O reverse 00 setq ICVP cdr assoc 70 O if and PRED or not O logand ICVP 8 8 setq LLAA cons LLAA VAL ATRIBS 1 0 VAL ATRIBS 2 defun MAKEBLOC BLOC 2 ATRIBS OO entmake list 0 BLOCK cons 2 BLOC 2 10 0 0 O cons 70 if ATRIBS 2 0 foreach O reverse OO entmake O entmake 0 ENDBLK defun MNLOC 0 MA
8. AIX 3D DE BLOCS AMB ATRIBUTS UBICATS I ORIENTATS LLIUREMENT 2 6 ALTERNATIVES redefinici de l itinerari i repercussi sobre l estructura de blocs auxiliars ANNEX Plantejament algebraic de transformacions afins en 3D amb car cter finalista Con un texto tan o m s apretado que el empleado aqu me temo que va a sobrepasar las 300 p ginas la 1 parte y el cap tulo 2 1 se llevaron 70 y por lo realizado la exposici n progresa en paralelo por los cap tulos 2 4 y 2 5 aunque s lo el software del cap tulo 2 6 est por resolver calculo que el desarrollo del tema propuesto cap tulos 2 2 al 2 6 m s el anexo representar al menos otras 250 2 Contenido Dado el car cter de comunicaci n de los materiales a presentar en el Congreso i la l gica acotaci n de su tama o el dilema entre glosar un trabajo o presentar el trabajo mismo est servido la ltima opci n s lo es viable para los de reducida extensi n o que admitan expresar su quintaesencia en gr ficos f rmulas o algoritmos Tratar de resumir con un m nimo de rigor una l nea argumental desarrollada a lo largo de las anunciadas m s de 250 p gs parec a una empresa dif cil y sobre todo est ril He cre do m s acertado emplazar a finales de a io fecha estimada para la conclusi n del trabajo a quienes est n interesados y ofrecerles ahora la primicia el programa AutoLISP en que ha culminado el discurso por lo menos hasta el cap tulo 2 5 a falta de las mejora
9. AutoCAD Adaptaci n de un bloque ortonormal 2D 3D a un paralel gramo paralelep pedo dado NOGU S MAR Carles Universitat Polit cnica de Catalunya Espa a Departament d Expressi Gr fica a l Enginyeria e mail nogues O ege upc edu RESUMEN Si se ha tenido la precauci n de referir a un bloque 2D un cuadrado unitario ortogonal ser inmediato insertarlo de manera que ste se adapte a cualquier marco rectangular establecido en el dibujo Sin embargo la inmediatez desaparece si pretendemos encadenar inserciones de manera que adem s de una combinaci n simple de escalado giro y traslaci n se halle impl cita una transformaci n de cortadura cuando el marco receptor sea un paralel gramo oblicuo Porque est claro que si insertamos el bloque girado convertimos la inserci n en bloque y volvemos a insertar esta vez con escalado no uniforme la figura transformada del primitivo cuadrado de referencia ser un paralel gramo pero el problema es dado un marco romboidal concreto con qu giro hay que realizar la primera inserci n y qu giro y factores de escala debemos aplicar a la segunda para que el cuadrado de referencia se ci a al marco El problema se complica si queremos aprovechar el resultado de la primera inserci n para adaptaciones a otros paralel gramos creando un sistema no redundante de inserciones intermedias pero se ha disefiado un programa AutoLISP que resuelve estas cuestiones en 2D en 3D y puede operar con
10. IBS BLIEX tblsearch BLOCK BLOC 1 BLOC 2 strcat ATRIBS DE BLOC BL2EX tblsearch BLOCK BLOC 2 KO 00 4 while ATRIB ATIPIC K K K if NL2EX J PUNTS NL2EX if BL2EX J PUNTS BL2EX K i gt KO K 3 J 00 4 i K 00 4 setq 00 4 K i K 00 4 progn setq NL2EX BL2EX command LIMPIA B strcat NLOC 2 BLOC 2 N if and or NL2EX BL2EX not XOR NLIEX NL2EX not XOR BLIEX BL2EX progn if and setq LE entget cdr assoc 2 if BLIEX BL2EX NL2EX E cdr assoc 0 LE ENDBLK cdr assoc 0 LE ATTDEF cdr assoc 2 LE NO BLOQUEOK AVIS if BLIEX progn B gt N T BLOC 1 B gt N T BLOC 2 progn B gt N NLOC 1 B gt N NLOC 2 if 00 3 BLOC gt WWAA if 00 2 progn VAL ATRIBS 00 2 T setq WWAA 1 WWAA if and not NLIEX NORM MNLOC if not or BLIEX NORM MBLOC if NORM setq BLOC NLOC 1 progn setq E cdr assoc 2 tblsearch BLOCK BLOC BLOK E 00 4 NE 1 El E2 while E setq LE entget E if equal E BLOK setq BLOK if and cdr assoc 0 LE ATTDEF cdr assoc 2 LE BLOQUEOK 2 0 if BLOK 1 setq BLOK 1 if and setq AT cdr assoc 0 LE ATTDEF logand setq ICVP cdr assoc 70 LE 2 0 progn setq NE 1 NE C 72 cdr assoc 72 LE C 74 cdr assoc 74 LE BLOK if and BLOK 0 or C 72 4 and C 72 3 C 74
11. KEBLOC setq BLOC NLOC 1 or AT C if O 00 2 append 00 2 00 1 MAKEBLOC NLOC 2 00 3 defun MBLOC 0 MAKEBLOC BLOC 1 AT C 00 1 MAKEBLOC BLOC 2 if O 00 2 setq 00 2 append 00 3 00 2 defun LINIA BASE polar cdr assoc 11 LE cdr assoc 50 LE PI 2 cdr assoc 40 LE i C 74 1 1 0 3 i C 74 2 0 5 1 defun PUNT P list 0 POINT cons 10 trans P Z 0 cons 210 Z defun INSPARCIAL EX EY EZ ANG command INSERT BLOC 1 O XYZ EX EY EZ ANG setq SS ssadd entlast if 00 2 progn command ATTREQ 0 INSERT BLOC 2 O XYZ EX EY EZ ANG ATTREQ if ATREQ 1 0 DESCOMP entlast setq SA ssget P K 1 while setq E ssname SA setq K 1 K ssadd E SS defun XOR A B and not and A B or A B defun B gt N A B C setq C B if A BLOC 1 NLOC 1 E cdr assoc 2 tblsearch BLOCK B if cdr assoc 0 entget E ENDBLK while E setq LE entget E AT cdr assoc 0 LE ATTDEF if and AT or and A not C and not A C logand cdr assoc 70 LE 2 0 setq AT C T 00 2 cons LE 00 2 if C setq AT C if AT C T AT 00 1 cons LE 00 1 setq 00 3 cons LE 00 3 setq E entnext E defun ATRIB ATIPIC I tblsearch BLOCK strcat ATRIBATIP itoa set I 1 eval I DE BLOC defun BLOC gt WWAA EE OO EEOO EO OORD N setq OO reverse 00 1 El car OO E2 cadr OO
12. KK 1 KK O cdr assoc 10 entget ssname SSAA KK KK 1 KK X cdr assoc 10 entget ssname SSAA KK KK 1 KK Y cdr assoc 10 entget ssname SSAA KK command SCP 3 O X Y setq OX distance O X OY distance O Y OZ OX O 0 0 0 X list OX 0 0 Y trans Y 0 1 Z U V X Y Z XY O I if last Z 0 1 1 BLOC 1 BLOC NUL BLOC 2 BLOC NORM XY equal setq X Y expt distance X Y 2 setq X O Y expt OX 2 expt OY 2 00 NORM Z T 00 2 T 00 4 if NORM XY eval append command INSERT BLOC O OX OY 0 if ATREQ append WWAA 1 WW INSERT command SCP PR command SCP PR BORRA SSAA MIA defun INSERT X X Y Y Z OX OX ZZ Z XY XY XY XY OXY OXY BLAA command CLAYER 0 CECOLOR PORBLOQUE CELTYPE PORBLOQUE CELWEIGHT 2 if NORM XY setq X X X X Y polar O PI 2 OX Y O OX OX OX OX Z XY list car Z cadr Z OX OY 0 progn CALCULA X Y OY lt X Y X O Y X X OX OX y setq Y polar O angle O X PI 2 OX A inters Z XY polar Z XY W 1 O X Z XY polar A angle A Z XY distance A Z XY distance X X distance X X if NORM Z setq BLOC strcat BLOC progn setq X inters XX Y O Z XY X if X X if car Z XY 0 list car Z XY cadr Z XY 0 Z XY Z XY angle O X angle Y X Z XY if lt Z XY 0 2 PI Z XY Z XY Z XY if or equal Z X
13. QUE BLOC if tblsearch BLOCK BLOC S 0 SS if 00 4 eval append command BLOQUE BLAA if tblsearch BLOCK BLAA S 0 SA command SCP PR command CELWEIGHT GLIN CELTYPE TLIN CECOLOR COL CLAYER CAPA eval append command INSERT BLOC O XYZ OX distance Y Y if NORM Z OZ OX I X x if ATREQ append WWAA 1 WW if 00 4 INSERT BLOC OX distance Y Y if NORM Z OZ OX I X defun INSERTOK 2D Q0 2 PI PI 2 M N CAPA COL TLIN GLIN ECO CTRL ECO OSN ATDIA ATREQ BL BLOC BLOC BLOC 1 BLOC 2 BLOC 1 BLOC 2 BL EX ICVP WWAA WWAA 1 WWAA 2 WW O X Y Z UV Z XY OX OY OZ X Y X O YA B E LE I J K W NORM XY NORM Z SA SS 00 1 00 2 00 4 setq Q0 0 001 M repeat strlen itoa fix 0 1 Q0 setq M strcat M setq 2 PI PI 2 PI 2 PI 2 CAPA getvar CLAYER COL getvar CECOLOR TLIN getvar CELTYPE GLIN getvar CELWEIGHT ECO getvar CMDECHO OSN getvar OSMODE ATDIA getvar ATTDIA ATREQ getvar ATTREQ 1 O getvar INSNAME BLOC getstring strcat nIndique nombre de bloque DEFECTE O T BLOC if BLOC if gt O O prompt nNombre de bloque no v lido if or and setq O tblsearch BLOCK BLOC lt cdr assoc 70 O 4 and not O findfile strcat BLOC dwg BLOC alert if O REFX RUTES BLOC if BLOC strcase BLOC exit N strcat BLOC M W T while W setq O get
14. Y 0 Q0 equal Z XY 2 PI Q0 0 Z XY Z trans list car Z XY cadr Z XY last Z 1 0 command SCP Z OX SCp x I 90 setq XY list OX 0 0 Z trans Z 0 1 CALCULA XY Z distance O Z gt car Z 0 XY XY OXY OXY Z setq ZZ distance Z Z K strcat FIX Z XY PI Q0 FIX OXY OXY Q0 BLOC strcat BLOC K BLOC 1 strcat BLOC 1 K BLOC 2 strcat BLOC 2 K BL EX and tblsearch BLOCK BLOC 1 tblsearch BLOCK BLOC 2 command SCP PR SCP PR if not BL EX progn INSPARCIAL setq K OXY OXY K K X eval append command SCP Z O X SCP x 90 GIRA SS wi e XY SCP ny e XY BLOQUE BLOC 1 if tblsearch BLOCK BLOC 1 O setq E ssname SS 0 PRO DESHACER I F command SCP PR setq B BL EX BLOC 1 BLOC 1 BLOC 2 BLOC 2 BLOC strcat BLOC FIX4 ZZ OXY Q0 if not NORM XY setq BLOC strcat BLOC FIX4 OX OX Q0 if 00 4 setq BLAA strcat ATRIBSATIPS DE BLOC if or NORM Z BL EX setq BL EX and tblsearch BLOCK BLOC if 00 4 tblsearch BLOCK BLAA T if not BL EX progn if NORM Z INSPARCIAL setq K OX OX K I X progn if B command SCP Z O X SCP ny 90 INSPARCIAL setq K 1 OX E OXY K ZZ K E OX OXY XY command SCP PR SCP PR if 00 4 SEGR PUNTS eval append command SCP Z O X BLO
15. er a sacar sus propias conclusiones del trabajo c piese el c digo precedente en un archivo nombre archivo lsp como texto sin formato ntrese en AutoCAD eval ese la expresi n load nombre archivo i ejec tese INS2D o INS3D 4 Bibliograf a Por heterodoxo que pueda parecer este trabajo es resultado exclusivo de la aplicaci n ad nauseam del m todo ensayo error con centenares de horas quemadas frente al ordenador Tal m todo distar de ser ejemplar pero es el m o Fuera de consultas espor dicas a manuales de AutoCAD no he utilizado directamente fuentes bibliogr ficas Subrayo el adverbio de modo porque es evidente que hay un background en el sentido del aforismo que afirma de la cultura que es lo que queda cuando uno ha olvidado lo que aprendi pero no he llegado a sentir la necesidad de recurrir a fuentes espec ficas
16. f 00 4 INSERT BL OX OY OZ I 0 INSERT command SCP PR INSNAME BL ATTDIA ATDIA OSMODE OSN DESHACER F setvar CMDECHO ECO princ defun ALINEAR O PX PY PZ QX QY QZ D PYD PZD PYDU PZDU PZDXY PZDG PZDGU setq O 0 0 0 PX 1 0 0 PY 0 1 0 PZ 0 0 1 QX trans PX 0 1 QY trans PY 0 1 QZ trans PZ 0 1 no cal usar QZU trans QZ 1 0 perqu equival a PZ D mapcar QX PX PYD mapcar PY D PZD mapcar PZ D PYDU trans PYD 1 0 PZDU trans PZD 1 0 command DESPLAZA p PX OX SCP 3 OX OY if equal OX PYD Q0 PZD PYD setq PYD trans PYDU 0 1 PZD trans PZDU 0 1 PZDXY list car PZD cadr PZD 0 PZDG polar O angle O PZDXY angle O PYD distance O PZDXY PZDG list car PZDG cadr PZDG last PZD PZDGU trans PZDG 1 0 command GIRA p O R O PYD 0 SCP DE list sqrt 2 2 0 0 SCP y 90 GIRA P O R O trans PZDGU 0 1 trans PZ 0 1 SCP PR SCP PR SCP PR defun C BLOQUEOK Q0 BLOC I SA SS ULT REDEF CAPA ECO OSN AFL SCP while not BLOC setq BLOC getstring nIndique nombre de bloque o T while 2 substr BLOC 1 1 setq BLOC substr BLOC 2 if setq I strlen BLOC 0 while substr BLOC I 1 setq I 1 I BLOC substr BLOC 1 1 setq BLOC if wcmatch BLOC strcat chr 1 chr 31 NER aet x EE chr 58 chr 62 9 20 TKAXX XX
17. n SENSE RASTRE a command DESHACER progn if ECO 1 ji progn ji BS 100 ki setq CTRL ECO I H I 5 if ECO 1 a progn E BLANC vi setq CTRL ECO defun QUASI SENSE RASTRE command DESHACER progn if ECO 1 BS 100 I if ECO 1 BLANC defun C INS2D INSERTOK T defun C INS3D INSERTOK defun BS I repeat I princ 10 10 defun BLANC princ r repeat 100 princ princ r princ defun REFX streat BLOC nNo se puede insertar con INSERT ni INSERTOK nporque if logand cdr assoc 70 O 16 0 es depende de una referencia externa defun RUTES MS PREFIX N C setq MS strcat BLOC dwg nNo se encuentra el archivo en el camino de busqueda n substr findfile ACAD EXE 1 strlen findfile ACAD EXE 8 directorio actual n getvar DWGPREFIX Vn PREFIX getvar ACADPREFIX N 0 repeat strlen PREFIX setq N 1 N C substr PREFIX N 1 MS strcat MS if C An C substr MS 1 strlen MS 3 defun DIBUIX A B command INSERT BLOC setq A tblnext BLOCK T while setq B tblnext BLOCK setq A B strcase cdr assoc 2 A defun DEFECTE TXT if TXT strcat lt TXT defun U V U V list cadr U last V last U cadr V last U car V car U last V car U cadr V
18. ons 10 O 70 0 entmake 0 ENDBLK defun REDEF BLOC S LB setvar CLAYER 0 setvar CECOLOR PORBLOQUE setvar CELTYPE PORBLOQUE setvar CELWEIGHT 2 if BLIEX progn tblnext BLOCK T while setq LB tblnext BLOCK if wcmatch setq BLOC 1 cdr assoc 2 LB strcat BLOC 1 M substr M 2 progn setq E cdr assoc 2 LB LE entget E K cdr assoc 41 LE BLOC 2 strcat BLOC 2 substr BLOC 1 1 strlen BLOC 1 command SCP EZ O mapcar O cdr assoc 210 LE INSPARCIAL K K K cdr assoc 50 LE 180 PI eval append command SCP PR BLOQUE BLOC 1 S O setq E ssname SS 0 PRO DESHACER I F setq BLOC 1 BLOC 1 BLOC 2 BLOC 2 tblnext BLOCK T while setq LB tblnext BLOCK if wcmatch setq BLOC cdr assoc 2 LB strcat N progn setq E cdr assoc 2 LB LE entget E J if wcmatch BLOC N wi substr BLOC 1 strlen BL 1 2 strlen M BLOC 1 strcat BLOC 1 J BLOC 2 strcat BLOC 2 J i J command SCP EZ O mapcar O cdr assoc 210 LE INSPARCIAL cdr assoc 41 LE cdr assoc 42 LE cdr assoc 43 LE cdr assoc 50 LE 180 PI i J command SCP PR if 00 4 SEGR PUNTS command BLOQUE BLOC S O SS if 00 4 progn setq K strcat ATRIBSATIPS DE BLOC eval append command BLOQUE K if tblsearch BLOCK K S O
19. point nPrecise punto de inserci n oreach P if 2D nxn ny nxn y 2 setq A getpoint O strcat nSitue el extremo de un segmento P desde el punto de inserci n W getdist O strcat in Longitud de este segmento en el bloque BLOC 1 W if W W 1 set read P mapcar lambda CO CA CO CA CO W O A set read strcat O P distance O A W setq OZ if 2D OX OZ W if equal setq UV U V mapcar X O mapcar Y O 0 0 0 00 e Y est n alineados if and not 2D equal apply lambda X Y Z X Y Z mapcar UV mapcar Z 0 0 Q0 1 Y y Z son coplanarios if W alert strcat nREPITE nEl punto de Inserci n nX W setq Z trans if 2D mapcar 4 O UV Z 1 0 Z XY Y Y trans Y 1 0 QUASI SENSE RASTRE ALTERNATIVA suprimir esta l nea y activar todas las que en SENSE RASTRE comienzan con borrando estos caracteres setvar CMDECHO 0 command OSMODE 0 ATTDIA 0 SCP 3 O X Z XY setq O 0 0 0 X list OX 0 0 Y trans Y 0 1 Z trans Z 0 1 Z XY list car Z cadr Z 0 I if lt last Z 0 1 1 NORM XY equal setq X Y expt distance X Y 2 setq X O Y expt OX 2 expt OY 2 00 NORM Z equal Z XY O Q0 BL BLOC BLOC if tblsearch BLOCK BLOC BLOC DIBUIX SEGR ATRIBS if and NORM XY NORM Z progn eval append command INSERT BLOC O XYZ OX OY OZ I 0 if ATREQ append WWAA 1 WW i
20. s previstas en 2 6 Con ello persigo el doble prop sito de poner a disposici n de todo el mundo una herramienta til y de que la herramienta quede almacenada en el CD que editar el Congreso para as poder desmentir eventuales usurpaciones de autor a cuando le d una difusi n m s amplia Si no hubiera sido por la decisi n de ltima hora de los organizadores de recortar la extensi n m xima de las comunicaciones desde 20 hasta 15 p ginas mi intenci n era presentar el alfa y la omega para mostrar hasta qu punto la complejidad del programa se hab a disparado por cuestiones relativamente accesorias como la de los atributos y no digamos con la extrapolaci n a atributos colocados arbitrariamente la versi n inicial de p gina y media cap tulo 2 2 y las casi 14 p ginas de la m s reciente cap tulo 2 5 pude hacerlo cumpliendo escrupulosamente la letra de la norma s lo con escribir el c digo de corrido sustituir con espacios simples los cambios de l nea con sangrado que tanto ayudan a apreciar su estructura l gica pero habr a sido una salvajada y he preferido limitarme a la omega vl load com vlr remove all vlr COMMAND reactor vlr CommandWillStart ECO 1 s vlr CommandEnded ECO 2 defun ECO 1 N REACTIU L ORDRE Sus if CTRL ECO BS 1 strlen getcname strcat car L ORDRE defun ECO 2 N REACTIU L ORDRE P if CTRL ECO BS 1 strlen CTRL ECO defu
21. se problems in 2D and in 3D Furthermore it can cope with blocks that do not sit squarely on the flat base but which are arbitrarily located and orientated Key words AutoCAD BLOCK INSERT Software AutoLISP Geometry affine transformations 1 Introducci n Hace diez afios me propuse abordar la cuesti n planteada en el resumen precedente La idea motriz del empefio fue la mejor adecuaci n del m todo gr fico llamado de Ritz determinaci n de los ejes de una elipse a partir de dos di metros conjugados a la mec nica de inserci n de los bloques AutoCAD en relaci n a una resoluci n algebraica convencional basada en transformaciones lineales Obtenidos unos resultados que desde la perspectiva actual calificar a de manifiestamente mejorables en fecha 28 01 97 me puse en contacto con Autodesk Spain para proponerles un trato esa modesta aportaci n al desarrollo de aplicaciones para su producto estrella a cambio de licencias para regularizar la precaria cobertura legal bajo la que ten a que impartir docencia en la E T S de Ingenieros de Telecomunicaci n de Barcelona Como era de prever no obtuve respuesta y la soluci n al problema de las licencias vino por otro lado y como con la consecuci n de unos m nimos objetivos el tema ya no me estimulaba lo suficiente y dej paso a otros este trabajo qued en hibernaci n Afios despu s lo he recuperado en el marco de un proyecto m s ambicioso una monograf a que intentara cubrir el
22. vac o bibliogr fico que se detecta en la vertiente geom trica de la inserci n de bloques a diferencia de la vertiente estructura de datos incrustaci n de dibujos via INSERT versus vinculaci n via REFX profusamente tratada Con tal prop sito se me ocurri reunir en una misma publicaci n material docente sobre el tema una parte de los apuntes de la asignatura ELEMENTS DE CAD dedicados a sistematizar en tipolog as geom tricas distintos casos de inserci n y una versi n actualizada de la versi n 13 a la 16 mejorada y comentada de aquel software que dorm a el sue o de los justos en el limbo metaf rico pues parece ser que ya no hay otro de las innovaciones frustradas La obra en catal n responde al siguiente plan INTRODUCCI 1 CAMPS D INSERCIONS EN 2D 5 EXERCICIS COMENTATS 1 1 EXERCICI 1 escales X i Y en funci de coordenades cartesianes 1 2 EXERCICI 2 escala nica en funci de coordenades cartesianes 1 3 EXERCICI 3 escala nica i orientaci en funci de coordenades polars A 1 4 EXERCICI 4 escala nica i orientaci en funci de coordenades polars B 1 5 EXERCICI 5 escales X Y i orientaci en funci de coordenades polars 1 6 I LA TORNA 2 ESMOLANT LES EINES AMB AUTOLISP 2 1 Optimitzaci dels recursos existents 2 EXEMPLES 2 2 Creaci de nous recursos ENCAIX 2D DE BLOCS SENSE ATRIBUTS 2 3 ENCAIX 2D DE BLOCS AMB ATRIBUTS 2 4 ENCAIX 3D DE BLOCS AMB ATRIBUTS 2 5 ENC

Download Pdf Manuals

image

Related Search

Related Contents

施工説明書 取扱説明書 出力2 出力1  

Copyright © All rights reserved.
Failed to retrieve file