Skip to content

Commit

Permalink
gl_inet: power switch
Browse files Browse the repository at this point in the history
  • Loading branch information
unixpickle committed Jan 7, 2024
1 parent f56d7e3 commit 0658be4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/parody/gl_inet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -41,9 +61,11 @@ func main() {
usbPort,
fanHole,
lidCutout,
powerSwitchHole,
},
},
usbInner,
powerSwitch,
}

joined := model3d.JoinedSolid{
Expand Down

0 comments on commit 0658be4

Please sign in to comment.