command _fillet using osnap

command _fillet using osnap

Anonymous
Not applicable
2,396 Views
27 Replies
Message 1 of 28

command _fillet using osnap

Anonymous
Not applicable
Hello,
Once manual fillet command choose two entity points
may I use "_.fillet" command using osnap to set a getpoint position?

(setq ent1 (car (entsel "\nSelect Object1: ")))
(setq StartPoint_ent1 (vlax-curve-getStartPoint (vlax-ename->vla-object ent1))
(setq ent2 (car (entsel "\nSelect Object1: ")))
(setq EndPoint_ent2 (vlax-curve-getEndPoint (vlax-ename->vla-object ent2))

(setq pickset1 (ssadd))
(ssadd ent1 pickset1)
(command "ZOOM" "OBject" pickset1 "")
(command "_.fillet" (osnap StartPoint_ent1 "_nea") (osnap EndPoint_ent2 "_nea"))

I've used this before with success but, now the result is always nil




 

0 Likes
Accepted solutions (2)
2,397 Views
27 Replies
Replies (27)
Message 21 of 28

ВeekeeCZ
Consultant
Consultant
Accepted solution

Well... not sure, it works for me.

 

Although, it could be much simpler...

 

from my previous suggestion.... (cons ent (list '(x y z))) to just (list ent '(x y z))   - test to see the result.

on your side... not sure why you don't simply take the point.

(command "_.fillet"
	 (list ent1 (trans StartPoint_ent1 1 0))
	 (list ent2 (trans EndPoint_ent2 1 0))
        )

 

That's all for today, have fun!

0 Likes
Message 22 of 28

Anonymous
Not applicable

Ok guys here it is a piece of the drawing and the complete code I am using 

 

check inside the code where I am trying to use the fillet command 

;; here is where I am trying to do the FILLET
;; without this 3 lines the program works most of times
;; see the hatched polylines, it is where the problem happens

 

Thanks in advance + regards.

Have fun!

0 Likes
Message 23 of 28

Anonymous
Not applicable

doesn't work for me

 

see attached file

0 Likes
Message 24 of 28

Anonymous
Not applicable

almost there...

 

this one worked

(command "_.fillet" (cons (eval (read previous_seg)) (list (osnap pt1 "_nea")) )
                                   (cons (eval (read current_seg)) (list (osnap pt4 "nea")) ) )

 

new version attached

0 Likes
Message 25 of 28

ВeekeeCZ
Consultant
Consultant

Just tips for now...

(vlax-curve-*) functions accept enames as well.

 

			(if (and
					(not (equal pt1 nil))
					(not (equal pt2 nil))
					(not (equal pt3 nil))
					(not (equal pt4 nil))

...it really the same as just (if (and pt1 pt2 pt3 pt4) ....

 

 

Message 26 of 28

Anonymous
Not applicable

now it is complete full operational and running

Message 27 of 28

Anonymous
Not applicable

much better and complete version without using fillet command

0 Likes
Message 28 of 28

ВeekeeCZ
Consultant
Consultant

+1 Right move. Sooner to later this was inevitable.