Skip to content

Commit cd35b42

Browse files
committed
Updated to v.0.4.3 bug fix with different versions of cq-kit/CadQuery
1 parent f2936ad commit cd35b42

File tree

6 files changed

+22
-4
lines changed

6 files changed

+22
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
- v.0.4.0 - Added `GridfinityRuggedBox` class and `ruggedbox` console script. Various other improvements.
1111
- v.0.4.1 - Fixed docstring in `__init__.py`
1212
- v.0.4.2 - Improved script automatic renaming
13+
- v.0.4.3 - Fixed regression bug with using multilevel extrusion functions from cq-kit

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Assuming these dependencie are installed, you can install **cq-gridfinity** usin
4343
$ pip install cqgridfinity
4444
```
4545

46-
The **cq-gridfinity** package can be installed directly from the source code:
46+
Alternatively, the **cq-gridfinity** package can be installed directly from the source code:
4747

4848
```bash
4949
$ git clone https://github.com/michaelgale/cq-gridfinity.git
@@ -597,6 +597,7 @@ b1.save_step_file()
597597
- v.0.4.0 - Added `GridfinityRuggedBox` class and `ruggedbox` console script. Various other improvements.
598598
- v.0.4.1 - Fixed docstring in `__init__.py`
599599
- v.0.4.2 - Improved script automatic renaming
600+
- v.0.4.3 - Fixed regression bug with using multilevel extrusion functions from cq-kit
600601

601602
# References
602603

cqgridfinity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# fmt: off
66
__project__ = 'cqgridfinity'
7-
__version__ = '0.4.2'
7+
__version__ = '0.4.3'
88
# fmt: on
99

1010
VERSION = __project__ + "-" + __version__

cqgridfinity/gf_box.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import cadquery as cq
2929
from cqkit import HasZCoordinateSelector, VerticalEdgeSelector, FlatEdgeSelector
30-
from cqkit.cq_helpers import rounded_rect_sketch, composite_from_pts
30+
from cqkit.cq_helpers import rounded_rect_sketch, composite_from_pts, size_3d, recentre
3131
from cqgridfinity import *
3232

3333

cqgridfinity/gf_obj.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,12 @@ def extrude_profile(self, sketch, profile, workplane="XY"):
312312
taper = profile[0][1] if isinstance(profile[0], (list, tuple)) else 0
313313
p0 = profile[0][0] if isinstance(profile[0], (list, tuple)) else profile[0]
314314
r = cq.Workplane(workplane).placeSketch(sketch).extrude(p0, taper=taper)
315-
return multi_extrude(r, profile[1:])
315+
for level in profile[1:]:
316+
if isinstance(level, (tuple, list)):
317+
r = r.faces(">Z").wires().toPending().extrude(level[0], taper=level[1])
318+
else:
319+
r = r.faces(">Z").wires().toPending().extrude(level)
320+
return r
316321

317322
@classmethod
318323
def to_step_file(

tests/test_spacer.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,14 @@ def test_spacer_render():
9292
assert s1.filename() == "gf_drawer_4x3_corner_spacer"
9393
if _export_files("spacer"):
9494
s1.save_step_file(path=EXPORT_STEP_FILE_PATH)
95+
96+
97+
# def test_spacer_render():
98+
# s1 = GridfinityDrawerSpacer(tolerance=0.25)
99+
# dx, dy = INCHES(22 + 7/8)-0.5, INCHES(16 + 3/16)-0.5
100+
# s1.best_fit_to_dim(dx, dy, verbose=True)
101+
# rh = s1.render_half_set()
102+
# # assert _almost_same(size_3d(rh), (253.084, 177.0625, 5))
103+
# # assert s1.filename() == "gf_drawer_4x3_half_set"
104+
# # if _export_files("spacer"):
105+
# s1.save_step_file(path=EXPORT_STEP_FILE_PATH)

0 commit comments

Comments
 (0)