added tests to be erased, but temporally needed
This commit is contained in:
parent
a53d48e49d
commit
869cc8fd81
|
@ -10,6 +10,8 @@ from unittest import TestCase
|
||||||
from city_model_structure.city import City
|
from city_model_structure.city import City
|
||||||
from factories.geometry_factory import GeometryFactory
|
from factories.geometry_factory import GeometryFactory
|
||||||
from helpers.geometry_helper import GeometryHelper
|
from helpers.geometry_helper import GeometryHelper
|
||||||
|
import math
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
class TestGeometryFactory(TestCase):
|
class TestGeometryFactory(TestCase):
|
||||||
|
@ -86,6 +88,19 @@ class TestGeometryFactory(TestCase):
|
||||||
errors += 1
|
errors += 1
|
||||||
print(f'{errors} buildings aren\'t closed volumes')
|
print(f'{errors} buildings aren\'t closed volumes')
|
||||||
|
|
||||||
|
def test_volume(self):
|
||||||
|
"""
|
||||||
|
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
building = 'bld100087.gml'
|
||||||
|
file_path = (self._example_path / building).resolve()
|
||||||
|
city = GeometryFactory('citygml', file_path).city
|
||||||
|
for building in city.buildings:
|
||||||
|
print('volume', building.volume)
|
||||||
|
#print('volume om', building.volume_om)
|
||||||
|
building.stl_export(self._output_path)
|
||||||
|
|
||||||
def test_citygml_buildings(self):
|
def test_citygml_buildings(self):
|
||||||
"""
|
"""
|
||||||
Test city objects in the city
|
Test city objects in the city
|
||||||
|
@ -222,3 +237,13 @@ class TestGeometryFactory(TestCase):
|
||||||
'thermal_opening front_side_solar_transmittance_at_normal_incidence was initialized')
|
'thermal_opening front_side_solar_transmittance_at_normal_incidence was initialized')
|
||||||
self.assertIsNone(thermal_opening.thickness, 'thermal_opening thickness_m was initialized')
|
self.assertIsNone(thermal_opening.thickness, 'thermal_opening thickness_m was initialized')
|
||||||
self.assertRaises(Exception, lambda: thermal_opening.u_value, 'thermal_opening u_value was initialized')
|
self.assertRaises(Exception, lambda: thermal_opening.u_value, 'thermal_opening u_value was initialized')
|
||||||
|
|
||||||
|
def test_is_planar(self):
|
||||||
|
building = 'bld100087.gml'
|
||||||
|
file_path = (self._example_path / building).resolve()
|
||||||
|
city = GeometryFactory('citygml', file_path).city
|
||||||
|
for building in city.buildings:
|
||||||
|
for surface in building.surfaces:
|
||||||
|
print(surface.type, surface.area)
|
||||||
|
print('volume', building.volume)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user