Blender Sverchok Shortest Path Node

by vkter in Addons


Shortest Path Node

Functionality

Shortest path node is a script of Script Node Lite in sverchok. It can find a shortest path between two points in a multi-point structure to select the shortest continuous surface, line, and point. Solve problems such as finding the best route in the maze

Inputs

Input

Description

verts,edges,faces

Model element data

StartGoal

The start and end index of the face(point)

FaceCenterPoint

Midpoint data of each face of the model

blockindex

Index of obstacle face(point)

algorithm_weights

Algorithm weights, the close to 1, the faster the algorithm, but sometimes it may not be the shortest path. You can appropriately reduce the value to increase the accuracy. When it is 0.5,you

must get a shortest path.

Parameters

Parameters

face(point)

Confirm the mode of the adjacent faces, the diagonal faces will be considered in this mode.

face(edge)

The diagonal faces will not be considered in this mode

edge.

Enable this parameters to choose the shortest path side.

Outputs

According to the mode, output the index of the shortest path face, or the index of the shortest path vertex.

Examples

Video link:https://youtu.be/OchUjpvprHg

Future

Note: This script is not the final version

I will make the following plans based on sales volume:

200: Expose more parameters of the algorithm and optimize the code, which is expected to improve performance by several times.

400: Use numba to refactor the key code ,which will bring tens or enev hundreds of times performance improvement.

?: Consider merging this function node into the sverchok

updates

Version: 1

  1. Update the loading mode and use the load function of the sverchok side panel to load the corresponding .json file.
  2. merge multiple modules into one file, and this node can be used on different platforms
Published over 3 years ago
Blender Version 2.92, 2.93
License Creative Commons
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message