discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

TooTallToby CAD challenge

WF
William F. Adams
Wed, Jan 21, 2026 1:30 PM

This was recently put up on Reddit:

https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/

I believe I got it in Block/OpenSCAD, ~20 minutes:

https://www.blockscad3d.com/community/projects/2052961

click on a "Create" button to make an STL to check (or see the attached .scad file).

Is there a simpler/better way to make this? 

Maybe using BOSL2?

William

This was recently put up on Reddit: https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/ I believe I got it in Block/OpenSCAD, ~20 minutes: https://www.blockscad3d.com/community/projects/2052961 click on a "Create" button to make an STL to check (or see the attached .scad file). Is there a simpler/better way to make this?  Maybe using BOSL2? William
MM
Michael Möller
Wed, Jan 21, 2026 2:29 PM

// units
Zero = 0 ;
One = 25 ;
Two = One*2 ;

module Diagonal () {
polyhedron([ [Zero,Zero,Zero], [Zero,One,One], [One,Zero,One],
[Zero,Zero,One] ],
[ [0,1,3], [0,3,2], [1,2,3], [0,2,1] ]) ;
}

difference () {
cube(Two) ;
translate([Zero,Zero,One]) {
cube([One,Two,One]) ;
cube([Two,One,One]) ;
}
translate([Zero,-One,Zero]) rotate([0,-45,0]) cube([Two,Two,Two]) ;
translate([One,One,One]) Diagonal() ;
translate([Zero,One,Zero]) Diagonal() ;
}

Yeah, the "Diagonal" is a bit of a cheat I feel, but I am so bad at the
Two-Rotations with the acos/atan functions.
Next version :-)

Msquare

On Wed, 21 Jan 2026 at 14:31, William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:

This was recently put up on Reddit:

https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/

I believe I got it in Block/OpenSCAD, ~20 minutes:

https://www.blockscad3d.com/community/projects/2052961

click on a "Create" button to make an STL to check (or see the attached
.scad file).

Is there a simpler/better way to make this?

Maybe using BOSL2?

William


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

// units Zero = 0 ; One = 25 ; Two = One*2 ; module Diagonal () { polyhedron([ [Zero,Zero,Zero], [Zero,One,One], [One,Zero,One], [Zero,Zero,One] ], [ [0,1,3], [0,3,2], [1,2,3], [0,2,1] ]) ; } difference () { cube(Two) ; translate([Zero,Zero,One]) { cube([One,Two,One]) ; cube([Two,One,One]) ; } translate([Zero,-One,Zero]) rotate([0,-45,0]) cube([Two,Two,Two]) ; translate([One,One,One]) Diagonal() ; translate([Zero,One,Zero]) Diagonal() ; } Yeah, the "Diagonal" is a bit of a cheat I feel, but I am so bad at the Two-Rotations with the acos/atan functions. Next version :-) Msquare On Wed, 21 Jan 2026 at 14:31, William F. Adams via Discuss < discuss@lists.openscad.org> wrote: > This was recently put up on Reddit: > > > https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/ > > > > I believe I got it in Block/OpenSCAD, ~20 minutes: > > https://www.blockscad3d.com/community/projects/2052961 > > click on a "Create" button to make an STL to check (or see the attached > .scad file). > > Is there a simpler/better way to make this? > > Maybe using BOSL2? > > William > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
WF
William F. Adams
Wed, Jan 21, 2026 4:05 PM

Nice!

Guenther pointed out that I got it wrong, but I was able to fix it by changing one number (hard-coded --- will have to figure out the trigonometry or other mechanism for placement).

William

On Wednesday, January 21, 2026 at 09:29:50 AM EST, Michael Möller private2michael@gmail.com wrote:

// units
Zero = 0 ;
One = 25 ;
Two = One*2 ;

module Diagonal () {
 polyhedron([ [Zero,Zero,Zero], [Zero,One,One], [One,Zero,One], [Zero,Zero,One] ],
            [ [0,1,3], [0,3,2], [1,2,3], [0,2,1] ]) ;
}

difference () {
  cube(Two) ;
  translate([Zero,Zero,One]) {
    cube([One,Two,One]) ;
    cube([Two,One,One]) ;
  }
  translate([Zero,-One,Zero]) rotate([0,-45,0]) cube([Two,Two,Two]) ;
  translate([One,One,One]) Diagonal() ;
  translate([Zero,One,Zero]) Diagonal() ;
}

Yeah, the "Diagonal" is a bit of a cheat I feel, but I am so bad at the Two-Rotations with the acos/atan functions.
Next version :-)

Msquare

On Wed, 21 Jan 2026 at 14:31, William F. Adams via Discuss discuss@lists.openscad.org wrote:

This was recently put up on Reddit:

https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/

I believe I got it in Block/OpenSCAD, ~20 minutes:

https://www.blockscad3d.com/community/projects/2052961

click on a "Create" button to make an STL to check (or see the attached .scad file).

Is there a simpler/better way to make this? 

Maybe using BOSL2?

William


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Nice! Guenther pointed out that I got it wrong, but I was able to fix it by changing one number (hard-coded --- will have to figure out the trigonometry or other mechanism for placement). William On Wednesday, January 21, 2026 at 09:29:50 AM EST, Michael Möller <private2michael@gmail.com> wrote: // units Zero = 0 ; One = 25 ; Two = One*2 ; module Diagonal () {  polyhedron([ [Zero,Zero,Zero], [Zero,One,One], [One,Zero,One], [Zero,Zero,One] ],             [ [0,1,3], [0,3,2], [1,2,3], [0,2,1] ]) ; } difference () {   cube(Two) ;   translate([Zero,Zero,One]) {     cube([One,Two,One]) ;     cube([Two,One,One]) ;   }   translate([Zero,-One,Zero]) rotate([0,-45,0]) cube([Two,Two,Two]) ;   translate([One,One,One]) Diagonal() ;   translate([Zero,One,Zero]) Diagonal() ; } Yeah, the "Diagonal" is a bit of a cheat I feel, but I am so bad at the Two-Rotations with the acos/atan functions. Next version :-) Msquare On Wed, 21 Jan 2026 at 14:31, William F. Adams via Discuss <discuss@lists.openscad.org> wrote: > This was recently put up on Reddit: > > https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/ > > > > I believe I got it in Block/OpenSCAD, ~20 minutes: > > https://www.blockscad3d.com/community/projects/2052961 > > click on a "Create" button to make an STL to check (or see the attached .scad file). > > Is there a simpler/better way to make this?  > > Maybe using BOSL2? > > William > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
AM
Adrian Mariano
Wed, Jan 21, 2026 5:00 PM

Two ways to do it in BOSL2

include<BOSL2/std.scad>

pat1 = [[0,0,1],[1,1,1],[1,1,1]];

pat2 = [[0,1],[1,1]];

top_half()

textured_tile(pat1, [2,2,1],  tex_reps=1)

align(TOP, RIGHT+FWD)

textured_tile(pat2, [1,1,1], tex_reps=1);

include<BOSL2/std.scad>

s1 = square(1);

s2 = select(s1,0,2);

skin([s1,s2],z=[0,1],slices=0);

left(1)skin([s1,s1,s2],z=[0,1,2],slices=0);

back(1.5)prismoid([2,1],[1,1],h=1,shift=[-1/2,0]);

On Wed, Jan 21, 2026 at 11:06 William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:

Nice!

Guenther pointed out that I got it wrong, but I was able to fix it by
changing one number (hard-coded --- will have to figure out the
trigonometry or other mechanism for placement).

William

On Wednesday, January 21, 2026 at 09:29:50 AM EST, Michael Möller <
private2michael@gmail.com> wrote:

// units
Zero = 0 ;
One = 25 ;
Two = One*2 ;

module Diagonal () {
polyhedron([ [Zero,Zero,Zero], [Zero,One,One], [One,Zero,One],
[Zero,Zero,One] ],
[ [0,1,3], [0,3,2], [1,2,3], [0,2,1] ]) ;
}

difference () {
cube(Two) ;
translate([Zero,Zero,One]) {
cube([One,Two,One]) ;
cube([Two,One,One]) ;
}
translate([Zero,-One,Zero]) rotate([0,-45,0]) cube([Two,Two,Two]) ;
translate([One,One,One]) Diagonal() ;
translate([Zero,One,Zero]) Diagonal() ;
}

Yeah, the "Diagonal" is a bit of a cheat I feel, but I am so bad at the
Two-Rotations with the acos/atan functions.
Next version :-)

Msquare

On Wed, 21 Jan 2026 at 14:31, William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:

This was recently put up on Reddit:

I believe I got it in Block/OpenSCAD, ~20 minutes:

https://www.blockscad3d.com/community/projects/2052961

click on a "Create" button to make an STL to check (or see the attached

.scad file).

Is there a simpler/better way to make this?

Maybe using BOSL2?

William


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Two ways to do it in BOSL2 include<BOSL2/std.scad> pat1 = [[0,0,1],[1,1,1],[1,1,1]]; pat2 = [[0,1],[1,1]]; top_half() textured_tile(pat1, [2,2,1], tex_reps=1) align(TOP, RIGHT+FWD) textured_tile(pat2, [1,1,1], tex_reps=1); include<BOSL2/std.scad> s1 = square(1); s2 = select(s1,0,2); skin([s1,s2],z=[0,1],slices=0); left(1)skin([s1,s1,s2],z=[0,1,2],slices=0); back(1.5)prismoid([2,1],[1,1],h=1,shift=[-1/2,0]); On Wed, Jan 21, 2026 at 11:06 William F. Adams via Discuss < discuss@lists.openscad.org> wrote: > Nice! > > Guenther pointed out that I got it wrong, but I was able to fix it by > changing one number (hard-coded --- will have to figure out the > trigonometry or other mechanism for placement). > > William > > > > > > > On Wednesday, January 21, 2026 at 09:29:50 AM EST, Michael Möller < > private2michael@gmail.com> wrote: > > > > > > // units > Zero = 0 ; > One = 25 ; > Two = One*2 ; > > module Diagonal () { > polyhedron([ [Zero,Zero,Zero], [Zero,One,One], [One,Zero,One], > [Zero,Zero,One] ], > [ [0,1,3], [0,3,2], [1,2,3], [0,2,1] ]) ; > } > > difference () { > cube(Two) ; > translate([Zero,Zero,One]) { > cube([One,Two,One]) ; > cube([Two,One,One]) ; > } > translate([Zero,-One,Zero]) rotate([0,-45,0]) cube([Two,Two,Two]) ; > translate([One,One,One]) Diagonal() ; > translate([Zero,One,Zero]) Diagonal() ; > } > > Yeah, the "Diagonal" is a bit of a cheat I feel, but I am so bad at the > Two-Rotations with the acos/atan functions. > Next version :-) > > Msquare > > > On Wed, 21 Jan 2026 at 14:31, William F. Adams via Discuss < > discuss@lists.openscad.org> wrote: > > This was recently put up on Reddit: > > > > > https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/ > > > > > > > > I believe I got it in Block/OpenSCAD, ~20 minutes: > > > > https://www.blockscad3d.com/community/projects/2052961 > > > > click on a "Create" button to make an STL to check (or see the attached > .scad file). > > > > Is there a simpler/better way to make this? > > > > Maybe using BOSL2? > > > > William > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jordan Brown
Wed, Jan 21, 2026 7:33 PM

Just under 9 minutes.  Note that the * line is a tool I used to see the
numbers of the vertexes.  Once I had all 27 vertexes, the tedious part
was just stringing them together into faces.

points = [ for (x=[0:2], y=[0:2], z=[0:2]) [x,y,z] ];
*color("black") for (i = [0:len(points)-1]) translate(points[i]) linear_extrude(h=0.01) text(str(i), size=0.2, halign="center", valign="center");
faces = [
    [0,9,18,21,24,15,6,3],
    [18,22,25,24,21,18],
    [25,22,13,16],
    [18,9,13,22],
    [0,1,9],
    [1,13,9],
    [1,4,13],
    [4,5,13],
    [5,17,13],
    [13,17,16],
    [5,8,17],
    [0,3,6,7,8,5,4,1],
    [6,15,24,25,16,17,8,7],
];
polyhedron(points=points, faces=faces);

Calculating the volume and thence the mass is left as an exercise for
the reader.

Just under 9 minutes.  Note that the * line is a tool I used to see the numbers of the vertexes.  Once I had all 27 vertexes, the tedious part was just stringing them together into faces. points = [ for (x=[0:2], y=[0:2], z=[0:2]) [x,y,z] ]; *color("black") for (i = [0:len(points)-1]) translate(points[i]) linear_extrude(h=0.01) text(str(i), size=0.2, halign="center", valign="center"); faces = [ [0,9,18,21,24,15,6,3], [18,22,25,24,21,18], [25,22,13,16], [18,9,13,22], [0,1,9], [1,13,9], [1,4,13], [4,5,13], [5,17,13], [13,17,16], [5,8,17], [0,3,6,7,8,5,4,1], [6,15,24,25,16,17,8,7], ]; polyhedron(points=points, faces=faces); Calculating the volume and thence the mass is left as an exercise for the reader.
CM
Curt McDowell
Thu, Jan 22, 2026 9:44 AM

Here's my entry. Although it's vanilla code, it's just about as readable
as a polyhedron()!

difference() {
     union() {
         translate([-1, 0, 0]) cube([2, 1, 1]);
         translate([-1, 0, 1]) cube(1);
     }

     translate([1, 1, 1] * 2 / 3)
         rotate([0, atan(sqrt(2)), 45])
             translate([-2, -2, 0]) cube(4);
}

difference() {
     translate([-1, 1, 0]) cube([2, 1, 1]);
     translate([0, 0, 1]) rotate([0, 45, 0]) cube(3);
}

Anyone else notice that /command line/ OpenSCAD can't parse original
attachment because it is UTF-8 (has the UTF-8 prefix) ?

$ openscad --version
OpenSCAD version 2026.01.02
$ openscad "MarkStoddard Block.scad" /*<=== Opens window and
displays correctly*/
$ openscad "MarkStoddard Block.scad" -o out.stl
ERROR: Parser error: syntax error in file MarkStoddard Block.scad,
line 1
Can't parse file 'MarkStoddard Block.scad'!

$ dos2unix "MarkStoddard Block.scad"
dos2unix: converting file MarkStoddard Block.scad to Unix format...
$ openscad "MarkStoddard Block.scad" -o out.stl
Geometries in cache: 17
Geometry cache size in bytes: 17672
CGAL Polyhedrons in cache: 2
CGAL cache size in bytes: 0
Total rendering time: 0:00:00.023
    Top level object is a 3D object (manifold):
    Status:     NoError
    Genus:      0
    Vertices:       18
    Facets:         32

If one edits the file in OpenSCAD, the file is saved back as ASCII.
After that it can be processed from the command line. (If one edits the
file in Emacs or Vim, the file is saved back as UTF-8.)

Possible bug 1: should be able to process a UTF-8 file from the command
line (at the very least, ignore the prefix)
Possible bug 2: should be able to edit a UTF-8 file and save it back as
UTF-8 (a bigger can of worms)

-Curt

On 1/21/26 05:30, William F. Adams via Discuss wrote:

This was recently put up on Reddit:

https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/

I believe I got it in Block/OpenSCAD, ~20 minutes:

https://www.blockscad3d.com/community/projects/2052961

click on a "Create" button to make an STL to check (or see the attached .scad file).

Is there a simpler/better way to make this?

Maybe using BOSL2?

William


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Here's my entry. Although it's vanilla code, it's just about as readable as a polyhedron()! difference() {     union() {         translate([-1, 0, 0]) cube([2, 1, 1]);         translate([-1, 0, 1]) cube(1);     }     translate([1, 1, 1] * 2 / 3)         rotate([0, atan(sqrt(2)), 45])             translate([-2, -2, 0]) cube(4); } difference() {     translate([-1, 1, 0]) cube([2, 1, 1]);     translate([0, 0, 1]) rotate([0, 45, 0]) cube(3); } Anyone else notice that /command line/ OpenSCAD can't parse original attachment because it is UTF-8 (has the UTF-8 prefix) ? $ openscad --version OpenSCAD version 2026.01.02 $ openscad "MarkStoddard Block.scad" /*<=== Opens window and displays correctly*/ $ openscad "MarkStoddard Block.scad" -o out.stl ERROR: Parser error: syntax error in file MarkStoddard Block.scad, line 1 Can't parse file 'MarkStoddard Block.scad'! $ dos2unix "MarkStoddard Block.scad" dos2unix: converting file MarkStoddard Block.scad to Unix format... $ openscad "MarkStoddard Block.scad" -o out.stl Geometries in cache: 17 Geometry cache size in bytes: 17672 CGAL Polyhedrons in cache: 2 CGAL cache size in bytes: 0 Total rendering time: 0:00:00.023    Top level object is a 3D object (manifold):    Status:     NoError    Genus:      0    Vertices:       18    Facets:         32 If one edits the file in OpenSCAD, the file is saved back as ASCII. After that it can be processed from the command line. (If one edits the file in Emacs or Vim, the file is saved back as UTF-8.) Possible bug 1: should be able to process a UTF-8 file from the command line (at the very least, ignore the prefix) Possible bug 2: should be able to edit a UTF-8 file and save it back as UTF-8 (a bigger can of worms) -Curt On 1/21/26 05:30, William F. Adams via Discuss wrote: > This was recently put up on Reddit: > > https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/ > > > > I believe I got it in Block/OpenSCAD, ~20 minutes: > > https://www.blockscad3d.com/community/projects/2052961 > > click on a "Create" button to make an STL to check (or see the attached .scad file). > > Is there a simpler/better way to make this? > > Maybe using BOSL2? > > William > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
GS
Guenther Sohler
Thu, Jan 22, 2026 9:49 AM

Hey, that's an awesome short.
you are an absolute geometry wizard :)

On Thu, Jan 22, 2026 at 10:44 AM Curt McDowell via Discuss <
discuss@lists.openscad.org> wrote:

Here's my entry. Although it's vanilla code, it's just about as readable
as a polyhedron()!

difference() {
union() {
translate([-1, 0, 0]) cube([2, 1, 1]);
translate([-1, 0, 1]) cube(1);
}

 translate([1, 1, 1] * 2 / 3)
     rotate([0, atan(sqrt(2)), 45])
         translate([-2, -2, 0]) cube(4);

}

difference() {
translate([-1, 1, 0]) cube([2, 1, 1]);
translate([0, 0, 1]) rotate([0, 45, 0]) cube(3);
}

Anyone else notice that command line OpenSCAD can't parse original
attachment because it is UTF-8 (has the UTF-8 prefix) ?

$ openscad --version
OpenSCAD version 2026.01.02
$ openscad "MarkStoddard Block.scad"      <=== Opens window and
displays correctly

$ openscad "MarkStoddard Block.scad" -o out.stl
ERROR: Parser error: syntax error in file MarkStoddard Block.scad, line 1
Can't parse file 'MarkStoddard Block.scad'!

$ dos2unix "MarkStoddard Block.scad"
dos2unix: converting file MarkStoddard Block.scad to Unix format...
$ openscad "MarkStoddard Block.scad" -o out.stl
Geometries in cache: 17
Geometry cache size in bytes: 17672
CGAL Polyhedrons in cache: 2
CGAL cache size in bytes: 0
Total rendering time: 0:00:00.023
Top level object is a 3D object (manifold):
Status:    NoError
Genus:      0
Vertices:      18
Facets:        32

If one edits the file in OpenSCAD, the file is saved back as ASCII. After
that it can be processed from the command line. (If one edits the file in
Emacs or Vim, the file is saved back as UTF-8.)

Possible bug 1: should be able to process a UTF-8 file from the command
line (at the very least, ignore the prefix)
Possible bug 2: should be able to edit a UTF-8 file and save it back as
UTF-8 (a bigger can of worms)

-Curt

On 1/21/26 05:30, William F. Adams via Discuss wrote:

This was recently put up on Reddit:
https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/

I believe I got it in Block/OpenSCAD, ~20 minutes:
https://www.blockscad3d.com/community/projects/2052961

click on a "Create" button to make an STL to check (or see the attached .scad file).

Is there a simpler/better way to make this?

Maybe using BOSL2?

William


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Hey, that's an awesome short. you are an absolute geometry wizard :) On Thu, Jan 22, 2026 at 10:44 AM Curt McDowell via Discuss < discuss@lists.openscad.org> wrote: > Here's my entry. Although it's vanilla code, it's just about as readable > as a polyhedron()! > > difference() { > union() { > translate([-1, 0, 0]) cube([2, 1, 1]); > translate([-1, 0, 1]) cube(1); > } > > translate([1, 1, 1] * 2 / 3) > rotate([0, atan(sqrt(2)), 45]) > translate([-2, -2, 0]) cube(4); > } > > difference() { > translate([-1, 1, 0]) cube([2, 1, 1]); > translate([0, 0, 1]) rotate([0, 45, 0]) cube(3); > } > > Anyone else notice that *command line* OpenSCAD can't parse original > attachment because it is UTF-8 (has the UTF-8 prefix) ? > > $ openscad --version > OpenSCAD version 2026.01.02 > $ openscad "MarkStoddard Block.scad" *<=== Opens window and > displays correctly* > $ openscad "MarkStoddard Block.scad" -o out.stl > ERROR: Parser error: syntax error in file MarkStoddard Block.scad, line 1 > Can't parse file 'MarkStoddard Block.scad'! > > $ dos2unix "MarkStoddard Block.scad" > dos2unix: converting file MarkStoddard Block.scad to Unix format... > $ openscad "MarkStoddard Block.scad" -o out.stl > Geometries in cache: 17 > Geometry cache size in bytes: 17672 > CGAL Polyhedrons in cache: 2 > CGAL cache size in bytes: 0 > Total rendering time: 0:00:00.023 > Top level object is a 3D object (manifold): > Status: NoError > Genus: 0 > Vertices: 18 > Facets: 32 > > If one edits the file in OpenSCAD, the file is saved back as ASCII. After > that it can be processed from the command line. (If one edits the file in > Emacs or Vim, the file is saved back as UTF-8.) > > Possible bug 1: should be able to process a UTF-8 file from the command > line (at the very least, ignore the prefix) > Possible bug 2: should be able to edit a UTF-8 file and save it back as > UTF-8 (a bigger can of worms) > > -Curt > > On 1/21/26 05:30, William F. Adams via Discuss wrote: > > This was recently put up on Reddit: > https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/ > > > > I believe I got it in Block/OpenSCAD, ~20 minutes: > https://www.blockscad3d.com/community/projects/2052961 > > click on a "Create" button to make an STL to check (or see the attached .scad file). > > Is there a simpler/better way to make this? > > Maybe using BOSL2? > > William > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
TA
Todd Allen
Thu, Jan 22, 2026 4:26 PM

Here's my entry. Although it's vanilla code, it's just about as readable

as a polyhedron()!

We have a winner!

On Thu, Jan 22, 2026 at 3:44 AM Curt McDowell via Discuss <
discuss@lists.openscad.org> wrote:

Here's my entry. Although it's vanilla code, it's just about as readable
as a polyhedron()!

difference() {
union() {
translate([-1, 0, 0]) cube([2, 1, 1]);
translate([-1, 0, 1]) cube(1);
}

 translate([1, 1, 1] * 2 / 3)
     rotate([0, atan(sqrt(2)), 45])
         translate([-2, -2, 0]) cube(4);

}

difference() {
translate([-1, 1, 0]) cube([2, 1, 1]);
translate([0, 0, 1]) rotate([0, 45, 0]) cube(3);
}

Anyone else notice that command line OpenSCAD can't parse original
attachment because it is UTF-8 (has the UTF-8 prefix) ?

$ openscad --version
OpenSCAD version 2026.01.02
$ openscad "MarkStoddard Block.scad"      <=== Opens window and
displays correctly

$ openscad "MarkStoddard Block.scad" -o out.stl
ERROR: Parser error: syntax error in file MarkStoddard Block.scad, line 1
Can't parse file 'MarkStoddard Block.scad'!

$ dos2unix "MarkStoddard Block.scad"
dos2unix: converting file MarkStoddard Block.scad to Unix format...
$ openscad "MarkStoddard Block.scad" -o out.stl
Geometries in cache: 17
Geometry cache size in bytes: 17672
CGAL Polyhedrons in cache: 2
CGAL cache size in bytes: 0
Total rendering time: 0:00:00.023
Top level object is a 3D object (manifold):
Status:    NoError
Genus:      0
Vertices:      18
Facets:        32

If one edits the file in OpenSCAD, the file is saved back as ASCII. After
that it can be processed from the command line. (If one edits the file in
Emacs or Vim, the file is saved back as UTF-8.)

Possible bug 1: should be able to process a UTF-8 file from the command
line (at the very least, ignore the prefix)
Possible bug 2: should be able to edit a UTF-8 file and save it back as
UTF-8 (a bigger can of worms)

-Curt

On 1/21/26 05:30, William F. Adams via Discuss wrote:

This was recently put up on Reddit:
https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/

I believe I got it in Block/OpenSCAD, ~20 minutes:
https://www.blockscad3d.com/community/projects/2052961

click on a "Create" button to make an STL to check (or see the attached .scad file).

Is there a simpler/better way to make this?

Maybe using BOSL2?

William


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

> Here's my entry. Although it's vanilla code, it's just about as readable as a polyhedron()! We have a winner! On Thu, Jan 22, 2026 at 3:44 AM Curt McDowell via Discuss < discuss@lists.openscad.org> wrote: > Here's my entry. Although it's vanilla code, it's just about as readable > as a polyhedron()! > > difference() { > union() { > translate([-1, 0, 0]) cube([2, 1, 1]); > translate([-1, 0, 1]) cube(1); > } > > translate([1, 1, 1] * 2 / 3) > rotate([0, atan(sqrt(2)), 45]) > translate([-2, -2, 0]) cube(4); > } > > difference() { > translate([-1, 1, 0]) cube([2, 1, 1]); > translate([0, 0, 1]) rotate([0, 45, 0]) cube(3); > } > > Anyone else notice that *command line* OpenSCAD can't parse original > attachment because it is UTF-8 (has the UTF-8 prefix) ? > > $ openscad --version > OpenSCAD version 2026.01.02 > $ openscad "MarkStoddard Block.scad" *<=== Opens window and > displays correctly* > $ openscad "MarkStoddard Block.scad" -o out.stl > ERROR: Parser error: syntax error in file MarkStoddard Block.scad, line 1 > Can't parse file 'MarkStoddard Block.scad'! > > $ dos2unix "MarkStoddard Block.scad" > dos2unix: converting file MarkStoddard Block.scad to Unix format... > $ openscad "MarkStoddard Block.scad" -o out.stl > Geometries in cache: 17 > Geometry cache size in bytes: 17672 > CGAL Polyhedrons in cache: 2 > CGAL cache size in bytes: 0 > Total rendering time: 0:00:00.023 > Top level object is a 3D object (manifold): > Status: NoError > Genus: 0 > Vertices: 18 > Facets: 32 > > If one edits the file in OpenSCAD, the file is saved back as ASCII. After > that it can be processed from the command line. (If one edits the file in > Emacs or Vim, the file is saved back as UTF-8.) > > Possible bug 1: should be able to process a UTF-8 file from the command > line (at the very least, ignore the prefix) > Possible bug 2: should be able to edit a UTF-8 file and save it back as > UTF-8 (a bigger can of worms) > > -Curt > > On 1/21/26 05:30, William F. Adams via Discuss wrote: > > This was recently put up on Reddit: > https://old.reddit.com/r/FreeCAD/comments/1qibk1y/fun_freecad_model_to_try_to_build/ > > > > I believe I got it in Block/OpenSCAD, ~20 minutes: > https://www.blockscad3d.com/community/projects/2052961 > > click on a "Create" button to make an STL to check (or see the attached .scad file). > > Is there a simpler/better way to make this? > > Maybe using BOSL2? > > William > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jordan Brown
Thu, Jan 22, 2026 5:31 PM

Here's a geometric answer.  I'm deeply dissatisfied by the need to
resort to trig.  Intuitively, it seems like you should be able to
construct that figure using a series of 45° rotates, but I wasn't able
to.  Note also that this violates the sometimes-rule of avoiding
coincident faces.  I found constructing the polyhedron to be
significantly easier.  This required actual thinking; the polyhedron was
just a bit tedious.

module truncatedCube() {
difference() {
cube();
translate([1,0,0])
rotate([0,-atan2(1/2,sqrt(2)/2),-45])
translate([0,-1,0]) cube(2);
}
}

module diagonalHalfCube() {
difference() {
cube();
rotate([45,0,0]) translate([-1,0,0]) cube(3);
}
}

truncatedCube();
translate([0,1,1]) truncatedCube();
translate([0,1,0]) cube();
translate([1,1,0]) cube();
translate([1,0,0]) diagonalHalfCube();

Here's a geometric answer.  I'm deeply dissatisfied by the need to resort to trig.  Intuitively, it seems like you should be able to construct that figure using a series of 45° rotates, but I wasn't able to.  Note also that this violates the sometimes-rule of avoiding coincident faces.  I found constructing the polyhedron to be significantly easier.  This required actual thinking; the polyhedron was just a bit tedious. module truncatedCube() { difference() { cube(); translate([1,0,0]) rotate([0,-atan2(1/2,sqrt(2)/2),-45]) translate([0,-1,0]) cube(2); } } module diagonalHalfCube() { difference() { cube(); rotate([45,0,0]) translate([-1,0,0]) cube(3); } } truncatedCube(); translate([0,1,1]) truncatedCube(); translate([0,1,0]) cube(); translate([1,1,0]) cube(); translate([1,0,0]) diagonalHalfCube();
AM
Adrian Mariano
Thu, Jan 22, 2026 5:48 PM

Jordan, BOSL2 will help you avoid that trig and decrease the required
thinking as shown below.  :)    I think I like my second BOSL2 solution the
best.  To me it seems the most comprehensible.

include<BOSL2/std.scad>

module truncatedCube() {
difference() {
cube();
translate([1,0,0])
rot(from=[1,0,0],to=[1,-1,1])
translate([0,-1,0]) cube(2);
}
}

module diagonalHalfCube() {
difference() {
cube();
rotate([45,0,0]) translate([-1,0,0]) cube(3);
}
}

truncatedCube();
translate([0,1,1]) truncatedCube();
translate([0,1,0]) cube();
translate([1,1,0]) cube();
translate([1,0,0]) diagonalHalfCube();

On Thu, Jan 22, 2026 at 12:31 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:

Here's a geometric answer.  I'm deeply dissatisfied by the need to resort
to trig.  Intuitively, it seems like you should be able to construct that
figure using a series of 45° rotates, but I wasn't able to.  Note also that
this violates the sometimes-rule of avoiding coincident faces.  I found
constructing the polyhedron to be significantly easier.  This required
actual thinking; the polyhedron was just a bit tedious.

module truncatedCube() {
difference() {
cube();
translate([1,0,0])
rotate([0,-atan2(1/2,sqrt(2)/2),-45])
translate([0,-1,0]) cube(2);
}
}

module diagonalHalfCube() {
difference() {
cube();
rotate([45,0,0]) translate([-1,0,0]) cube(3);
}
}

truncatedCube();
translate([0,1,1]) truncatedCube();
translate([0,1,0]) cube();
translate([1,1,0]) cube();
translate([1,0,0]) diagonalHalfCube();


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Jordan, BOSL2 will help you avoid that trig and decrease the required thinking as shown below. :) I think I like my second BOSL2 solution the best. To me it seems the most comprehensible. include<BOSL2/std.scad> module truncatedCube() { difference() { cube(); translate([1,0,0]) rot(from=[1,0,0],to=[1,-1,1]) translate([0,-1,0]) cube(2); } } module diagonalHalfCube() { difference() { cube(); rotate([45,0,0]) translate([-1,0,0]) cube(3); } } truncatedCube(); translate([0,1,1]) truncatedCube(); translate([0,1,0]) cube(); translate([1,1,0]) cube(); translate([1,0,0]) diagonalHalfCube(); On Thu, Jan 22, 2026 at 12:31 PM Jordan Brown via Discuss < discuss@lists.openscad.org> wrote: > Here's a geometric answer. I'm deeply dissatisfied by the need to resort > to trig. Intuitively, it seems like you should be able to construct that > figure using a series of 45° rotates, but I wasn't able to. Note also that > this violates the sometimes-rule of avoiding coincident faces. I found > constructing the polyhedron to be significantly easier. This required > actual thinking; the polyhedron was just a bit tedious. > > module truncatedCube() { > difference() { > cube(); > translate([1,0,0]) > rotate([0,-atan2(1/2,sqrt(2)/2),-45]) > translate([0,-1,0]) cube(2); > } > } > > module diagonalHalfCube() { > difference() { > cube(); > rotate([45,0,0]) translate([-1,0,0]) cube(3); > } > } > > truncatedCube(); > translate([0,1,1]) truncatedCube(); > translate([0,1,0]) cube(); > translate([1,1,0]) cube(); > translate([1,0,0]) diagonalHalfCube(); > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org