Dear, I hope you can help me on this issue that I am.
As you can see from the picture, I'm looking for ways to save a list of lines (identified with a unique personal code) match (which is equal to) its end (end) with the front end of another line. This way I know that there is continuity, starting from a line selected (code).
Example: In the attached picture you can see that we start to evaluate from the line, it is determined that the value of your order is equal to the starting value of b and c lines (crossing all until he b and c), then evaluate lines b and c with the other resulting in the dye for line by line, and g for the line c. And so on
Now I have several day thinking as estructuralo, perhaps you can give me an idea of how I could start.
Thank you.
Hi,
What you have there it's a graph, probably a tree, there is a lot of literature on that topic, just google Graph or .NET Graph and you will see a huge list of results.
The first thing is to have the correct tool for the task:
Map has support for topologies, and the Map API support creation and analysis of topologies
2. If you don't have Map, then I suggest you to grab some free (or maybe paid) graph library like QuickGraph
3.- Alternative is to create your own graph class, with methods to obtain the degree of a vertex, traverse the graph, and a huge etc.
Now, please let us know what kind of task or work flow are you aimed for.
Gaston Nunez
This work is to be applied to networks GAS lines. Selecting a line, we must emphasize that lines are connected with it and have the same direction (definidad by its start and end address lines). I am in search of an algorithm or libraries that help search among all lines, starting from a selected.
Thanks for your reply.
greetings
Hi,
First I assume you have a good knowledge of AutoCAD .NET API, and .NET programming in general.
Do you have AutoCAD Map 3D? If so, then create a network topology, Map has some tools to create and analysis of networks. If not, then try programming a recursive function to find all the connected lines, I would go with a little crossing box filtered selection over the ends of the lines, and some structure to store the handles of each line found, not sure the structure, maybe a dictionary and a try catch to avoid duplicates. Then when the search end you will have all the lines connected, now you will need to create a graph in order to find upstream and downstream connected components with a depth first search.
Gaston Nunez