MJLM Posted December 17, 2014 Posted December 17, 2014 I m trying to make a selection set using a point and a couple of lines passing through this point (caution, NOT terminating). I want to select lines of specific layers. What I m typing is this (setq pt (getpoint "\nSelect point: ")) (setq ss (ssget pt '((0 . "LINE") (8 . "mylayer")))) Unfortunately this doesn't work. The only way I could find is to use this instead (ssget "C" pt pt '((0 . "LINE") (8 . "mylayer"))) However I do not find that helpful at all. If there is a line at the back on an other elevation, not crossing the initial line, but coincidentally passing 'visually' through this point (pt) the later ssget command will include both and that is not what I want. How could I use a point and filter together? Any help would be appreciated. Quote
hmsilva Posted December 17, 2014 Posted December 17, 2014 Try (setq ss (ssget pt (list '(0 . "LINE") '(8 . "mylayer")(cons -4 "*,*,=")(cons 10 (list 0.0 0.0 (caddr pt)))))) ;; or (setq ss (ssget "C" pt pt (list '(0 . "LINE") '(8 . "mylayer")(cons -4 "*,*,=")(cons 10 (list 0.0 0.0 (caddr pt)))))) Henrique Quote
MJLM Posted December 17, 2014 Author Posted December 17, 2014 Thank you. The first one doesn t seem to work. The second works but this way only filtering the Z. If I change the viewpoint of the entire model this will not be reliable. I tried (setq ss (ssget "C" pt pt (list (cons 0 "LINE") (cons 8 "mylayer") (cons -4 "=,=,=") (cons 10 (list (car pt) (cadr pt) (caddr pt)))))) but it gives me nil! It should have worked. There is at least one line passing through the pt. Quote
hmsilva Posted December 17, 2014 Posted December 17, 2014 (setq pt (getpoint "\nSelect point: "));; your known point (setq wpt (trans pt 1 0));; point in WCS (setq upt (trans wpt 0 1));; point in actual UCS (setq ss (ssget "C" upt upt (list '(0 . "LINE") '(8 . "mylayer")(cons -4 "*,*,=")(cons 10 (list 0.0 0.0 (caddr upt)))))) HTH Henrique Quote
MJLM Posted December 17, 2014 Author Posted December 17, 2014 (edited) Thanks! I will look into it. Edited February 4, 2015 by MJLM Quote
Recommended Posts
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.