Remove prints
This commit is contained in:
parent
ee8549bf98
commit
7498be0e1d
|
@ -104,7 +104,6 @@ class Polygon:
|
||||||
if module != 0:
|
if module != 0:
|
||||||
angle = abs(np.arcsin(scalar_product / module))
|
angle = abs(np.arcsin(scalar_product / module))
|
||||||
angle_sum += angle
|
angle_sum += angle
|
||||||
print(angle_sum)
|
|
||||||
return abs(angle_sum - math.pi*2) < cte.EPSILON
|
return abs(angle_sum - math.pi*2) < cte.EPSILON
|
||||||
|
|
||||||
def contains_polygon(self, polygon):
|
def contains_polygon(self, polygon):
|
||||||
|
@ -112,13 +111,10 @@ class Polygon:
|
||||||
Determines if the given polygon is contained by the current polygon
|
Determines if the given polygon is contained by the current polygon
|
||||||
:return: boolean
|
:return: boolean
|
||||||
"""
|
"""
|
||||||
print('contains')
|
|
||||||
for point in polygon.points:
|
|
||||||
print(point.coordinates, self.contains_point(point))
|
|
||||||
|
|
||||||
|
for point in polygon.points:
|
||||||
if not self.contains_point(point):
|
if not self.contains_point(point):
|
||||||
return False
|
return False
|
||||||
print('Belong!')
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -8,8 +8,9 @@ from __future__ import annotations
|
||||||
import sys
|
import sys
|
||||||
import pickle
|
import pickle
|
||||||
import math
|
import math
|
||||||
from typing import List, Union
|
import copy
|
||||||
import pyproj
|
import pyproj
|
||||||
|
from typing import List, Union
|
||||||
from pyproj import Transformer
|
from pyproj import Transformer
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
@ -434,3 +435,9 @@ class City:
|
||||||
return lca_material
|
return lca_material
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def copy(self) -> City:
|
||||||
|
"""
|
||||||
|
Get a copy of the current city
|
||||||
|
"""
|
||||||
|
return copy.deepcopy(self)
|
||||||
|
|
|
@ -7,7 +7,6 @@ from numpy import inf
|
||||||
from rhino3dm import *
|
from rhino3dm import *
|
||||||
from rhino3dm._rhino3dm import MeshType
|
from rhino3dm._rhino3dm import MeshType
|
||||||
|
|
||||||
|
|
||||||
from city_model_structure.attributes.point import Point
|
from city_model_structure.attributes.point import Point
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
@ -16,7 +15,6 @@ from city_model_structure.attributes.polygon import Polygon
|
||||||
from city_model_structure.building import Building
|
from city_model_structure.building import Building
|
||||||
from city_model_structure.city import City
|
from city_model_structure.city import City
|
||||||
from city_model_structure.building_demand.surface import Surface as LibsSurface
|
from city_model_structure.building_demand.surface import Surface as LibsSurface
|
||||||
from helpers.constants import EPSILON
|
|
||||||
from imports.geometry.helpers.geometry_helper import GeometryHelper
|
from imports.geometry.helpers.geometry_helper import GeometryHelper
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +29,6 @@ class Rhino:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _in_perimeter(wall, corner):
|
def _in_perimeter(wall, corner):
|
||||||
res = wall.contains_point(Point(corner))
|
res = wall.contains_point(Point(corner))
|
||||||
print(f'belong: {res} wall:({wall.coordinates}) corner: ({corner})')
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -98,7 +95,6 @@ class Rhino:
|
||||||
windows.append(Polygon(surface.perimeter_polygon.inverse))
|
windows.append(Polygon(surface.perimeter_polygon.inverse))
|
||||||
else:
|
else:
|
||||||
buildings.append(rhino_object)
|
buildings.append(rhino_object)
|
||||||
print(f'windows: {len(windows)}')
|
|
||||||
# todo: this method will be pretty inefficient
|
# todo: this method will be pretty inefficient
|
||||||
for hole in windows:
|
for hole in windows:
|
||||||
corner = hole.coordinates[0]
|
corner = hole.coordinates[0]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user