A Line Tree problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have been thinking about a problem of a different sort and I thought I might throw this up and see how you guys might handle it. Given the attached example drawing, I'd like to be able to acquire the entity names of each of the lines that are on the "0" layer (the white ones). However, the manner in which this is accomplished has to be by proximity and/or touching of lines.
For example, I've identified the line that will be selected with a "1". In order to accomplish my goal, when I select that line, I find the endpoints, use those to generate a slightly larger crossing (search) window to locate line "2". I can then repeat this search using the endpoints of line "2" to find line "3" and so on. I'll call this method CROSSING.
CROSSING seems to mimic the result of FASTSEL, but I am looking to be able to filter each subsequent selection set by the layer and then do FASTSEL again and again until all the "ends" are found and no more lines exist to be found that fit the search parameters.
My first thoughts are to try to avoid hard coding the CROSSING/FASTSEL function 10 times so I can collect all 10 line objects. Also, even if they are hard coded 10 times, what if the drawing needs 11 and I am not able to acquire the last line?
I am not sure of the best way to handle this problem.
How would you handle the problem? Do you know of any existing routines that handle this problem?
I look forward to your responses. Thanks!
~Z