Skip to content

Commit

Permalink
remove duplicated vertices at quadruple points
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfHielscher committed Jun 4, 2022
1 parent c87cf4b commit 321efec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions EBSDAnalysis/@EBSD/private/spatialDecomposition.m
Expand Up @@ -35,6 +35,18 @@
[V,D] = voronoin([X;dummyCoordinates],{'Q5','Q6','Qs'}); %,'QbB'

end

%if check_option(varargin,'quadruplePoints')

[V,~,ic] = unique(V,'rows');
%D = cellfun(@(x) ic(x).',D,'UniformOutput',false);

for k = 1:length(D)
x = ic(D{k}).'; % merge points that coincide
D{k} = x(diff([x,x(1)])~=0); % remove dubplicates in D
end

%end

D = D(1:size(X,1));

Expand Down

0 comments on commit 321efec

Please sign in to comment.