Find shortest path with unique points per path

   5819   5   1
User Avatar
Member
125 posts
Joined: 4月 2014
Offline
I am trying to use Find Shortest Path in a way that doesn't produce overlapping paths - each path goes through unique points.

My thought is to use a for next loop for each pair of points and to progressively remove the previous paths points from the source geometry for each iteration.

Is this overkill for what I am trying to achieve? I see a lot of options in the Find Shortest Path node for avoiding edges/objects and path costs but I am not sure how I can progressively iterate over those as the node seems to take all at once.

Would any one have any suggestions for a workflow for this?
User Avatar
Member
125 posts
Joined: 4月 2014
Offline
So I made it farther than expected but I am stumped on how to accumulate the individual paths into a single object with each path as a primitive (I have the points of all the paths).

Not exactly sure what I was doing so I am a bit amazed I got this far. Would not be surprised if there is a much better way to go about this.

Anyone care to look at this and offer suggestions for how to get my group of paths out?
thanks in advance

Attachments:
unique_shortest_path.hip (97.5 KB)

User Avatar
Member
125 posts
Joined: 4月 2014
Offline
cleaned up the start position grouping a bit and tested with a larger number of start position and paths

Attachments:
unique_shortest_path_2.hip (98.0 KB)

User Avatar
Member
116 posts
Joined: 4月 2016
Offline
jammer
I am trying to use Find Shortest Path in a way that doesn't produce overlapping paths - each path goes through unique points.

My thought is to use a for next loop for each pair of points and to progressively remove the previous paths points from the source geometry for each iteration.

Is this overkill for what I am trying to achieve? I see a lot of options in the Find Shortest Path node for avoiding edges/objects and path costs but I am not sure how I can progressively iterate over those as the node seems to take all at once.

Would any one have any suggestions for a workflow for this?

If you're only worried about the overlapping curves you would need to fuse the points and then merge the overlapping polylines which I'm not quite sure how that works.

IMO the fuse node should do that but it appears not to. I'm unaware of the node that can get ride of overlapping two point polygons.
Simon van de Lagemaat
owner the Embassy VFX
User Avatar
Member
125 posts
Joined: 4月 2014
Offline
I think I have found the solution to getting all of my individual paths at the end of the line.
I am not exactly sure how it is working but I'll save that for another day.
That said, this seems like a rather complex solution. I still wonder if I have not gone about this in a completely daft way. Seems like non overlapping paths should be an option within Find Shortest Path itself.

Thanks for the tip Simon, while not exactly what I was looking for it did push me in another direction toward finding a solution.

here is the scene if anyone interested

Attachments:
unique_shortest_path_3.hip (180.3 KB)

User Avatar
Member
38 posts
Joined: 2月 2018
Offline
After spending way to long on this, I think you can just do:
fuse -> convert line -> poly path -> fuse
and that will cleanup all the overlapping paths.
  • Quick Links