From fee6124eb426162c758162042a6a76257fd3abfd Mon Sep 17 00:00:00 2001 From: atomega Date: Tue, 6 Jul 2021 23:32:23 +0200 Subject: [PATCH] some added form for prusa ligthning --- box_prusa.scad | 87 +++++++++++++++ leatherSkiver.scad | 47 ++++++++ roundedPoly.scad | 271 +++++++++++++++++++++++++++++++++++++++++++++ stanley1992.scad | 59 ++++++++++ 4 files changed, 464 insertions(+) create mode 100644 box_prusa.scad create mode 100644 leatherSkiver.scad create mode 100644 roundedPoly.scad create mode 100644 stanley1992.scad diff --git a/box_prusa.scad b/box_prusa.scad new file mode 100644 index 0000000..308ba62 --- /dev/null +++ b/box_prusa.scad @@ -0,0 +1,87 @@ +include + +$fn = 100; + + + +smallLenght = 10; +smallWidth = 10; +wall =2; +circleDia = 27; + +//assembly(); + +module assembly() +{ + fixation(); + translate([18+5,0,-(50-5)])rotate([0,90,0])arm(); + translate([10/2+wall,-10,-(100-10)])rotate([-45,90,0])attachment(); + +} + + + +module fixation() +{ + lenght = 20; + width = 20; + height = 10; + + exRay = 0; + inRay = 2; + + difference() + { + union() + { + keyCubeEmpty(lenght,width,height,wall,exRay,inRay,tFlat = true, Iflat = true, ce = true); + translate([lenght/2+smallLenght/2-wall,0,0])keyCubeEmpty(smallLenght,smallWidth,height,wall,exRay,0,tFlat = true, Iflat = true, ce = true); + } + + rotate([0,0,90])translate([-(smallLenght-wall*2)/2,-width/2,-height/2+wall])cube([smallWidth-wall*2,wall,height-wall]); + + translate([lenght/2+smallLenght-wall*2,0,0])rotate([0,90,0])cylinder(d=2.8,h=wall); + translate([0,0,-height/2])cylinder(d=3.1,h=wall); + translate([-(smallWidth-wall*2)/2,width/2-wall,-height/2+wall])rotate([0,0,0])cube([smallWidth-wall*2,wall,height-wall]); + translate([-(smallWidth-wall*2)/2,-width/2,-height/2+wall])rotate([0,0,0])cube([smallWidth-wall*2,wall,height-wall]); + } +} + +//arm(); +module arm() +{ + lenght = 100; + width = smallWidth; + height = 10; + wall =2; + exRay = 0; + inRay = 2; + + smallLenght = 10; + smallWidth = 10; + difference() + { + keyCubeEmpty(lenght,width,height,wall,exRay,inRay,tFlat = true, Iflat = true, ce = true); + translate([lenght/2 - width/2,0,-height/2+wall/2])cylinder(d = 3.1, h=wall, center = true); + translate([-(lenght/2 - width/2),0,-height/2+wall/2])cylinder(d = 3.1, h=wall, center = true); + translate([-(lenght/2 - wall/2),0,height/2-2.5])cube([wall*2,5,height/2],center = true); + translate([(lenght/2 - wall/2),0,height/2-2.5])cube([wall*2,5,height/2],center = true); + } +} + +attachment(); +module attachment() +{ + baseHeight = 10; + cylinder(d=circleDia, h=wall, center= true); + + difference() + { + union() + { + translate([0,0,wall/2+baseHeight/2])cube([smallLenght,smallWidth,baseHeight],center = true); + translate([smallWidth/2,-smallWidth/2,smallLenght+wall/2])rotate([0,-90,0])linear_extrude(smallWidth)polygon(points=[[0,0],[0,smallLenght],[smallWidth,smallWidth]]); + } + translate([0,0,smallLenght/2+smallLenght])rotate([45,0,0])cylinder(d=2.8, h= smallLenght*2, center = true); + } +} \ No newline at end of file diff --git a/leatherSkiver.scad b/leatherSkiver.scad new file mode 100644 index 0000000..616c24b --- /dev/null +++ b/leatherSkiver.scad @@ -0,0 +1,47 @@ +include + +$fn=150; + +ColX = 10; +ColY = 10; +boxBotZ = 5; +boxTopZ = 5; + +leatherOppeningZ = 10; +leatherOppeningY = 63; +bladeSpcaeX = 30 ; +bladeSpaceZ = 20 ; + +boxZ = bladeSpaceZ+boxBotZ+boxTopZ; +boxX = bladeSpcaeX + ColX*2; +boxY = leatherOppeningY + ColY*2; + +srcewHole = 3.1; +srcewThread = 2.8; +srcewDepth = bladeSpaceZ/2+boxBotZ; +screwPosz = boxBotZ + bladeSpaceZ -srcewDepth; + +%base(); +translate([boxX/2,boxY/2,10])rotate([10,0,90])stanley1992(center = true); +module base() +{ + difference() + { + union() + { + cube([boxX,boxY,boxBotZ]); + translate([0,0,boxBotZ])cube([ColX,ColY,bladeSpaceZ]); + translate([0,boxY-ColY,boxBotZ])cube([ColX,ColY,bladeSpaceZ]); + translate([boxX-ColX,0,boxBotZ])cube([ColX,ColY,bladeSpaceZ]); + translate([boxX-ColX,boxY-ColY,boxBotZ])cube([ColX,ColY,bladeSpaceZ]); + } + + union() + { + translate([ColX/2,ColY/2,screwPosz])cylinder(d=srcewThread, h=srcewDepth); + translate([boxX-ColX/2,ColY/2,screwPosz])cylinder(d=srcewThread, h=srcewDepth); + translate([ColX/2,boxY-ColY/2,screwPosz])cylinder(d=srcewThread, h=srcewDepth); + translate([boxX-ColX/2,boxY-ColY/2,screwPosz])cylinder(d=srcewThread, h=srcewDepth); + } + } +} diff --git a/roundedPoly.scad b/roundedPoly.scad new file mode 100644 index 0000000..f6b659b --- /dev/null +++ b/roundedPoly.scad @@ -0,0 +1,271 @@ + +/* +Creator : Kerem Yollu +date : 30.06.2021 +Description : + +*/ + +$fn=50; +/*" +a=[0,0,10]; +b=[10,0,0]; +c=[10,10,4]; +d=[0,10,0]; +height = 5; +roundingRadious = 1; +*/ + + +startWidht = 21; +stopWidht = 18; +startHeight = 0.6; +stopHeight = 0.6; +lenght = 113; +shortLenght = 75; +shaftDia = 2; +rolloverLenght = 25; +rolloverThikcness = 0.6; +holeCount = 5; +holeDia = 2; +holeSpace = 7; +holeOffset = 20; +endDia= 20; +endLen = 15; + +stichResess = 2; +stichStep = 4; +stichHole = 2.2; +stichAngle = 45; +stichWidth = 0.5; +stichGroove = 2; + +buckleDia = 4; +BuckleWidth = 1.5; + +leatherThikness = 2; + + +//trapeziod(lenght,stopWidht,startWidht,startHeight,stopHeight); +//trapeziod(40,10,20,5,1); +module trapeziod(lenght,startWidht,stopWidht,startHeight,stopHeight) +{ + widthOffset = (startWidht-stopWidht)/2; + trapPoints = [ + [0,0,0], //0 + [lenght,widthOffset,0], //1 + [lenght,stopWidht + widthOffset,0], //2 + [0,startWidht,0], // 3 + [0,0,startHeight], // 4 + [lenght,widthOffset,stopHeight], // 5 + [lenght,stopWidht + widthOffset,stopHeight], //6 + [0,startWidht,startHeight]]; + + trapFaces = [ + [0,1,2,3], + [4,5,6,7], + [4,5,1,0], + [5,1,2,6], + [6,7,3,2], + [4,7,3,0]]; + + polyhedron(trapPoints,trapFaces,100); +} + + + +//filledTrapeziod(lenght,startWidht,stopWidht,startHeight,stopHeight); +module filledTrapeziod(lenght,startWidht,stopWidht,startHeight,stopHeight) +{ + adj = lenght; + opp = (startWidht - stopWidht)/2; + alpha = atan(opp/adj); + + echo(alpha); + polygon(points=[[0,0],[1,0],[1,1]]); + +} + + +//translate([0,0,0])polyFull(lenght,startWidht,stopWidht,startHeight,stopHeight); +module polyFull(lenght,startWidht,stopWidht,startHeight,stopHeight) +{ + extraHeight = startHeight + stopHeight; + extraWidth = startWidht + stopWidht; + widthOffset = (startWidht-stopWidht)/2; + trapPoints = [ + [0,0], //0 + [lenght,widthOffset], //1 + [lenght,startWidht-widthOffset], //2 + [0,startWidht]]; //3 + + if(startWidht >= stopWidht) + { + difference() + { + if(startHeight >= stopHeight) + { + linear_extrude(startHeight)polygon(trapPoints); + } + else + { + linear_extrude(stopHeight)polygon(trapPoints); + } + translate([0,startWidht,0])rotate([90,0,0])linear_extrude(startWidht)polygon(points=[[0,startHeight],[lenght,stopHeight],[lenght,stopHeight+extraHeight],[0,startHeight+extraHeight]]); + } + } + else + { + difference() + { + if(startHeight >= stopHeight) + { + linear_extrude(startHeight)polygon(trapPoints); + } + else + { + linear_extrude(stopHeight)polygon(trapPoints); + } + translate([0,stopWidht + widthOffset,0])rotate([90,0,0])linear_extrude(stopWidht)polygon(points=[[0,startHeight],[lenght,stopHeight],[lenght,stopHeight+extraHeight],[0,startHeight+extraHeight]]); + } + } +} + + + +//whatchBandLong(lenght,startWidht,stopWidht,startHeight,stopHeight,shaftDia,rolloverLenght,rolloverThikcness,endDia,endLen,holeCount,holeDia,holeSpace,holeOffset,stichGroove); +module whatchBandLong(lenght,startWidht,stopWidht,startHeight,stopHeight,oDia,oLenght,oThinning,endDia,endLen,holeCount,holeDia,holeSpace,oleOffset,stichGroove) +{ + widthOffset = (startWidht-stopWidht)/2; + oLenghtDia = oLenght + (PI*(oDia/2))/2; + lenghtWoEnding = lenght - endLen; + alpha = atan(widthOffset/lenght); + oStopBright = startWidht - (2*oLenghtDia*tan(alpha)); + holeStart = lenght + oLenghtDia - holeOffset; + roundingLen = lenght + oLenghtDia - endDia/2; + roundingOpp = (roundingLen-oLenghtDia-endDia)/atan(alpha); + + + difference() + { + union() + { + difference() + { + union() + { + translate([oLenghtDia,0,0])polyFull(lenghtWoEnding,startWidht,stopWidht,startHeight,stopHeight); + translate([lenghtWoEnding+oLenghtDia,widthOffset,0])ending(0,endLen,stopWidht,stopHeight); + } + for(a=[0:holeCount]){translate([holeStart-a*holeSpace,startWidht/2,0])cylinder(d=holeDia,h=startHeight+stopHeight);} + translate([holeStart+holeOffset-stichGroove,startWidht/2,0])cylinder(d=1,h=startHeight+stopHeight); + } + difference() + { + rotate([180,180,0])translate([-oLenghtDia,-startWidht,0])polyFull(oLenghtDia,startWidht,oStopBright,startHeight,oThinning); + union() + { + translate([oLenght+(PI*(oDia/2))/4,startWidht/2,0])cylinder(d=1,h=startHeight+stopHeight); + translate([oLenght+(PI*(oDia/2))/4,stichGroove,0])cylinder(d=1,h=startHeight+stopHeight); + translate([oLenght+(PI*(oDia/2))/4,startWidht-stichGroove,0])cylinder(d=1,h=startHeight+stopHeight); + } + } + } + translate([oLenghtDia,0,0])stiching(5,stichGroove,lenghtWoEnding,widthOffset+stichGroove,stichStep,stichHole,stichWidth,stichAngle,startHeight); + translate([oLenghtDia,0,0])stiching(5,startWidht-stichGroove,lenghtWoEnding,startWidht-widthOffset-stichGroove,stichStep,stichHole,stichWidth,stichAngle,startHeight); + } +} + + +//stiching(10,10,112,2,stichStep,stichHole,stichWidth,stichAngle,1); +module stiching(startX,startY,stopX,stopY, space, holeLenght, holeWidth, angle, height) +{ + *hull() + { + translate([startX,startY,0])color("red")cylinder(d=stichWidth,h=2,center=true); + translate([stopX,stopY,0])color("red")cylinder(d=stichWidth,h=2,center=true); + } + if(startY <= stopY) + { + alpa = atan((stopY-startY)/(stopX-startX)); + stichCount = floor((stopX-startX)/(space)); + for(a=[0:stichCount]) + { + oppOffset = tan(alpa)*(a*space); + translate([startX+a*space,startY+oppOffset,height/2])rotate([0,0,-angle])cube([holeWidth,holeLenght,height],center=true); + } + } + else + { + alpa = atan((startY-stopY)/(stopX-startX)); + stichCount = floor((stopX-startX)/(space)); + for(a=[0:stichCount]) + { + oppOffset = tan(alpa)*(a*space); + translate([startX+a*space,startY-oppOffset,height/2])rotate([0,0,-angle])cube([holeWidth,holeLenght,height],center=true); + } + + } +} + + + + +//ending(0,endLen,stopWidht,stopHeight); +module ending(dia, lengh, bright, height) +{ + ray = (sqrt(lengh*lengh+(bright/2)*(bright/2)))+dia; + translate([0,bright/2,0])//intersection() + { + difference() + { + intersection() + { + rotate([0,0,0])translate([0,(ray-bright/2),0])cylinder(r=ray,h=height); + rotate([0,0,0])translate([0,-(ray-bright/2),0])cylinder(r=ray,h=height); + } + translate([-ray,-bright/2,0])cube([ray,bright,height]); + } + } +} + +%translate([-lenght+11.5,-startWidht/2,0])whatchBandShort(shortLenght,startWidht,stopWidht,startHeight,stopHeight,shaftDia,rolloverLenght,rolloverThikcness,buckleDia,BuckleWidth); +module whatchBandShort(lenght,startWidht,stopWidht,startHeight,stopHeight,oDia,oLenght,oThinning,buckleDia, BuckleWidth) +{ + widthOffset = (startWidht-stopWidht)/2; + oLenghtDia = oLenght+ PI*(oDia/2)/2; + angle = atan(widthOffset/lenght); + oStopBrightFirst = startWidht - (2*oLenghtDia*tan(angle)); + oStopBrightSecond = startWidht - 2*((lenght - oLenghtDia)*tan(angle)); + buckleDia = buckleDia +leatherThikness*2; + difference() + { + union() + { + translate([oLenghtDia,0,0])polyFull(lenght,startWidht,stopWidht,startHeight,stopHeight); + rotate(a=[180,180,0])translate([-oLenghtDia,-startWidht,0])polyFull(oLenghtDia,startWidht,oStopBrightFirst,startHeight,oThinning); + translate([lenght+oLenghtDia,widthOffset,0])polyFull(oLenghtDia,stopWidht,oStopBrightSecond,stopHeight,oThinning); + } + union() + { + translate([oLenght+(PI*(oDia/2))/4,startWidht/2,0])cylinder(d=1,h=startHeight+stopHeight); + translate([oLenght+(PI*(oDia/2))/4,stichGroove,0])cylinder(d=1,h=startHeight+stopHeight); + translate([oLenght+(PI*(oDia/2))/4,startWidht-stichGroove,0])cylinder(d=1,h=startHeight+stopHeight); + } + translate([lenght+oLenghtDia-buckleDia/2,startWidht/2-BuckleWidth/2,0])cube([buckleDia,BuckleWidth,startHeight+stopHeight]); + } +} + + + +//keyPolyRounded(a,b,c,d,height,roundingRadious); +module keyPolyRounded(a=[0,0,0],b=[1,0,0],c=[1,1,0],d=[0,1,0],height=1,rad=1) +{ + hull() + { + translate([a[0]+rad,a[1]+rad,a[2]])cylinder(r=rad, h=height); + translate([b[0]-rad,b[1]+rad,b[2]])cylinder(r=rad, h=height); + translate([c[0]-rad,c[1]-rad,c[2]])cylinder(r=rad, h=height); + translate([d[0]+rad,d[1]-rad,d[2]])cylinder(r=rad, h=height); + } +} \ No newline at end of file diff --git a/stanley1992.scad b/stanley1992.scad new file mode 100644 index 0000000..ce1bcf5 --- /dev/null +++ b/stanley1992.scad @@ -0,0 +1,59 @@ +$fn = 100; + +//stanley1992(center = false); +module stanley1992(center = true) +{ + tollerence = 0; + cutLen = 61-tollerence; + width = 19-tollerence; + height = 1; + topResses = 11.5; + dentWidth = 3+tollerence/2; + dentDia = 3.4+tollerence/2; + acuteAngle = 52.27; + optusAngle = 127.73; + dentsLen = dentDia*2 + dentWidth; + adjLen = (cutLen-dentsLen-2*topResses)/2; + dentOneX =cutLen/2-dentWidth/2-dentDia/2; + dentTwoX =cutLen/2+dentWidth/2+dentDia/2; + dentY = width - 4.2 + dentDia/2; + + point=[ + [0,0], + [cutLen,0], + [cutLen-topResses,width], + [topResses,width] + ]; + + if(center) + { + translate([-cutLen/2,-width/2,0]) + linear_extrude(height,center=center) + difference() + { + polygon(points=point); + union() + { + translate([dentOneX,dentY,0])circle(d=dentDia); + translate([dentOneX-dentDia/2,dentY,0])square([dentDia,dentY]); + translate([dentTwoX,dentY,0])circle(d=dentDia); + translate([dentTwoX-dentDia/2,dentY,0])square([dentDia,dentY]); + } + } + } + else + { + linear_extrude(height,center=center) + difference() + { + polygon(points=point); + union() + { + translate([dentOneX,dentY,0])circle(d=dentDia); + translate([dentOneX-dentDia/2,dentY,0])square([dentDia,dentY]); + translate([dentTwoX,dentY,0])circle(d=dentDia); + translate([dentTwoX-dentDia/2,dentY,0])square([dentDia,dentY]); + } + } + } +} \ No newline at end of file