View Full Version : Merge several curves into 1 object?
David
03-05-2008, 05:10 AM
Hello all :)
Let's say I have 3 closed curve circles. Can I merge the 3 of them so that it becomes a new unique curve object?
Thanks
David
grahamef
03-05-2008, 04:51 PM
I don't think this is possible through the user interface but it is possible through the SDK. Below is a JScript that Guillaume Laforge posted on the XSI mailing list a while back. All selected curves will be merged into the first one selected.
var my_crvlist = Selection(0).ActivePrimitive.Geometry;
for ( var i=1;i<Selection.count;i++ )
{
var obj = Selection(i);
var crvlist = obj.ActivePrimitive.Geometry;
var crv = crvlist.Curves(0);
var VBdata = crv.Get2( siSiNurbs );
var data = VBdata.toArray();
var crtlvertices = data[0];
var knots = data[1];
var isclosed = data[2];
var degree = data[3];
var parameterization = data[4];
var newcrv = my_crvlist.AddCurve( crtlvertices, knots, isclosed, degree, parameterization );
}
David
03-07-2008, 10:30 AM
Thanks Graham!
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.