Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
Digging this one up again because I find my self working with polylines quite often too.
I've tried adjusting this function to allow the second entity to be a polyline by making a copy of the segment if it is a polyline picked. then I can run everything the same as before on the temporary segment/copy. Once the routine is complete, I simply delete the copied temporary segment leaving behind the original polyline and the filleted line or arc.
So I guess my question is: Can anyone help make T.Willey's "c:FakeFillet" program work with polylines (for the second pick)? The first pick will always be a line, circle, or arc.
Thank you for any help
* If helpful, I can share my "GetSeg" function, but it's a messy global maker.
@mid-awe wrote:
.... Can anyone help make T.Willey's "c:FakeFillet" program work with polylines (for the second pick)? The first pick will always be a line, circle, or arc.
....
A Circle? I would want to see an image or sample drawing of the result you're looking for, since you can't Fillet a Circle, whatever the other object is. It sounds like a job for a Circle command with TTR option, and some trimming.
I'd still like to see what result you expect when the first object is a Circle....
@mid-awe wrote:
Just an arc tangent to the two entities picked. The arc would be at the
radius defined by the user like the filet rad prompts so there is no
difference with the flow from T.Willey's program.
I can imagine something like that.... Maybe [like Scarlet O'Hara] I'll think about that tomorrow. In the meantime, the concept sounded familiar, and I found the attached, from 2009. [I think it was in response to something here, but haven't been able to find the thread.] It has the slight disadvantage, if it is one for you, that it doesn't save the current Fillet radius and restore it, but affects it. But it has the slight advantage, if it is one, that it doesn't require you to answer a radius prompt, but has setting the Radius as an option you can call for only if you don't want to use the current value. And its selection prompts are a little more descriptive of what's going on. Note the coincidental remark: line 3.
Kent,
That works great for a circle. T.Willey's version works as well. Unfortunately, it still has the polyline limitation.
I'm thinking that my "GetSeg" function is still needed. (written a looong time ago, not so clean, not too smart, but it works. It's attached.)
Hi mid-awe,
perhaps something like this, quick and dirty and minimally tested...
T.Willey's FakeFillet, modified...
And "The first pick will always be a line, circle, or arc."
(defun c:FakeFillet (/ BLG ENT ENT1 ENT2 ENT3 FILLRAD NEWOBJ OLDFILLET PAR_1 PAR_2 PAR_M PT_E PT_M PT_S PT_SEL TMPOBJ ) (setq OldFillet (getvar "filletrad")) (if (setq FillRad (getdist "\n Enter fillet radius: ")) (while (and (setq Ent1 (entsel "\n Select first object to fillet: ")) (not (redraw (car Ent1) 3)) (setq Ent2 (entsel "\n Select second object to fillet: ")) (not (redraw (car Ent1) 4)) ) (setq Ent (car Ent2)) (if (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE") (progn (setq Pt_sel (vlax-curve-getclosestpointto Ent (cadr Ent2)) Par_1 (fix (vlax-curve-getparamatpoint Ent Pt_sel)) Par_m (+ Par_1 0.5) Par_2 (1+ Par_1) Pt_s (vlax-curve-getpointatparam Ent Par_1) Pt_m (vlax-curve-getpointatparam Ent Par_m) Pt_e (vlax-curve-getpointatparam Ent Par_2) Blg (vla-getbulge (vlax-ename->vla-object Ent) Par_1) ) (if (not (equal Blg 0.0 1e-8)) (command "_.arc" "_none" Pt_s "_none" Pt_m "_none" Pt_e) (command "_.line" "_none" Pt_s "_none" Pt_e "") ) (setvar "filletrad" FillRad) (setq Ent3 (list (entlast) (cadr Ent2))) (command "_.fillet" Ent1 Ent3) (entdel (car Ent3)) ) (progn (setvar "filletrad" FillRad) (setq tmpObj (vlax-ename->vla-object (car Ent2))) (setq NewObj (vla-Copy TmpObj)) (command "_.fillet" Ent1 Ent2) (vla-Delete TmpObj) ) ) ) ) (setvar "filletrad" OldFillet) (princ) )
HTH
Henrique
Can't find what you're looking for? Ask the community or share your knowledge.