We need your help! 🔥
Please consider disabling your ad-blocker to support this website! 🔑
We are a free, community-supported website! 🥰
We only display small unobtrusive ads which help us stay online! 💯
Thank you in advance! ❤️
Curve
Image
Mesh
Populate
Print
Spiral
Surface
Text
Topology
Tree
Various

TSP from Topology

Hamiltonian Cycle using a topology made by points and edges, the algorithm tries to go through all points using the edges. There is no self intersection and the path is closed.
It looks like path generated by Travelling Salesman Problem (TSP) tools
It uses an algorithm like the number 3 or 4 or 5 presented here https://stemlounge.com/animated-algorithms-for-the-traveling-salesman-problem/

Inputs

NameIDDescriptionType
PointsPPointsPoint
Points IndexFPPoint index for each Face/Branch of DataTreeInteger
EdgesEEdges as curvesCurve
Points IndexEPPoint index for each Edge/Curve of DataTreeInteger
Face EddgeFEEdge Index for each FaceInteger
Edge FaceEFFace Index for each EdgeInteger
AlgorithmAAlgorithm used 0 first edge, 1 last edge, 2 random edge, 3 shortest insertion, 4 farthest insertion, 5 lowest insertionInteger
SeedSSeedInteger
ToleranceTToleranceNumber

Outputs

NameIDDescriptionType
TSP curveCTSP curveCurve
PointsPList of Ordered PointsPoint
IndexesIIndex of pointsInteger
ErrorsEIndex of points that are not usedInteger

Site design © Robin Rodricks.   Nautilus and associated data © 2024 Laurent Delrieu.  
Rhinoceros and Grasshopper are registered trademarks of Robert McNeel & Associates.  Hosted by GitHub

Report an Issue  |  Terms of Service