From dd5e8b3acec598deef71bd1268bce088e3a59edc Mon Sep 17 00:00:00 2001 From: Michael Gale Date: Fri, 9 Feb 2024 16:28:52 -0500 Subject: [PATCH] v.0.4.5 fix for extrusion angle --- CHANGELOG.md | 1 + README.md | 1 + cqgridfinity/__init__.py | 2 +- cqgridfinity/gf_obj.py | 2 +- tests/test_box.py | 16 ++++++++-------- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8a36db..158cb77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,3 +12,4 @@ - v.0.4.2 - Improved script automatic renaming - v.0.4.3 - Fixed regression bug with using multilevel extrusion functions from cq-kit - v.0.4.4 - IMPORTANT FIX: generated geometry breaks using CadQuery v.2.4+ due to changes in CadQuery's `extrude` method. This version should work with any CQ version since it detects which CQ extrusion implementation is used at runtime. +- v.0.4.5 - IMPORTANT FIX: fixes error in v.0.4.4 for extrusion angle diff --git a/README.md b/README.md index f8f475f..7ebcf9f 100644 --- a/README.md +++ b/README.md @@ -599,6 +599,7 @@ b1.save_step_file() - v.0.4.2 - Improved script automatic renaming - v.0.4.3 - Fixed regression bug with using multilevel extrusion functions from cq-kit - v.0.4.4 - IMPORTANT FIX: generated geometry breaks using CadQuery v.2.4+ due to changes in CadQuery's `extrude` method. This version should work with any CQ version since it detects which CQ extrusion implementation is used at runtime. +- v.0.4.5 - IMPORTANT FIX: fixes error in v.0.4.4 for extrusion angle # References diff --git a/cqgridfinity/__init__.py b/cqgridfinity/__init__.py index 8ba48e5..3678b67 100644 --- a/cqgridfinity/__init__.py +++ b/cqgridfinity/__init__.py @@ -4,7 +4,7 @@ # fmt: off __project__ = 'cqgridfinity' -__version__ = '0.4.4' +__version__ = '0.4.5' # fmt: on VERSION = __project__ + "-" + __version__ diff --git a/cqgridfinity/gf_obj.py b/cqgridfinity/gf_obj.py index acbe641..99165b5 100644 --- a/cqgridfinity/gf_obj.py +++ b/cqgridfinity/gf_obj.py @@ -326,7 +326,7 @@ def extrude_profile(self, sketch, profile, workplane="XY"): for level in profile[1:]: if isinstance(level, (tuple, list)): zlen = level[0] if ZLEN_FIX else level[0] / SQRT2 - r = r.faces(">Z").wires().toPending().extrude(zlen, taper=taper) + r = r.faces(">Z").wires().toPending().extrude(zlen, taper=level[1]) else: r = r.faces(">Z").wires().toPending().extrude(level) return r diff --git a/tests/test_box.py b/tests/test_box.py index 4341e5a..323ad2e 100644 --- a/tests/test_box.py +++ b/tests/test_box.py @@ -32,19 +32,21 @@ def test_basic_box(): def test_lite_box(): b1 = GridfinityBox(2, 3, 5, lite_style=True) r = b1.render() + if _export_files("box"): + b1.save_step_file(path=EXPORT_STEP_FILE_PATH) assert _almost_same(size_3d(r), (83.5, 125.5, 38.8)) assert _faces_match(r, ">Z", 1) assert _faces_match(r, "Z", 16) assert _edges_match(r, "Z", 1) assert _faces_match(r, "Z", 1) assert _faces_match(r, "Z", 1) assert _faces_match(r, "