From 0658be47cf29e4c084ffaf5dc2fd9b2ea8a8ae65 Mon Sep 17 00:00:00 2001 From: Alex Nichol Date: Sun, 7 Jan 2024 14:09:10 -0500 Subject: [PATCH] gl_inet: power switch --- examples/parody/gl_inet/main.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/examples/parody/gl_inet/main.go b/examples/parody/gl_inet/main.go index f868ada..a2b06f2 100644 --- a/examples/parody/gl_inet/main.go +++ b/examples/parody/gl_inet/main.go @@ -33,6 +33,26 @@ func main() { fanHole := FanHole() + powerSwitchHole := model3d.NewColliderSolidInset( + model3d.NewRect( + model3d.XYZ(BodySideLength/2-0.05, -0.1, 0.3), + model3d.XYZ(BodySideLength/2+0.01, 0.1, 0.3001), + ), + -0.075, + ) + powerSwitch := model3d.JoinedSolid{ + &model3d.Cylinder{ + P1: model3d.XYZ(BodySideLength/2-0.2, 0.0, 0.3), + P2: model3d.XYZ(BodySideLength/2, 0.0, 0.3), + Radius: 0.08, + }, + // Mask the rounded back of the powerSwitchHole. + model3d.NewRect( + model3d.XYZ(BodySideLength/2-0.2, -0.2, 0.2), + model3d.XYZ(BodySideLength/2-0.05, 0.2, 0.4), + ), + } + body = model3d.JoinedSolid{ &model3d.SubtractedSolid{ Positive: body, @@ -41,9 +61,11 @@ func main() { usbPort, fanHole, lidCutout, + powerSwitchHole, }, }, usbInner, + powerSwitch, } joined := model3d.JoinedSolid{