Skip navigation

First we select our blograms.
Then according to the number of the blograms that we want to connect, we change the
number in the start of the following script(in our case we take into account all the
blograms). The script is going to calculate the centre of each one of our blograms and
it will create a curve point inside them. Then with another script we are going to
connect these centres and visualize the current connections between the blograms.

CALCULATION OF BLOGRAMS CENTRE:

for($j=1; $j<419; $j++){
$blob = "test6_blogram_" + $j;
select -r $blob;
string $poly[] = `ls -sl`;

if($poly[0] != "")

{

string $verts[] = `polyInfo -fv $poly[0]`;
string $vert[] = stringToStringArray($verts[0],
"FACE :");
string $obj[] = `ls -sl -objectsOnly`;

int $numVerts = (`size ($vert)`-2);

float $px=0;
float $py=0;
float $pz=0;

for ($i=1; $i< ($numVerts+1); $i++)
{
string $vertID = ($obj[0]+".vtx["+$vert[$i]+"]");
float $pos[] = `xform -q -ws -t $vertID`;
$px += $pos[0];
$py += $pos[1];
$pz += $pos[2];
}

vector $center = <>;

print (“center point of “+$poly[0]+ ” is: “+ $center);

xform -os -t ($center.x) ($center.y) ($center.z)
locator1;
string $initialCurve = (`curve -p ($px/$numVerts) ($py/$numVerts) ($pz/$numVerts)`) ;
};
}

CONNECTION OF CENTRES:

The script i used is in this site:

http://www.creativecrash.com/maya/downloads/scripts-plugins/modeling/curve-tools/c/fb-wire-jumbler

In the pictures above is a visualization of the procedure.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s