Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
d6f6a2b1
Commit
d6f6a2b1
authored
Aug 30, 2017
by
Lukas Aspöck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented method to return surface area of walls in room model
parent
fcccddc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
applications/VirtualAcoustics/Raven/itaRavenProject.m
applications/VirtualAcoustics/Raven/itaRavenProject.m
+4
-2
applications/VirtualAcoustics/Raven/load_ac3d.m
applications/VirtualAcoustics/Raven/load_ac3d.m
+21
-1
No files found.
applications/VirtualAcoustics/Raven/itaRavenProject.m
View file @
d6f6a2b1
...
...
@@ -2656,8 +2656,10 @@ classdef itaRavenProject < handle
function
S
=
getMaterialSurfaceArea
(
obj
,
materialName
)
%S = getRoomSurfaceArea(roomID)
%
% returns the
total
surface area of the current
room
.
% returns the surface area of the current
material
.
%
% WARNING: NOT IMPLEMENTED!
%
if
nargin
<
2
error
(
'Please provide a material name.'
);
end
...
...
@@ -2680,7 +2682,7 @@ classdef itaRavenProject < handle
end
end
%
g
et
all materials in room
%
r
et
urn surface area of given material
S
=
roommodel
.
getMaterialSurface
(
materialName
);
end
...
...
applications/VirtualAcoustics/Raven/load_ac3d.m
View file @
d6f6a2b1
...
...
@@ -289,7 +289,27 @@ classdef load_ac3d
function
S
=
getSurface
(
obj
)
S
=
obj
.
totalSurface
;
end
function
SMat
=
getMaterialSurface
(
obj
,
materialName
)
% sometimes multiple materials with the same name are defined. in this case, sum up all of them
matchingMatIDs
=
[];
SMat
=
0
;
for
matID
=
1
:
length
(
obj
.
bcGroups
)
if
(
strcmp
(
obj
.
bcGroups
{
matID
}
.
name
,
materialName
))
matchingMatIDs
=
[
matchingMatIDs
matID
];
SMat
=
SMat
+
obj
.
bcGroups
{
matID
}
.
surface
;
end
end
if
isempty
(
matchingMatIDs
)
error
([
'Material "'
materialName
'" is not part of the model. Please check materialname and or your *.ac file'
]);
end
end
function
[
A
,
S
]
=
getEquivalentAbsorptionArea_sabine
(
obj
,
material_path
,
portal_surface_materials
)
if
nargin
<
2
material_path
=
'..\RavenDatabase\MaterialDatabase'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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