sekow Posted September 19, 2014 Share Posted September 19, 2014 I am having this problem at hand where I need to loop thru clusters of points and calculate the average position. These points are organized with a cluster id attibute (clsID). Can't really figure out how to do this in VEX. So far I have a For Each Sop (looping thru each attribute value) with two attrbPromote Sops attached in line. First is promoting @P to detail attribute ('center') via average, second is reapplying @center to points again. Help is much appreciated -sebastian Quote Link to comment Share on other sites More sharing options...
petz Posted September 23, 2014 Share Posted September 23, 2014 (edited) in vex you could use nuniqueval() and uniqueval() to iterate over attributes. the following link might put you on the right track: http://forums.odforce.net/topic/20814-need-help-with-python-vex/?p=124375if it doesn´t has to be vex, the attached example is probably the easiest way to do it... hth. petz centroid.hipnc Edited September 23, 2014 by petz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.