muthu123 Posted February 23, 2010 Share Posted February 23, 2010 i have copied the following result from console window. If you look at it the pt1 is part of the purlin_ins_pt_list_left. But when i use the function member it returns nil. Please suggest the correct way. _$ pt1 (8955.33 6895.53 0.0) _$ purlin_ins_pt_list_left ((1492.56 6149.26 0.0) (2985.11 6298.51 0.0) (4477.67 6447.77 0.0) (5970.22 6597.02 0.0) (7462.78 6746.28 0.0) (8955.33 6895.53 0.0) (10447.9 7044.79 0.0) (11940.4 7194.04 0.0) (13433.0 7343.3 0.0) (14925.6 7492.56 0.0)) _$ (member pt1 purlin_ins_pt_list_left) nil _$ Quote Link to comment Share on other sites More sharing options...
jammie Posted February 23, 2010 Share Posted February 23, 2010 It could be the precision of either pt1 or purlin_ins_pt_list_left The concept is correct though (setq pt1 '(8955.33 6895.53 0.0)) (setq purlin_ins_pt_list_left '((1492.56 6149.26 0.0) (2985.11 6298.51 0.0) (4477.67 6447.77 0.0) (5970.22 6597.02 0.0) (7462.78 6746.28 0.0) (8955.33 6895.53 0.0) (10447.9 7044.79 0.0) (11940.4 7194.04 0.0) (13433.0 7343.3 0.0) (14925.6 7492.56 0.0))) (member pt1 purlin_ins_pt_list_left) Quote Link to comment Share on other sites More sharing options...
David Bethel Posted February 23, 2010 Share Posted February 23, 2010 ( member ) looks for exact matches so Jammie is probably correct with the precession query I'd try something like this: (setq found nil) (foreach p purlin_ins_pt_list_left (and (equal p pt1 1e-4) (setq found T))) found -David Quote Link to comment Share on other sites More sharing options...
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.