Open ThSGM opened 3 years ago
I had an issue with using split_backfacing when the input consists of a single trimesh patch. For example, running this command:
split_backfacing
tplot = tsurf(faces, verts); [backtri, fronttri] = split_backfacing(tplot);
produces an error since split_backfacing is attempting to access tplot{1} instead of tplot.
tplot{1}
tplot
I changed the initial lines of the for loop to:
for ti = 1:numel(ts) if iscell(ts) == 0 && numel(ts) == 1 tmp = ts; ts = []; ts{1} = tmp; end t = ts{ti}; ...
and also added this at the end:
if numel(ts) == 1 ts = ts{1}; bs = bs{1}; end
which outputs the trimesh patches direct if there is only a single element.
There are probably slicker ways to do it, but this seemed like an issue for me.
I had an issue with using
split_backfacing
when the input consists of a single trimesh patch. For example, running this command:produces an error since
split_backfacing
is attempting to accesstplot{1}
instead oftplot
.I changed the initial lines of the for loop to:
and also added this at the end:
which outputs the trimesh patches direct if there is only a single element.
There are probably slicker ways to do it, but this seemed like an issue for me.