b3dkit 0.5.2__tar.gz → 0.5.3__tar.gz

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.
Files changed (68) hide show
  1. {b3dkit-0.5.2 → b3dkit-0.5.3}/CHANGELOG.md +18 -8
  2. {b3dkit-0.5.2 → b3dkit-0.5.3}/PKG-INFO +1 -1
  3. {b3dkit-0.5.2 → b3dkit-0.5.3}/pyproject.toml +1 -1
  4. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/slide_box.py +10 -14
  5. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_slide_box.py +2 -2
  6. {b3dkit-0.5.2 → b3dkit-0.5.3}/.coveragerc +0 -0
  7. {b3dkit-0.5.2 → b3dkit-0.5.3}/.github/workflows/release.yml +0 -0
  8. {b3dkit-0.5.2 → b3dkit-0.5.3}/.github/workflows/test.yml +0 -0
  9. {b3dkit-0.5.2 → b3dkit-0.5.3}/.gitignore +0 -0
  10. {b3dkit-0.5.2 → b3dkit-0.5.3}/.pre-commit-config.yaml +0 -0
  11. {b3dkit-0.5.2 → b3dkit-0.5.3}/.vscode/settings.json +0 -0
  12. {b3dkit-0.5.2 → b3dkit-0.5.3}/CONTRIBUTING.md +0 -0
  13. {b3dkit-0.5.2 → b3dkit-0.5.3}/LICENSE +0 -0
  14. {b3dkit-0.5.2 → b3dkit-0.5.3}/README.md +0 -0
  15. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/CONTRIBUTING.md +0 -0
  16. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/antichamfer.md +0 -0
  17. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/ball_socket.md +0 -0
  18. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/basic_shapes.md +0 -0
  19. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/bolt_fittings.md +0 -0
  20. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/click_fit.md +0 -0
  21. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/dovetail.md +0 -0
  22. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/dovetail.png +0 -0
  23. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/hexwall.md +0 -0
  24. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/high_top_slide_box.md +0 -0
  25. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/index.md +0 -0
  26. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/point.md +0 -0
  27. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/antichamfer.md +0 -0
  28. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/ball_socket.md +0 -0
  29. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/basic_shapes.md +0 -0
  30. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/bolt_fittings.md +0 -0
  31. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/click_fit.md +0 -0
  32. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/dovetail.md +0 -0
  33. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/hexwall.md +0 -0
  34. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/high_top_slide_box.md +0 -0
  35. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/index.md +0 -0
  36. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/point.md +0 -0
  37. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/slide_box.md +0 -0
  38. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/reference/twist_snap.md +0 -0
  39. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/requirements.txt +0 -0
  40. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/slide_box.md +0 -0
  41. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/twist_snap.md +0 -0
  42. {b3dkit-0.5.2 → b3dkit-0.5.3}/docs/twist_snap.png +0 -0
  43. {b3dkit-0.5.2 → b3dkit-0.5.3}/mkdocs.yml +0 -0
  44. {b3dkit-0.5.2 → b3dkit-0.5.3}/readthedocs.yaml +0 -0
  45. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/__init__.py +0 -0
  46. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/antichamfer.py +0 -0
  47. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/ball_socket.py +0 -0
  48. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/basic_shapes.py +0 -0
  49. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/bolt_fittings.py +0 -0
  50. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/click_fit.py +0 -0
  51. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/dovetail.py +0 -0
  52. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/hexwall.py +0 -0
  53. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/high_top_slide_box.py +0 -0
  54. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/point.py +0 -0
  55. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/py.typed +0 -0
  56. {b3dkit-0.5.2 → b3dkit-0.5.3}/src/b3dkit/twist_snap.py +0 -0
  57. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_antichamfer.py +0 -0
  58. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_ball_socket.py +0 -0
  59. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_basic_shapes.py +0 -0
  60. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_bolt_fittings.py +0 -0
  61. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_click_fit.py +0 -0
  62. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_docs.py +0 -0
  63. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_dovetail.py +0 -0
  64. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_hexwall.py +0 -0
  65. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_high_top_slide_box.py +0 -0
  66. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_point.py +0 -0
  67. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_public_api.py +0 -0
  68. {b3dkit-0.5.2 → b3dkit-0.5.3}/tests/test_twist_snap.py +0 -0
@@ -7,6 +7,22 @@ ship in minor releases.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.3] - 2026-10-08
11
+
12
+ ### Changed
13
+
14
+ - **`slide_box` cavity walls are `wall_thickness` thick.** The cavity follows
15
+ the part's outline at `top_offset` below the top, so lettering or other top
16
+ features no longer shape it, and `top_offset` and `tolerance` no longer thin
17
+ the walls.
18
+
19
+ ## [0.5.2] - 2026-10-03
20
+
21
+ ### Changed
22
+
23
+ - **`slide_box` sliding edges are filleted** by `wall_thickness * 0.025` on
24
+ both the slot and the lid.
25
+
10
26
  ### Fixed
11
27
 
12
28
  - **build123d 0.12 and 0.13 support.** `TeardropBoltCutSinkhole`,
@@ -17,13 +33,6 @@ ship in minor releases.
17
33
  - **`Teardrop`'s `rotation` is a float**, defaulting to `0`. The old `(0, 0)`
18
34
  default raised `TypeError` on build123d 0.12+.
19
35
 
20
- ## [0.5.2] - 2026-10-03
21
-
22
- ### Changed
23
-
24
- - **`slide_box` sliding edges are filleted** by `wall_thickness * 0.025` on
25
- both the slot and the lid.
26
-
27
36
  ## [0.5.1] - 2026-10-01
28
37
 
29
38
  ### Changed
@@ -175,7 +184,8 @@ the Python 3.11 floor.
175
184
  See the git history. b3dkit began as `fb-library`; the rename accompanied a
176
185
  rewrite that reworked names and usage to feel closer to native build123d.
177
186
 
178
- [Unreleased]: https://github.com/x0pherl/b3dkit/compare/v0.5.2...HEAD
187
+ [Unreleased]: https://github.com/x0pherl/b3dkit/compare/v0.5.3...HEAD
188
+ [0.5.3]: https://github.com/x0pherl/b3dkit/releases/tag/v0.5.3
179
189
  [0.5.2]: https://github.com/x0pherl/b3dkit/releases/tag/v0.5.2
180
190
  [0.5.1]: https://github.com/x0pherl/b3dkit/releases/tag/v0.5.1
181
191
  [0.5.0]: https://github.com/x0pherl/b3dkit/releases/tag/v0.5.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: b3dkit
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: build123d libraries and utilities
5
5
  Project-URL: Homepage, https://github.com/x0pherl/b3dkit
6
6
  Project-URL: Issues, https://github.com/x0pherl/b3dkit/issues
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "b3dkit"
3
- version = "0.5.2"
3
+ version = "0.5.3"
4
4
  authors = [
5
5
  { name="x0pherl"},
6
6
  ]
@@ -93,7 +93,6 @@ def _slider_template(
93
93
  sketch: Sketch,
94
94
  wall_thickness: float = 2,
95
95
  tolerance: float = 0.2,
96
- top_offset: float = 0,
97
96
  x_straighten_distance: float = 0,
98
97
  divot_radius: float = 0,
99
98
  cut_template: bool = True,
@@ -203,7 +202,6 @@ def slide_lid(
203
202
  cross_section,
204
203
  wall_thickness,
205
204
  tolerance=tolerance,
206
- top_offset=top_offset,
207
205
  x_straighten_distance=x_straighten_distance,
208
206
  divot_radius=divot_radius,
209
207
  cut_template=False,
@@ -279,29 +277,27 @@ def slide_box(
279
277
  returns a Compound labelled "slide box" with two children, "box" and "lid"
280
278
  """
281
279
 
282
- cross_section = section(
283
- obj=part, section_by=Plane.XY.offset(part.bounding_box().max.Z - top_offset)
284
- )
280
+ top = part.bounding_box().max.Z
281
+ cross_section = section(obj=part, section_by=Plane.XY.offset(top - top_offset))
285
282
  lid_cut_template = _slider_template(
286
283
  cross_section,
287
284
  wall_thickness,
288
285
  tolerance=tolerance,
289
- top_offset=top_offset,
290
286
  x_straighten_distance=x_straighten_distance,
291
287
  divot_radius=divot_radius,
292
288
  )
293
289
 
294
- extrusion_height = part.bounding_box().max.Z - wall_thickness
290
+ extrusion_height = top - wall_thickness
295
291
  with BuildPart() as box_part:
296
292
  add(part)
297
- extrude(
293
+ # the cavity follows the outline below any top features, raised to the
294
+ # top of the part
295
+ with BuildSketch(Plane.XY.offset(top)):
298
296
  offset(
299
- box_part.faces().sort_by(Axis.Z)[-1],
300
- amount=-abs(tolerance) - abs(wall_thickness - top_offset),
301
- ),
302
- amount=-extrusion_height,
303
- mode=Mode.SUBTRACT,
304
- )
297
+ cross_section.moved(Location((0, 0, -(top - top_offset)))),
298
+ amount=-abs(wall_thickness),
299
+ )
300
+ extrude(amount=-extrusion_height, mode=Mode.SUBTRACT)
305
301
  add(
306
302
  lid_cut_template.move(Location((0, 0, extrusion_height + wall_thickness))),
307
303
  mode=Mode.SUBTRACT,
@@ -29,7 +29,7 @@ class TestSlideBox:
29
29
  assert (box.label, lid.label) == ("box", "lid")
30
30
  assert len(box.solids()) == 1
31
31
  assert len(lid.solids()) == 1
32
- assert box.volume == pytest.approx(4604.7926, rel=1e-4)
32
+ assert box.volume == pytest.approx(4439.0809, rel=1e-4)
33
33
  assert lid.volume == pytest.approx(1344.8752, rel=1e-4)
34
34
  # the lid slides inside the box, so it must be narrower
35
35
  assert lid.bounding_box().size.X < box.bounding_box().size.X
@@ -146,7 +146,7 @@ class TestSlideBoxFit:
146
146
 
147
147
  # the slot floor is a ledge: just above it the opening reaches out to
148
148
  # the rail, just below it only to the inner wall of the box
149
- cavity_wall = 10 - self.WALL - tolerance
149
+ cavity_wall = 10 - self.WALL
150
150
  assert first_material(floor - 0.01) == pytest.approx(cavity_wall, abs=1e-4)
151
151
  assert first_material(floor + 0.01) > cavity_wall + 0.5
152
152
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes