Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have to connect a lot of waves. I want to have a program which can do it automatically.
I stacked a little bit, I don't know how to do it.
I've started an the logic behind is, that I check the lower end of the lines, it an lower endpoint of an other line is inside of a certain rectangular than do the fillet. It works if the columns are more or less on the same level and the high difference it not too much - green area.
By selection of the right side leads misfunction
Has someone an better idea how to that?
(setq ss (ssget (list (cons 0 "LINE"))))
(setq n 0)
(setq n1 0)
(setq y_range 3)
(setq pitch 25)
(setq r 3)
(setvar 'filletrad r)
(repeat (sslength ss)
(setq e1 (ssname ss n))
(setq e1_vla (vlax-ename->vla-object e1))
(setq e1s (vlax-curve-getStartPoint e1_vla))
(setq e1e (vlax-curve-getEndPoint e1_vla))
(if (< (cadr e1s) (cadr e1e))
(progn
(setq e1low e1s)
(setq e1hig e1e)
) ;_ progn
(progn
(setq e1low e1e)
(setq e1hig e1s)
) ;_ progn
) ;_ if
;;; (entmake (list (cons 0 "point") (cons 10 e1low) (cons 62 2))) ; yellow
(repeat (sslength ss)
(setq e2 (ssname ss n1))
(setq e2_vla (vlax-ename->vla-object e2))
(setq e2s (vlax-curve-getStartPoint e2_vla))
(setq e2e (vlax-curve-getEndPoint e2_vla))
(if (< (cadr e2s) (cadr e2e))
(setq e2low e2s)
(setq e2low e2e)
) ;_ if
;;; (entmake (list (cons 0 "point") (cons 10 e2low) (cons 62 1))) ; red
(if (and (< (cadr e2low) (+ (cadr e1low) y_range)) (> (cadr e2low) (- (cadr e1low) y_range)))
(if (and (< (car e1low) (car e1hig)) (< (car e2low) (car e1low)) (< (distance e1low e2low) (/ pitch 2)))
(command "_.fillet" e1 e2)
)
) ;_ if
(setq n1 (+ n1 1))
) ;_ repeat
(setq n1 0)
(setq n (+ n 1))
) ;_ repeat
Solved! Go to Solution.