Now that I see it, I feel so embarrassed that I had to ask :/
Thanks a ton Grahame!

cheers,
Thomas

> Grahame Fuller <[email protected]> hat am 9. Mai 2013 um 17:28
> geschrieben:
>
>
> Is this what you want?
>
> [cid:[email protected]]
>
> gray
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Thomas Volkmann
> Sent: Thursday, May 09, 2013 10:34 AM
> To: [email protected]
> Subject: Re: ICE: Get Polygon (or whatever) by ID
>
> some pseudocode (maybe that's easiest to describe what i want):
>
> for node on mesh:
> poly = node.getPolygon()
> nodes = poly.GetNodes()
> index = nodes.index(node)
> node.StoreSomeAttribute(doSomethingWith(index))
>
> Fabricio Chamon <[email protected]<mailto:[email protected]>> hat am 9. Mai
> 2013 um 15:51 geschrieben:
> " Use the PolygonID that I get this way, and get PolygonToNodes for that Poly
> (how the fxxk do I do that?)"
>
> responding to the main question only, does this icetree work ?
> desired node index range should be: 0 to (num vertices for that polygon -1)
>
> [Imagem inline 1]
>
> 2013/5/9 Thomas Volkmann
> <[email protected]<mailto:[email protected]>>
> You can probably see how much vertices a polygon has and then interpolate
> around the UV-space, but the problem is more the general question, since we
> have a working solution for our needs.
>
> cheers,
> Thomas
> Peter Agg < [email protected]<mailto:[email protected]>> hat am
> 9. Mai 2013 um 15:19 geschrieben:
>
> So if a quad is (0,0),(0,1),(1,1),(1,0) what would a n-gon be?
>
> A triangle would be (0,0),(0,1),(1,1)? What would a polygon with 5 vertexes
> have?
>
> On 9 May 2013 14:09, Thomas Volkmann
> <[email protected]<mailto:[email protected]>> wrote:
> Hi,
> we found a working solution to a current problem (set UV per Polygon), but I'm
> not fully satisfied with it, because it breaks when we have triangles in the
> mesh (which we can avoid, so it's more a personal problem of not being able to
> do what I want to do in ICE).
>
> Problem:
> We want to set a vector per node. Depending on the index of that node when
> using a PolygonToNodes it will be at (0,0),(0,1),(1,1) or (1,0) in UV-space.
>
> Solution for Quads only:
> GetNodeID -> find in array
> the array:
> Get PolygonToNodes -> build array from set
> we modulo the index by 4, and no we know, if this Node is 0,1,2 or 3
>
> This solution breaks of course when there is a single polygon that has more or
> less than 4 points.
>
> What I would like to do but can't figure out:
> Get NodeToPolygon (because we need to be in a perNode context)
> Use the PolygonID that I get this way, and get PolygonToNodes for that Poly
> (how the fxxk do I do that?) THAT IS PROBABLY THE MAIN QUESTION!
> Then I could check which index the Node has that I got in the beginning.
>
> Unfortunately I have some real work to do, and can't continue on this right
> now, but in the back of my head it's driving me mad.
> So if anyone can offer salvation it'll be much appreciated! Even if it's a
> complete different solution)
>
> cheers,
> Thomas
>
>
>
>

Reply via email to