gpd Posted December 7, 2010 Posted December 7, 2010 Hi all The attached drawing contains 2 polylines which I want to fillet I have tried 2 ways but could not succeed. 1 I passed result of (entsel) for both entities to fillet Command: (setq ent1(entsel)) Select object: ( (31.7452 23.9204 0.0)) Command: (setq ent2(entsel)) Select object: ( (41.2135 7.70397 0.0)) Command: (command "fillet" ent1 ent2) fillet Current settings: Mode = TRIM, Radius = 0.2000 Select first object or [uNdo/Polyline/Radius/Trim/mUltiple]: Select second object or shift-select to apply corner: Command: nil 2. passed just entity names to fillet Command: (setq ent1(car(entsel))) Select object: Command: (setq ent2(car(entsel))) Select object: Command: (command "fillet" ent1 ent2) fillet Current settings: Mode = TRIM, Radius = 0.2000 Select first object or [uNdo/Polyline/Radius/Trim/mUltiple]: Select second object or shift-select to apply corner: Command: nil The interesting thing is that If I apply the command manually it works. How can I fillet these entities using lisp with a fillet radius of 0.2 Thanks. mail.dwg Quote
jammie Posted December 7, 2010 Posted December 7, 2010 Hi Fillet requires points to be passed as arguments instead of the retval from entsel or the curve ename See the following for more info http://www.cadtutor.net/forum/showthread.php?54474-Problem-with-fillet Regards Jammie Quote
David Bethel Posted December 7, 2010 Posted December 7, 2010 Hi Fillet requires points to be passed as arguments instead of the retval from entsel or the curve ename Not quite true: [b][color=BLACK]([/color][/b]entmake '[b][color=FUCHSIA]([/color][/b][b][color=NAVY]([/color][/b]0 . [color=#2f4f4f]"LINE"[/color][b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]10 1 1 0[b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]11 3 1 0[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]setq l1 [b][color=FUCHSIA]([/color][/b]entlast[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]entmake '[b][color=FUCHSIA]([/color][/b][b][color=NAVY]([/color][/b]0 . [color=#2f4f4f]"LINE"[/color][b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]10 4 2 0[b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]11 4 6 0[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]setq l2 [b][color=FUCHSIA]([/color][/b]entlast[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]setvar [color=#2f4f4f]"FILLETRAD"[/color] 0.2[b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]command [color=#2f4f4f]"_.FILLET"[/color] l1 l2[b][color=BLACK])[/color][/b] Should work. -David Quote
David Bethel Posted December 7, 2010 Posted December 7, 2010 GPD, The sample doesn't work manually in 2000. The error is Command: FILLET Current settings: Mode = TRIM, Radius = 0.2000 Select first object or [Polyline/Radius/Trim]: Select second object: Cannot fillet polyline segments from different polylines. Select second object: I've never totally understood the error but it is there from time to time. Possible it has change in later releases where it can be filleted. -David Quote
jammie Posted December 7, 2010 Posted December 7, 2010 Not quite true: [b][color=BLACK]([/color][/b]entmake '[b][color=FUCHSIA]([/color][/b][b][color=NAVY]([/color][/b]0 . [color=#2f4f4f]"LINE"[/color][b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]10 1 1 0[b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]11 3 1 0[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]setq l1 [b][color=FUCHSIA]([/color][/b]entlast[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]entmake '[b][color=FUCHSIA]([/color][/b][b][color=NAVY]([/color][/b]0 . [color=#2f4f4f]"LINE"[/color][b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]10 4 2 0[b][color=NAVY])[/color][/b][b][color=NAVY]([/color][/b]11 4 6 0[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]setq l2 [b][color=FUCHSIA]([/color][/b]entlast[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]setvar [color=#2f4f4f]"FILLETRAD"[/color] 0.2[b][color=BLACK])[/color][/b] [b][color=BLACK]([/color][/b]command [color=#2f4f4f]"_.FILLET"[/color] l1 l2[b][color=BLACK])[/color][/b] Should work. -David When testing fillet with polylines, AutoCAD didn't seem to accept enames. However,as you have shown, for certain curve objects it does Thanks for the tip Regards Jammie Quote
irneb Posted December 8, 2010 Posted December 8, 2010 Actually fillet requires the same input as you would get from entsel (in most cases). I.e. a list with an ename followed by the XYZ coordinates of the pick-point. This is quite logical, since in many cases you could get 2 different results with 2 different pick-points on the same two entities. If you just send it the pick-point it should work usually, except that you don't then have control over which entity is picked if there's 2 (or more) on top of each other. Most of the newer acads (can't remember when this was introduced - probably with the LWPolyLines) can fillet 2 separate polylines together, in effect joining them. Sometimes this fails however, especially if the pick-point is not on the 1st or last vectors of both polylines. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.