Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Unreleased
## Fixed
- Boundary labeling fix

### [3.3.0] - 2020-12-21
## Fixed
Expand Down
9 changes: 9 additions & 0 deletions utilities/extract_boundary.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@

temp = pts(bnde(r,:)',:);
temp2 = bnde(r,:)';
if v_next ~= temp2(2)
% swap
temp = flipud(temp);
temp2 = flipud(temp2);
end

k = 2;
while v_next~=v_end % terminates when we reach v_end
rt= (v_next==bnde(:,1) | v_next==bnde(:,2)) & active;
Expand All @@ -83,6 +89,9 @@
% exhausted all edges and couldn't connect
if(~any(active)), cut=false; disp('coudln''t conntect'); break, end
end
if length(temp) == 2
cut = false;
end
poly{p} = temp;
poly_idx{p} = temp2;
[area] = parea(poly{p}(:,1),poly{p}(:,2));
Expand Down