-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add USB-SD-microSD-Plate #19
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new parametric OpenSCAD script for generating customizable USB/SD/microSD storage rack plates with standard rack mounting holes. The design supports configurable rack dimensions (10" or 6" width), flexible storage slot arrangements with three positioning zones (left/middle/right), and optional structural reinforcement ribs.
Key Changes:
- Adds complete plate generation system with rounded corners and mounting holes
- Implements configurable storage slots with stacking options and safety stops
- Includes structural rib support with chamfered edges for rack mounting compatibility
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| module chamfered_rib(width, thickness, depth, chamfer) { | ||
| difference() { | ||
| cube([width, thickness, depth]); | ||
| translate([depth - depth * 2, -tolerance, depth]) |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expression depth - depth * 2 simplifies to -depth, which creates a negative X translation. This will incorrectly position the chamfer cube. Consider replacing with the intended expression, likely just -depth or adjusting the calculation based on the desired geometry.
| translate([depth - depth * 2, -tolerance, depth]) | |
| translate([-depth, -tolerance, depth]) |
| translate([depth - depth * 2, -tolerance, depth]) | ||
| rotate([0, 45, 0]) | ||
| cube([depth * 1.5, thickness + 2*tolerance, depth * 1.5]); | ||
| translate([width - depth + depth, -tolerance, 0]) |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expression width - depth + depth simplifies to just width, making the -depth + depth portion redundant. This should be simplified to translate([width, -tolerance, 0]) or corrected if a different offset was intended.
| translate([width - depth + depth, -tolerance, 0]) | |
| translate([width, -tolerance, 0]) |
| } | ||
|
|
||
| module structural_ribs() { | ||
| usable_width = (rack_width == 152.4) ? 120.65 * 0.9 : 221.5 * 0.9; |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic numbers for rack specifications are scattered across multiple functions. Consider extracting these values into named constants at the top of the file (e.g., rack_6inch_usable_width, rack_10inch_hole_spacing) to improve maintainability and reduce duplication.
| hole_spacing_x = (rack_width == 152.4) ? 136.526 : 236.525; | ||
| hole_left_x = (rack_width - hole_spacing_x) / 2; | ||
| hole_right_x = (rack_width + hole_spacing_x) / 2; | ||
| slot_len = (rack_width == 152.4) ? 6.5 : 10.0; | ||
| slot_height = (rack_width == 152.4) ? 3.25 : 7.0; |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic numbers for rack specifications are scattered across multiple functions. Consider extracting these values into named constants at the top of the file (e.g., rack_6inch_usable_width, rack_10inch_hole_spacing) to improve maintainability and reduce duplication.
| translate([x_pos, y_pos, -1]) | ||
| cube([usb_w, usb_h, front_thickness + this_cut_depth]); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number -1 for Z-position is duplicated across all storage cut functions. Consider extracting this into a named constant (e.g., cut_z_offset = -1) to clarify its purpose and enable easier adjustment.
| translate([x_pos, center_y - sd_h/2, -1]) | ||
| cube([sd_w, sd_h, front_thickness + this_cut_depth]); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number -1 for Z-position is duplicated across all storage cut functions. Consider extracting this into a named constant (e.g., cut_z_offset = -1) to clarify its purpose and enable easier adjustment.
| translate([x_pos, y_pos, -1]) | ||
| cube([msd_w, msd_h, front_thickness + this_cut_depth]); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number -1 for Z-position is duplicated across all storage cut functions. Consider extracting this into a named constant (e.g., cut_z_offset = -1) to clarify its purpose and enable easier adjustment.
This pull request adds a configurable OpenSCAD script for generating a customizable USB/SD/microSD rack plate.
The new script introduces parameters for rack dimensions, slot arrangements, safety features, and structural elements, enabling flexible design for 3D printing or fabrication.
Test it out on the OpenSCAD Playground