MJLM Posted February 5, 2015 Posted February 5, 2015 Hello everybody. I have a main line and my intent is to make my own one dimension array command by duplicating a, perpendicularly connected to the main, line. Let s suppose that this perpendicular line is connected at the start point of the main line. While the perpendicular line being duplicated along the path of the main line, I want to break the main line at every point the new duplicate touches the main. For that I m making a selection set to capture both lines (new & main) as follows: (setq s (ssget "C" w w '((0 . "LINE")))) where w is the start point of the new dupplicate. However this is not working reliably. Sometimes it captures both lines, sometimes not, sometimes not for all instances and therefore no brake occurs. Is there a way to make it work reliable? Any alternative on how to make the selection set? Thank you in advance. Quote
Tharwat Posted February 5, 2015 Posted February 5, 2015 Hi , Can you illustrate your aim with an example ? Quote
Tharwat Posted February 5, 2015 Posted February 5, 2015 Firstly , I think your using of ssget function to make a selection set would not work in other than world coordinates . still a guess. Why don't you make a selection set of the new created lines by adding them to a new separate selection set ? e.g . (setq sd (ssadd)) (setq e (entmakex (list '(0 . "LINE") '(10 0. 0. 0.) '(11 1. 0. 0.)))) (ssadd e sd) So you would have the new new add to the new selection set variable sd Quote
MJLM Posted February 5, 2015 Author Posted February 5, 2015 The point here is not to make a sel.set of the new lines. The point is to make a selection set on every new intersection of the main and perpendicular line only. In the picture above the "ssget "C" pt pt not selecting two lines" does not refer to the two duplicates shown rather the main and the new perpendicular line as pair. Then this process will check the next pair and next and so on... I m currently checking if I could avoid the ssget "c" option all together and find an other approach on how to break the main line. Any ideas are welcome. Quote
Tharwat Posted February 5, 2015 Posted February 5, 2015 Try to use the fence mode "_F" instead of the "_C" with the ssget function then if that succeeded , you can redraw the main line with every intersecting point after gathering the coordinates and sorting them according to shortest distance from one of the two sides of the main line to get them in order . This could be a long way to go through but I think this should be perfect . Quote
BIGAL Posted February 6, 2015 Posted February 6, 2015 Maybe in future for clarity (ssget "C" pt1 pt2 '(( Quote
MJLM Posted February 6, 2015 Author Posted February 6, 2015 yes but what should be pt2? maybe (+ (car w) 0.01) (+ (cadr w) 0.01) (+ (caddr w) 0.01)? Increasing the distance from 'w' may select other lines behind. All "C", "F" etc switches are very unreliable to me for selecting. But it you don't have end endpoint there and need to select the line, what do you do? 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.