# Travel Distance Visualisation

**URL:** <https://forum.dynamobim.com/t/travel-distance-visualisation/115267>\
**Category:** Share\
**Tags:** revit, dynamo\
**Created:** [October 10, 2026, 4:15pm UTC](https://forum.dynamobim.com/t/travel-distance-visualisation/115267 "2026-10-10T16:15:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy\_Grout](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andy_grout/32/40509_2.png) [@Andy\_Grout](https://forum.dynamobim.com/u/Andy_Grout)\
**Post date:** [October 10, 2026, 4:15pm UTC](https://forum.dynamobim.com/t/travel-distance-visualisation/115267/1 "2026-10-10T16:15:17Z")

</div>

The dynamo script places instances of a hexagonal detail item in a grid and colours them based on their distances from destination points (detail family also provided).

 ![Dynamo Graph_Steps](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/3/131acde273dacf7fb15af7b20b2b636646556360.jpeg)

How to use:

1. Select the surface face of a floor representing the circulation area. This is best done in a 3D view
2. Place the “DET\_Destination Point” families in a 2D plan view, temporarily isolate them, and select them as inputs for the node.
3. Specify the maximum travel distance. Any grids beyond this distance will be shown in the third colour (current red)
4. Before running the script, ensure that the “DET\_Hexagon” family is loaded into the project
5. Run the script with the 2D plan as your active view.

Result:

 ![Result](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/a/ea5d38ff30a20ceb5b5728856f7586815bfc7372.jpeg)

Script:

[Hexagon Colour Map\_Distance To Given Points.dyn](https://forum.dynamobim.com/uploads/short-url/sG1rRNpHAexrTDbci76XWBwVDIk.dyn) (86.1 KB)

Families:

[DET\_Hexagon.rfa](https://forum.dynamobim.com/uploads/short-url/zxclVLp9eP0Pdzq1aotEqQtUNSJ.rfa) (372 KB)

[DET\_Destination Point.rfa](https://forum.dynamobim.com/uploads/short-url/yPq6M1YvloBwOn6IvrNeQNmMJ04.rfa) (372 KB)

The script was formulated as a quick alternative to the built-in Revit “Path of Travel” node, providing an overall visualisation which can double as intuitive diagrams in presentation decks.

It utilised the Dijkstra algorithm routing through the centre points of a hexagonal grid, with the tolerance set to allow the path-finding to skip over one adjacent hexagon for more efficient travel. The attached PDF illustrates the tolerance setting and highlights some use-cases.

[Travel Distance Visualisation.pdf](https://forum.dynamobim.com/uploads/short-url/9A0mZYFJe3ynFtUjRfHddYI4wiq.pdf) (520.8 KB)

The script was developed in Dynamo v.3.6.2 and tested in Revit 2026.4. It utilises CPython3 code which was written by AI.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [October 11, 2026, 12:13pm UTC](https://forum.dynamobim.com/t/travel-distance-visualisation/115267/2 "2026-10-11T12:13:38Z")

</div>

Have you checked out VASA? Does this in 3D as well as additional analysis.

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [October 11, 2026, 3:38pm UTC](https://forum.dynamobim.com/t/travel-distance-visualisation/115267/3 "2026-10-11T15:38:19Z")

</div>

A few suggestions:

- For the Dijkstra algorithm, you can use the SciPy library (scipy.sparse.csr\_matrix and scipy.sparse.csgraph.dijkstra)
- For colors, you can use the Analysis Visualization Framework (AVF, Autodesk.Revit.DB.Analysis) directly on the floor face references

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [October 12, 2026, 3:51am UTC](https://forum.dynamobim.com/t/travel-distance-visualisation/115267/4 "2026-10-12T03:51:54Z")

</div>

One of my frustrations with using LLMs for coding, specially in the Dynamo space is that the ability to use the Revit or DesignScript API is limited to the publicly available code.

Time and time again I see LLMs create helper functions, repetitive testing or wrappers for built-in API methods because the ‘knowledge’ of the API is so thin.

I assist my agent (when I use one) by utilising the Autodesk Help MCP and an extensive Revit and Dynamo API stub library for my IDE Visual Studio Code. This allows for discovery of methods that are not documented on the web as DesignScript is closed source. For example this is an excerpt from the python stub for the DesignScript Geometry `Polygon` class. Note how the `Center()` method is built in. No need for a helper.

```python
class Polygon:
    PlaneDeviation: float
    """Returns maximum deviation from average plane of polygon."""
    Points: Array[Point]
    """Returns all the segment start / end points."""
    @staticmethod
    def ByPoints(points: IEnumerable[Point]) -> Polygon: ...
    def Center(self) -> Point:
        """Returns average point of corners of polygon"""
        ...
    def ContainmentTest(self, point: Point) -> bool:
        """
        Returns whether an input point is contained within the polygon...

```

Further little minor annoyances like creating a 3d point `Point.ByCoordinates(px, py, z_level)` when a 2d overload exists.

Finally it appears that the pathfinding is not checking for blocked areas or crossing blocked areas when calculating the distances

Cyril is correct that SciPy library, which is already available in Dynamo python (PythonNet3 and CPython3 engines), can be for more efficient as it uses compiled code and has built in algorithms for creating coordinate grids and shortest paths.

Check out the following page [Red Blog Games - Hexagons](https://www.redblobgames.com/grids/hexagons) it is an absolute goldmine of info on how to work with hex grids and pathfinding

Edit: You could also look at multi-source BFS [Breadth First Search] using a mask for non-traversable areas using Numpy
