Cut the Length of many Curves

Hi everyone.
I’m working on a huge mel script and a part of it has to be a way of cut the Length of many Curves in the Scene from both sides. I get the length of my Curve with the arclen so I can then get the possition to detach my Curve. How ever I’m doing something wrong with the detachCurve comand.
my Error is: line 10: No object matches name: .u[2.5] //

 SelectAllNURBSCurves;
string $SelectedCurve[] = `ls -sl`;
     for ($MyCurve in $SelectedCurve)

     {
        float $CutValue = 2.5;
        float $CurveLength = `arclen $MyCurve`;
        float $StartCutPoint= $CurveLength - $CutValue;
        float $EndCutPoint = $CurveLength - $StartCutPoint;
        detachCurve -ch 1 -cos on -rpo 1 $MyCurve.u[$StartCutPoint];
        select -r ($MyCurve+"detachedCurve2");
        delete;
     }

Thx for help. :wink:

Hey siralien,

Try this:
detachCurve -ch 1 -cos on -rpo 1 ($MyCurve + “.u[” + $StartCutPoint + “]”);

  • Kiran Anasingaraju

First sorry for my Late replay, I was on Holydays.
Then Thx for your help, it worked. I still need to look after the backet.

No problem dude! Glad it worked.

Cheers
Kiran Anasingaraju