Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
25e92ae1
Commit
25e92ae1
authored
Jan 17, 2017
by
Jan-Gerrit Richter
Browse files
added reduce option to ita_plot_mesh and fixed argument pass in itaMesh
parent
6fd09c86
Changes
2
Hide whitespace changes
Inline
Side-by-side
kernel/ClassStuff/Meshing/@itaMesh/itaMesh.m
View file @
25e92ae1
...
...
@@ -311,11 +311,11 @@ classdef itaMesh
end
%% plot
function
h
=
plot
(
this
,
additionalArgs
)
function
h
=
plot
(
this
,
varargin
)
if
nargin
<
2
h
=
ita_plot_mesh
(
this
);
else
h
=
ita_plot_mesh
(
this
,
additionalArgs
);
h
=
ita_plot_mesh
(
this
,
varargin
{:}
);
end
end
...
...
kernel/PlotRoutines/ita_plot_mesh.m
View file @
25e92ae1
...
...
@@ -41,13 +41,16 @@ if nargin
handleMode
=
false
;
if
ischar
(
varargin
{
1
})
sArgs
=
struct
(
'pos1_unvFilename'
,
'string'
,
'plotObject'
,
itaSuper
(),
'plotInstant'
,[],
'plotDomain'
,
'freq'
,
'plotType'
,
'mag'
,
'plotRange'
,[],
'hold'
,
'off'
);
sArgs
.
reduce
=
0
;
[
unvFilename
,
sArgs
]
=
ita_parse_arguments
(
sArgs
,
varargin
);
Mesh
=
itaMesh
(
unvFilename
);
elseif
isa
(
varargin
{
1
},
'itaMesh'
)
sArgs
=
struct
(
'pos1_Mesh'
,
'itaMesh'
,
'plotObject'
,
itaSuper
(),
'plotInstant'
,[],
'plotDomain'
,
'freq'
,
'plotType'
,
'mag'
,
'plotRange'
,[],
'hold'
,
'off'
);
sArgs
.
reduce
=
0
;
[
Mesh
,
sArgs
]
=
ita_parse_arguments
(
sArgs
,
varargin
);
elseif
all
(
ishandle
(
varargin
{
1
}))
sArgs
=
struct
(
'pos1_h'
,
'anything'
,
'plotObject'
,
itaSuper
(),
'plotInstant'
,[],
'plotDomain'
,
'freq'
,
'plotType'
,
'mag'
,
'plotRange'
,[],
'hold'
,
'off'
);
sArgs
.
reduce
=
0
;
[
h
,
sArgs
]
=
ita_parse_arguments
(
sArgs
,
varargin
);
handleMode
=
true
;
else
...
...
@@ -153,6 +156,9 @@ else
% figure('units','normalized','outerposition',[1 0 1 1]);
figure
;
end
if
sArgs
.
reduce
~=
0
[
faces_matrix
,
vertices_matrix
]
=
reducepatch
(
faces_matrix
,
vertices_matrix
,
sArgs
.
reduce
,
'fast'
);
end
h
=
patch
(
'Vertices'
,
vertices_matrix
,
'Faces'
,
faces_matrix
,
'FaceVertexCData'
,
plotData
,
'FaceColor'
,
'interp'
,
'EdgeColor'
,
'k'
);
hold
off
;
if
~
meshOnly
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment