msk-STAPLE icon indicating copy to clipboard operation
msk-STAPLE copied to clipboard

[GIBOC-core] TriFillPlanarHoles.m throws error if mesh has no holes

Open modenaxe opened this issue 4 years ago • 2 comments
trafficstars

TriFillPlanarHoles.m does not handle meshes with no holes.

modenaxe avatar Jun 02 '21 15:06 modenaxe

I think I fixed it: see here but please let's double check together.

It would be neater to have a isTriWatertight.m function, some ideas here. What do you think @renaultJB?

modenaxe avatar Jun 02 '21 15:06 modenaxe

Looks good, but I might have done the check at the beginning for clarity:

%-------------------------------------------------------------------------%
function [ TRout ] = TriFillPlanarHoles( TRin)
FB = TRin.freeBoundary;

if isempty(FB)
    % warning
    disp('No holes on triangulation.');
    TRout = TRin;
    return
end

Pts = TRin.Points;
Segments = FB;

...

renaultJB avatar Jul 01 '21 20:07 renaultJB