Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CQGI shims and the PartCAD config #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cqgridfinity/gf_baseplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class GridfinityBaseplate(GridfinityObject):
Zach Freedman. As such, it does not include features such as mounting
holes, magnet holes, weight slots, etc.
length_u - length in U (42 mm / U)
width_y - width in U (42 mm / U)
width_u - width in U (42 mm / U)
ext_depth - extrude bottom face by an extra amount in mm
straight_bottom - remove bottom chamfer and replace with straight side
corner_screws - add countersink mounting screws to the inside corners
Expand Down
107 changes: 107 additions & 0 deletions cqgridfinity/shims/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# /pub/storage/workspace/gridfinity

Created by Zach Freedman as a versatile system of modular organization and storage modules.

This package defines the basic building blocks of the Gridfinity system.
Make use of the parameters to customize the parts to your needs.


## Parts

### baseplate
<table><tr>
<td valign=top><a href="cqgridfinity/shims/cqgi_gf_baseplate.py"><img src="../../cqgridfinity/shims/baseplate.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Parameters:<br/><ul>
<li>length_u: 2</li>
<li>width_u: 2</li>
<li>ext_depth: 0.0</li>
<li>straight_bottom: False</li>
<li>corner_screws: False</li>
<li>corner_tab_size: 21.0</li>
<li>csk_hole: 5.0</li>
<li>csk_diam: 10.0</li>
<li>csk_angle: 82.0</li>
</ul>
</td>
</tr></table>

### box
<table><tr>
<td valign=top><a href="cqgridfinity/shims/cqgi_gf_box.py"><img src="../../cqgridfinity/shims/box.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Parameters:<br/><ul>
<li>length_u: 2</li>
<li>width_u: 2</li>
<li>height_u: 2</li>
<li>length_div: 0.0</li>
<li>width_div: 0.0</li>
<li>scoops: False</li>
<li>labels: False</li>
<li>solid: False</li>
<li>holes: False</li>
<li>no_lip: False</li>
<li>solid_ratio: 1.0</li>
<li>lite_style: False</li>
<li>unsupported_holes: False</li>
<li>label_width: 12.0</li>
<li>label_height: 10.0</li>
<li>label_lip_height: 0.8</li>
<li>scoop_rad: 12.0</li>
<li>fillet_interior: True</li>
<li>wall_th: 1.0</li>
</ul>
</td>
</tr></table>

### drawerspacer
<table><tr>
<td valign=top><a href="cqgridfinity/shims/cqgi_gf_drawerspacer.py"><img src="../../cqgridfinity/shims/drawerspacer.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Parameters:<br/><ul>
<li>length_u: 2</li>
<li>width_u: 2</li>
<li>length_th: 10.0</li>
<li>width_th: 10.0</li>
<li>thickness: 5.0</li>
<li>chamf_rad: 1.0</li>
<li>show_arrows: True</li>
<li>arrow_h: 0.8</li>
<li>length_fill: 0.0</li>
<li>width_fill: 0.0</li>
<li>align_features: True</li>
<li>align_l: 16.0</li>
<li>align_tol: 0.15</li>
<li>align_min: 8.0</li>
<li>min_margin: 4.0</li>
<li>tolerance: 0.5</li>
</ul>
</td>
</tr></table>

### ruggedbox
<table><tr>
<td valign=top><a href="cqgridfinity/shims/cqgi_gf_ruggedbox.py"><img src="../../cqgridfinity/shims/ruggedbox.svg" style="width: auto; height: auto; max-width: 200px; max-height: 200px;"></a></td>
<td valign=top>Parameters:<br/><ul>
<li>length_u: 4</li>
<li>width_u: 4</li>
<li>height_u: 4</li>
<li>lid_height: 10.0</li>
<li>wall_vgrooves: True</li>
<li>front_handle: True</li>
<li>stackable: True</li>
<li>side_clasps: True</li>
<li>lid_baseplate: True</li>
<li>inside_baseplate: True</li>
<li>side_handles: True</li>
<li>front_label: True</li>
<li>label_length: 0.0</li>
<li>label_height: 0.0</li>
<li>label_th: 0.5</li>
<li>back_feet: True</li>
<li>hinge_width: 48.0</li>
<li>hinge_bolted: False</li>
</ul>
</td>
</tr></table>

<br/><br/>

*Generated by [PartCAD](https://partcad.org/)*
176 changes: 176 additions & 0 deletions cqgridfinity/shims/baseplate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
178 changes: 178 additions & 0 deletions cqgridfinity/shims/box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions cqgridfinity/shims/cqgi_gf_baseplate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import sys
sys.path.append(".") # Relative to `partcad.yaml`

from cqgridfinity.gf_baseplate import GridfinityBaseplate

length_u = 2
width_u = 2
ext_depth = 0.0
straight_bottom = False
corner_screws = False
corner_tab_size = 21
csk_hole = 5.0
csk_diam = 10.0
csk_angle = 82

result = GridfinityBaseplate(
length_u=int(length_u),
width_u=int(width_u),
ext_depth=ext_depth,
straight_bottom=straight_bottom,
corner_screws=corner_screws,
corner_tab_size=corner_tab_size,
csk_hole=csk_hole,
csk_diam=csk_diam,
csk_angle=csk_angle,
).render().val()

show_object(result)
48 changes: 48 additions & 0 deletions cqgridfinity/shims/cqgi_gf_box.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import sys
sys.path.append(".") # Relative to `partcad.yaml`

from cqgridfinity.gf_box import GridfinityBox

length_u = 2
width_u = 2
height_u = 2
length_div = 0.0
width_div = 0.0
scoops = False
labels = False
solid = False
holes = False
no_lip = False
solid_ratio = 1.0
lite_style = False
unsupported_holes = False
label_width = 12.0 # width of the label strip
label_height = 10.0 # thickness of label overhang
label_lip_height = 0.8 # thickness of label vertical lip
scoop_rad = 12.0 # radius of optional interior scoops
fillet_interior = True
wall_th = 1.0

result = GridfinityBox(
length_u=int(length_u),
width_u=int(width_u),
height_u=int(height_u),
length_div=length_div,
width_div=width_div,
scoops=scoops,
labels=labels,
solid=solid,
holes=holes,
no_lip=no_lip,
solid_ratio=solid_ratio,
lite_style=lite_style,
unsupported_holes=unsupported_holes,
label_width=label_width,
label_height=label_height,
label_lip_height=label_lip_height,
scoop_rad=scoop_rad,
fillet_interior=fillet_interior,
wall_th=wall_th,
).render().val()

show_object(result)
42 changes: 42 additions & 0 deletions cqgridfinity/shims/cqgi_gf_drawerspacer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import sys
sys.path.append(".") # Relative to `partcad.yaml`

from cqgridfinity.gf_drawer import GridfinityDrawerSpacer

length_u = 2
width_u = 2
length_th = 10.0
width_th = 10.0
thickness = 5.0
chamf_rad = 1.0
show_arrows = True
arrow_h = 0.8
length_fill = 0.0
width_fill = 0.0
align_features = True
align_l = 16.0
align_tol = 0.15
align_min = 8.0
min_margin = 4.0
tolerance = 0.5

result = GridfinityDrawerSpacer(
length_u=int(length_u),
width_u=int(width_u),
length_th=length_th,
width_th=width_th,
thickness=thickness,
chamf_rad=chamf_rad,
show_arrows=show_arrows,
arrow_h=arrow_h,
length_fill=length_fill,
width_fill=width_fill,
align_features=align_features,
align_l=align_l,
align_tol=align_tol,
align_min=align_min,
min_margin=min_margin,
tolerance=tolerance,
).render().val()

show_object(result)
56 changes: 56 additions & 0 deletions cqgridfinity/shims/cqgi_gf_ruggedbox.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import sys
sys.path.append(".") # Relative to `partcad.yaml`

from cqgridfinity.gf_ruggedbox import GridfinityRuggedBox

length_u = 4
width_u = 4
height_u = 4
lid_height = 10.0
wall_vgrooves = True
front_handle = True
stackable = True
side_clasps = True
lid_baseplate = True
inside_baseplate = True
side_handles = True
front_label = True
# TODO(clairbee): uncomment the below when annotations are supported by CQGI
# label_length: float = None
# label_height: float = None
label_length = 0.0
label_height = 0.0
if label_length == 0.0:
label_length = None
if label_height == 0.0:
label_height = None

label_th = 0.8
back_feet = True
hinge_width = 48.0
hinge_bolted = False
rib_style = False

result = GridfinityRuggedBox(
length_u=int(length_u),
width_u=int(width_u),
height_u=int(height_u),
lid_height=lid_height,
wall_vgrooves=wall_vgrooves,
front_handle=front_handle,
stackable=stackable,
side_clasps=side_clasps,
lid_baseplate=lid_baseplate,
inside_baseplate=inside_baseplate,
side_handles=side_handles,
front_label=front_label,
label_length=label_length,
label_height=label_height,
label_th=label_th,
back_feet=back_feet,
hinge_width=hinge_width,
hinge_bolted=hinge_bolted,
rib_style=rib_style,
).render().val()

show_object(result)
Loading