-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,291 @@ | ||||||
| rack_width = 254.0; // [ 254.0:10 inch, 152.4:6 inch] | ||||||
| rack_height = 1.0; // [0.5:0.5:5] | ||||||
| half_height_holes = true; // [true:Show partial holes at edges, false:Hide partial holes] | ||||||
| print_orientation = true; // [true: Place on printbed, false: Facing forward] | ||||||
| ribs = true; // [true:Show structural ribs, false:Hide structural ribs] | ||||||
|
|
||||||
| /* [Storage Configuration] */ | ||||||
| enable_storage = true; | ||||||
| usb_slots = 6; | ||||||
| sd_slots = 4; | ||||||
| microsd_slots = 12; | ||||||
|
|
||||||
| /* [Storage Arrangement] */ | ||||||
| // Assign unique positions for each group | ||||||
| usb_pos = 1; // [1:Left, 2:Middle, 3:Right] | ||||||
| sd_pos = 2; // [1:Left, 2:Middle, 3:Right] | ||||||
| microsd_pos = 3; // [1:Left, 2:Middle, 3:Right] | ||||||
|
|
||||||
| /* [Efficiency & Safety] */ | ||||||
| stack_microsd = true; | ||||||
| stack_usb = true; | ||||||
| slot_spacing = 3.0; | ||||||
| stack_gap = 4.0; | ||||||
| // Distance between the main groups (USB group vs SD group) | ||||||
| group_gap = 6.0; | ||||||
|
|
||||||
| // Enable stops to prevent devices falling through? | ||||||
| sd_stop = true; | ||||||
| microsd_stop = true; | ||||||
| usb_stop = true; | ||||||
|
|
||||||
| /* [Hidden] */ | ||||||
| height = 44.45 * rack_height; | ||||||
| front_thickness = 3.0; | ||||||
| corner_radius = 4.0; | ||||||
| tolerance = 0.42; | ||||||
|
|
||||||
| // --- Device Physical Dimensions --- | ||||||
| usb_w = 5.2; usb_h = 13.5; | ||||||
| sd_w = 2.6; sd_h = 25.0; | ||||||
| msd_w = 1.4; msd_h = 11.5; | ||||||
|
|
||||||
| // --- Stop Depths --- | ||||||
| depth_sd_stop = 27.0; | ||||||
| depth_msd_stop = 12.0; | ||||||
| depth_usb_stop = 14.0; | ||||||
| default_pass_through = 10.0; | ||||||
|
|
||||||
| // Rib parameters | ||||||
| rib_thickness = 2.0; | ||||||
| rib_depth = 3.0; | ||||||
| chamfer_size = 0.5; | ||||||
|
|
||||||
| module plate_generator() { | ||||||
| $fn = 64; | ||||||
|
|
||||||
| module capsule_slot_2d(L, H) { | ||||||
| hull() { | ||||||
| translate([-L/2 + H/2, 0]) circle(r=H/2); | ||||||
| translate([L/2 - H/2, 0]) circle(r=H/2); | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| module rounded_rect_2d(w, h, r) { | ||||||
| hull() { | ||||||
| translate([r, r]) circle(r=r); | ||||||
| translate([w-r, r]) circle(r=r); | ||||||
| translate([w-r, h-r]) circle(r=r); | ||||||
| translate([r, h-r]) circle(r=r); | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| module chamfered_rib(width, thickness, depth, chamfer) { | ||||||
| difference() { | ||||||
| cube([width, thickness, 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]) | ||||||
|
||||||
| translate([width - depth + depth, -tolerance, 0]) | |
| translate([width, -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 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.
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.
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.
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.
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.
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 * 2simplifies to-depth, which creates a negative X translation. This will incorrectly position the chamfer cube. Consider replacing with the intended expression, likely just-depthor adjusting the calculation based on the desired geometry.