diff --git a/cqgridfinity/gf_baseplate.py b/cqgridfinity/gf_baseplate.py index dac2819..0a57894 100644 --- a/cqgridfinity/gf_baseplate.py +++ b/cqgridfinity/gf_baseplate.py @@ -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 diff --git a/cqgridfinity/shims/README.md b/cqgridfinity/shims/README.md new file mode 100644 index 0000000..8b4e10e --- /dev/null +++ b/cqgridfinity/shims/README.md @@ -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 + + + +
Parameters:
    +
  • length_u: 2
  • +
  • width_u: 2
  • +
  • ext_depth: 0.0
  • +
  • straight_bottom: False
  • +
  • corner_screws: False
  • +
  • corner_tab_size: 21.0
  • +
  • csk_hole: 5.0
  • +
  • csk_diam: 10.0
  • +
  • csk_angle: 82.0
  • +
+
+ +### box + + + +
Parameters:
    +
  • 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
  • +
  • label_height: 10.0
  • +
  • label_lip_height: 0.8
  • +
  • scoop_rad: 12.0
  • +
  • fillet_interior: True
  • +
  • wall_th: 1.0
  • +
+
+ +### drawerspacer + + + +
Parameters:
    +
  • 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
  • +
+
+ +### ruggedbox + + + +
Parameters:
    +
  • 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
  • +
  • label_length: 0.0
  • +
  • label_height: 0.0
  • +
  • label_th: 0.5
  • +
  • back_feet: True
  • +
  • hinge_width: 48.0
  • +
  • hinge_bolted: False
  • +
+
+ +

+ +*Generated by [PartCAD](https://partcad.org/)* diff --git a/cqgridfinity/shims/baseplate.svg b/cqgridfinity/shims/baseplate.svg new file mode 100644 index 0000000..de6a7cf --- /dev/null +++ b/cqgridfinity/shims/baseplate.svg @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cqgridfinity/shims/box.svg b/cqgridfinity/shims/box.svg new file mode 100644 index 0000000..e30dd69 --- /dev/null +++ b/cqgridfinity/shims/box.svg @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cqgridfinity/shims/cqgi_gf_baseplate.py b/cqgridfinity/shims/cqgi_gf_baseplate.py new file mode 100644 index 0000000..f887c9b --- /dev/null +++ b/cqgridfinity/shims/cqgi_gf_baseplate.py @@ -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) \ No newline at end of file diff --git a/cqgridfinity/shims/cqgi_gf_box.py b/cqgridfinity/shims/cqgi_gf_box.py new file mode 100644 index 0000000..f1d67cd --- /dev/null +++ b/cqgridfinity/shims/cqgi_gf_box.py @@ -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) \ No newline at end of file diff --git a/cqgridfinity/shims/cqgi_gf_drawerspacer.py b/cqgridfinity/shims/cqgi_gf_drawerspacer.py new file mode 100644 index 0000000..f38b0b7 --- /dev/null +++ b/cqgridfinity/shims/cqgi_gf_drawerspacer.py @@ -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) \ No newline at end of file diff --git a/cqgridfinity/shims/cqgi_gf_ruggedbox.py b/cqgridfinity/shims/cqgi_gf_ruggedbox.py new file mode 100644 index 0000000..ce6bed7 --- /dev/null +++ b/cqgridfinity/shims/cqgi_gf_ruggedbox.py @@ -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) \ No newline at end of file diff --git a/cqgridfinity/shims/drawerspacer.svg b/cqgridfinity/shims/drawerspacer.svg new file mode 100644 index 0000000..21f9a95 --- /dev/null +++ b/cqgridfinity/shims/drawerspacer.svg @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cqgridfinity/shims/ruggedbox.svg b/cqgridfinity/shims/ruggedbox.svg new file mode 100644 index 0000000..1f67e7b --- /dev/null +++ b/cqgridfinity/shims/ruggedbox.svg @@ -0,0 +1,2496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/demo1.assy b/examples/demo1.assy new file mode 100644 index 0000000..52c7443 --- /dev/null +++ b/examples/demo1.assy @@ -0,0 +1,12 @@ +# This is a demo of multiple gridfinity parts put together using PartCAD. +# Use `pc show -a examples/demo1` to view it in OCP CAD Viewer or +# use `pc render -t png -a examples/demo1` to render a PNG image of this assembly. +links: + - part: baseplate + name: baseplate + - part: box + name: box + location: [[100, 0, 0], [0, 0, 1], 0] + - part: drawerspacer + name: drawerspacerbox + location: [[-200, 0, 0], [0, 0, 1], 0] diff --git a/partcad.yaml b/partcad.yaml new file mode 100644 index 0000000..8a204f7 --- /dev/null +++ b/partcad.yaml @@ -0,0 +1,240 @@ +partcad: ">=0.7.16" + +name: /pub/storage/workspace/gridfinity +desc: Created by Zach Freedman as a versatile system of modular organization and storage modules. +cover: + part: ruggedbox + +docs: + intro: | + This package defines the basic building blocks of the Gridfinity system. + Make use of the parameters to customize the parts to your needs. + footer: | + ## Implementation notes + + This packages has a folder with PartCAD shims. + This folder contains wrappers for cqgridfinity main Python files + to make them compatible with CadQuery's CQGI interface that is used by PartCAD. + This is a non-intrusive alternative to refactoring cqgridfinity main Python files. + If cqgridfinity adopts CQGI, then these shims can be dropped. + +parts: + baseplate: + type: cadquery + path: cqgridfinity/shims/cqgi_gf_baseplate.py + parameters: + length_u: + type: int + default: 2 + width_u: + type: int + default: 2 + ext_depth: + type: float + default: 0.0 + straight_bottom: + type: bool + default: False + corner_screws: + type: bool + default: False + corner_tab_size: + type: float + default: 21.0 + csk_hole: + type: float + default: 5.0 + csk_diam: + type: float + default: 10.0 + csk_angle: + type: float + default: 82.0 + ruggedbox: + type: cadquery + path: cqgridfinity/shims/cqgi_gf_ruggedbox.py + parameters: + length_u: + type: int + default: 4 + width_u: + type: int + default: 4 + height_u: + type: int + default: 4 + lid_height: + type: float + default: 10.0 + wall_vgrooves: + type: bool + default: True + front_handle: + type: bool + default: True + stackable: + type: bool + default: True + side_clasps: + type: bool + default: True + lid_baseplate: + type: bool + default: True + inside_baseplate: + type: bool + default: True + side_handles: + type: bool + default: True + front_label: + type: bool + default: True + label_length: + type: float + default: 0.0 + label_height: + type: float + default: 0.0 + label_th: + type: float + default: 0.8 + back_feet: + type: bool + default: True + hinge_width: + type: float + default: 48.0 + hinge_bolted: + type: bool + default: False + rib_style: + type: bool + default: False + box: + type: cadquery + path: cqgridfinity/shims/cqgi_gf_box.py + parameters: + length_u: + type: int + default: 2 + width_u: + type: int + default: 2 + height_u: + type: int + default: 2 + length_div: + type: float + default: 0.0 + width_div: + type: float + default: 0.0 + scoops: + type: bool + default: False + labels: + type: bool + default: False + solid: + type: bool + default: False + holes: + type: bool + default: False + no_lip: + type: bool + default: False + solid_ratio: + type: float + default: 1.0 + lite_style: + type: bool + default: False + unsupported_holes: + type: bool + default: False + label_width: + type: float + default: 12.0 # width of the label strip + label_height: + type: float + default: 10.0 # thickness of label overhang + label_lip_height: + type: float + default: 0.8 # thickness of label vertical lip + scoop_rad: + type: float + default: 12.0 # radius of optional interior scoops + fillet_interior: + type: bool + default: True + wall_th: + type: float + default: 1.0 + drawerspacer: + type: cadquery + path: cqgridfinity/shims/cqgi_gf_drawerspacer.py + parameters: + length_u: + type: int + default: 2 + width_u: + type: int + default: 2 + length_th: + type: float + default: 10.0 + width_th: + type: float + default: 10.0 + thickness: + type: float + default: 5.0 + chamf_rad: + type: float + default: 1.0 + show_arrows: + type: bool + default: True + arrow_h: + type: float + default: 0.8 + length_fill: + type: float + default: 0.0 + width_fill: + type: float + default: 0.0 + align_features: + type: bool + default: True + align_l: + type: float + default: 16.0 + align_tol: + type: float + default: 0.15 + align_min: + type: float + default: 8.0 + min_margin: + type: float + default: 4.0 + tolerance: + type: float + default: 0.5 + +assemblies: + examples/demo1: + type: assy + +render: + svg: + prefix: cqgridfinity/shims + exclude: + - assemblies + readme: + path: cqgridfinity/shims/README.md + exclude: + - assemblies