Dear Bruce,
Thank you for your assist. I see the difference between patch and surface, but I would need to get he cut surface in matlab. I do not know how to set the ripflag=1 for x<0. Here is the code I use to upload surfaces in Matlab:
function [vertex_coords, faces] = read_surf(fname)
%QUAD_FILE_MAGIC_NUMBER = (-1 & 0x00ffffff) ; %NEW_QUAD_FILE_MAGIC_NUMBER = (-3 & 0x00ffffff) ; TRIANGLE_FILE_MAGIC_NUMBER = 16777214 ; QUAD_FILE_MAGIC_NUMBER = 16777215 ; fid = fopen(fname, 'rb', 'b') ; if (fid < 0) str = sprintf('could not open curvature file %s.', fname) ; error(str) ;
end magic = fread3(fid) ; if (magic == QUAD_FILE_MAGIC_NUMBER) vnum = fread3(fid) ; %number of vertices fnum = fread3(fid) ; %number of faces vertex_coords = fread(fid, vnum*3, 'int16') ./ 100 ; if (nargout > 1) for i=1:fnum for n=1:4 faces(i,n) = fread3(fid) ; end end end elseif (magic == TRIANGLE_FILE_MAGIC_NUMBER) fgets(fid) ; fgets(fid) ; vnum = fread(fid, 1, 'int32') ; %number of vertices fnum = fread(fid, 1, 'int32') ; %number of faces vertex_coords = fread(fid, vnum*3, 'float32') + 1 ; vertex_coords = reshape(vertex_coords, 3, vnum)'; faces = fread(fid, fnum*3, 'int32') + 1 ; faces = reshape(faces, 3, fnum)' ; end fclose(fid) ;
Can something be done with this, or do I need to transform the surface before importing it into matlab?
Thank you for your help