AM
Adrian Mariano
Thu, Jan 1, 2026 5:56 PM
I must be missing something here. If you have a module that makes an
object and you have some assumed bounding box known you can intersect with
one half-section and then intersect with another half section, and you can
translate the intersections apart so they do not overlap.
BOSL2 provides this as
https://github.com/BelfrySCAD/BOSL2/wiki/partitions.scad#module-partition
in a fairly generic fashion, but the concept seems straight forward.
On Wed, Dec 31, 2025 at 11:06 PM Cory Cross via Discuss <
discuss@lists.openscad.org> wrote:
On 12/31/2025 1:34 PM, Cory Cross via Discuss wrote:
No, the data that I "currently" (which is to say, a year or two ago)
have access to is not broken up into distinct volumes. It is, in
essence, the same as the arguments to a single polyhedron() call: a
list of vertexes and a list of faces.
All I meant was it was essentially a prerequisite to executing the code I
shared, not that it could already do this. I apologize for not
communicating clearly.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I must be missing something here. If you have a module that makes an
object and you have some assumed bounding box known you can intersect with
one half-section and then intersect with another half section, and you can
translate the intersections apart so they do not overlap.
BOSL2 provides this as
https://github.com/BelfrySCAD/BOSL2/wiki/partitions.scad#module-partition
in a fairly generic fashion, but the concept seems straight forward.
On Wed, Dec 31, 2025 at 11:06 PM Cory Cross via Discuss <
discuss@lists.openscad.org> wrote:
>
>
> On December 31, 2025 6:06:43 PM PST, Jordan Brown via Discuss <
> discuss@lists.openscad.org> wrote:
> >On 12/31/2025 1:34 PM, Cory Cross via Discuss wrote:
> >> Jordan's "geometry literals
> >> <https://github.com/openscad/openscad/pull/4478>," when complete,
> >> could allow iterating across distinct meshes.
> >
> >No, the data that I "currently" (which is to say, a year or two ago)
> >have access to is not broken up into distinct volumes. It is, in
> >essence, the same as the arguments to a single polyhedron() call: a
> >list of vertexes and a list of faces.
>
> All I meant was it was essentially a prerequisite to executing the code I
> shared, not that it could already do this. I apologize for not
> communicating clearly.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jordan Brown
Fri, Jan 2, 2026 6:11 PM
On 1/1/2026 9:56 AM, Adrian Mariano via Discuss wrote:
I must be missing something here. If you have a module that makes an
object and you have some assumed bounding box known you can intersect
with one half-section and then intersect with another half section,
and you can translate the intersections apart so they do not overlap.
He doesn't have the half-sections. He has the cut volume, the negative
shape.
That is, in
difference() {
cube(20, center=true);
cube([1,30,30], center=true);
}
he has the second cube. (And of course it's not as simple as a cube.)
On 1/1/2026 9:56 AM, Adrian Mariano via Discuss wrote:
> I must be missing something here. If you have a module that makes an
> object and you have some assumed bounding box known you can intersect
> with one half-section and then intersect with another half section,
> and you can translate the intersections apart so they do not overlap.
He doesn't have the half-sections. He has the cut volume, the negative
shape.
That is, in
> difference() {
> cube(20, center=true);
> cube([1,30,30], center=true);
> }
he has the second cube. (And of course it's not as simple as a cube.)
CA
Carsten Arnholm
Fri, Jan 2, 2026 7:20 PM
Such objects can be separated automatically using topological analysis
(as in 'polyfix'). Assuming the original file from OpenSCAD is
"boxes.stl", you can split them into disjoint "lumps"
polyfix -lumps ./boxes.stl -out=*.obj
The result is one file per disjoint lump. This works by repeatedly
looking up neighbouring faces, it works as long as the parts are truly
disjoint. The complexity of the shapes is irrelevant.
On 02/01/2026 19.11, Jordan Brown via Discuss wrote:
On 1/1/2026 9:56 AM, Adrian Mariano via Discuss wrote:
I must be missing something here. If you have a module that makes an
object and you have some assumed bounding box known you can intersect
with one half-section and then intersect with another half section,
and you can translate the intersections apart so they do not overlap.
He doesn't have the half-sections. He has the cut volume, the
negative shape.
That is, in
difference() {
cube(20, center=true);
cube([1,30,30], center=true);
}
Such objects can be separated automatically using topological analysis
(as in 'polyfix'). Assuming the original file from OpenSCAD is
"boxes.stl", you can split them into disjoint "lumps"
polyfix -lumps ./boxes.stl -out=*.obj
The result is one file per disjoint lump. This works by repeatedly
looking up neighbouring faces, it works as long as the parts are truly
disjoint. The complexity of the shapes is irrelevant.
On 02/01/2026 19.11, Jordan Brown via Discuss wrote:
> On 1/1/2026 9:56 AM, Adrian Mariano via Discuss wrote:
>> I must be missing something here. If you have a module that makes an
>> object and you have some assumed bounding box known you can intersect
>> with one half-section and then intersect with another half section,
>> and you can translate the intersections apart so they do not overlap.
>
> He doesn't have the half-sections. He has the cut volume, the
> negative shape.
>
> That is, in
>
>> difference() {
>> cube(20, center=true);
>> cube([1,30,30], center=true);
>> }
>
> he has the second cube. (And of course it's not as simple as a cube.)
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email todiscuss-leave@lists.openscad.org
CM
Curt McDowell
Sat, Jan 3, 2026 3:08 AM
Rogier,
I realize you'd like the whole thing in OpenSCAD, but it seems very
difficult.
I have a command utility that splits parts out of an STL into multiple
STL files, in case that helps. I also have a utility that converts an
STL back to an OpenSCAD file (as a single polyhedron).
The code is a work in progress, but I've attached a clean-building ZIP
file. If you're on Linux, you can just go to MeshUtil and type "make".
After putting your example in split-test.scad:
$ openscad -o split-test.stl split-test.scad
$ ./stl_split split-test.stl
Number of triangles: 1996
Split into 2 parts
Writing: part.1.stl
Writing: part.2.stl
$ ./stl_to_scad part.1.stl part.1.scad
$ ./stl_to_scad part.2.stl part.2.scad
$ openscad part.*.scad
BTW, that's a pretty cool object to come out of so few lines of SCAD!
Regards,
Curt
On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
Hi,
I am working on objects that are created like this:
m = 0.5;
cs = 50;
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square ([100,m], center=true);
}
Put it on its side and 3D-print and you have a simple puzzle to put it
back together.
But the procedure is to click "split to objects" in the slicer and
orient the pieces before printing. This adds a step that needs to be
redone with an intelligent person behind the keyboard. I want to make
the prints reproducible by doing it in openscad before exporting.
This requires being able to separate the two resulting objects.
Does anybody have a way of doing this?
In this simplest-example,
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
translate ([-50,0])square ([100,100]);
}
works to get one half. But my splitting shapes are quickly becoming
more complicated from here on out.
Roger.
Rogier,
I realize you'd like the whole thing in OpenSCAD, but it seems very
difficult.
I have a command utility that splits parts out of an STL into multiple
STL files, in case that helps. I also have a utility that converts an
STL back to an OpenSCAD file (as a single polyhedron).
The code is a work in progress, but I've attached a clean-building ZIP
file. If you're on Linux, you can just go to MeshUtil and type "make".
After putting your example in split-test.scad:
$ openscad -o split-test.stl split-test.scad
$ ./stl_split split-test.stl
Number of triangles: 1996
Split into 2 parts
Writing: part.1.stl
Writing: part.2.stl
$ ./stl_to_scad part.1.stl part.1.scad
$ ./stl_to_scad part.2.stl part.2.scad
$ openscad part.*.scad
BTW, that's a pretty cool object to come out of so few lines of SCAD!
Regards,
Curt
On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
> Hi,
>
> I am working on objects that are created like this:
>
> --------------
> m = 0.5;
> cs = 50;
>
> difference () {
> translate ([0,0,cs/2+.001]) cube (cs, center=true);
> linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square ([100,m], center=true);
> }
> --------------
>
> Put it on its side and 3D-print and you have a simple puzzle to put it
> back together.
>
> But the procedure is to click "split to objects" in the slicer and
> orient the pieces before printing. This adds a step that needs to be
> redone with an intelligent person behind the keyboard. I want to make
> the prints reproducible by doing it in openscad before exporting.
>
> This requires being able to separate the two resulting objects.
>
> Does anybody have a way of doing this?
>
>
> In this simplest-example,
>
> difference () {
> translate ([0,0,cs/2+.001]) cube (cs, center=true);
> linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
> translate ([-50,0])square ([100,100]);
> }
>
> works to get one half. But my splitting shapes are quickly becoming
> more complicated from here on out.
>
> Roger.
>
RW
Rogier Wolff
Sat, Jan 3, 2026 11:46 AM
On Fri, Jan 02, 2026 at 07:08:06PM -0800, Curt McDowell wrote:
Rogier,
I realize you'd like the whole thing in OpenSCAD, but it seems very
difficult.
I have a command utility that splits parts out of an STL into multiple STL
files, in case that helps. I also have a utility that converts an STL back
to an OpenSCAD file (as a single polyhedron).
The code is a work in progress, but I've attached a clean-building ZIP file.
If you're on Linux, you can just go to MeshUtil and type "make".
After putting your example in split-test.scad:
$ openscad -o split-test.stl split-test.scad
$ ./stl_split split-test.stl
Number of triangles: 1996
Split into 2 parts
Writing: part.1.stl
Writing: part.2.stl
$ ./stl_to_scad part.1.stl part.1.scad
$ ./stl_to_scad part.2.stl part.2.scad
$ openscad part.*.scad
Oh, Cool!
I nowadays have a "newscad" script that creates an scad file that has
my "template". It includes my private openscad library (up, down,
dup3, stuff like that.) AND... it defines the "do_output" function.
This function normally does nothing. But there is a script waiting
for changed scads and when that runs the scad, it will generate each
of the output STL files from that openscad source.
If I add this to my bag-of-tricks, I can put a "do_split" in the output
section of my scad file, the script will first run the split(s) and THEN
all the output sections, so I can orient my split objects for printing
in the same scad file!
This looks very much like a workflow that I'm happy with. :-)
BTW, that's a pretty cool object to come out of so few lines of SCAD!
Idea by George Hart. (if you're a bit into math, you should have watched
vihart's videos on youtube 10 ish years ago. I just learned that you
can't go and watch them if you never did before: she deleted everything
in 2025. Anyway, George is her father.)
Anyway, thanks very much for your tool!
Roger.
Regards,
Curt
On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
Hi,
I am working on objects that are created like this:
m = 0.5;
cs = 50;
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square ([100,m], center=true);
}
Put it on its side and 3D-print and you have a simple puzzle to put it
back together.
But the procedure is to click "split to objects" in the slicer and
orient the pieces before printing. This adds a step that needs to be
redone with an intelligent person behind the keyboard. I want to make
the prints reproducible by doing it in openscad before exporting.
This requires being able to separate the two resulting objects.
Does anybody have a way of doing this?
In this simplest-example,
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
translate ([-50,0])square ([100,100]);
}
works to get one half. But my splitting shapes are quickly becoming
more complicated from here on out.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
On Fri, Jan 02, 2026 at 07:08:06PM -0800, Curt McDowell wrote:
> Rogier,
>
> I realize you'd like the whole thing in OpenSCAD, but it seems very
> difficult.
>
> I have a command utility that splits parts out of an STL into multiple STL
> files, in case that helps. I also have a utility that converts an STL back
> to an OpenSCAD file (as a single polyhedron).
>
> The code is a work in progress, but I've attached a clean-building ZIP file.
> If you're on Linux, you can just go to MeshUtil and type "make".
>
> After putting your example in split-test.scad:
>
> $ openscad -o split-test.stl split-test.scad
> $ ./stl_split split-test.stl
> Number of triangles: 1996
> Split into 2 parts
> Writing: part.1.stl
> Writing: part.2.stl
> $ ./stl_to_scad part.1.stl part.1.scad
> $ ./stl_to_scad part.2.stl part.2.scad
> $ openscad part.*.scad
>
Oh, Cool!
I nowadays have a "newscad" script that creates an scad file that has
my "template". It includes my private openscad library (up, down,
dup3, stuff like that.) AND... it defines the "do_output" function.
This function normally does nothing. But there is a script waiting
for changed scads and when that runs the scad, it will generate each
of the output STL files from that openscad source.
If I add this to my bag-of-tricks, I can put a "do_split" in the output
section of my scad file, the script will first run the split(s) and THEN
all the output sections, so I can orient my split objects for printing
in the same scad file!
This looks very much like a workflow that I'm happy with. :-)
> BTW, that's a pretty cool object to come out of so few lines of SCAD!
Idea by George Hart. (if you're a bit into math, you should have watched
vihart's videos on youtube 10 ish years ago. I just learned that you
can't go and watch them if you never did before: she deleted everything
in 2025. Anyway, George is her father.)
Anyway, thanks very much for your tool!
Roger.
> Regards,
> Curt
>
> On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
> > Hi,
> >
> > I am working on objects that are created like this:
> >
> > --------------
> > m = 0.5;
> > cs = 50;
> >
> > difference () {
> > translate ([0,0,cs/2+.001]) cube (cs, center=true);
> > linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square ([100,m], center=true);
> > }
> > --------------
> >
> > Put it on its side and 3D-print and you have a simple puzzle to put it
> > back together.
> >
> > But the procedure is to click "split to objects" in the slicer and
> > orient the pieces before printing. This adds a step that needs to be
> > redone with an intelligent person behind the keyboard. I want to make
> > the prints reproducible by doing it in openscad before exporting.
> >
> > This requires being able to separate the two resulting objects.
> >
> > Does anybody have a way of doing this?
> >
> >
> > In this simplest-example,
> >
> > difference () {
> > translate ([0,0,cs/2+.001]) cube (cs, center=true);
> > linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
> > translate ([-50,0])square ([100,100]);
> > }
> >
> > works to get one half. But my splitting shapes are quickly becoming
> > more complicated from here on out.
> >
> > Roger.
> >
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
JB
Jon Bondy
Sat, Jan 3, 2026 1:07 PM
Rogier:
I am puzzled that Carsten's similar program did not receive similar
enthusiasm. He has had this working for many years. I wonder if we are
seeing the same stream of messages.
Jon
On 1/3/2026 6:46 AM, Rogier Wolff via Discuss wrote:
On Fri, Jan 02, 2026 at 07:08:06PM -0800, Curt McDowell wrote:
Rogier,
I realize you'd like the whole thing in OpenSCAD, but it seems very
difficult.
I have a command utility that splits parts out of an STL into multiple STL
files, in case that helps. I also have a utility that converts an STL back
to an OpenSCAD file (as a single polyhedron).
The code is a work in progress, but I've attached a clean-building ZIP file.
If you're on Linux, you can just go to MeshUtil and type "make".
After putting your example in split-test.scad:
$ openscad -o split-test.stl split-test.scad
$ ./stl_split split-test.stl
Number of triangles: 1996
Split into 2 parts
Writing: part.1.stl
Writing: part.2.stl
$ ./stl_to_scad part.1.stl part.1.scad
$ ./stl_to_scad part.2.stl part.2.scad
$ openscad part.*.scad
Oh, Cool!
I nowadays have a "newscad" script that creates an scad file that has
my "template". It includes my private openscad library (up, down,
dup3, stuff like that.) AND... it defines the "do_output" function.
This function normally does nothing. But there is a script waiting
for changed scads and when that runs the scad, it will generate each
of the output STL files from that openscad source.
If I add this to my bag-of-tricks, I can put a "do_split" in the output
section of my scad file, the script will first run the split(s) and THEN
all the output sections, so I can orient my split objects for printing
in the same scad file!
This looks very much like a workflow that I'm happy with. :-)
BTW, that's a pretty cool object to come out of so few lines of SCAD!
Idea by George Hart. (if you're a bit into math, you should have watched
vihart's videos on youtube 10 ish years ago. I just learned that you
can't go and watch them if you never did before: she deleted everything
in 2025. Anyway, George is her father.)
Anyway, thanks very much for your tool!
Roger.
Regards,
Curt
On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
Hi,
I am working on objects that are created like this:
m = 0.5;
cs = 50;
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square ([100,m], center=true);
}
Put it on its side and 3D-print and you have a simple puzzle to put it
back together.
But the procedure is to click "split to objects" in the slicer and
orient the pieces before printing. This adds a step that needs to be
redone with an intelligent person behind the keyboard. I want to make
the prints reproducible by doing it in openscad before exporting.
This requires being able to separate the two resulting objects.
Does anybody have a way of doing this?
In this simplest-example,
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
translate ([-50,0])square ([100,100]);
}
works to get one half. But my splitting shapes are quickly becoming
more complicated from here on out.
Roger.
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
Rogier:
I am puzzled that Carsten's similar program did not receive similar
enthusiasm. He has had this working for many years. I wonder if we are
seeing the same stream of messages.
Jon
On 1/3/2026 6:46 AM, Rogier Wolff via Discuss wrote:
> On Fri, Jan 02, 2026 at 07:08:06PM -0800, Curt McDowell wrote:
>> Rogier,
>>
>> I realize you'd like the whole thing in OpenSCAD, but it seems very
>> difficult.
>>
>> I have a command utility that splits parts out of an STL into multiple STL
>> files, in case that helps. I also have a utility that converts an STL back
>> to an OpenSCAD file (as a single polyhedron).
>>
>> The code is a work in progress, but I've attached a clean-building ZIP file.
>> If you're on Linux, you can just go to MeshUtil and type "make".
>>
>> After putting your example in split-test.scad:
>>
>> $ openscad -o split-test.stl split-test.scad
>> $ ./stl_split split-test.stl
>> Number of triangles: 1996
>> Split into 2 parts
>> Writing: part.1.stl
>> Writing: part.2.stl
>> $ ./stl_to_scad part.1.stl part.1.scad
>> $ ./stl_to_scad part.2.stl part.2.scad
>> $ openscad part.*.scad
>>
> Oh, Cool!
>
> I nowadays have a "newscad" script that creates an scad file that has
> my "template". It includes my private openscad library (up, down,
> dup3, stuff like that.) AND... it defines the "do_output" function.
>
> This function normally does nothing. But there is a script waiting
> for changed scads and when that runs the scad, it will generate each
> of the output STL files from that openscad source.
>
> If I add this to my bag-of-tricks, I can put a "do_split" in the output
> section of my scad file, the script will first run the split(s) and THEN
> all the output sections, so I can orient my split objects for printing
> in the same scad file!
>
> This looks very much like a workflow that I'm happy with. :-)
>
>> BTW, that's a pretty cool object to come out of so few lines of SCAD!
> Idea by George Hart. (if you're a bit into math, you should have watched
> vihart's videos on youtube 10 ish years ago. I just learned that you
> can't go and watch them if you never did before: she deleted everything
> in 2025. Anyway, George is her father.)
>
> Anyway, thanks very much for your tool!
>
> Roger.
>
>> Regards,
>> Curt
>>
>> On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
>>> Hi,
>>>
>>> I am working on objects that are created like this:
>>>
>>> --------------
>>> m = 0.5;
>>> cs = 50;
>>>
>>> difference () {
>>> translate ([0,0,cs/2+.001]) cube (cs, center=true);
>>> linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square ([100,m], center=true);
>>> }
>>> --------------
>>>
>>> Put it on its side and 3D-print and you have a simple puzzle to put it
>>> back together.
>>>
>>> But the procedure is to click "split to objects" in the slicer and
>>> orient the pieces before printing. This adds a step that needs to be
>>> redone with an intelligent person behind the keyboard. I want to make
>>> the prints reproducible by doing it in openscad before exporting.
>>>
>>> This requires being able to separate the two resulting objects.
>>>
>>> Does anybody have a way of doing this?
>>>
>>>
>>> In this simplest-example,
>>>
>>> difference () {
>>> translate ([0,0,cs/2+.001]) cube (cs, center=true);
>>> linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
>>> translate ([-50,0])square ([100,100]);
>>> }
>>>
>>> works to get one half. But my splitting shapes are quickly becoming
>>> more complicated from here on out.
>>>
>>> Roger.
>>>
>
>
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
AM
Adrian Mariano
Sat, Jan 3, 2026 1:56 PM
This task is an example of something we could do nativelyi if we had access
to the geometry internals (as posed in another thread on the list).
You can actually still watch the vi hart videos on vimeo. Actually there
are a bunch there I don't remember ever seeing on youtube.
https://vimeo.com/vihart
I personally really liked the "Doodling in Math Class" series, which are in
a "showcase" on vimeo. https://vimeo.com/showcase/11667238
On Sat, Jan 3, 2026 at 6:47 AM Rogier Wolff via Discuss <
discuss@lists.openscad.org> wrote:
On Fri, Jan 02, 2026 at 07:08:06PM -0800, Curt McDowell wrote:
Rogier,
I realize you'd like the whole thing in OpenSCAD, but it seems very
difficult.
I have a command utility that splits parts out of an STL into multiple
files, in case that helps. I also have a utility that converts an STL
to an OpenSCAD file (as a single polyhedron).
The code is a work in progress, but I've attached a clean-building ZIP
If you're on Linux, you can just go to MeshUtil and type "make".
After putting your example in split-test.scad:
$ openscad -o split-test.stl split-test.scad
$ ./stl_split split-test.stl
Number of triangles: 1996
Split into 2 parts
Writing: part.1.stl
Writing: part.2.stl
$ ./stl_to_scad part.1.stl part.1.scad
$ ./stl_to_scad part.2.stl part.2.scad
$ openscad part.*.scad
Oh, Cool!
I nowadays have a "newscad" script that creates an scad file that has
my "template". It includes my private openscad library (up, down,
dup3, stuff like that.) AND... it defines the "do_output" function.
This function normally does nothing. But there is a script waiting
for changed scads and when that runs the scad, it will generate each
of the output STL files from that openscad source.
If I add this to my bag-of-tricks, I can put a "do_split" in the output
section of my scad file, the script will first run the split(s) and THEN
all the output sections, so I can orient my split objects for printing
in the same scad file!
This looks very much like a workflow that I'm happy with. :-)
BTW, that's a pretty cool object to come out of so few lines of SCAD!
Idea by George Hart. (if you're a bit into math, you should have watched
vihart's videos on youtube 10 ish years ago. I just learned that you
can't go and watch them if you never did before: she deleted everything
in 2025. Anyway, George is her father.)
Anyway, thanks very much for your tool!
Roger.
Regards,
Curt
On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
Hi,
I am working on objects that are created like this:
m = 0.5;
cs = 50;
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square
}
Put it on its side and 3D-print and you have a simple puzzle to put it
back together.
But the procedure is to click "split to objects" in the slicer and
orient the pieces before printing. This adds a step that needs to be
redone with an intelligent person behind the keyboard. I want to make
the prints reproducible by doing it in openscad before exporting.
This requires being able to separate the two resulting objects.
Does anybody have a way of doing this?
In this simplest-example,
difference () {
translate ([0,0,cs/2+.001]) cube (cs, center=true);
linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
translate ([-50,0])square ([100,100]);
}
works to get one half. But my splitting shapes are quickly becoming
more complicated from here on out.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
This task is an example of something we could do nativelyi if we had access
to the geometry internals (as posed in another thread on the list).
You can actually still watch the vi hart videos on vimeo. Actually there
are a bunch there I don't remember ever seeing on youtube.
https://vimeo.com/vihart
I personally really liked the "Doodling in Math Class" series, which are in
a "showcase" on vimeo. https://vimeo.com/showcase/11667238
On Sat, Jan 3, 2026 at 6:47 AM Rogier Wolff via Discuss <
discuss@lists.openscad.org> wrote:
> On Fri, Jan 02, 2026 at 07:08:06PM -0800, Curt McDowell wrote:
> > Rogier,
> >
> > I realize you'd like the whole thing in OpenSCAD, but it seems very
> > difficult.
> >
> > I have a command utility that splits parts out of an STL into multiple
> STL
> > files, in case that helps. I also have a utility that converts an STL
> back
> > to an OpenSCAD file (as a single polyhedron).
> >
> > The code is a work in progress, but I've attached a clean-building ZIP
> file.
> > If you're on Linux, you can just go to MeshUtil and type "make".
> >
> > After putting your example in split-test.scad:
> >
> > $ openscad -o split-test.stl split-test.scad
> > $ ./stl_split split-test.stl
> > Number of triangles: 1996
> > Split into 2 parts
> > Writing: part.1.stl
> > Writing: part.2.stl
> > $ ./stl_to_scad part.1.stl part.1.scad
> > $ ./stl_to_scad part.2.stl part.2.scad
> > $ openscad part.*.scad
> >
>
> Oh, Cool!
>
> I nowadays have a "newscad" script that creates an scad file that has
> my "template". It includes my private openscad library (up, down,
> dup3, stuff like that.) AND... it defines the "do_output" function.
>
> This function normally does nothing. But there is a script waiting
> for changed scads and when that runs the scad, it will generate each
> of the output STL files from that openscad source.
>
> If I add this to my bag-of-tricks, I can put a "do_split" in the output
> section of my scad file, the script will first run the split(s) and THEN
> all the output sections, so I can orient my split objects for printing
> in the same scad file!
>
> This looks very much like a workflow that I'm happy with. :-)
>
> > BTW, that's a pretty cool object to come out of so few lines of SCAD!
>
> Idea by George Hart. (if you're a bit into math, you should have watched
> vihart's videos on youtube 10 ish years ago. I just learned that you
> can't go and watch them if you never did before: she deleted everything
> in 2025. Anyway, George is her father.)
>
> Anyway, thanks very much for your tool!
>
> Roger.
>
> > Regards,
> > Curt
> >
> > On 12/31/25 09:46, Rogier Wolff via Discuss wrote:
> > > Hi,
> > >
> > > I am working on objects that are created like this:
> > >
> > > --------------
> > > m = 0.5;
> > > cs = 50;
> > >
> > > difference () {
> > > translate ([0,0,cs/2+.001]) cube (cs, center=true);
> > > linear_extrude (height=cs+.002, twist = 5*90, convexity=10) square
> ([100,m], center=true);
> > > }
> > > --------------
> > >
> > > Put it on its side and 3D-print and you have a simple puzzle to put it
> > > back together.
> > >
> > > But the procedure is to click "split to objects" in the slicer and
> > > orient the pieces before printing. This adds a step that needs to be
> > > redone with an intelligent person behind the keyboard. I want to make
> > > the prints reproducible by doing it in openscad before exporting.
> > >
> > > This requires being able to separate the two resulting objects.
> > >
> > > Does anybody have a way of doing this?
> > >
> > >
> > > In this simplest-example,
> > >
> > > difference () {
> > > translate ([0,0,cs/2+.001]) cube (cs, center=true);
> > > linear_extrude (height=cs+.002, twist = 5*90, convexity=10)
> > > translate ([-50,0])square ([100,100]);
> > > }
> > >
> > > works to get one half. But my splitting shapes are quickly becoming
> > > more complicated from here on out.
> > >
> > > Roger.
> > >
>
>
>
> --
> ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
> **
> ** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
> ** KVK: 27239233 **
> f equals m times a. When your f is steady, and your m is going down
> your a** is going up. -- Chris Hadfield about flying up the space shuttle.
> ** 'a' for accelleration.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
RW
Rogier Wolff
Sat, Jan 3, 2026 3:02 PM
On Sat, Jan 03, 2026 at 08:07:02AM -0500, Jon Bondy wrote:
I am puzzled that Carsten's similar program did not receive similar
enthusiasm. He has had this working for many years. I wonder if
we are seeing the same stream of messages.
Indeed, that's the case.
OFFTOPIC:
I've been handling my own mailserver since about three decades now.
Places like google/gmail have a budget to have a team of people
working on anti-spam. I'm on my own. Also they have the volume that
allows them to do some tricks. (e.g. if one user marks a message as
"spam", you can retroactively filter all "unseen" messages based on
that fact!). So spam control at large providers is a lot better than
what I can do on my own.
Since about 3 decades, spam is big enough that the general advice is
not to put your Email address on the internet in "plain text",
otherwise you'll get a lot of spam. I've been an advocate for "put
your email address on the internet in plain sight" for about 3.5
decades... I get a lot of spam. So much that someone at one point
recognized that and offered to pay me for my spam feed (to help them
filter spam for others). I declined for the possibility of having
private non-spam ending up in that feed.
I'm also very against throwing away Emails, even if they score high on
the spam-test. I'm 100% against the modern practise of refusing to
accept mail that somehow scores high on the spam-probability. Then the
addressee can't even "check the spam mailbox" to find the improperly
marked-as-spam mails.
Over a decade ago, I decided to filter my mails by a bunch of rules.
VERY likely spam goes to the spam folder. Also detected-as-virus goes
there. At one point I recognized that when I'm not in the To:- or CC:
fields, it's likely spam. That also got added. This had the
side-effect of most of the mailing-list traffic going there as
well. To prevent legit mails going to the spam filter, I've made a
mechanism to whitelist people I've emailed before.
This has the side effect of SOME of the mailing-list traffic ending up
in my normal box, and the rest going to the spam box. I kind of like
the current situation. I certainly don't have the time to read
everything on all the mailing lists I've gotten subscribed to.
So: Sorry Carsten, I didn't see your message. Either because I skimped
over it in my main mailbox, or because you didn't CC me and I
should've gotten it only-through-the-mailing-list.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
On Sat, Jan 03, 2026 at 08:07:02AM -0500, Jon Bondy wrote:
> I am puzzled that Carsten's similar program did not receive similar
> enthusiasm. He has had this working for many years. I wonder if
> we are seeing the same stream of messages.
Indeed, that's the case.
OFFTOPIC:
I've been handling my own mailserver since about three decades now.
Places like google/gmail have a budget to have a team of people
working on anti-spam. I'm on my own. Also they have the volume that
allows them to do some tricks. (e.g. if one user marks a message as
"spam", you can retroactively filter all "unseen" messages based on
that fact!). So spam control at large providers is a lot better than
what I can do on my own.
Since about 3 decades, spam is big enough that the general advice is
not to put your Email address on the internet in "plain text",
otherwise you'll get a lot of spam. I've been an advocate for "put
your email address on the internet in plain sight" for about 3.5
decades... I get a lot of spam. So much that someone at one point
recognized that and offered to pay me for my spam feed (to help them
filter spam for others). I declined for the possibility of having
private non-spam ending up in that feed.
I'm also very against throwing away Emails, even if they score high on
the spam-test. I'm 100% against the modern practise of refusing to
accept mail that somehow scores high on the spam-probability. Then the
addressee can't even "check the spam mailbox" to find the improperly
marked-as-spam mails.
Over a decade ago, I decided to filter my mails by a bunch of rules.
VERY likely spam goes to the spam folder. Also detected-as-virus goes
there. At one point I recognized that when I'm not in the To:- or CC:
fields, it's likely spam. That also got added. This had the
side-effect of most of the mailing-list traffic going there as
well. To prevent legit mails going to the spam filter, I've made a
mechanism to whitelist people I've emailed before.
This has the side effect of SOME of the mailing-list traffic ending up
in my normal box, and the rest going to the spam box. I kind of like
the current situation. I certainly don't have the time to read
everything on all the mailing lists I've gotten subscribed to.
So: Sorry Carsten, I didn't see your message. Either because I skimped
over it in my main mailbox, or because you didn't CC me and I
should've gotten it only-through-the-mailing-list.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
RW
Rogier Wolff
Sat, Jan 3, 2026 3:09 PM
Hi,
Contrary to my message to the list, this did land in my normal
mailbox, I just hadn't gotten around to processing it yet because of
the busyness around new-year.
Roger.
On Fri, Jan 02, 2026 at 08:20:44PM +0100, Carsten Arnholm via Discuss wrote:
Such objects can be separated automatically using topological analysis (as
in 'polyfix'). Assuming the original file from OpenSCAD is "boxes.stl", you
can split them into disjoint "lumps"
polyfix -lumps ./boxes.stl -out=*.obj
The result is one file per disjoint lump. This works by repeatedly looking
up neighbouring faces, it works as long as the parts are truly disjoint. The
complexity of the shapes is irrelevant.
On 02/01/2026 19.11, Jordan Brown via Discuss wrote:
On 1/1/2026 9:56 AM, Adrian Mariano via Discuss wrote:
I must be missing something here. If you have a module that makes
an object and you have some assumed bounding box known you can
intersect with one half-section and then intersect with another half
section, and you can translate the intersections apart so they do
not overlap.
He doesn't have the half-sections. He has the cut volume, the negative
shape.
That is, in
difference() {
cube(20, center=true);
cube([1,30,30], center=true);
}
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
Hi,
Contrary to my message to the list, this did land in my normal
mailbox, I just hadn't gotten around to processing it yet because of
the busyness around new-year.
Roger.
On Fri, Jan 02, 2026 at 08:20:44PM +0100, Carsten Arnholm via Discuss wrote:
> Such objects can be separated automatically using topological analysis (as
> in 'polyfix'). Assuming the original file from OpenSCAD is "boxes.stl", you
> can split them into disjoint "lumps"
>
> polyfix -lumps ./boxes.stl -out=*.obj
>
> The result is one file per disjoint lump. This works by repeatedly looking
> up neighbouring faces, it works as long as the parts are truly disjoint. The
> complexity of the shapes is irrelevant.
>
> On 02/01/2026 19.11, Jordan Brown via Discuss wrote:
> > On 1/1/2026 9:56 AM, Adrian Mariano via Discuss wrote:
> > > I must be missing something here. If you have a module that makes
> > > an object and you have some assumed bounding box known you can
> > > intersect with one half-section and then intersect with another half
> > > section, and you can translate the intersections apart so they do
> > > not overlap.
> >
> > He doesn't have the half-sections. He has the cut volume, the negative
> > shape.
> >
> > That is, in
> >
> > > difference() {
> > > cube(20, center=true);
> > > cube([1,30,30], center=true);
> > > }
> >
> > he has the second cube. (And of course it's not as simple as a cube.)
> >
> >
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email todiscuss-leave@lists.openscad.org
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
RW
Rogier Wolff
Sat, Jan 3, 2026 3:13 PM
On Fri, Jan 02, 2026 at 08:20:44PM +0100, Carsten Arnholm via Discuss wrote:
And I just found out that when I hit "reply" (and not reply-to-all) on
a message in mutt, it will ask me: "really reply to:
arnholm@arnholm.org" ? and when I say yes, it will automatically CC in
the mailing list without me intending to do that. :-(
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
On Fri, Jan 02, 2026 at 08:20:44PM +0100, Carsten Arnholm via Discuss wrote:
And I just found out that when I hit "reply" (and not reply-to-all) on
a message in mutt, it will ask me: "really reply to:
arnholm@arnholm.org" ? and when I say yes, it will automatically CC in
the mailing list without me intending to do that. :-(
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.