|
|
Using the iso_csg.inc I was experimenting with the following.
Basically I wanted to substitute iso_csg triangles for mesh elements
which in this case I am getting from arrays ( Verts Faces ). I was
getting what appeared to be memory errors. That lead to the following
script which is an attempt to bite off and process subsets of the mesh
elements. The error I am getting is on the attempt to load the array,
IsoMeshArray, on the second pass. The message is that I cannot redefine
a function definition; that I must #undef it first. But the #undef
instructions are being exercised. If, after you get done laughing,
anyone could point to the problem, it would be very much appreciated.
Thanks, Jim
#declare IsoMeshArray = array [ 16 ];
#local i=0;
#declare indx=0;
#while(i<Totalfaces)
#if (mod(i,16)=0)
#if ( i )
#declare fn_mesh [indx] = IC_Merge_Array ( IsoMeshArray )
#local j=0;
#while(j<dimension_size(IsoMeshArray,1))
#undef IsoMeshArray[j]
#local j=j+1;
#end
#undef IsoMeshArray
#declare IsoMeshArray = array [ 16 ];
#declare indx=indx+1;
#end
#end
#if ( indx > 0 )
#declare IsoMeshArray [i/(indx+1)] =
IC_Triangle( Verts[Faces[i].x],
Verts[Faces[i].y],
Verts[Faces[i].z], 0.1);
#else
#declare IsoMeshArray [i] =
IC_Triangle( Verts[Faces[i].x],
Verts[Faces[i].y],
Verts[Faces[i].z], 0.1);
#end
#local i=i+1;
#end
Post a reply to this message
|
|