Minimum Spanning tree connecting only specific points in a network

Hi,

I would like to find a network that connects a set of points within a network using a minimum spanning tree alogrithm (for instance using spiderweb).
When I try now using MST of spiderweb, it connects all the vertices of the network (blue and red points) while I don’t need the (blue) points to be part of the network, only the red ones.
I illustrated my problem below:

What is the best way to only have the red ones part of the network?
Thank you!

Leave out the blue points?

I have no idea what “MST” means and no experience with “spiderweb”. I have used shortest path a few times, which might be relevant? But you didn’t post any code or geometry so good luck.

P.S. Oh, of course: “Minimum Spanning Tree”. And “SpiderWeb”:

Hi,

sorry! I added now an example SpiderWeb grasshopper graph with internalized geometry to describe my problem.
The red points are the points I want to connect in a MST network. The blue ones are all the vertices of the graph. My problem is that SpiderWeb connects all points (blue) not only the red ones if I want the network to follow the street path.
Final question: What is the minimum spanning tree network that connects all red points, using an existing street pattern?


example_mst_forum.gh (31.1 KB)