03 March 2013 | |
![]() |
|
Member
portfolio
Calvet David
Technical Director
BANDITS Collective
United Kingdom
|
Get Grow function
Hi everyone,
I'm currently working on a script, where each vertex of a selected object are running in a for loop to calculate their Normal vector. I would like to get the surrounding vertex to calculate the distance between the vertex of the loop and the surrounding ( it's the easiest way i found to get the polygon density locally). Here is a piece of the script :
I hope you'll be able to help me, i think i just missed an easy part to call the Grow button in the command panel, or an other function Thank you |
03 March 2013 | |
![]() |
|
Member
portfolio
Calvet David
Technical Director
BANDITS Collective
United Kingdom
|
I found an other way to do it, slower but it works
|
04 April 2013 | |
![]() |
|
MAX Doctor
portfolio
Denis Trofimov
CA,
USA
|
everything is much easier... because you already have a snapshot mesh (i will call it mesh in my sample) the neighbors of a vertex (v) are:
by edges:
by faces:
ps. polyop.getfacenormal is much faster then getfacenormal (mesh method) Last edited by denisT : 04 April 2013 at 10:32 AM. |
04 April 2013 | |
![]() |
|
MAX Doctor
portfolio
Denis Trofimov
CA,
USA
|
btw... who can show the fastest way how to get all neighbors of every mesh vertex?
![]() |
04 April 2013 | |
![]() |
|
Member
portfolio
Calvet David
Technical Director
BANDITS Collective
United Kingdom
|
Thank you, i was sure there was an other way to write it faster. Testing it
|
04 April 2013 | |
![]() |
|
MAX Doctor
portfolio
Denis Trofimov
CA,
USA
|
Originally Posted by GreySize:
Thank you, i was sure there was an other way to write it faster. Testing it
if you need to compute all vertices the way that i showed above is not fastest. |
04 April 2013 | |
![]() |
|
Expert
|
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. |
Thread Closed share thread |
«
Previous Thread
|
Next Thread
»
|
|
|