Sphere with up to 6 coordinate planes parallel holes

Some examples of holes with three.js

https://discourse.threejs.org/t/restrict-an-object-to-another/1780
https://discourse.threejs.org/t/in-the-orb-shaders/3286
https://discourse.threejs.org/t/experiment-geometry-holes/5555

https://discourse.threejs.org/t/how-to-allow-duplicate-vertices-in-extrudegeometry/6333/3
https://jsfiddle.net/Lg458tof/

https://discourse.threejs.org/t/looking-for-updated-plug-in-for-csg/6785

My contribution are two variants of a sphere with up to 6 coordinate planes parallel holes. One variant is completely symmetrical, the other variant is more efficient.

See Updated April 29 (There was a typo. Only one m in symmetry.)

http://discourse.threejs.hofk.de/2019/SphereCut/SphereCutSymmetric.html
20190424-1939-4710

http://discourse.threejs.hofk.de/2019/SphereCut/SphereCut.html
20190424-1944-39510

With these spheres you can e.g. create a labyrinth similar to https://discourse.threejs.org/t/addon-to-create-special-extended-geometries/1855/4 , but with round shapes.

20190427-2003-10309

These properties are helpful for this.

	g.cutRadius = []; // calculated radius of cut circles px, nx, py, ny, pz, nz - for external use
	g.cutDistance = []; // calculated distance of the cut circles to the center px, nx, py, ny, pz, nz - for external use
	g.cutSegments = []; // segments of the cut circles  - for external use

20190420-1838-05860

Iā€™m gonna put the spheres in the addon.

1 Like

It is now possible to create only some of the eight sphere parts.

Updated April 29 (There was a typo. Only one m in symmetry.)

function createSphereCutSymmetric( g, radius, fineness, cut, parts  ) {

	// BufferGeometry, radius, fineness (1/4 equator),
	//    cut[ px, nx, py, ny, pz, nz ] max. 2*fineness
	//    parts [ 1, 1, 1, 1, 1, 0, 0, 1 ]  1 for create part, otherwise arbitrary

20190428-2110-46201

function createSphereCut( g, radius, equator, cut, parts ) {

	// BufferGeometry, radius, equator,
	//     cut[ px, nx, py, ny, pz, nz ] max. equator, non-overlapping,
	//     parts [ 1, 1, 1, 1, 1, 0, 0, 1 ]  1 for create part, otherwise arbitrary

20190428-2104-33851

3 Likes