From Cadalyst's "AutoLISP Solutions" column:
Bill Baker asked for a new way to fillet three lines in AutoCAD by picking them in clockwise or counterclockwise order. The result would be a full fillet in the sense that an arc would be constructed tangential to all three lines with a full trim.
Bill sent me a LISP routine that worked on old drawings but does not work in later versions of AutoCAD. The program was so old that it used no ActiveX Visual LISP methods, so I decided to ignore it and write a new program from scratch. It is usually easier to write new programs than to figure out how to fix old ones because programming techniques change quite often.
The AutoLISP Solution is FILLET-3-LINES.LSP, which allows the user to enter F3L on the Command line, then select each of the three lines in either clockwise or counterclockwise direction. The lines are then filleted automatically, and the fillets are placed on the same layer as the first selected line.
Get the Code!
Download the attached FILLET-3-LINES.LSP file. Save the file in AutoCAD's Support directory. Use the Appload facility by selecting Tools / Load Application, then use the browser to select the FILLET-3-LINES.LSP file.
How to Use the FILLET-3-LINES.LSP Code
To start the program, enter F3L and you will be prompted to select the first line, then the middle line, and finally, the last line.
To read the full "AutoLISP Solutions" column, including tip details, programming notes, and images, go to: http://management.cadalyst.com/cadman/article/articleDetail.jsp?id=560900. |