topologicpy 0.7.64__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
@@ -694,7 +694,8 @@ class Wire():
694
694
  defaultMaxOffset=1,
695
695
  maxIterations = 1,
696
696
  tolerance=0.0001,
697
- silent = False):
697
+ silent = False,
698
+ numWorkers = None):
698
699
  """
699
700
  Creates an offset wire from the input wire based on the input area.
700
701
 
@@ -720,6 +721,9 @@ class Wire():
720
721
  The desired tolerance. The default is 0.0001.
721
722
  silent : bool , optional
722
723
  If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
724
+ numWorkers : int , optional
725
+ Number of workers run in parallel to process. If you set it to 1, no parallel processing will take place.
726
+ The default is None which causes the algorithm to use twice the number of cpu cores in the host computer.
723
727
 
724
728
  Returns
725
729
  -------
@@ -742,7 +746,6 @@ class Wire():
742
746
  defaultMinOffset=0,
743
747
  defaultMaxOffset=1,
744
748
  maxIterations = 10000,
745
- maxTime = 10,
746
749
  tolerance=0.0001):
747
750
 
748
751
  initial_offsets = []
@@ -767,7 +770,7 @@ class Wire():
767
770
  edge = Topology.SetDictionary(edge, d)
768
771
 
769
772
  # Offset the wire
770
- new_wire = Wire.ByOffset(wire, offsetKey=offsetKey, silent=silent)
773
+ new_wire = Wire.ByOffset(wire, offsetKey=offsetKey, silent=silent, numWorkers=numWorkers)
771
774
  # Check for an illegal wire. In that case, return a very large loss value.
772
775
  if not Topology.IsInstance(new_wire, "Wire"):
773
776
  return (float("inf"))
@@ -839,7 +842,7 @@ class Wire():
839
842
  edge = Topology.SetDictionary(edge, d)
840
843
 
841
844
  # Offset the wire
842
- return_wire = Wire.ByOffset(wire, offsetKey=offsetKey, silent=silent)
845
+ return_wire = Wire.ByOffset(wire, offsetKey=offsetKey, silent=silent, numWorkers=numWorkers)
843
846
  if not Topology.IsInstance(wire, "Wire"):
844
847
  if not silent:
845
848
  print("Wire.OffsetByArea - Error: Could not create the offset wire. Returning None.")
@@ -2907,7 +2910,7 @@ class Wire():
2907
2910
  return return_wire
2908
2911
 
2909
2912
  @staticmethod
2910
- def Roof(face, angle: float = 45, tolerance: float = 0.001):
2913
+ def Roof(face, angle: float = 45, boundary: bool = True, tolerance: float = 0.001):
2911
2914
  """
2912
2915
  Creates a hipped roof through a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com>
2913
2916
  This algorithm depends on the polyskel code which is included in the library. Polyskel code is found at: https://github.com/Botffy/polyskel
@@ -2918,6 +2921,8 @@ class Wire():
2918
2921
  The input face.
2919
2922
  angle : float , optioal
2920
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.
2921
2926
  tolerance : float , optional
2922
2927
  The desired tolerance. The default is 0.001. (This is set to a larger number as it was found to work better)
2923
2928
 
@@ -2974,7 +2979,7 @@ class Wire():
2974
2979
  edges.append(e)
2975
2980
  return edges
2976
2981
 
2977
- def face_to_skeleton(face, angle=0):
2982
+ def face_to_skeleton(face, angle=0, boundary=True):
2978
2983
  normal = Face.Normal(face)
2979
2984
  eb_wire = Face.ExternalBoundary(face)
2980
2985
  ib_wires = Face.InternalBoundaries(face)
@@ -3000,7 +3005,10 @@ class Wire():
3000
3005
  return None
3001
3006
  slope = math.tan(math.radians(angle))
3002
3007
  roofEdges = subtrees_to_edges(skeleton, zero_coordinates, slope)
3003
- 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)
3004
3012
  roofTopology = Topology.SelfMerge(Cluster.ByTopologies(roofEdges), tolerance=tolerance)
3005
3013
  return roofTopology
3006
3014
 
@@ -3013,7 +3021,7 @@ class Wire():
3013
3021
  normal = Face.Normal(face)
3014
3022
  flat_face = Topology.Flatten(face, origin=origin, direction=normal)
3015
3023
  d = Topology.Dictionary(flat_face)
3016
- roof = face_to_skeleton(flat_face, angle)
3024
+ roof = face_to_skeleton(flat_face, angle=angle, boundary=boundary)
3017
3025
  if not roof:
3018
3026
  return None
3019
3027
  roof = Topology.Unflatten(roof, origin=origin, direction=normal)
@@ -3111,7 +3119,7 @@ class Wire():
3111
3119
  return new_wire
3112
3120
 
3113
3121
  @staticmethod
3114
- def Skeleton(face, tolerance=0.001):
3122
+ def Skeleton(face, boundary: bool = True, tolerance: float = 0.001):
3115
3123
  """
3116
3124
  Creates a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com>
3117
3125
  This algorithm depends on the polyskel code which is included in the library. Polyskel code is found at: https://github.com/Botffy/polyskel
@@ -3120,6 +3128,8 @@ class Wire():
3120
3128
  ----------
3121
3129
  face : topologic_core.Face
3122
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.
3123
3133
  tolerance : float , optional
3124
3134
  The desired tolerance. The default is 0.001. (This is set to a larger number as it was found to work better)
3125
3135
 
@@ -3131,7 +3141,7 @@ class Wire():
3131
3141
  """
3132
3142
  if not Topology.IsInstance(face, "Face"):
3133
3143
  return None
3134
- return Wire.Roof(face, angle=0, tolerance=tolerance)
3144
+ return Wire.Roof(face, angle=0, boundary=boundary, tolerance=tolerance)
3135
3145
 
3136
3146
  @staticmethod
3137
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.64'
1
+ __version__ = '0.7.66'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.7.64
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=OyzEWdXl8yScHlyG3jDqcI31d_QlAt3SDma8AtkLQFs,116746
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=x2ut3Pej3fTBv1nPzQMsJ8asWFy4WKIjrAUPA0boesU,171628
30
- topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
31
- topologicpy/version.py,sha256=bS9oMyiW7mG9IEOnZxQjxJsbA3M_PYb8UoQ9nlFur3E,23
32
- topologicpy-0.7.64.dist-info/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
33
- topologicpy-0.7.64.dist-info/METADATA,sha256=H8NmzOE2UXg9QijrxOwaqCedfuJf1kj3M5xYSHKZ8cs,10493
34
- topologicpy-0.7.64.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
35
- topologicpy-0.7.64.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
36
- topologicpy-0.7.64.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