-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b488884
commit f78823b
Showing
8 changed files
with
167 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,52 @@ | ||
import { subtract, union } from "@jscad/modeling/src/operations/booleans"; | ||
import { cuboid, cylinder } from "@jscad/modeling/src/primitives"; | ||
import { cone } from "./chargerPlate"; | ||
import { rotateZ, translateZ } from "@jscad/modeling/src/operations/transforms"; | ||
import { degToRad } from "@jscad/modeling/src/utils"; | ||
import { subtract, union } from '@jscad/modeling/src/operations/booleans' | ||
import { cuboid, cylinder } from '@jscad/modeling/src/primitives' | ||
import { cone } from './chargerPlate' | ||
import { rotateZ, translateZ } from '@jscad/modeling/src/operations/transforms' | ||
import { degToRad } from '@jscad/modeling/src/utils' | ||
|
||
export const plantPotInlay = () => [ | ||
translateZ(20, union( | ||
subtract( | ||
cylinder({ | ||
center: [0,0,35/2], | ||
radius: 40, | ||
height: 35, | ||
segments: 64 | ||
}), | ||
cylinder({ | ||
center: [0,0,35/2], | ||
radius: 38, | ||
height: 35, | ||
segments: 64 | ||
}), | ||
), | ||
subtract( | ||
cone({ | ||
topRadius: 40, | ||
bottomRadius: 7, | ||
height: 20, | ||
center: [0,0,-20] | ||
}), | ||
cone({ | ||
topRadius: 38, | ||
bottomRadius: 5, | ||
height: 20, | ||
center: [0,0,-20] | ||
}) | ||
), | ||
cuboid({ | ||
center: [0,0,-19.5], | ||
size: [12,1,1] | ||
}), | ||
rotateZ(degToRad(90), cuboid({ | ||
center: [0,0,-19.5], | ||
size: [12,1,1] | ||
})) | ||
)) | ||
] | ||
translateZ( | ||
20, | ||
union( | ||
subtract( | ||
cylinder({ | ||
center: [0, 0, 35 / 2], | ||
radius: 40, | ||
height: 35, | ||
segments: 64, | ||
}), | ||
cylinder({ | ||
center: [0, 0, 35 / 2], | ||
radius: 38, | ||
height: 35, | ||
segments: 64, | ||
}), | ||
), | ||
subtract( | ||
cone({ | ||
topRadius: 40, | ||
bottomRadius: 7, | ||
height: 20, | ||
center: [0, 0, -20], | ||
}), | ||
cone({ | ||
topRadius: 38, | ||
bottomRadius: 5, | ||
height: 20, | ||
center: [0, 0, -20], | ||
}), | ||
), | ||
cuboid({ | ||
center: [0, 0, -19.5], | ||
size: [12, 1, 1], | ||
}), | ||
rotateZ( | ||
degToRad(90), | ||
cuboid({ | ||
center: [0, 0, -19.5], | ||
size: [12, 1, 1], | ||
}), | ||
), | ||
), | ||
), | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import { colorNameToRgb, colorize, hexToRgb } from '@jscad/modeling/src/colors' | ||
import { | ||
intersect, | ||
subtract, | ||
union, | ||
} from '@jscad/modeling/src/operations/booleans' | ||
import { extrudeLinear } from '@jscad/modeling/src/operations/extrusions' | ||
import { | ||
rotate, | ||
rotateX, | ||
rotateY, | ||
scale, | ||
translate, | ||
} from '@jscad/modeling/src/operations/transforms' | ||
import { cuboid, triangle } from '@jscad/modeling/src/primitives' | ||
import { degToRad } from '@jscad/modeling/src/utils' | ||
import { hexagonGrid } from '../utils/hexagon.js' | ||
|
||
const height = 2 | ||
const len = 223 | ||
const edge = 15 | ||
const width = 70 | ||
|
||
const plate = () => | ||
union( | ||
cuboid({ | ||
size: [len - edge * 2, width, height], | ||
}), | ||
cuboid({ | ||
size: [edge, 30, height], | ||
center: [len / 2 - edge / 2, 0, 0], | ||
}), | ||
cuboid({ | ||
size: [edge, 30, height], | ||
center: [-(len / 2) + edge / 2, 0, 0], | ||
}), | ||
translate( | ||
[-len / 2, edge, -height / 2], | ||
extrudeLinear( | ||
{ height }, | ||
triangle({ | ||
type: 'SAS', | ||
values: [edge, degToRad(90), (width - 2 * edge) / 2], | ||
}), | ||
), | ||
), | ||
rotateY( | ||
degToRad(180), | ||
translate( | ||
[-len / 2, edge, -height / 2], | ||
extrudeLinear( | ||
{ height }, | ||
triangle({ | ||
type: 'SAS', | ||
values: [edge, degToRad(90), (width - 2 * edge) / 2], | ||
}), | ||
), | ||
), | ||
), | ||
rotateX( | ||
degToRad(180), | ||
translate( | ||
[-len / 2, edge, -height / 2], | ||
extrudeLinear( | ||
{ height }, | ||
triangle({ | ||
type: 'SAS', | ||
values: [edge, degToRad(90), (width - 2 * edge) / 2], | ||
}), | ||
), | ||
), | ||
), | ||
rotate( | ||
[degToRad(180), degToRad(180), 0], | ||
translate( | ||
[-len / 2, edge, -height / 2], | ||
extrudeLinear( | ||
{ height }, | ||
triangle({ | ||
type: 'SAS', | ||
values: [edge, degToRad(90), (width - 2 * edge) / 2], | ||
}), | ||
), | ||
), | ||
), | ||
) | ||
|
||
export const showerPlate = () => [ | ||
union( | ||
subtract(plate(), scale([0.985, 0.95, 2], plate())), | ||
intersect( | ||
plate(), | ||
translate( | ||
[-120, -52.5, -height / 2], | ||
hexagonGrid({ | ||
cols: 20, | ||
rows: 40, | ||
height, | ||
size: height * 2.01, | ||
wallThickness: height / 4, | ||
}), | ||
), | ||
), | ||
), | ||
] |