LeafVein
(by Dachuan)
LeafVein is a graph theory plug-in for Grasshopper.  You can generate graphs from Rhino/GH geometric objects and perform multiple graph algorithms.
Support Email

LeafVein is a graph theory plug-in for Grasshopper. The design goal of LeafVein is to use Rhino/GH geometric objects to easily generate abstract and complex network graph objects and provide as many graph-related algorithms as possible. With LeafVein, you can use the curves, points and meshs in Rhino/Grasshopper to generate undirected, directed or mixed graphs; based on the provided arcs option generator, you can specify the properties (direction and weight) of each arc; provide a wealth of graph analysis, path search and neighbor search algorithm. LeafVein is developed with Python, but the bottom layer uses Satsuma and Alglib high-performance math libraries. It can perform operations on large-scale complex graphs (tens of thousands of nodes and arcs) in a reasonable time. Graph theory is widely used in urban planning, architectural design (space syntax), etc. This plug-in can help you save time and improve efficiency in related research.

LeafVein mainly has the following features:

1 Create graphs in a variety of ways, and completely customize graph properties.

  • Mixed graphs with directed and undirected edges.
  • Create custom graphs, complete graphs, and bipartite graphs through Rhino or Grasshopper curves, points or mesh objects (Objects can be located in three-dimensional space).
  • Set the direction and cost of each arc through global attributes or custom attributes (Rhino object user attributes or Json parameters).

2 Visualization tool: node number, arc number, arc length, custom the size and color of text and graphic.

3 Easily transform/search between Rhino/GH objects and graph elements: locate the arcs and nodes of the graph according to curves and points, and display the corresponding curves and points according to the arcs and nodes of the graph.

4 The graph can be edited after created: adjust the established graph by adding, deleting arcs and nodes, and changing the direction of the arcs.

5 Multiple graph-related algorithms: Bipartite graph conversion, Bipartite graph Matching (maximum matching, minimum cost and maximum matching), Minimum spanning tree, strong and weak connected components, cut points/edges of the graph, Topological order, neighbor search (Kd-tree).

6 Rich path algorithms: Breadth-first, Depth-first, Shortest path (Dijkstra and Astar), Single source shortest path, Euler path, Hamilton path, heuristic Traveling salesman solver.

It is currently an alpha version, and leafvein is under active development. Any comments/bug feedback you can contacted: i@alwayswdc.com

LeafVein是Grasshopper的一个图论插件,LeafVein的设计目标是借助Rhino的几何对象轻松生成抽象和复杂的网络图对象,并提供尽可能完善的图相关算法。使用LeafVein您可以使用Rhino/GH中的曲线、点和曲面生成无向、有向或混合图;基于提供的属性运算器,可以指定每一条弧的属性(方向和权重);提供了丰富完善的图相关分析、路径和临近点算法。LeafVein使用Python开发,底层使用了Satsuma和Alglib高性能数学库,对于大规模的复杂图(上万节点和弧)也能在合理的时间内进行运算。图论在城市规划、建筑设计(空间句法)等方面有广泛运用,该插件可以帮助您在相关研究中节省时间、提高效率。

LeafVein主要有以下特性:

1 多种方式建立图,并完全自定义图的属性。

  • 边有向和无向的混合图。
  • 通过Rhino或Grasshopper曲线、点或网格对象建立自定义图、完全图、二分图(对象可位于三维空间)。
  • 通过全局属性或自定义属性(Rhino对象用户属性或Json参数)设置边的方向、长度。

2 可视化图:节点编号、弧编号、弧长度、自定义文字和图形大小和颜色。

3 轻松转化Rhino/GH对象和图的元素:根据曲线、点定位图的弧、节点,根据图的弧和节点显示相应的曲线和点。

4 图可编辑:通过添加、删除弧和节点,改变弧的方向来调整已建立的图。

5 多种图相关算法:二分图转换、二分图匹配(最大匹配、最小费用最大匹配)、最小生成树、图的强弱连通分量、图的割点/边、拓扑排序、邻近点搜索(Kd-tree)。

6 丰富的路径算法:广度优先、深度优先、最短路径(Dijkstra和Astar)、单源最短路径、欧拉路径、汉密尔顿路径、启发式旅行商求解器。

当前是早期的alpha版本,leafvein正在保持积极的开发,任何意见/bug反馈可以联系:i@alwayswdc.com。

----------Alpha0.2------------2021-01-06---------------

1 Bug fixed:

  • Fixed context pop-up menu option cannot be saved

  • Fixed an error when SuperGraph input Opt

  • Fixed errors of GetOpt

2 Examples updated.

License:
Reviews