m
This commit is contained in:
+20
-7
@@ -47,14 +47,22 @@ module pcie_riser_holder(
|
||||
total_length = hole_position_4 + (margin_x * 2);
|
||||
total_width = holder_width;
|
||||
|
||||
// Extension parameters for negative y direction
|
||||
extension_from_holes = 42; // 40mm extension in negative y direction from holes
|
||||
hole_y_position = total_width/2; // Current hole y position
|
||||
|
||||
// New total width includes original width plus extension
|
||||
extended_total_width = total_width + extension_from_holes;
|
||||
|
||||
// Main holder body
|
||||
difference() {
|
||||
// Create the main rectangular plane
|
||||
cube([total_length, total_width, thickness]);
|
||||
// Create the main rectangular plane, translated to accommodate extension
|
||||
translate([0, -extension_from_holes, 0])
|
||||
cube([total_length, extended_total_width, thickness]);
|
||||
|
||||
// Create M3 holes
|
||||
// Create M3 holes (position unchanged relative to original rectangle)
|
||||
for (i = [0 : len(hole_positions) - 1]) {
|
||||
translate([margin_x + hole_positions[i], total_width/2, -cylinder_overlap])
|
||||
translate([margin_x + hole_positions[i], hole_y_position, -cylinder_overlap])
|
||||
cylinder(
|
||||
h = thickness + (cylinder_overlap * 2),
|
||||
d = hole_diameter,
|
||||
@@ -66,7 +74,7 @@ module pcie_riser_holder(
|
||||
// Optional preview holes for reference
|
||||
if (show_preview_holes) {
|
||||
for (i = [0 : len(hole_positions) - 1]) {
|
||||
translate([margin_x + hole_positions[i], total_width/2, thickness])
|
||||
translate([margin_x + hole_positions[i], hole_y_position, thickness])
|
||||
cylinder(
|
||||
h = preview_cylinder_height,
|
||||
d = preview_cylinder_diameter,
|
||||
@@ -77,9 +85,14 @@ module pcie_riser_holder(
|
||||
|
||||
// Display specifications
|
||||
echo("=== PCIe Riser Holder Specifications ===");
|
||||
echo(str("Total dimensions: ", total_length, "mm x ", total_width, "mm x ", thickness, "mm"));
|
||||
echo(str("Total dimensions: ", total_length, "mm x ", extended_total_width, "mm x ", thickness, "mm"));
|
||||
echo(str("Extension: 40mm in negative y direction from holes"));
|
||||
echo(str("Hole spacing: ", first_spacing, "mm, ", second_spacing, "mm, ", third_spacing, "mm"));
|
||||
echo(str("Hole positions: ", hole_positions));
|
||||
echo(str("Hole diameter: ", hole_diameter, "mm (for M3 bolts)"));
|
||||
echo("=== End Specifications ===");
|
||||
}
|
||||
}
|
||||
|
||||
// === Test the holder ===
|
||||
// Default holder
|
||||
pcie_riser_holder();
|
||||
|
||||
Reference in New Issue
Block a user