topologicpy 0.7.65__py3-none-any.whl → 0.7.66__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/Shell.py CHANGED
@@ -1520,7 +1520,7 @@ class Shell():
1520
1520
  origin = Topology.Centroid(face)
1521
1521
  normal = Face.Normal(face, mantissa=mantissa)
1522
1522
  flat_face = Topology.Flatten(face, origin=origin, direction=normal)
1523
- roof = Wire.Roof(flat_face, angle=angle, tolerance=tolerance)
1523
+ roof = Wire.Roof(flat_face, angle=angle, boundary=True, tolerance=tolerance)
1524
1524
  if not roof:
1525
1525
  return None
1526
1526
  shell = Shell.Skeleton(flat_face, tolerance=tolerance)
topologicpy/Topology.py CHANGED
@@ -245,7 +245,7 @@ class Topology():
245
245
 
246
246
  for aperture in apertures:
247
247
  d = Topology.Dictionary(aperture)
248
- d = Dictionary.SetValueAtKey(d, "type", "aperture")
248
+ d = Dictionary.SetValueAtKey(d, "type", "Aperture")
249
249
  aperture = Topology.SetDictionary(aperture, d)
250
250
 
251
251
  topology = Topology.AddContent(topology, apertures, subTopologyType=subTopologyType, tolerance=tolerance)
@@ -864,7 +864,7 @@ class Topology():
864
864
  d = Topology.Dictionary(content)
865
865
  if len(Dictionary.Keys(d)) > 0:
866
866
  type = Dictionary.ValueAtKey(d,"type")
867
- if type == "aperture":
867
+ if "aperture" in type.lower():
868
868
  apertures.append(content)
869
869
  elif subTopologyType.lower() == "vertex":
870
870
  subTopologies = Topology.Vertices(topology)
topologicpy/Wire.py CHANGED
@@ -2910,7 +2910,7 @@ class Wire():
2910
2910
  return return_wire
2911
2911
 
2912
2912
  @staticmethod
2913
- def Roof(face, angle: float = 45, tolerance: float = 0.001):
2913
+ def Roof(face, angle: float = 45, boundary: bool = True, tolerance: float = 0.001):
2914
2914
  """
2915
2915
  Creates a hipped roof through a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com>
2916
2916
  This algorithm depends on the polyskel code which is included in the library. Polyskel code is found at: https://github.com/Botffy/polyskel
@@ -2921,6 +2921,8 @@ class Wire():
2921
2921
  The input face.
2922
2922
  angle : float , optioal
2923
2923
  The desired angle in degrees of the roof. The default is 45.
2924
+ boundary : bool , optional
2925
+ If set to True the original boundary is returned as part of the roof. Otherwise it is not. The default is True.
2924
2926
  tolerance : float , optional
2925
2927
  The desired tolerance. The default is 0.001. (This is set to a larger number as it was found to work better)
2926
2928
 
@@ -2977,7 +2979,7 @@ class Wire():
2977
2979
  edges.append(e)
2978
2980
  return edges
2979
2981
 
2980
- def face_to_skeleton(face, angle=0):
2982
+ def face_to_skeleton(face, angle=0, boundary=True):
2981
2983
  normal = Face.Normal(face)
2982
2984
  eb_wire = Face.ExternalBoundary(face)
2983
2985
  ib_wires = Face.InternalBoundaries(face)
@@ -3003,7 +3005,10 @@ class Wire():
3003
3005
  return None
3004
3006
  slope = math.tan(math.radians(angle))
3005
3007
  roofEdges = subtrees_to_edges(skeleton, zero_coordinates, slope)
3006
- roofEdges = Helper.Flatten(roofEdges)+Topology.Edges(face)
3008
+ if boundary == True:
3009
+ roofEdges = Helper.Flatten(roofEdges)+Topology.Edges(face)
3010
+ else:
3011
+ roofEdges = Helper.Flatten(roofEdges)
3007
3012
  roofTopology = Topology.SelfMerge(Cluster.ByTopologies(roofEdges), tolerance=tolerance)
3008
3013
  return roofTopology
3009
3014
 
@@ -3016,7 +3021,7 @@ class Wire():
3016
3021
  normal = Face.Normal(face)
3017
3022
  flat_face = Topology.Flatten(face, origin=origin, direction=normal)
3018
3023
  d = Topology.Dictionary(flat_face)
3019
- roof = face_to_skeleton(flat_face, angle)
3024
+ roof = face_to_skeleton(flat_face, angle=angle, boundary=boundary)
3020
3025
  if not roof:
3021
3026
  return None
3022
3027
  roof = Topology.Unflatten(roof, origin=origin, direction=normal)
@@ -3114,7 +3119,7 @@ class Wire():
3114
3119
  return new_wire
3115
3120
 
3116
3121
  @staticmethod
3117
- def Skeleton(face, tolerance=0.001):
3122
+ def Skeleton(face, boundary: bool = True, tolerance: float = 0.001):
3118
3123
  """
3119
3124
  Creates a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com>
3120
3125
  This algorithm depends on the polyskel code which is included in the library. Polyskel code is found at: https://github.com/Botffy/polyskel
@@ -3123,6 +3128,8 @@ class Wire():
3123
3128
  ----------
3124
3129
  face : topologic_core.Face
3125
3130
  The input face.
3131
+ boundary : bool , optional
3132
+ If set to True the original boundary is returned as part of the roof. Otherwise it is not. The default is True.
3126
3133
  tolerance : float , optional
3127
3134
  The desired tolerance. The default is 0.001. (This is set to a larger number as it was found to work better)
3128
3135
 
@@ -3134,7 +3141,7 @@ class Wire():
3134
3141
  """
3135
3142
  if not Topology.IsInstance(face, "Face"):
3136
3143
  return None
3137
- return Wire.Roof(face, angle=0, tolerance=tolerance)
3144
+ return Wire.Roof(face, angle=0, boundary=boundary, tolerance=tolerance)
3138
3145
 
3139
3146
  @staticmethod
3140
3147
  def Spiral(origin = None, radiusA : float = 0.05, radiusB : float = 0.5, height : float = 1, turns : int = 10, sides : int = 36, clockwise : bool = False, reverse : bool = False, direction: list = [0, 0, 1], placement: str = "center", tolerance: float = 0.0001):
topologicpy/__init__.py CHANGED
@@ -20,3 +20,6 @@ from sys import platform
20
20
  from .version import __version__
21
21
 
22
22
  __version_info__ = tuple([ int(num) for num in __version__.split('.')])
23
+
24
+ # Set an alias for ease of access
25
+ version = __version__
topologicpy/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.7.65'
1
+ __version__ = '0.7.66'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.7.65
3
+ Version: 0.7.66
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,8 +10,8 @@ topologicpy/DGL.py,sha256=Dd6O08D-vSxpjHYgKm45JpKiaeGvWlg1BRMzYMAXGNc,138991
10
10
  topologicpy/Dictionary.py,sha256=cURg452wwk2WeSxWY46ncgAUo5XD1c2c5EtO6ESZHaY,27304
11
11
  topologicpy/Edge.py,sha256=FACD8Bm2nL2uTHIeRMVXfRF0cYeqhZ-lCZPHAfjAIPg,66927
12
12
  topologicpy/EnergyModel.py,sha256=NM3_nAdY9_YDtbp9CaEZ0x0xVsetTqVDzm_VSjmq_mI,53746
13
- topologicpy/Face.py,sha256=emRTWbaLZeU3E0MprqpltTxC4ckv42h36enOcUMcLpU,124144
14
- topologicpy/Graph.py,sha256=4b8bzlyXmh0Ef9rjiEjl8wmh_9vAxoE5xiSiGvGjG9Q,411392
13
+ topologicpy/Face.py,sha256=lCjahpvNpaI-yNm_VN1-4HxjPEkpPIbRnyyj7H6DsPc,124354
14
+ topologicpy/Graph.py,sha256=dxXYQdaowi8IZ031IpxI75GLs-uJjq9FRYKgrb5xWEw,389863
15
15
  topologicpy/Grid.py,sha256=3-sn7CHWGcXk18XCnHjsUttNJTWwmN63g_Insj__p04,18218
16
16
  topologicpy/Helper.py,sha256=i-AfI29NMsZXBaymjilfvxQbuS3wpYbpPw4RWu1YCHs,16358
17
17
  topologicpy/Honeybee.py,sha256=Oc8mfGBNSjs6wxkPzCKmEw1ZPQPbp9XtiYWaAF62oSk,21893
@@ -20,17 +20,17 @@ topologicpy/Neo4j.py,sha256=t52hgE9cVsqkGc7m7fjRsLnyfRHakVHwdvF4ms7ow78,22342
20
20
  topologicpy/Plotly.py,sha256=k-gluqX4Na3zlYCDl_6A0gqeFoGR-0Oy6fLiT-Zqlyk,108362
21
21
  topologicpy/Polyskel.py,sha256=EFsuh2EwQJGPLiFUjvtXmAwdX-A4r_DxP5hF7Qd3PaU,19829
22
22
  topologicpy/PyG.py,sha256=LU9LCCzjxGPUM31qbaJXZsTvniTtgugxJY7y612t4A4,109757
23
- topologicpy/Shell.py,sha256=joahFtpRQTWJpQOmi3qU4Xe0Sx2XXeayHlXTNx8CzMk,87610
23
+ topologicpy/Shell.py,sha256=iX9jLbpylRqt24jtzEH6kSWvA5JvbhAY_w880PxJXP8,87625
24
24
  topologicpy/Speckle.py,sha256=rUS6PCaxIjEF5_fUruxvMH47FMKg-ohcoU0qAUb-yNM,14267
25
25
  topologicpy/Sun.py,sha256=42tDWMYpwRG7Z2Qjtp94eRgBuqySq7k8TgNUZDK7QxQ,36837
26
- topologicpy/Topology.py,sha256=DsRPV0iWUY2NIlxdvLLDBkkDY3xw8oYvmzQEEfJUusQ,398136
26
+ topologicpy/Topology.py,sha256=phWy7R-D-en1tksPh3bWyjw_shlCtL7N9_GVw0Hpnwc,398144
27
27
  topologicpy/Vector.py,sha256=A1g83zDHep58iVPY8WQ8iHNrSOfGWFEzvVeDuMnjDNY,33078
28
28
  topologicpy/Vertex.py,sha256=bLY60YWoMsgCgHk7F7k9F93Sq2FJ6AzUcTfJ83NZfHA,71107
29
- topologicpy/Wire.py,sha256=68KGFO6jere1aj5lci0W67kDRThXLMko8oY68q-ZP_A,171939
30
- topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
31
- topologicpy/version.py,sha256=4-LUGtsfz8i419m9JYP1wXtHIMULgrganMwzGAvPIkU,23
32
- topologicpy-0.7.65.dist-info/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
33
- topologicpy-0.7.65.dist-info/METADATA,sha256=BzRukyNwXpaXv7OWSodC4FUsGbC5LMvLaGsAj10xvV8,10493
34
- topologicpy-0.7.65.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
35
- topologicpy-0.7.65.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
36
- topologicpy-0.7.65.dist-info/RECORD,,
29
+ topologicpy/Wire.py,sha256=BIWv-NIDd31F1EMdX20rHGr_QPhut7SNyqkZmHpv93Q,172480
30
+ topologicpy/__init__.py,sha256=vlPCanUbxe5NifC4pHcnhSzkmmYcs_UrZrTlVMsxcFs,928
31
+ topologicpy/version.py,sha256=8Xc3cxvrZ9_sMCCrmn7ZXexdTYLaSLD_y3ZgwJbwdIg,23
32
+ topologicpy-0.7.66.dist-info/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
33
+ topologicpy-0.7.66.dist-info/METADATA,sha256=ShbKoA2zGyai16RPlqJ7j1AFFsfmLC5-1KsB0C53YQo,10493
34
+ topologicpy-0.7.66.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
35
+ topologicpy-0.7.66.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
36
+ topologicpy-0.7.66.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5