update socket

This commit is contained in:
2026-08-27 07:31:30 -07:00
parent e0296ffd26
commit a6e7f27bee
16 changed files with 29802 additions and 29756 deletions
+33 -21
View File
@@ -1,8 +1,8 @@
/*
* Parametric copy-stand base for a Bambu Lab X2D.
* Service coordinates: X left-to-right, Y rear-to-front, Z bottom-to-top.
* The grid origin is at plate Y=datum_y. The socket's straight front edge is
* 0.5 inch forward of that origin and remains a convenient reference face.
* The grid origin is at plate Y=datum_y. The socket flange's straight front
* edge is 0.5 inch forward of that origin, while the rail front face is at 0.
*/
/* [Output] */
@@ -50,7 +50,10 @@ socket_capture = 50;
socket_front_y = grid_pitch / 2;
socket_rear_y = -datum_y;
socket_flange_size = [110, socket_front_y - socket_rear_y, 10];
socket_key_size = [52, 22, 6];
socket_rail_front_y = 0;
socket_key_axis_y = -0.05; // Fixed to the existing base locator slot.
socket_key_bottom_clearance = 0.2;
socket_key_size = [52, 22, plate_height - socket_key_bottom_clearance];
socket_key_clearance = 0.25;
socket_side_wall = 6;
socket_end_wall = 2.7;
@@ -88,7 +91,10 @@ assert(socket_gusset_outer_x
< socket_mount_x - socket_mount_tool_diameter / 2,
"Socket gusset enters a flange-screw tool-access envelope");
assert(socket_front_y == grid_pitch / 2,
"Socket reference face must remain at the half-inch grid coordinate");
"Socket flange reference face must remain at the half-inch grid coordinate");
assert(socket_rail_axis_y() + (rail_size + 2 * rail_clearance) / 2
== socket_rail_front_y,
"Rail front face must remain at the grid origin");
assert(socket_rear_y == -datum_y,
"Socket flange must reach the rear edge of the base");
assert(socket_mount_x + socket_mount_tool_diameter / 2
@@ -99,7 +105,7 @@ assert(socket_mount_ys[0] - socket_mount_tool_diameter / 2
&& socket_mount_ys[len(socket_mount_ys) - 1]
+ socket_mount_tool_diameter / 2 <= socket_front_y,
"Socket washer envelope exceeds the flange depth");
assert(socket_rail_axis_y() + socket_key_size[1] / 2
assert(socket_key_axis_y + socket_key_size[1] / 2
+ socket_key_clearance
< grid_pitch - insert_boss_diameter / 2,
"Socket key slot overlaps the first grid-row insert bosses");
@@ -107,8 +113,8 @@ assert(socket_mount_ys[len(socket_mount_ys) - 1]
+ insert_boss_diameter / 2
< grid_pitch - insert_boss_diameter / 2,
"Socket mounting bosses overlap the first grid-row bosses");
assert(socket_key_size[2] < plate_height,
"Socket tongue must stop above the base underside");
assert(socket_key_size[2] == plate_height - socket_key_bottom_clearance,
"Socket tongue must leave 0.2 mm clearance above the base underside");
grid_xs = [for (i = [0 : grid_columns - 1])
plate_width / 2 + (i - (grid_columns - 1) / 2) * grid_pitch];
@@ -225,7 +231,7 @@ module insert_pattern_2d(diameter) {
}
module socket_key_2d(clearance = 0) {
translate([plate_width / 2, datum_y + socket_rail_axis_y()])
translate([plate_width / 2, datum_y + socket_key_axis_y])
rounded_rect_2d(
[socket_key_size[0] + 2 * clearance,
socket_key_size[1] + 2 * clearance],
@@ -326,26 +332,30 @@ module socket_flange_2d() {
function socket_outer_y() = rail_size + 2 * rail_clearance
+ 2 * socket_end_wall;
function socket_rail_axis_y() = socket_front_y - socket_outer_y() / 2;
function socket_rail_axis_y() = socket_rail_front_y
- (rail_size + 2 * rail_clearance) / 2;
module socket_key_local_2d() {
translate([0, socket_rail_axis_y()])
translate([0, socket_key_axis_y])
rounded_rect_2d([socket_key_size[0], socket_key_size[1]], 2);
}
module socket_gusset(side = 1) {
cavity = rail_size + 2 * rail_clearance;
collar_half_x = (cavity + 2 * socket_side_wall) / 2;
collar_y_min = socket_rail_axis_y() - socket_outer_y() / 2;
collar_y_depth = socket_outer_y();
near_x = side > 0 ? collar_half_x : -collar_half_x - 2;
outer_x = side > 0 ? socket_gusset_outer_x - 2
: -socket_gusset_outer_x;
gusset_depth = socket_gusset_y_span[1] - socket_gusset_y_span[0];
// Broad buttress with a short outer reach. Tool-access bores below remove
// any material that could obstruct either family of fasteners.
// The full-height attachment follows the collar's front and rear edges,
// while the low outer footprint retains the proven flange support area.
// Tool-access bores below remove material around both fastener families.
hull() {
translate([near_x, socket_gusset_y_span[0], socket_flange_size[2]])
cube([2, gusset_depth, socket_gusset_height]);
translate([near_x, collar_y_min, socket_flange_size[2]])
cube([2, collar_y_depth, socket_gusset_height]);
translate([outer_x, socket_gusset_y_span[0], socket_flange_size[2]])
cube([2, gusset_depth, 2]);
}
@@ -360,7 +370,7 @@ module socket_positive() {
linear_extrude(height = socket_key_size[2] + eps)
socket_key_local_2d();
linear_extrude(height = socket_flange_size[2]) socket_flange_2d();
translate([-outer_x / 2, socket_front_y - outer_y,
translate([-outer_x / 2, socket_rail_axis_y() - outer_y / 2,
socket_flange_size[2]])
cube([outer_x, outer_y, socket_capture]);
socket_gusset(-1);
@@ -462,12 +472,13 @@ coupon_rail_y = 23;
coupon_fit_center = [82.5, 90];
coupon_fit_outer = [64, 34];
coupon_fit_height = 6;
coupon_key_depth = 6;
coupon_key_center = [200, 90];
coupon_key_cap = [56, 26, 2];
coupon_key_handle = [40, 6, 8];
assert(coupon_fit_height == socket_key_size[2],
"Coupon socket depth must match the production tongue");
assert(coupon_fit_height == coupon_key_depth,
"Coupon socket and tongue gauges must have matching depths");
assert(len(coupon_rail_gaps) == len(coupon_rail_xs),
"Each rail gauge must have one layout position");
assert(len([for (gap = coupon_rail_gaps)
@@ -558,17 +569,18 @@ module coupon_key() {
// Separate full-size tongue. A 45-degree stop shoulder remains
// support-free, and the vertical rib provides a grip for removal.
translate([coupon_key_center[0], coupon_key_center[1], 0]) {
rounded_prism(socket_key_size, 2);
rounded_prism(
[socket_key_size[0], socket_key_size[1], coupon_key_depth], 2);
hull() {
translate([0, 0, socket_key_size[2] - eps])
translate([0, 0, coupon_key_depth - eps])
rounded_prism(
[socket_key_size[0], socket_key_size[1], eps], 2);
translate([0, 0,
socket_key_size[2] + coupon_key_cap[2] - eps])
coupon_key_depth + coupon_key_cap[2] - eps])
rounded_prism(
[coupon_key_cap[0], coupon_key_cap[1], eps], 3);
}
translate([0, 0, socket_key_size[2] + coupon_key_cap[2] - eps])
translate([0, 0, coupon_key_depth + coupon_key_cap[2] - eps])
rounded_prism(
[coupon_key_handle[0], coupon_key_handle[1],
coupon_key_handle[2] + eps],