topologicpy 0.7.80__py3-none-any.whl → 0.7.81__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
topologicpy/Face.py CHANGED
@@ -1649,7 +1649,7 @@ class Face():
1649
1649
  return are_planes_coplanar(plane_a, plane_b, tolerance=tolerance)
1650
1650
 
1651
1651
  @staticmethod
1652
- def Isovist(face, vertex, obstacles: list = [], direction: list = [0,1,0], fov: float = 360, mantissa: int = 6, tolerance: float = 0.0001):
1652
+ def Isovist(face, vertex, obstacles: list = [], direction: list = [0,1,0], fov: float = 360, transferDictionaries: bool = False, mantissa: int = 6, tolerance: float = 0.0001):
1653
1653
  """
1654
1654
  Returns the face representing the isovist projection from the input viewpoint.
1655
1655
  This method assumes all input is in 2D. Z coordinates are ignored.
@@ -1671,6 +1671,8 @@ class Face():
1671
1671
  fov : float , optional
1672
1672
  The horizontal field of view (fov) angle in degrees. See https://en.wikipedia.org/wiki/Field_of_view.
1673
1673
  The acceptable range is 1 to 360. The default is 360.
1674
+ transferDictionaries : bool , optional
1675
+ If set to True, the dictionaries of the encountered edges will be transfered to the isovist edges. The default is False.
1674
1676
  mantissa : int , optional
1675
1677
  The desired length of the mantissa. The default is 6.
1676
1678
  tolerance : float , optional:
@@ -1690,6 +1692,8 @@ class Face():
1690
1692
  from topologicpy.Cluster import Cluster
1691
1693
  from topologicpy.Topology import Topology
1692
1694
  from topologicpy.Vector import Vector
1695
+ from topologicpy.Dictionary import Dictionary
1696
+ from topologicpy.Helper import Helper
1693
1697
 
1694
1698
  def vertexPartofFace(vertex, face, tolerance):
1695
1699
  vertices = Topology.Vertices(face)
@@ -1716,6 +1720,7 @@ class Face():
1716
1720
  normal = Face.Normal(face)
1717
1721
  flat_face = Topology.Flatten(face, origin=origin, direction=normal)
1718
1722
  flat_vertex = Topology.Flatten(vertex, origin=origin, direction=normal)
1723
+ flat_obstacles = [Topology.Flatten(obstacle, origin=origin, direction=normal) for obstacle in obstacles]
1719
1724
 
1720
1725
  eb = Face.ExternalBoundary(flat_face)
1721
1726
  vertices = Topology.Vertices(eb)
@@ -1732,7 +1737,7 @@ class Face():
1732
1737
  new_ib_list.append(Wire.ByVertices(new_vertices, close=True))
1733
1738
 
1734
1739
  flat_face = Face.ByWires(eb, new_ib_list)
1735
- for obs in obstacles:
1740
+ for obs in flat_obstacles:
1736
1741
  flat_face = Topology.Difference(flat_face, Face.ByWire(obs))
1737
1742
 
1738
1743
  targets = Topology.Vertices(flat_face)
@@ -1795,6 +1800,21 @@ class Face():
1795
1800
  return None
1796
1801
  simpler_face = Face.RemoveCollinearEdges(return_face)
1797
1802
  if Topology.IsInstance(simpler_face, "face"):
1803
+ if transferDictionaries == True:
1804
+ j_edges = [Topology.Edges(t) for t in obstacles]
1805
+ j_edges = Helper.Flatten(j_edges)
1806
+ j_edges += Topology.Edges(face)
1807
+ i_edges = Topology.Edges(simpler_face)
1808
+ used = [0 for _ in range(len(j_edges))]
1809
+ for i, i_edge in enumerate(i_edges):
1810
+ d_i = Topology.Dictionary(i_edge)
1811
+ for j, j_edge in enumerate(j_edges):
1812
+ if used[j] == 0:
1813
+ if Edge.IsCollinear(i_edge, j_edge):
1814
+ d_j = Topology.Dictionary(j_edge)
1815
+ d_result = Dictionary.ByMergedDictionaries([d_i, d_j])
1816
+ i_edge = Topology.SetDictionary(i_edge, d_result)
1817
+ used[j] == 1
1798
1818
  return Topology.Unflatten(simpler_face, origin=origin, direction=normal)
1799
1819
  return Topology.Unflatten(return_face, origin=origin, direction=normal)
1800
1820
 
topologicpy/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.7.80'
1
+ __version__ = '0.7.81'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.7.80
3
+ Version: 0.7.81
4
4
  Summary: An AI-Powered Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
5
5
  Author-email: Wassim Jabi <wassim.jabi@gmail.com>
6
6
  License: AGPL v3 License
@@ -10,7 +10,7 @@ topologicpy/DGL.py,sha256=Dd6O08D-vSxpjHYgKm45JpKiaeGvWlg1BRMzYMAXGNc,138991
10
10
  topologicpy/Dictionary.py,sha256=0AsGoz48pGTye_F4KcJopNjD9STeQ50LHc6PPvERFaA,31932
11
11
  topologicpy/Edge.py,sha256=9u9SdUxuenLUIK26xwFvPoYV34p0dCfXmHHBxdgvAdM,67164
12
12
  topologicpy/EnergyModel.py,sha256=AqTtmXE35SxvRXhG3vYAQd7GQDW-6HtjYPHua6ME4Eg,53762
13
- topologicpy/Face.py,sha256=mS7LI3qIo2jfQbibpInArRfXMmTZd7xU8IdvRYUIGSU,124747
13
+ topologicpy/Face.py,sha256=oktXe_qOam1ykYTPo-tjBygPG37Tc4FzuuTzC5r4XsY,126050
14
14
  topologicpy/Graph.py,sha256=ZhMVB6ntuhIgTrKLUPryeAJFFBF0cnRsNgESbaohOiw,416914
15
15
  topologicpy/Grid.py,sha256=9N6PE84qCm40TRi2WtlVZSBwXXr47zHpscEpZHg_JW4,18205
16
16
  topologicpy/Helper.py,sha256=vUWbnZJxn0e9YsFUNyJ5Dee8Nh6TmDp9uCzCk4e0qAA,21897
@@ -28,9 +28,9 @@ topologicpy/Vector.py,sha256=A1g83zDHep58iVPY8WQ8iHNrSOfGWFEzvVeDuMnjDNY,33078
28
28
  topologicpy/Vertex.py,sha256=mcLJaWFCct03dkVmT25wAl6k0k2EaYvB1PWNO9WQHWg,73465
29
29
  topologicpy/Wire.py,sha256=o6MlOjubkJ_f5s1tUamizCsoPKvcQ2OudtJv0yCF-2o,186477
30
30
  topologicpy/__init__.py,sha256=vlPCanUbxe5NifC4pHcnhSzkmmYcs_UrZrTlVMsxcFs,928
31
- topologicpy/version.py,sha256=aBUXqj0fVv7Q8TFJaUl3kuETKLosGV1MVLaSEclOujg,23
32
- topologicpy-0.7.80.dist-info/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
33
- topologicpy-0.7.80.dist-info/METADATA,sha256=g22rsF0lEieZmVNOo3LukQGLjnAykoocyDmw2qBPHwg,10513
34
- topologicpy-0.7.80.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
35
- topologicpy-0.7.80.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
36
- topologicpy-0.7.80.dist-info/RECORD,,
31
+ topologicpy/version.py,sha256=iZxz9QXmJIsvAXj4dVDKbSxrlUwOUsiYBfqkVb8YgDc,23
32
+ topologicpy-0.7.81.dist-info/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
33
+ topologicpy-0.7.81.dist-info/METADATA,sha256=DOkP8pfJc3ibgaQkLoBgCqjct8GvZumL7I1hQnVBKh8,10513
34
+ topologicpy-0.7.81.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
35
+ topologicpy-0.7.81.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
36
+ topologicpy-0.7.81.dist-info/RECORD,,