topologicpy 0.7.28__py3-none-any.whl → 0.7.30__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/Wire.py CHANGED
@@ -310,7 +310,7 @@ class Wire(Topology):
310
310
  return Wire.ByEdges(edges, tolerance=tolerance)
311
311
 
312
312
  @staticmethod
313
- def ByOffset(wire, offset: float = 1.0, offsetKey: str = "offset", bisectors: bool = False, tolerance: float = 0.0001, silent: bool = False):
313
+ def ByOffset(wire, offset: float = 1.0, offsetKey: str = "offset", stepOffsetA: float = 0, stepOffsetB: float = 0, stepOffsetKeyA: str = "stepOffsetA", stepOffsetKeyB: str = "stepOffsetB", bisectors: bool = False, tolerance: float = 0.0001, silent: bool = False):
314
314
  """
315
315
  Creates an offset wire from the input wire. A positive offset value results in an offset to the interior of an anti-clockwise wire.
316
316
 
@@ -322,6 +322,14 @@ class Wire(Topology):
322
322
  The desired offset distance. The default is 1.0.
323
323
  offsetKey : str , optional
324
324
  The edge dictionary key under which to find the offset value. If a value cannot be found, the offset input parameter value is used instead. The default is "offset".
325
+ stepOffsetA : float , optional
326
+ The amount to offset along the previous edge when transitioning between parallel edges with different offsets. The default is 0.
327
+ stepOffsetB : float , optional
328
+ The amount to offset along the next edge when transitioning between parallel edges with different offsets. The default is 0.
329
+ stepOffsetKeyA : str , optional
330
+ The vertex dictionary key under which to find the step offset A value. If a value cannot be found, the stepOffsetA input parameter value is used instead. The default is "stepOffsetA".
331
+ stepOffsetKeyB : str , optional
332
+ The vertex dictionary key under which to find the step offset B value. If a value cannot be found, the stepOffsetB input parameter value is used instead. The default is "stepOffsetB".
325
333
  bisectors : bool , optional
326
334
  If set to True, The bisectors (seams) edges will be included in the returned wire. The default is False.
327
335
  tolerance : float , optional
@@ -355,8 +363,6 @@ class Wire(Topology):
355
363
  temp_normal = Face.Normal(temp_face)
356
364
  flat_wire = Topology.Flatten(wire, direction=temp_normal, origin=origin)
357
365
  normal = Face.Normal(temp_face)
358
- if normal[2] < 0:
359
- wire = Wire.Reverse(wire, transferDictionaries=True)
360
366
  flat_wire = Topology.Flatten(wire, direction=normal, origin=origin)
361
367
  edges = Topology.Edges(flat_wire)
362
368
  offsets = []
@@ -394,8 +400,20 @@ class Wire(Topology):
394
400
  else:
395
401
  connection = Edge.Connection(prev_edge, o_edge_a)
396
402
  if Topology.IsInstance(connection, "Edge"):
397
- v1_1 = Edge.StartVertex(connection)
398
- v1_2 = Edge.EndVertex(connection)
403
+ d = Topology.Dictionary(v_a)
404
+ d_stepOffsetA = Dictionary.ValueAtKey(d, stepOffsetKeyA)
405
+ if d_stepOffsetA == None:
406
+ d_stepOffsetA = stepOffsetA
407
+ d_stepOffsetB = Dictionary.ValueAtKey(d, stepOffsetKeyB)
408
+ if d_stepOffsetB == None:
409
+ d_stepOffsetB = stepOffsetB
410
+ v1_1 = Topology.TranslateByDirectionDistance(Edge.EndVertex(prev_edge),
411
+ direction = Vector.Reverse(Edge.Direction(prev_edge)),
412
+ distance = d_stepOffsetA)
413
+
414
+ v1_2 = Topology.TranslateByDirectionDistance(Edge.StartVertex(o_edge_a),
415
+ direction = Edge.Direction(o_edge_a),
416
+ distance = d_stepOffsetB)
399
417
  bisectors_list.append(Edge.ByVertices(v_a, v1_1))
400
418
  bisectors_list.append(Edge.ByVertices(v_a, v1_2))
401
419
  final_vertices.append(v1_1)
topologicpy/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.7.28'
1
+ __version__ = '0.7.30'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.7.28
3
+ Version: 0.7.30
4
4
  Summary: An Advanced Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
5
5
  Author-email: Wassim Jabi <wassim.jabi@gmail.com>
6
6
  License: MIT License
@@ -24,11 +24,11 @@ topologicpy/Sun.py,sha256=_gZfVyH0SDLQmmt775UeeAJ_BtwXO1STQnUMV1qkU0s,37161
24
24
  topologicpy/Topology.py,sha256=Z-zddTGL_wkQmhrkXlredpQxx7Myd4Xp-yNw2d95iks,361647
25
25
  topologicpy/Vector.py,sha256=WQQUbwrg7VKImtxuBUi2i-FRiPT77WlrzLP05gdXKM8,33079
26
26
  topologicpy/Vertex.py,sha256=xnCoPG7BTKBG-JU3C0e11KcpDJbDt9t1Ahj4f5Ul13I,71151
27
- topologicpy/Wire.py,sha256=mxwx6170ylBnSP2CRAuUZ6xWtISR-frAG5QAVMtS_ZE,147316
27
+ topologicpy/Wire.py,sha256=cCdaQzjiDQWSZ7it0V1i114-6Swjh4rv8hTHgRiEf7Y,149195
28
28
  topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
29
- topologicpy/version.py,sha256=wuEtkjyrjapFyP-8kysuud97ywxtz0wWW7TfbCk_q1g,23
30
- topologicpy-0.7.28.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
31
- topologicpy-0.7.28.dist-info/METADATA,sha256=5Q_QWybjO0mzQG8ikrtZ6g9s2IQ3n1-0l4at8o8yJeI,10916
32
- topologicpy-0.7.28.dist-info/WHEEL,sha256=rWxmBtp7hEUqVLOnTaDOPpR-cZpCDkzhhcBce-Zyd5k,91
33
- topologicpy-0.7.28.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
34
- topologicpy-0.7.28.dist-info/RECORD,,
29
+ topologicpy/version.py,sha256=CbJ3GQqlDb-M7QMe4MLNpbEUMiZs9eF7jGbgZtwVIIc,23
30
+ topologicpy-0.7.30.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
31
+ topologicpy-0.7.30.dist-info/METADATA,sha256=0JnIk0hsi9_YxehWfEHHrP_vXgPLtSkOHSRxzfL2Oac,10916
32
+ topologicpy-0.7.30.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
33
+ topologicpy-0.7.30.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
34
+ topologicpy-0.7.30.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (71.0.4)
2
+ Generator: setuptools (71.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5