Jump to content

How to flatten the cost attribute of Find Shortest Path SOP?


magneto

Recommended Posts

Hi,

 

I have multiple shapes that are isolated, so they aren't connected to each other. I have 1 point at each shape, where I am calculating the cost from these points to all ends. This works well. But Find Shortest Path creates a new component for each start point, so if I have 5 points, I get float[5].

 

Since each point can only go to the ends of the shape it belongs to, how can I flatten this attribute so that I only have a float attribute?

 

Because I am trying to set point colors using cost but because there are multiple components, using the right values prove to be difficult.

 

I tried creating a new attribute using max(cost array), but it didn't work. I tried AttribPromote and Foreach SOP without success. Is there a simple way to do this?

 

 

Thanks :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...