Correct errors in simplified radiosity algorithm export
This commit is contained in:
parent
146162165f
commit
35667ab083
|
@ -19,6 +19,7 @@ class Surface:
|
|||
self._type = surface_type
|
||||
self._swr = swr
|
||||
self._name = None
|
||||
self._id = None
|
||||
self._azimuth = None
|
||||
self._inclination = None
|
||||
self._area_above_ground = None
|
||||
|
@ -39,7 +40,7 @@ class Surface:
|
|||
:return: str
|
||||
"""
|
||||
if self._name is None:
|
||||
self._name = uuid.uuid4()
|
||||
self._name = str(uuid.uuid4())
|
||||
return self._name
|
||||
|
||||
@property
|
||||
|
@ -48,7 +49,11 @@ class Surface:
|
|||
Surface id
|
||||
:return str
|
||||
"""
|
||||
return str(self.name)[:8]
|
||||
if self._id is None:
|
||||
self._id = self.name.replace('-', '').replace('a', '').replace('b', '').replace('c', '').replace('d', '')
|
||||
self._id = self._id.replace('e', '').replace('f', '')
|
||||
print(self._id)
|
||||
return self._id
|
||||
|
||||
@property
|
||||
def swr(self):
|
||||
|
|
|
@ -41,7 +41,6 @@ class SimplifiedRadiosityAlgorithm:
|
|||
'@ShortWaveReflectance': f'{surface.swr}'
|
||||
}
|
||||
for point_index, point in enumerate(surface.perimeter_polygon.points):
|
||||
# todo: check corrected points
|
||||
point = self._correct_point(point)
|
||||
surface_dict[f'V{point_index}'] = {
|
||||
'@x': f'{point[0]}',
|
||||
|
|
|
@ -9,3 +9,6 @@ geomeppy~=0.11.8
|
|||
open3d~=0.12.0
|
||||
pathlib~=1.0.1
|
||||
PyWavefront~=1.3.3
|
||||
xlrd~=2.0.1
|
||||
openpyxl~=3.0.7
|
||||
networkx~=2.5.1
|
|
@ -38,9 +38,10 @@ class TestExports(TestCase):
|
|||
cli = 'C:\\Users\\Pilar\\PycharmProjects\\monthlyenergybalance\\tests_data\\weather\\inseldb_Summerland.cli'
|
||||
self._city_gml.climate_file = Path(cli)
|
||||
self._city_gml.climate_reference_city = 'Summerland'
|
||||
dummy_measures = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
for building in self._city_gml.buildings:
|
||||
building.heating['month'] = pd.DataFrame({'INSEL': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]})
|
||||
building.cooling['month'] = pd.DataFrame({'INSEL': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]})
|
||||
building.heating['month'] = pd.DataFrame({'INSEL': dummy_measures})
|
||||
building.cooling['month'] = pd.DataFrame({'INSEL': dummy_measures})
|
||||
building.heating['year'] = pd.DataFrame({'INSEL': [0.0]})
|
||||
building.cooling['year'] = pd.DataFrame({'INSEL': [0.0]})
|
||||
return self._city_gml
|
||||
|
|
Loading…
Reference in New Issue
Block a user