{"id":20594981,"url":"https://github.com/hackuarium/laser-cut-box","last_synced_at":"2026-02-17T14:01:49.753Z","repository":{"id":84232737,"uuid":"143561189","full_name":"Hackuarium/laser-cut-box","owner":"Hackuarium","description":"Create a box for a PCB using laser cutting machine","archived":false,"fork":false,"pushed_at":"2023-04-29T19:13:42.000Z","size":8873,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-05T00:43:34.541Z","etag":null,"topics":["box","box2d","box3d","laser-cutting","openscad","pcb","printed-circuit-boards"],"latest_commit_sha":null,"homepage":"https://hackuarium.github.io/laser-cut-box/","language":"OpenSCAD","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hackuarium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-04T20:32:58.000Z","updated_at":"2024-11-28T01:27:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9298c45-61c5-4c73-bbea-2d907cb65005","html_url":"https://github.com/Hackuarium/laser-cut-box","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hackuarium/laser-cut-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flaser-cut-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flaser-cut-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flaser-cut-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flaser-cut-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hackuarium","download_url":"https://codeload.github.com/Hackuarium/laser-cut-box/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackuarium%2Flaser-cut-box/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29546746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T13:00:00.370Z","status":"ssl_error","status_checked_at":"2026-02-17T12:57:14.072Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["box","box2d","box3d","laser-cutting","openscad","pcb","printed-circuit-boards"],"created_at":"2024-11-16T08:11:10.719Z","updated_at":"2026-02-17T14:01:49.723Z","avatar_url":"https://github.com/Hackuarium.png","language":"OpenSCAD","funding_links":[],"categories":[],"sub_categories":[],"readme":"## It's in the box\n\n#### An OpenSCAD project to wrap your PCB in a box\n\nOften we need to create custom boxes to wrap a printed circuit board (PCB) and this\nmay be time consuming.\n\nIn this project based on couple of parameters you can quickly and efficiently create DXF files that after laser cutting will provide the different elements to create the box. You may cut any number of holes (round or rectangle) on all the faces of the box and the coordinates will always be relative to the (0,0) that is the bottom left of the PCB.\n\nCoordinates [x,y] of holes corresponds to the center.\n\nYou can render the box as a 3D image\n\n\u003cimg src=\"docs/box.png\"\u003e\n\nAnd you can also export easily as a SVG of DXF file for laser cutting.\n\n\u003cimg src=\"docs/box.svg\"\u003e\n\n## How to use it\n\nDownload OpenSCAD and open the file 'testBox.scad'.\n\nThe comments in the file should be clear enough to use this code.\n\n## Exporting as DXF\n\nYou should change the following parameters before generating DXF:\n\n- showLabels = false\n- 3d = false\n\nYou may then render the image and export as DXF.\n\n## Code example\n\n```js\n$fn=40;\n\nuse \u003cpcbbox/pcb.scad\u003e;\n\npcb(\n    length=100,         // length of the PCB\n    width=80,           // width of the PCB\n    padding=1,          // space around the pcb (between pcb and box)\n    thickness=3,        // thickness of the material to create the box\n    pcbThickness=1.6,   // thickness of the box\n    topToTop=20,        // distance from the top of the PCB to the external top of the box\n    bottomToBottom=40,  // distance from the bottom of the PCB to the external bottom of the box\n    extend=[10,10,0,0,0,0],          // should top and bottom 'extend' in order to assemble the box without glue\n    screws=[            // position of holes to fix the PCB\n        [5,5],\n        [10,70],\n        [85,15],\n        [80,60]\n    ],\n    screwDiameter=3,    // diameter of the screws to fix the PCB\n    topHoles=[          // holes to put on the top of the box\n        [20,20,30,10]   // 0,0 is the bottom left of the PCB\n    ],\n    bottomHoles=[       // holes to put on the bottom of the box\n        [40,40,10],     // array witlh 3 parameters = a circle [x,y,diameter]\n        [20,20,5,5]     // array with 4 parameters = a rectangle [x,y,width,depth]\n    ],\n    frontHoles=[        // holes in front of the box, over the PCB\n        [20, 2.5, 5],\n        [40,5,10,10]\n    ],\n    frontHolesB=[       // holes in front of the box, under the PCB\n        [20,2.5,5],\n        [40,5,10,10]\n    ],\n    backHoles=[         // holes in the back of the box, over the PCB\n        [20,2.5,5],\n        [40,5,10,10]\n    ],\n    backHolesB=[        // holes in front of the box, under the PCB\n        [20,2.5,5],\n        [40,5,10,10]\n    ],\n    leftHoles=[         // holes on the left of the box, over the PCB\n        [20,2.5,5],\n        [40,5,10,10]\n    ],\n    leftHolesB=[        // holes on the left of the box, under the PCB\n        [20,2.5,5],\n        [40,5,10,10]\n    ],\n    rightHoles=[        // holes on the right of the box, over the PCB\n        [20,2.5,5],\n        [40,5,10,10]\n    ],\n    rightHolesB=[       // holes on the right of the box, under the PCB\n        [20,2.5,5],\n        [40,5,10,10]\n    ],\n    showLabels=true,    //should we show the labels\n    labelsSize=10,      // size of the labels\n    3d=true             // 3d rendering or just 2d ?\n);\n```\n\n## Screwing the PCB\n\nWe recently often use black nylon M3 screw, standoff and spacer.\n\nIn order to fix the PCB we have the following sequence:\n\n- M3 screw\n- top of the case\n- column standoff female spacer\n- PCB\n- column standoff male spacer\n- bottom of the case\n- M3 screw (we take 40 mm screws that we cut if needed)\n\n\u003cimg src=\"docs/nylon.jpg\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackuarium%2Flaser-cut-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackuarium%2Flaser-cut-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackuarium%2Flaser-cut-box/lists"}