Jump to content

Recommended Posts

Posted

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

Posted
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

Posted

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

Posted
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

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...