Thank you for the answer,
in the meanwhile i wrote this (buggy) script, that did what i needed...
// Uniform To Chord-Lenght curve rebuilder v 0.1
// by Luigi Cammuca
// Feel free to use / modify / fix it as you need
global proc RFX_Uniform_To_Chord () {
vector $CV_A;
vector $CV_B;
string $Full_Command;
string $CV_Command;
string $Knot_Command;
int $Degree;
int $N_Spans;
int $N_CV;
int $n;
float $Chord_Lenght;
float $Old_Chord_Lenght;
float $Full_Chord_Lenght;
string $Selection[] = ls -sl
;
string $Shape_Name[] = listRelatives -s $Selection[0]
;
$Degree = getAttr ($Shape\_Name[0] + ".degree")
;
$N_Spans = getAttr ($Shape\_Name[0] + ".spans")
;
$N_CV = $N_Spans + $Degree;
print ("Numero CVs: " + $N_CV + "\n");
// Prende i primi 4 CV e costuisce il primo spezzone di curva di grado 3
for ($n = 0; $n < 4; $n++) {
$CV_A = `getAttr ($Shape\_Name[0] + ".cp[" + $n + "]")`;
$CV_Command = $CV_Command + (" -p " + $CV_A.x +" " + $CV_A.y + " " + $CV_A.z);
}
$Full_Command = "curve -d 3 -n RFX_DUMMY" + $CV_Command;
eval $Full_Command;
$Chord_Lenght = arclen RFX\_DUMMY
;
$Knot_Command = $Knot_Command + " -k 0 -k 0 -k 0";
$Knot_Command = $Knot_Command + (" -k " + $Chord_Lenght);
print ("CV_Command Part_1: " + $CV_Command + "\n");
print ("Knot_Command Part_1: " + $Knot_Command + "\n");
/////////////////////////////
for ($n = 4; $n<$N_CV; $n++) {
$CV_A = `getAttr ($Shape\_Name[0] + ".cp[" + $n + "]")`;
$CV_Command = $CV_Command + (" -p " + $CV_A.x +" " + $CV_A.y + " " + $CV_A.z);
delete RFX_DUMMY;
$Full_Command = "curve -d 3 -n RFX_DUMMY" + $CV_Command;
eval $Full_Command;
$Chord_Lenght = `arclen RFX\_DUMMY`;
$Knot_Command = $Knot_Command + (" -k " + $Chord_Lenght);
}
delete RFX_DUMMY;
$Knot_Command = $Knot_Command + (" -k " + $Chord_Lenght);
$Knot_Command = $Knot_Command + (" -k " + $Chord_Lenght);
$Full_Command = "curve -d 3 -n Chord_Lenght_Curve" + $CV_Command + $Knot_Command;
print ("Total Lenght:" + $Chord_Lenght + "\n");
print ("CV_Command: " + $CV_Command + "\n");
print ("Knot_Command: " + $Knot_Command + "\n");
print ($Full_Command + "\n");
eval $Full_Command;
}
As i said, this is really buggy, but it worked for what i needed... if someone wants to check / fix it that would be great, at least we all can have a working Uniform to Chord-Lenght curve converter tool.
C ya
Luigi