Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
modenaxe opened this issue Jun 2, 2021 · 2 comments
Open
Assignees

Comments

@modenaxe
Copy link
Owner

modenaxe commented Jun 2, 2021

TriFillPlanarHoles.m does not handle meshes with no holes.

@modenaxe
Copy link
Owner Author

modenaxe commented Jun 2, 2021

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?

@renaultJB
Copy link
Collaborator

renaultJB commented Jul 1, 2021

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;

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants