Hi everybody, I am struggling with the last part of my Script. I attach here the error and the correlated part of the script.
Script:
for ind1=1:length(Slicesurf)
for ind2=1:(ncontour*2)
[~, intersection] = SurfaceIntersection(Slicesurf(ind1),Htot(ind2));
Infill(ind1,ind2).faces=intersection.faces;
Infill(ind1,ind2).vertices=intersection.vertices;
Infill(ind1,ind2).edges=intersection.edges;
end
end
the curious thing is that the loop goes well for a few rounds but then it stops and give me this error. ncontour and lenght(Slicesurf) are both real and positive. Slicesurf contains all surfaces parallel to xy plane and Htot contains 3D parabolas.
Error:
"Subscript indices must either be real positive integers or logicals.
Error in SurfaceIntersection>TriangleIntersection3D_Moller (line 367)
a2 = lut(sign(du)*[9; 3; 1] + 14);
Error in SurfaceIntersection (line 218)
[intMatrix(tMsk), intSurface] = TriangleIntersection3D_Moller(...
Error in SurfaceIntersection_prova13 (line 166)
[~, intersection] = SurfaceIntersection(Slicesurf(ind1),Htot(ind2));"
can someone help me? I am going crazy with this error!
Thanks a lot!