From 2f358075e687fec168f71a2f7e178e1e023b961f Mon Sep 17 00:00:00 2001 From: ede1998 Date: Sat, 29 Aug 2026 21:53:45 +0200 Subject: [PATCH] model nfc reader --- model/common.scad | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/model/common.scad b/model/common.scad index 32802a4..415da32 100644 --- a/model/common.scad +++ b/model/common.scad @@ -163,3 +163,39 @@ module micro_controller(battery_holder = false, battery = false) { } } } + +module nfc(pin_header = true) { + length = 43; + width = 40.5; + height = 4; + + pin_protrusion = 2.2; + + hole_diameter = 3; + hole_inset = 6; + + x_span = length - (2 * hole_inset) - hole_diameter; + y_span = width - (2 * hole_inset) - hole_diameter; + + color("red") + difference() { + cuboid([length, width, height], rounding=2, edges="Z") { + // pin header is lower than highest other component -> in the cube. + if (pin_header) + right(6 - pin_protrusion) // ugly: 6mm is the pin height + position(LEFT + TOP) + yrot(-90) + pin_header(7, spin=90, anchor=FRONT + TOP); + } + + move_copies( + [ + [x_span / 2, -y_span / 2], // Bottom-Left corner + [-x_span / 2, y_span / 2], // Top-Right corner + ] + ) { + zcyl(d=hole_diameter, h=height + EPS); + } + } +} +