Created
December 28, 2025 14:14
-
-
Save ednisley/49c1930b3f8da462180d70fecd34121c to your computer and use it in GitHub Desktop.
OpenSCAD source code: Belt cover with home switch for Ortur YRC-1 chuck rotary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Ortur Rotary belt cover | |
| // Ed Nisley - KE4ZNU | |
| // 2025-12-23 | |
| include <BOSL2/std.scad> | |
| Layout = "Show"; // [Show,Build,Block,Shell] | |
| /* [Hidden] */ | |
| ID = 0; | |
| OD = 1; | |
| LENGTH = 2; | |
| HoleWindage = 0.2; | |
| Protrusion = 0.1; | |
| NumSides = 2*3*4; | |
| $fn=NumSides; | |
| Gap = 5.0; | |
| WallThick = 1.6; // OEM wall | |
| CoverOA = [81.5,50.5,23.0]; // open side down | |
| CoverRadius = 4.0; | |
| CoverTrimZ = 6.0; | |
| CoverTrimAngle = 45; | |
| BreakX = (CoverOA.z - CoverTrimZ)/tan(CoverTrimAngle); | |
| ScrewOC = [51.0,38.0]; | |
| ScrewHoleID = 3.5; | |
| ScrewHeadRecess = [ScrewHoleID,7.0,1.8]; | |
| ScrewOffset = 8.0; // cover edge to hole centerline | |
| SwitchOA = [21.0,20.0,6.5]; // X = body + roller, excludes terminals | |
| SwitchOffset = [0,0,17.0]; // nominal end = roller at centerline | |
| //----- | |
| // Overall cover shape | |
| module CoverBlock() { | |
| cuboid([CoverOA.x,CoverOA.y,CoverTrimZ],anchor=BOTTOM) position(TOP+LEFT) | |
| prismoid(size1=[CoverOA.x,CoverOA.y],size2=[CoverOA.x - BreakX,CoverOA.y], | |
| height=CoverOA.z - CoverTrimZ,shift=[-BreakX/2,0],anchor=BOTTOM+LEFT); | |
| } | |
| // Cover shell | |
| module CoverShell() { | |
| difference() { | |
| CoverBlock(); | |
| down(Protrusion) | |
| resize(CoverOA - [2*WallThick,2*WallThick,WallThick - Protrusion]) | |
| CoverBlock(); | |
| } | |
| } | |
| // The complete cover | |
| module Cover() { | |
| difference() { | |
| union() { | |
| CoverShell(); | |
| left((CoverOA.x - ScrewOC.x)/2 - ScrewOffset) | |
| for (i = [-1,1], j=[-1,1]) | |
| translate([i*ScrewOC.x/2,j*ScrewOC.y/2,0]) | |
| cyl(CoverOA.z,d=ScrewHoleID + 2*WallThick,anchor=BOTTOM); | |
| } | |
| left((CoverOA.x - ScrewOC.x)/2 - ScrewOffset) down(Protrusion) | |
| for (i = [-1,1], j=[-1,1]) | |
| translate([i*ScrewOC.x/2,j*ScrewOC.y/2,0]) { | |
| cyl(CoverOA.z + 2*Protrusion,d=ScrewHoleID + HoleWindage,anchor=BOTTOM); | |
| up(CoverOA.z - ScrewHeadRecess[LENGTH]) | |
| cyl(ScrewHeadRecess[LENGTH] + 2*Protrusion, | |
| d1=ScrewHeadRecess[ID] + HoleWindage,d2=ScrewHeadRecess[OD] + HoleWindage, | |
| anchor=BOTTOM); | |
| } | |
| translate(SwitchOffset) left(CoverOA.x/2 - WallThick - Protrusion) | |
| cuboid(SwitchOA,anchor=RIGHT+FWD); | |
| } | |
| } | |
| //----- | |
| // Build things | |
| if (Layout == "Block") { | |
| CoverBlock(); | |
| } | |
| if (Layout == "Shell") { | |
| CoverShell(); | |
| } | |
| if (Layout == "Show") { | |
| Cover(); | |
| } | |
| if (Layout == "Build") { | |
| up(CoverOA.z) | |
| xrot(180) | |
| Cover(); | |
| } | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details on my blog at https://softsolder.com/2025/12/29/ortur-yrc-1-adding-a-home-switch/