I'm helping a friend's daughter to construct a 120 sided solid by
3d printing a skeleton that she's going to cover in mylar.
My attempt is at:
https://github.com/rugyoga/catalan_solids/blob/main/disdyakis_triacontahedron.scad
Each face is a triangle.
To save some time, I wanted to print the parallelogram formed by four
triangles
so I only need 30 of them. Ideally I wanted them to snap together like lego
bricks.
So the edges that mate to the neighbouring parallelogram should be half
cylinders.
The code for the parallelogram works great.
But I can't get the difference operator to shave the half cylinders.
I'm subtracting four tetrahedron where face slices the rod in half.
c0 = 3 * (15 + sqrt(5)) / 44;
c1 = (5 - sqrt(5)) / 2;
c2 = 3 * (5 + 4 * sqrt(5)) / 22;
c3 = 3 * (5 + sqrt(5)) / 10;
c4 = sqrt(5);
c5 = (75 + 27 * sqrt(5)) / 44;
c6 = (15 + 9 * sqrt(5)) / 10;
c7 = (5 + sqrt(5)) / 2;
c8 = 3 * (5 + 4 * sqrt(5)) / 11;
function vertices() =
[[0.0, 0.0, c8], // 0
[0.0, 0.0, -c8],
[ c8, 0.0, 0.0],
[-c8, 0.0, 0.0],
[0.0, c8, 0.0],
[0.0, -c8, 0.0],
[0.0, c1, c7],
[0.0, c1, -c7],
[0.0, -c1, c7],
[0.0, -c1, -c7],
[ c7, 0.0, c1], // 10
[ c7, 0.0, -c1],
[-c7, 0.0, c1],
[-c7, 0.0, -c1],
[ c1, c7, 0.0],
[ c1, -c7, 0.0],
[-c1, c7, 0.0],
[-c1, -c7, 0.0],
[ c3, 0.0, c6],
[ c3, 0.0, -c6],
[-c3, 0.0, c6], // 20
[-c3, 0.0, -c6],
[ c6, c3, 0.0],
[ c6, -c3, 0.0],
[-c6, c3, 0.0],
[-c6, -c3, 0.0],
[0.0, c6, c3],
[0.0, c6, -c3],
[0.0, -c6, c3],
[0.0, -c6, -c3],
[ c0, c2, c5], // 30
[ c0, c2, -c5],
[ c0, -c2, c5],
[ c0, -c2, -c5],
[-c0, c2, c5],
[-c0, c2, -c5],
[-c0, -c2, c5],
[-c0, -c2, -c5],
[ c5, c0, c2],
[ c5, c0, -c2],
[ c5, -c0, c2], // 40
[ c5, -c0, -c2],
[-c5, c0, c2],
[-c5, c0, -c2],
[-c5, -c0, c2],
[-c5, -c0, -c2],
[ c2, c5, c0],
[ c2, c5, -c0],
[ c2, -c5, c0],
[ c2, -c5, -c0],
[-c2, c5, c0], // 50
[-c2, c5, -c0],
[-c2, -c5, c0],
[-c2, -c5, -c0],
[ c4, c4, c4],
[ c4, c4, -c4],
[ c4, -c4, c4],
[ c4, -c4, -c4],
[-c4, c4, c4],
[-c4, c4, -c4],
[-c4, -c4, c4], // 60
[-c4, -c4, -c4]];
v = vertices()
// cribbed from
http://forum.openscad.org/Rods-between-3D-points-tp13104p13115.html
module rod(p1,p2,tk){ // draw ray between 2 specified points
translate(p1)
sphere(r=tk);
translate(p2)
sphere(r=tk);
translate((p1+p2)/2)
rotate([-acos((p2[2]-p1[2]) / norm(p1-p2)),0,
-atan2(p2[0]-p1[0],p2[1]-p1[1])])
cylinder(r1=tk, h=norm(p1-p2), center = true);
}
module diamond() {
rod(v[0], v[6], 1);
rod(v[0], v[18], 1);
rod(v[0], v[8], 1);
rod(v[0], v[20], 1);
rod(v[20], v[6], 1);
rod(v[6], v[18], 1);
rod(v[18], v[8], 1);
rod(v[8], v[20], 1);
}
module tetra(points) {
polyhedron( points, [[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]] );
}
module flattened_diamond() {
difference() {
diamond();
tetra( [v[8], v[18], v[7], v[15]] * 2);
tetra( [v[6], v[18], v[9], v[14]] * 2);
tetra( [v[8], v[20], v[7], v[15]] * 2);
tetra( [v[20], v[6], v[19], v[1]] * 2);
}
}
Can you see anything obvious that I'm doing wrong?
Cheers,
Guy
--
Sent from: http://forum.openscad.org/
Does she know how fragile mylar is???
On 12/18/20 11:30 PM, rugyoga wrote:
I'm helping a friend's daughter to construct a 120 sided solid by
3d printing a skeleton that she's going to cover in mylar.
My attempt is at:
https://github.com/rugyoga/catalan_solids/blob/main/disdyakis_triacontahedron.scad
Each face is a triangle.
To save some time, I wanted to print the parallelogram formed by four
triangles
so I only need 30 of them. Ideally I wanted them to snap together like lego
bricks.
So the edges that mate to the neighbouring parallelogram should be half
cylinders.
The code for the parallelogram works great.
But I can't get the difference operator to shave the half cylinders.
I'm subtracting four tetrahedron where face slices the rod in half.
c0 = 3 * (15 + sqrt(5)) / 44;
c1 = (5 - sqrt(5)) / 2;
c2 = 3 * (5 + 4 * sqrt(5)) / 22;
c3 = 3 * (5 + sqrt(5)) / 10;
c4 = sqrt(5);
c5 = (75 + 27 * sqrt(5)) / 44;
c6 = (15 + 9 * sqrt(5)) / 10;
c7 = (5 + sqrt(5)) / 2;
c8 = 3 * (5 + 4 * sqrt(5)) / 11;
function vertices() =
[[0.0, 0.0, c8], // 0
[0.0, 0.0, -c8],
[ c8, 0.0, 0.0],
[-c8, 0.0, 0.0],
[0.0, c8, 0.0],
[0.0, -c8, 0.0],
[0.0, c1, c7],
[0.0, c1, -c7],
[0.0, -c1, c7],
[0.0, -c1, -c7],
[ c7, 0.0, c1], // 10
[ c7, 0.0, -c1],
[-c7, 0.0, c1],
[-c7, 0.0, -c1],
[ c1, c7, 0.0],
[ c1, -c7, 0.0],
[-c1, c7, 0.0],
[-c1, -c7, 0.0],
[ c3, 0.0, c6],
[ c3, 0.0, -c6],
[-c3, 0.0, c6], // 20
[-c3, 0.0, -c6],
[ c6, c3, 0.0],
[ c6, -c3, 0.0],
[-c6, c3, 0.0],
[-c6, -c3, 0.0],
[0.0, c6, c3],
[0.0, c6, -c3],
[0.0, -c6, c3],
[0.0, -c6, -c3],
[ c0, c2, c5], // 30
[ c0, c2, -c5],
[ c0, -c2, c5],
[ c0, -c2, -c5],
[-c0, c2, c5],
[-c0, c2, -c5],
[-c0, -c2, c5],
[-c0, -c2, -c5],
[ c5, c0, c2],
[ c5, c0, -c2],
[ c5, -c0, c2], // 40
[ c5, -c0, -c2],
[-c5, c0, c2],
[-c5, c0, -c2],
[-c5, -c0, c2],
[-c5, -c0, -c2],
[ c2, c5, c0],
[ c2, c5, -c0],
[ c2, -c5, c0],
[ c2, -c5, -c0],
[-c2, c5, c0], // 50
[-c2, c5, -c0],
[-c2, -c5, c0],
[-c2, -c5, -c0],
[ c4, c4, c4],
[ c4, c4, -c4],
[ c4, -c4, c4],
[ c4, -c4, -c4],
[-c4, c4, c4],
[-c4, c4, -c4],
[-c4, -c4, c4], // 60
[-c4, -c4, -c4]];
v = vertices()
// cribbed from
http://forum.openscad.org/Rods-between-3D-points-tp13104p13115.html
module rod(p1,p2,tk){ // draw ray between 2 specified points
translate(p1)
sphere(r=tk);
translate(p2)
sphere(r=tk);
translate((p1+p2)/2)
rotate([-acos((p2[2]-p1[2]) / norm(p1-p2)),0,
-atan2(p2[0]-p1[0],p2[1]-p1[1])])
cylinder(r1=tk, h=norm(p1-p2), center = true);
}
module diamond() {
rod(v[0], v[6], 1);
rod(v[0], v[18], 1);
rod(v[0], v[8], 1);
rod(v[0], v[20], 1);
rod(v[20], v[6], 1);
rod(v[6], v[18], 1);
rod(v[18], v[8], 1);
rod(v[8], v[20], 1);
}
module tetra(points) {
polyhedron( points, [[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]] );
}
module flattened_diamond() {
difference() {
diamond();
tetra( [v[8], v[18], v[7], v[15]] * 2);
tetra( [v[6], v[18], v[9], v[14]] * 2);
tetra( [v[8], v[20], v[7], v[15]] * 2);
tetra( [v[20], v[6], v[19], v[1]] * 2);
}
}
Can you see anything obvious that I'm doing wrong?
Cheers,
Guy
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Mylar is not fragile except in extremely thin shapes like balloons or insulation foils. I’ve used it for large vacuum chamber windows, and for drafting paper. Very versatile and strong substance.
--
David Gustavson
dbg@SCIzzL.com
On Fri, Dec 18, 2020, at 9:37 PM, David wrote:
Does she know how fragile mylar is???
On 12/18/20 11:30 PM, rugyoga wrote:
I'm helping a friend's daughter to construct a 120 sided solid by
3d printing a skeleton that she's going to cover in mylar.
My attempt is at:
https://github.com/rugyoga/catalan_solids/blob/main/disdyakis_triacontahedron.scad
Each face is a triangle.
To save some time, I wanted to print the parallelogram formed by four
triangles
so I only need 30 of them. Ideally I wanted them to snap together like lego
bricks.
So the edges that mate to the neighbouring parallelogram should be half
cylinders.
The code for the parallelogram works great.
But I can't get the difference operator to shave the half cylinders.
I'm subtracting four tetrahedron where face slices the rod in half.
c0 = 3 * (15 + sqrt(5)) / 44;
c1 = (5 - sqrt(5)) / 2;
c2 = 3 * (5 + 4 * sqrt(5)) / 22;
c3 = 3 * (5 + sqrt(5)) / 10;
c4 = sqrt(5);
c5 = (75 + 27 * sqrt(5)) / 44;
c6 = (15 + 9 * sqrt(5)) / 10;
c7 = (5 + sqrt(5)) / 2;
c8 = 3 * (5 + 4 * sqrt(5)) / 11;
function vertices() =
[[0.0, 0.0, c8], // 0
[0.0, 0.0, -c8],
[ c8, 0.0, 0.0],
[-c8, 0.0, 0.0],
[0.0, c8, 0.0],
[0.0, -c8, 0.0],
[0.0, c1, c7],
[0.0, c1, -c7],
[0.0, -c1, c7],
[0.0, -c1, -c7],
[ c7, 0.0, c1], // 10
[ c7, 0.0, -c1],
[-c7, 0.0, c1],
[-c7, 0.0, -c1],
[ c1, c7, 0.0],
[ c1, -c7, 0.0],
[-c1, c7, 0.0],
[-c1, -c7, 0.0],
[ c3, 0.0, c6],
[ c3, 0.0, -c6],
[-c3, 0.0, c6], // 20
[-c3, 0.0, -c6],
[ c6, c3, 0.0],
[ c6, -c3, 0.0],
[-c6, c3, 0.0],
[-c6, -c3, 0.0],
[0.0, c6, c3],
[0.0, c6, -c3],
[0.0, -c6, c3],
[0.0, -c6, -c3],
[ c0, c2, c5], // 30
[ c0, c2, -c5],
[ c0, -c2, c5],
[ c0, -c2, -c5],
[-c0, c2, c5],
[-c0, c2, -c5],
[-c0, -c2, c5],
[-c0, -c2, -c5],
[ c5, c0, c2],
[ c5, c0, -c2],
[ c5, -c0, c2], // 40
[ c5, -c0, -c2],
[-c5, c0, c2],
[-c5, c0, -c2],
[-c5, -c0, c2],
[-c5, -c0, -c2],
[ c2, c5, c0],
[ c2, c5, -c0],
[ c2, -c5, c0],
[ c2, -c5, -c0],
[-c2, c5, c0], // 50
[-c2, c5, -c0],
[-c2, -c5, c0],
[-c2, -c5, -c0],
[ c4, c4, c4],
[ c4, c4, -c4],
[ c4, -c4, c4],
[ c4, -c4, -c4],
[-c4, c4, c4],
[-c4, c4, -c4],
[-c4, -c4, c4], // 60
[-c4, -c4, -c4]];
v = vertices()
// cribbed from
http://forum.openscad.org/Rods-between-3D-points-tp13104p13115.html
module rod(p1,p2,tk){ // draw ray between 2 specified points
translate(p1)
sphere(r=tk);
translate(p2)
sphere(r=tk);
translate((p1+p2)/2)
rotate([-acos((p2[2]-p1[2]) / norm(p1-p2)),0,
-atan2(p2[0]-p1[0],p2[1]-p1[1])])
cylinder(r1=tk, h=norm(p1-p2), center = true);
}
module diamond() {
rod(v[0], v[6], 1);
rod(v[0], v[18], 1);
rod(v[0], v[8], 1);
rod(v[0], v[20], 1);
rod(v[20], v[6], 1);
rod(v[6], v[18], 1);
rod(v[18], v[8], 1);
rod(v[8], v[20], 1);
}
module tetra(points) {
polyhedron( points, [[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]] );
}
module flattened_diamond() {
difference() {
diamond();
tetra( [v[8], v[18], v[7], v[15]] * 2);
tetra( [v[6], v[18], v[9], v[14]] * 2);
tetra( [v[8], v[20], v[7], v[15]] * 2);
tetra( [v[20], v[6], v[19], v[1]] * 2);
}
}
Can you see anything obvious that I'm doing wrong?
Cheers,
Guy
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Thanks. My only experiences with mylar has been with the extremely thin
windows in radiation detection / counting equipment. Had no idea that
thicker, stronger uses were even out there.
David
On 12/18/20 11:51 PM, David Gustavson wrote:
Mylar is not fragile except in extremely thin shapes like balloons or insulation foils. I’ve used it for large vacuum chamber windows, and for drafting paper. Very versatile and strong substance.
Note for others, that pasted code is not complete, see the GitHub link
instead.
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
--
Sent from: http://forum.openscad.org/
This is your problem.
That is F5 & View/Thrown-together.
Your tetra( [v[8], v[18], v[7], v[15]] *2 ); is inside-out.
Effectively negative, hence difference() doesn't work.
See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Mis-ordered_faces
-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of rugyoga
Sent: Sat, 19 Dec 2020 16:30
Subject: [OpenSCAD] Problems with difference
I'm helping a friend's daughter to construct a 120 sided solid by
3d printing a skeleton that she's going to cover in mylar.
My attempt is at:
Each face is a triangle.
To save some time, I wanted to print the parallelogram formed by four
triangles
so I only need 30 of them. Ideally I wanted them to snap together like lego
bricks.
So the edges that mate to the neighbouring parallelogram should be half
cylinders.
The code for the parallelogram works great.
But I can't get the difference operator to shave the half cylinders.
I'm subtracting four tetrahedron where face slices the rod in half.
c0 = 3 * (15 + sqrt(5)) / 44;
c1 = (5 - sqrt(5)) / 2;
c2 = 3 * (5 + 4 * sqrt(5)) / 22;
c3 = 3 * (5 + sqrt(5)) / 10;
c4 = sqrt(5);
c5 = (75 + 27 * sqrt(5)) / 44;
c6 = (15 + 9 * sqrt(5)) / 10;
c7 = (5 + sqrt(5)) / 2;
c8 = 3 * (5 + 4 * sqrt(5)) / 11;
function vertices() =
[[0.0, 0.0, c8], // 0
[0.0, 0.0, -c8],
[ c8, 0.0, 0.0],
[-c8, 0.0, 0.0],
[0.0, c8, 0.0],
[0.0, -c8, 0.0],
[0.0, c1, c7],
[0.0, c1, -c7],
[0.0, -c1, c7],
[0.0, -c1, -c7],
[ c7, 0.0, c1], // 10
[ c7, 0.0, -c1],
[-c7, 0.0, c1],
[-c7, 0.0, -c1],
[ c1, c7, 0.0],
[ c1, -c7, 0.0],
[-c1, c7, 0.0],
[-c1, -c7, 0.0],
[ c3, 0.0, c6],
[ c3, 0.0, -c6],
[-c3, 0.0, c6], // 20
[-c3, 0.0, -c6],
[ c6, c3, 0.0],
[ c6, -c3, 0.0],
[-c6, c3, 0.0],
[-c6, -c3, 0.0],
[0.0, c6, c3],
[0.0, c6, -c3],
[0.0, -c6, c3],
[0.0, -c6, -c3],
[ c0, c2, c5], // 30
[ c0, c2, -c5],
[ c0, -c2, c5],
[ c0, -c2, -c5],
[-c0, c2, c5],
[-c0, c2, -c5],
[-c0, -c2, c5],
[-c0, -c2, -c5],
[ c5, c0, c2],
[ c5, c0, -c2],
[ c5, -c0, c2], // 40
[ c5, -c0, -c2],
[-c5, c0, c2],
[-c5, c0, -c2],
[-c5, -c0, c2],
[-c5, -c0, -c2],
[ c2, c5, c0],
[ c2, c5, -c0],
[ c2, -c5, c0],
[ c2, -c5, -c0],
[-c2, c5, c0], // 50
[-c2, c5, -c0],
[-c2, -c5, c0],
[-c2, -c5, -c0],
[ c4, c4, c4],
[ c4, c4, -c4],
[ c4, -c4, c4],
[ c4, -c4, -c4],
[-c4, c4, c4],
[-c4, c4, -c4],
[-c4, -c4, c4], // 60
[-c4, -c4, -c4]];
v = vertices()
// cribbed from
module rod(p1,p2,tk){ // draw ray between 2 specified points
translate(p1)
sphere(r=tk);
translate(p2)
sphere(r=tk);
translate((p1+p2)/2)
rotate([-acos((p2[2]-p1[2]) / norm(p1-p2)),0,
-atan2(p2[0]-p1[0],p2[1]-p1[1])])
cylinder(r1=tk, h=norm(p1-p2), center = true);
}
module diamond() {
rod(v[0], v[6], 1);
rod(v[0], v[18], 1);
rod(v[0], v[8], 1);
rod(v[0], v[20], 1);
rod(v[20], v[6], 1);
rod(v[6], v[18], 1);
rod(v[18], v[8], 1);
rod(v[8], v[20], 1);
}
module tetra(points) {
polyhedron( points, [[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]] );
}
module flattened_diamond() {
difference() {
diamond();
tetra( [v[8], v[18], v[7], v[15]] * 2);
tetra( [v[6], v[18], v[9], v[14]] * 2);
tetra( [v[8], v[20], v[7], v[15]] * 2);
tetra( [v[20], v[6], v[19], v[1]] * 2);
}
}
Can you see anything obvious that I'm doing wrong?
Cheers,
Guy
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
--
This email has been checked for viruses by AVG.
https://www.avg.com
Sorry, that's a bit misleading.
Not all inside-out, I keep forgetting on my normal system, a VM, I use S/W
rendering, it draws thrown-together a bit wrong.
I did it on a RM, two of the faces are bad.
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
--
Sent from: http://forum.openscad.org/
Also note your aim is a bit off
-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of MichaelAtOz
Sent: Sat, 19 Dec 2020 18:12
Subject: Re: [OpenSCAD] Problems with difference
Sorry, that's a bit misleading.
Not all inside-out, I keep forgetting on my normal system, a VM, I use S/W
rendering, it draws thrown-together a bit wrong.
I did it on a RM, two of the faces are bad.
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the
extent possible under law, I have waived all copyright and related or neighbouring rights
to this work. Obviously inclusion of works of previous authors is not included in the
above.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
--
This email has been checked for viruses by AVG.
https://www.avg.com
Yes!
The fix was:
module tetra(points) {
polyhedron( points, [[2, 1, 0], [1, 3, 0], [2, 3, 1], [0, 3, 2]] );
}
Many thanks!
--
Sent from: http://forum.openscad.org/
You might find this approach to making polyhedra interesting:
https://www.myminifactory.com/object/3d-print-folding-pentagonal-hexacontahedron-puzzle-85216
I made the tetrahedron and it worked very nicely. I'm not sure I fully
understand your plan, but if I were trying to assemble 30 of those "diamond"
modules I doubt they would align and close up once I was done. If you
haven't thought about it you might want to introduce more registration
geometry (e.g. alignment groove down the edge) so that the pieces hopefully
line up properly. I'd also be worried about the labor of removing support
material and the very small surface area for bed adhesion.
Another observation: I tried to render the full_skeleton model from the
above example. It's a pretty obnoxious model because every edge is in there
twice and there are a bunch of repeated spheres at each vertex. Anyhow, it
crashed opencad RC3 to try to render it.
I made a generic wireframe module that takes out repeated edges and vertices
and was able to render this beast, though it did take 24 minutes.
If you're interested in polyhedra you might also want to take a look at
this:
https://github.com/revarbat/BOSL2/wiki/polyhedra.scad
It will give you vertices and faces for all the catalan solids (and others).
--
Sent from: http://forum.openscad.org/