Author Topic: Fillet of 2 polylines  (Read 1830 times)

0 Members and 1 Guest are viewing this topic.

simor

  • Guest
Fillet of 2 polylines
« on: January 15, 2009, 12:15:27 PM »
I'm trying to write a short code for fillet'ing polylines with different radii, all working in a loop, but it doesn't want to work when I select 2 polylines. Lines are OK, line+poly is also fine but 2 polys just won't go through. I can do it manually but not with this code:

Code: [Select]
(setq
#filletr1 (edreal "Enter first radius: " #filletr1 3)
#filletrd (edreal "Enter change in radius: " #filletrd 3)
filletr2 #filletr1
)
(while T

(setq ET1 nil ET2 nil)
(setq ET1 (entsel "\npick first: "))
(while (= ET1 nil)
(setq ET1 (entsel "\npick first: "))
)
(setq ET2 (entsel "\npick second: "))
(while (= ET2 nil)
(setq ET2 (entsel "\npick second: "))
)
(setvar "filletrad" filletr2)
(command "._fillet" ET1 ET2)
(setq filletr2 (+ #filletrd filletr2))
)
(princ)

I've tried using car and cadr around ETs but it doesn't seem to have much effect.
What am I doint wrong? :|


OK apparently I did something wrong while trying multiple versions. Writing

(command "._fillet" (cadr ET1) (cadr ET2))

actually works! But... why is it needed?
« Last Edit: January 15, 2009, 12:30:47 PM by simor »