CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 6272

CAD tip CAD tip # 10383:

   
Question CAD 
 %  platform  category 
Q - question

The shortest path between two points on a network.

A - answer There are various algorithms to find the shortest path between two points on a given interconnected network (pipes, communication, roads, etc.).

In AutoCAD Map, you can effeciently solve this task using topologies (including throughput parameters, asymmetry, penalty functions). In plain AutoCAD, you can find the shortest connection between 2 network nodes using the freeware LISP utility CADstudio SPath.

Download the SPath.vlx file from Download, load it into AutoCAD with APPLOAD and type the SPATH command. Select the lines and polylines defining the network and pick two node-points on this network (precisely, use osnap). SPath will compute and generate a red polyline of the shortest path copying segments and nodes on the given network. Adjacent segment nodes must match. The number of selected network segments directly influences computing time of the optimal path.

Example of using SPath on a road network map of the Czech Republic - from the DWG block SilniceTematicky:

see also YouTube

To generate the shortest path connecting multiple points, use the ShortPath utility (travelling salesman problem, TSP).

(original algorithm: H.Schröder)

ACAD
100% *  CAD 
30.6.2015    13039×  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:
Tip 10416:How to fix/repair large 3D mesh models?
Tip 10128:How to convert a line-based map to closed polygons (lots)?
Tip 10102:How to simplify a complex 3D mesh model?
Tip 4068:How to find the polyline direction/orientation?
Tip 3541:"Topology is correct and incomplete" but it cannot be deleted.


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist