-
Notifications
You must be signed in to change notification settings - Fork 6
/
editUserdata.m
40 lines (36 loc) · 1.09 KB
/
editUserdata.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function userdata2 = editUserdata(userdata)
% EDITUSERDATA Graphically remove regions from a Carto dataset
%
% Usage:
% userdata2 = editUserdata(userdata)
% Where:
% userdata - is the original Carto dataset
% userdata2 - is the new Carto dataset with elements removed
%
% EDITUSERDATA uses EDITTRIANGULATION to remove triangles from a TriRep
% object. Controls:
% Left click - select triangles to remove
% Shift-Left click - select triangles to keep
% Ctrl-Left click - select area up to the boundary
% d - done
%
% Author: Steven Williams (2016) (Copyright)
% SPDX-License-Identifier: Apache-2.0
%
% Modifications -
%
% Info on Code Testing:
% ---------------------
%
% ---------------------
%
% ---------------------------------------------------------------
% code
% ---------------------------------------------------------------
tr = userdata.surface.triRep;
[tr2, isVertUsed] = editTriangulation(tr2);
userdata2 = userdata;
userdata2.surface.triRep = tr;
userdata2.surface.isVertexAtRim(~isVertUsed) = [];
userdata2.surface.act_bip(~isVertUsed,:) = [];
end