How to get two vectors of edge points

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
Alul
Posts: 7
Joined: 08 May 2010, 13:24

How to get two vectors of edge points

Post by Alul » 10 Apr 2011, 21:08

Hello.
How can i get two vectors from from edge. I need to place instanced cylinders at edges of polymesh object. My pointcloud should spread instanced shape across object by setting up particle position at every edge of polymesh object. This is pretty easy. Now i need to rotate and scale height of cylinders to fit edge orientation and theirs length.
At first i was trying to use EdgeReferenceFrame attribute but i don't know how to tranfer data from polymesh to pointcloud. How to use location-based node when i want to do it for ALL edges.
Then i was trying EdgeToVertices.Its return array of two points IDs that create this edge (i think this attribute is since SI2012) but i don't know how to get pointposition from array of two points :(( .

How to manage context with EdgeReferenceFrame between two object?
How to get pointposition when you get array of IDs?

I hope this post is readable :(
Thanks for any help.

p.s. I'm learning basis

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: How to get two vectors of edge points

Post by Hirazi Blue » 10 Apr 2011, 21:26

I am not near my own Softimage right now, so I cannot say for sure...
But there is a conversion node called "ID to Location",
which you could simply plug into a "Get Data ["pointposition"]"
to get the pointposition of the point you're looking for...
;)
Stay safe, sane & healthy!

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: How to get two vectors of edge points

Post by Mathaeus » 10 Apr 2011, 22:02

Alul wrote:Hello.
How to get pointposition when you get array of IDs?
As Hirazi said, some kind of 'ID to location', get point position, then 'get array average', or some other array node. BTW, 'old fashion' way for what you described was a bit different. It was getting a point neighbors, then some creativity for assigning IDs. Imho nicer creativity of this kind has a strand wire compound. Definitively a good source for studying this stuff.

Alul
Posts: 7
Joined: 08 May 2010, 13:24

Re: How to get two vectors of edge points

Post by Alul » 10 Apr 2011, 23:41

I'm confused with this ID to Location. How to walk thru all elements ? IDtoLocation returns one element with exact ID so how can i get all edges according to PointID when i get only one pointID at time?

I was looking inside Strandwire Compound but I still don't understand how he gets distance to neighbours by getting minimum, maximum and average distance. Why average? For what?
As far I understand he makes sample set to generate id and then he builds up (2nd AddPoint at same tree) same points again but this time he getting neighbours right?

btw. This compound crash my SI2011SAP and 2012 when i try to change parameters. Yours too?

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: How to get two vectors of edge points

Post by Mathaeus » 11 Apr 2011, 00:37

I have feeling you're a bit confused by context in ICE . There are some nice explanations on Julian Johnson site.
As for me and 2012, I still need to update, don't know when this will happen.

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: How to get two vectors of edge points

Post by xsisupport » 11 Apr 2011, 17:14

Here's one approach to this problem.
Last edited by xsisupport on 11 Apr 2011, 21:06, edited 1 time in total.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

Alul
Posts: 7
Joined: 08 May 2010, 13:24

Re: How to get two vectors of edge points

Post by Alul » 11 Apr 2011, 20:40

That's exactly what i was looking for ! Now i have to study your example.
Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests