Skip to content

Commit 03624aa

Browse files
committed
Adjusted floor/lip height geometry to exact 7.00mm intervals. new release v.0.5.2
1 parent f044fb1 commit 03624aa

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
- v.0.4.5 - IMPORTANT FIX: fixes error in v.0.4.4 for extrusion angle
1616
- v.0.5.0 - Improved rugged box to make viable boxes down to 3U x 3U x 4U
1717
- v.0.5.1 - Increased the resolution of the gridfinity extruded base profile
18+
- v.0.5.2 - Adjusted geometry of box/bin floor/lip heights to exactly 7.00 mm intervals

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ b1.save_step_file()
602602
- v.0.4.5 - IMPORTANT FIX: fixes error in v.0.4.4 for extrusion angle
603603
- v.0.5.0 - Improved rugged box to make viable boxes down to 3U x 3U x 4U
604604
- v.0.5.1 - Increased the resolution of the gridfinity extruded base profile
605+
- v.0.5.2 - Adjusted geometry of box/bin floor/lip heights to exactly 7.00 mm intervals
605606

606607
# References
607608

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.5.1'
7+
__version__ = '0.5.2'
88
# fmt: on
99

1010
VERSION = __project__ + "-" + __version__

cqgridfinity/constants.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141

4242
GR_RAD = 4
4343
GR_BASE_HEIGHT = 5
44+
45+
GR_BASE_PRO_H = 4.75
4446
GR_BASE_CHAMF_H = 0.98994949 / SQRT2
4547
GR_STR_H = 1.8
4648
GR_BASE_TOP_CHAMF = GR_BASE_HEIGHT - GR_BASE_CHAMF_H - GR_STR_H
@@ -61,14 +63,14 @@
6163
GR_HOLE_DIST = 26 / 2
6264
GR_HOLE_SLICE = 0.25
6365

64-
GR_BOT_H = 7.2
66+
GR_BOT_H = 7
6567
GR_FILLET = 1.2
66-
GR_FLOOR = GR_BOT_H - GR_BASE_HEIGHT
68+
GR_FLOOR = GR_BOT_H - GR_BASE_PRO_H
6769
GR_LITE_FLOOR = GR_FLOOR - GR_WALL
68-
GR_LITE_H = GR_LITE_FLOOR - GR_BASE_HEIGHT
70+
GR_LITE_H = GR_LITE_FLOOR - GR_BASE_PRO_H
6971

7072
GR_BOX_CHAMF_H = 1.1313708 / SQRT2
71-
GR_BOX_TOP_CHAMF = GR_BASE_HEIGHT - GR_BOX_CHAMF_H - GR_STR_H
73+
GR_BOX_TOP_CHAMF = GR_BASE_PRO_H - GR_BOX_CHAMF_H - GR_STR_H
7274
GR_TOL = 0.5
7375

7476
GR_UNDER_H = 1.6

cqgridfinity/gf_box.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ def render(self):
140140
if not self.labels and (self.width_div or self.length_div):
141141
bs = VerticalEdgeSelector(
142142
GR_TOPSIDE_H, tolerance=0.05
143-
) & HasZCoordinateSelector(GRHU * self.height_u - GR_BASE_HEIGHT)
143+
) & HasZCoordinateSelector(GRHU * self.height_u - GR_BASE_PRO_H)
144144
r = self.safe_fillet(r, bs, 1.0)
145145
if self.holes:
146146
r = self.render_holes(r)
147-
r = r.translate((-self.half_l, -self.half_w, GR_BASE_HEIGHT))
147+
r = r.translate((-self.half_l, -self.half_w, GR_BASE_PRO_H))
148148
if self.unsupported_holes:
149149
r = self.render_hole_fillers(r)
150150
return r
@@ -232,10 +232,10 @@ def mask_with_obj(self, obj):
232232
return obj.intersect(self.solid_shell())
233233

234234
def base_interior(self):
235-
profile = [GR_BASE_HEIGHT, *GR_BOX_PROFILE]
236-
zo = GR_BASE_HEIGHT
235+
profile = [GR_BASE_PRO_H, *GR_BOX_PROFILE]
236+
zo = GR_BASE_PRO_H
237237
if self.int_height < 0:
238-
h = self.box_height - GR_BASE_HEIGHT
238+
h = self.box_height - GR_BASE_PRO_H
239239
profile = [h, *profile]
240240
zo += h
241241
r = self.extrude_profile(
@@ -263,7 +263,7 @@ def render_shell(self, as_solid=False):
263263
rc = (
264264
cq.Workplane("XY")
265265
.placeSketch(rs)
266-
.extrude(-GR_BASE_HEIGHT - 1)
266+
.extrude(-GR_BASE_PRO_H - 1)
267267
.translate((*self.half_dim, 0.5))
268268
)
269269
rc = rc.intersect(r).union(rw)

cqgridfinity/gf_obj.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ def height(self):
8181

8282
@property
8383
def box_height(self):
84-
return self.height - GR_BASE_HEIGHT
84+
return self.height - GR_BASE_PRO_H
8585

8686
@property
8787
def int_height(self):
8888
h = self.height - GR_LIP_H - GR_BOT_H
8989
if self.lite_style:
90-
return h + GR_LITE_FLOOR
90+
return h + self.wall_th
9191
return h
9292

9393
@property

tests/test_box.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_empty_box():
5353
assert _edges_match(r, ">Z", 16)
5454
assert _edges_match(r, "<Z", 72)
5555
assert b1.filename() == "gf_box_2x3x5_holes"
56-
assert _almost_same(b1.top_ref_height, 7.2)
56+
assert _almost_same(b1.top_ref_height, 7)
5757

5858

5959
def test_solid_box():
@@ -71,7 +71,7 @@ def test_solid_box():
7171
assert b1.filename() == "gf_box_4x2x3_solid"
7272
assert _almost_same(b1.top_ref_height, 21)
7373
b1.solid_ratio = 0.5
74-
assert _almost_same(b1.top_ref_height, 14.1)
74+
assert _almost_same(b1.top_ref_height, 14)
7575

7676

7777
def test_divided_box():

0 commit comments

Comments
 (0)