From 652e26a191c126b7841a1e7f335a9d139fa22c72 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Mon, 11 Sep 2017 16:55:01 -0400 Subject: [PATCH] vex to pololu shaft adapter --- PololuShaftToVex.groovy | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/PololuShaftToVex.groovy b/PololuShaftToVex.groovy index 3f29de7..b85304a 100755 --- a/PololuShaftToVex.groovy +++ b/PololuShaftToVex.groovy @@ -1 +1,27 @@ -//Your code here \ No newline at end of file +CSG pshaft =new Cylinder(2,2,11,(int)30).toCSG() // a one line Cylinder +CSG flat = new Cube( 4,// X dimention + 3.4,// Y dimention + 11// Z dimention + ).toCSG() + .toYMin() + .toZMin() + .movey(pshaft.getMinY()) + +CSG xshaft = new RoundedCube( 3.12,// X dimention + 3.12,// Y dimention + 11// Z dimention + ) + .cornerRadius(0.5)// sets the radius of the corner + .toCSG()// converts it to a CSG tor display + .toZMax() + .movez(-1) +pshaft=pshaft.intersect(flat) + +CSG coupler = new Cube( 7.5,// X dimention + 7.5,// Y dimention + 20// Z dimention + ).toCSG() + .difference([pshaft,xshaft]) + .rotx(90) + .toZMin() +return [coupler] \ No newline at end of file