kreyszig

11-01-2012, 10:31 AM

Hi

I'm evaluating maya as a tool to manipulate (intersect, trim etc) tessellated surfaces (i.e. triangular meshes (not solids)).

The conversion to nurbs surfaces via subdivision surfaces looks promising, but produces a large number of nurbs patches relative to the number of triangular facets I start with. All the intersection routines work on two surfaces only it would appear, so I can't get a nice single intersection between two of my input surfaces easily.

I can attach two nurbs surfaces together but only two at a time, so I figure a script could be the way to go. But I'm low on experience with MEL and short on time!

Could someone help me out with the beginnings of a MEL script to loop over all the nurbs surfaces, attaching two together then attaching the next nurb to the output of the previous attach operation?

Most importantly I guess are how to get the name of the newly attached surface that I want to add each nurbs surface to - something like (in pseudo-c)

for (i=0; i < num_nurbs; i++)

{

if(!i)

attach(nurbs_0, nurbs_1)

else

attach(attach_to, nurbs_i+1)

attach_to = somehow_get_result_of_attach(?!)

}

many thanks in advance!

I'm evaluating maya as a tool to manipulate (intersect, trim etc) tessellated surfaces (i.e. triangular meshes (not solids)).

The conversion to nurbs surfaces via subdivision surfaces looks promising, but produces a large number of nurbs patches relative to the number of triangular facets I start with. All the intersection routines work on two surfaces only it would appear, so I can't get a nice single intersection between two of my input surfaces easily.

I can attach two nurbs surfaces together but only two at a time, so I figure a script could be the way to go. But I'm low on experience with MEL and short on time!

Could someone help me out with the beginnings of a MEL script to loop over all the nurbs surfaces, attaching two together then attaching the next nurb to the output of the previous attach operation?

Most importantly I guess are how to get the name of the newly attached surface that I want to add each nurbs surface to - something like (in pseudo-c)

for (i=0; i < num_nurbs; i++)

{

if(!i)

attach(nurbs_0, nurbs_1)

else

attach(attach_to, nurbs_i+1)

attach_to = somehow_get_result_of_attach(?!)

}

many thanks in advance!