.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Graph class in Autocad.NET

3 REPLIES 3
Reply
Message 1 of 4
Selevkos
610 Views, 3 Replies

Graph class in Autocad.NET

Hi all,

 

While trying to develop topological network structure within autocad, I realized that there is "Graph", "GraphNode", "Graphnode Collection" Classes within Autocad.net API.

 

I want to learn if these classes can be used to generate topological network. If so, please let me know how to do that.

 

Thanks ın advance.

3 REPLIES 3
Message 2 of 4
hgasty1001
in reply to: Selevkos

Hi,

 

It will depend on the class of network and the analisys you intend to do on the network, it seems that the Graph API its aimed to "rooted" graphs or trees, but also it doesn't have a lot of methods thet easier the life with graphs: I don't see :

 

  • AddNodeRange
  • AddEdgeRange

That means that you have to implement a node by node, edge by edge way to add nodes and edges to the graph

 

  • Node.Degree (the total number of edges connected to a node)
  • Node.OutDegree (the number of edges outbound of that node)
  • Node.InDegree (the number of node inbound of that node)
  • Node.InBoundEdges (edge collection of inbound edges)
  • Node.OutBoudEdges (edge collection of outbound edges)

You will ned that for node connectivity analisys 

 

The are lots of others thing one would expect to be included in a comprehensive Graph API, like node traversing algorithms implementation (A* search, Depth First search, Upstream search, etc). 

IMO this is a very limited API, but it can (and it must) be extended to suit a general purpose network topology graph API, so if you can't afford to implement the needed extensions, then would be a better idea to grab some other graph API, personally I use quickgraph, but it's a personal choise.

 

Regards,

 

Gaston Nunez

Message 3 of 4
Selevkos
in reply to: hgasty1001

Thank you for the reply.

 

In fact, I also understood that it is not sufficient to create a solid network topolgy. To be honest, it seems to me this class is useless.

 

Anyway, I will have to use an external graph API. May be, quick graph will be a good choice as you mentioned. But I wonder if an external database should be used to store graph relation data such as edges and nodes. Or is there any way to store such graph data in the internal database of autocad. 

 

You say that you are using quick graph api. Did you use it in atuocad? If you used this api in autocad, can you please tell me what you used for storing the graph data?

 

 

 

 

 

 

 

 

Message 4 of 4
hgasty1001
in reply to: Selevkos

Hi,

 

As for storing graph, network topology, or plain topologys in a data base, you can take a look to Oracle Spatial, or MS SQL Server 2008, they  include a spatial extension that permit store topological structures in them, and better, direct topological querys over the spatial data.

 

I'm using quicgraph mainly to represente wall connectivity in a custom solution for concrete formwork and scaffolding, but I'm not using persistent storage of graphs, anyway quickgraph implements serialization to GML, and XML, so, It should be no difficult to store that info in a data base. You can check the quickgraph Docs

 

Also You can use AutoCAD Map 3D, it have a lot of tools for GIS analysis, including network topology analysis, and Oracle Spatial connectivity.

 

Gaston Nunez

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost