partially implemented shared walls

This commit is contained in:
Pilar 2023-02-23 06:57:14 -05:00
parent 8ca95ddde0
commit b437cdf290
5 changed files with 12 additions and 3 deletions

View File

@ -55,7 +55,7 @@ class Plane:
self._equation = (a, b, c, d)
return self._equation
def distance(self, point):
def distance_to_point(self, point):
"""
Distance between the given point and the plane
:return: float

View File

@ -44,7 +44,6 @@ class Building(CityObject):
self._appliances_electrical_demand = dict()
self._domestic_hot_water_heat_demand = dict()
self._eave_height = None
self._neighbours = None
self._grounds = []
self._roofs = []
self._walls = []

View File

@ -336,3 +336,12 @@ class Surface:
:param value: None or [ThermalBoundary]
"""
self._associated_thermal_boundaries = value
def shared_percentage(self, neighbour_surface):
"""
Calculate the percentage of a surface that is shared with a neighbour surface
:return: float
"""
_shared_percentage = 0
return _shared_percentage

View File

@ -33,6 +33,7 @@ class CityObject:
self._diffuse = dict()
self._beam = dict()
self._sensors = []
self._neighbours = None
@property
def name(self):

View File

@ -124,7 +124,7 @@ class Rhino:
# todo: this is a hack for dompark project it should not be done this way windows should be correctly modeled
# if the distance between the wall plane and the window is less than 2m
# and the window Z coordinate it's between the wall Z, it's a window of that wall
if plane.distance(corner) <= 2:
if plane.distance_to_point(corner) <= 2:
# check if the window is in the right high.
if surface.upper_corner[2] >= corner[2] >= surface.lower_corner[2]:
if surface.holes_polygons is None: