A good optimization, but beside the point
an error message should contain text that CLEARLY points the user to the appropriate location in Preferences to fix the problem.
I cannot fathom how I need over 200,000 "elements" to create a final product with 5,000
OpenSCAD should not stop working because it is unable to display a model.
Jon
On 1/21/2026 4:09 AM, Curt McDowell wrote:
Jon,
Last year, AI kept writing C code when I asked it for OpenSCAD. But I'm blown away how good it's gotten since then, and I've been using it all the time for syntactically correct (and often semantically correct) OpenSCAD programming.
It rewrote your module LinkShape() after ruminating on it for about 60 seconds. Visually the result seems to match well. With this, even for (i = [0 : 9]) renders rapidly. See below.
Regards,
Curt
Gemini 3 Pro prompt:
This OpenSCAD program is very slow to execute and display. The LinkShape() module creates tons of slightly overlapping cylinders, creating large numbers of geometry elements. I think the performance would be greatly improved if it could instead linear_extrude simpler 2D shapes instead of doing the whole task starting from 3D objects.
Upload .scad file
Response:
Here is the optimized solution.
The slowness in your script comes from the LinkShape() module using a for loop to generate geometry. This forces OpenSCAD to calculate the union of hundreds of cylinders, which is an $O(N^2)$ or $O(N)$ operation depending on the engine.
Replacing this with a 2D shape that is linear extruded changes the complexity to $O(1)$ and renders nearly instantly.
Optimized Code
Replace your existing LinkShape() module with the version below.
module LinkShape() {
// Optimization: Create a 2D profile and extrude it once
// This replaces the loop of hundreds of cylinders
linear_extrude(height = vth) {
union() {
// 1. The curved body (Sector of a ring)
intersection() {
difference() {
circle(r = ad + hth/2); // Outer radius
circle(r = ad - hth/2); // Inner radius
}
// Mask to strictly limit the arc to angles [-an/2 : an/2]
// We use a polygon wedge to slice the ring
mask_r = ad + hth; // Radius large enough to cover the shape
polygon([
[0, 0],
[mask_r * cos(-an/2), mask_r * sin(-an/2)],
[mask_r, 0], // Mid-point to ensure arc curvature is covered
[mask_r * cos(an/2), mask_r * sin(an/2)]
]);
}
// 2. The rounded end-caps
// These match the 'cylinder' diameters at the start/end of the original loop
rotate([0, 0, -an/2]) translate([ad, 0]) circle(d = hth);
rotate([0, 0, an/2]) translate([ad, 0]) circle(d = hth);
}
}
}
Why this works
Geometric Equivalence: The original code swept a cylinder of diameter hth along an arc of radius ad. This creates a shape with a constant thickness of hth and rounded ends. The new code constructs this exact footprint in 2D using a ring sector (difference of two circles) unioned with two circles at the ends (end-caps).
Performance:
* Original: ~40+ cylinder primitives per link $\times$ boolean operations.
* New: 1 extrusion object containing 4 simple 2D primitives.
Integration
You do not need to change Link() or AxelHoles(). This module acts as a drop-in replacement that respects your global variables (ad, an, vth, hth).
Would you like me to also optimize the AxelHoles module to ensure the resolution ($fn) matches this new smooth curve perfectly?
On 1/20/26 13:14, Jon Bondy via Discuss wrote:
I realize that this code is long, but when I try to make it simpler, the bug fails to occur.
The bug is that if the for() at the end is [0:0], it works, but [0:1] blows up with the following (and OpenSCAD is dead and has to be restarted). Seems simple enough. Making one works, making two is fatal. I'm sure the problem is simple, but not to me, at the moment.
Thanks
Jon
Parsing design (AST generation)...
Used file cache size: 1 files
Compiling design (CSG Tree generation)...
ECHO: 23.25
Compiling design (CSG Products generation)...
Geometries in cache: 2
Geometry cache size in bytes: 26408
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
WARNING: Normalized tree is growing past 200000 elements. Aborting normalization.
Execution aborted
include <BOSL2/std.scad>
eps = 0.01;
$fa = 3;
$fs = 0.2;
inches = 25.4;
slop = 0.3; // printing slop
hth = 6.88; // thickness along curve horizontal thickness
vth = 4.83; // actual vertical thickness
ll = 21.25; // link length
// angles and diameters for rotation that creates the curved shape
id = 18.07;
od = id + hth;
ad = (id + od) / 2; // average diameter
an = round(asin(ll/ad))/2; // angle corresponding to "ll"
aSp = 12; // space between axels
xSp = ll + 2.0; // spacing of links
echo(xSp);
pd = 2.62 + slop; // pin diameter
// clearance around axle: I used 0.7, but metal printing needs 1.5
fmp = 0.0; // more clearance For Metal Printing (0.8)
clrc = 0.0; // clearance for clasp
clra = 0.0; // clearance for axles
module LinkShape()
// hull() rotated cylinders to make curved shape
for (a = [-an/2:1:an/2])
rotate([0, 0, a])
translate([ad, 0, 0])
cylinder(h = vth, d = hth);
*LinkShape();
module AxelHoles(sc) {
// "sc" allows cylinder diameter to be scaled for holes vs pins
aa = 0.40 * an; // axle hole angles
for (a = [-aa, aa])
rotate([0, 0, a])
translate([ad, 0, -eps])
cylinder(h = vth + 2*eps, d = pd*sc);
}
module Link(cutHoles)
rotate([0, -90, 90])
// Y
translate([-ad, 0, 0]) {
difference() {
LinkShape();
if (cutHoles)
AxelHoles(1);
}
}
*Link(true);
module PinAlignmentJig() {
difference() {
* translate([-12.5, -7.5, 0])
cube([25, 15, 2*vth+1]);
// link shape
translate([0, 0, 2*vth - eps])
scale([1.2, 1.4, 2.0])
rotate([90, 0, 0])
Link(false);
// the bottom link
translate([0, 0, vth - eps])
rotate([90, 0, 0])
scale(1.04)
Link(false);
// the top link
translate([0, 0, 2*vth + 1 + eps])
rotate([90, 0, 0])
scale(1.04)
Link(false);
// holes
translate([0, 21.51, -2])
rotate([0, 0, -90])
scale([1, 1, 9])
AxelHoles(1);
}
}
*PinAlignmentJig();
module PinAlignmentJigs() {
for (i = [0:1])
translate([0, i*20, 0])
PinAlignmentJig();
}
!PinAlignmentJigs();
[https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-green-avg-v1.png]<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=F3scEWn0ftRANLG3-GTnbAjbkI31nmFOm1s5a8CzT6OhGNBCpsW6M99W4RFj8PPU&s=ffh_IJTdmlSed6QFlwoALbXa1s8VpbOJScDeKZnIWtQ&e=> Virus-free.www.avg.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=F3scEWn0ftRANLG3-GTnbAjbkI31nmFOm1s5a8CzT6OhGNBCpsW6M99W4RFj8PPU&s=ffh_IJTdmlSed6QFlwoALbXa1s8VpbOJScDeKZnIWtQ&e=>
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org<mailto:discuss-leave@lists.openscad.org>
Jon, I have not looked at your code, but note the 5,000 is POST normalisation, there presumably are many more before hand.
From: jon jonbondy.com via Discuss [mailto:discuss@lists.openscad.org]
Sent: Wednesday, January 21, 2026 10:48 PM
To: Curt McDowell; OpenSCAD general discussion Mailing-list
Cc: jon jonbondy.com
Subject: [OpenSCAD] Re: strange behavior
A good optimization, but beside the point
an error message should contain text that CLEARLY points the user to the appropriate location in Preferences to fix the problem.
I cannot fathom how I need over 200,000 "elements" to create a final product with 5,000
OpenSCAD should not stop working because it is unable to display a model.
Jon
On 1/21/2026 4:09 AM, Curt McDowell wrote:
Jon,
Last year, AI kept writing C code when I asked it for OpenSCAD. But I'm blown away how good it's gotten since then, and I've been using it all the time for syntactically correct (and often semantically correct) OpenSCAD programming.
It rewrote your module LinkShape() after ruminating on it for about 60 seconds. Visually the result seems to match well. With this, even for (i = [0 : 9]) renders rapidly. See below.
Regards,
Curt
Gemini 3 Pro prompt:
This OpenSCAD program is very slow to execute and display. The LinkShape() module creates tons of slightly overlapping cylinders, creating large numbers of geometry elements. I think the performance would be greatly improved if it could instead linear_extrude simpler 2D shapes instead of doing the whole task starting from 3D objects.
Upload .scad file
Response:
Here is the optimized solution.
The slowness in your script comes from the LinkShape() module using a for loop to generate geometry. This forces OpenSCAD to calculate the union of hundreds of cylinders, which is an $O(N^2)$ or $O(N)$ operation depending on the engine.
Replacing this with a 2D shape that is linear extruded changes the complexity to $O(1)$ and renders nearly instantly.
Optimized Code
Replace your existing LinkShape() module with the version below.
module LinkShape() {
// Optimization: Create a 2D profile and extrude it once
// This replaces the loop of hundreds of cylinders
linear_extrude(height = vth) {
union() {
// 1. The curved body (Sector of a ring)
intersection() {
difference() {
circle(r = ad + hth/2); // Outer radius
circle(r = ad - hth/2); // Inner radius
}
// Mask to strictly limit the arc to angles [-an/2 : an/2]
// We use a polygon wedge to slice the ring
mask_r = ad + hth; // Radius large enough to cover the shape
polygon([
[0, 0],
[mask_r * cos(-an/2), mask_r * sin(-an/2)],
[mask_r, 0], // Mid-point to ensure arc curvature is covered
[mask_r * cos(an/2), mask_r * sin(an/2)]
]);
}
// 2. The rounded end-caps
// These match the 'cylinder' diameters at the start/end of the original loop
rotate([0, 0, -an/2]) translate([ad, 0]) circle(d = hth);
rotate([0, 0, an/2]) translate([ad, 0]) circle(d = hth);
}
}
}
Why this works
Geometric Equivalence: The original code swept a cylinder of diameter hth along an arc of radius ad. This creates a shape with a constant thickness of hth and rounded ends. The new code constructs this exact footprint in 2D using a ring sector (difference of two circles) unioned with two circles at the ends (end-caps).
Performance:
o Original: ~40+ cylinder primitives per link $\times$ boolean operations.
o New: 1 extrusion object containing 4 simple 2D primitives.
Integration
You do not need to change Link() or AxelHoles(). This module acts as a drop-in replacement that respects your global variables (ad, an, vth, hth).
Would you like me to also optimize the AxelHoles module to ensure the resolution ($fn) matches this new smooth curve perfectly?
On 1/20/26 13:14, Jon Bondy via Discuss wrote:
I realize that this code is long, but when I try to make it simpler, the bug fails to occur.
The bug is that if the for() at the end is [0:0], it works, but [0:1] blows up with the following (and OpenSCAD is dead and has to be restarted). Seems simple enough. Making one works, making two is fatal. I'm sure the problem is simple, but not to me, at the moment.
Thanks
Jon
Parsing design (AST generation)...
Used file cache size: 1 files
Compiling design (CSG Tree generation)...
ECHO: 23.25
Compiling design (CSG Products generation)...
Geometries in cache: 2
Geometry cache size in bytes: 26408
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
WARNING: Normalized tree is growing past 200000 elements. Aborting normalization.
Execution aborted
include <BOSL2/std.scad>
eps = 0.01;
$fa = 3;
$fs = 0.2;
inches = 25.4;
slop = 0.3; // printing slop
hth = 6.88; // thickness along curve horizontal thickness
vth = 4.83; // actual vertical thickness
ll = 21.25; // link length
// angles and diameters for rotation that creates the curved shape
id = 18.07;
od = id + hth;
ad = (id + od) / 2; // average diameter
an = round(asin(ll/ad))/2; // angle corresponding to "ll"
aSp = 12; // space between axels
xSp = ll + 2.0; // spacing of links
echo(xSp);
pd = 2.62 + slop; // pin diameter
// clearance around axle: I used 0.7, but metal printing needs 1.5
fmp = 0.0; // more clearance For Metal Printing (0.8)
clrc = 0.0; // clearance for clasp
clra = 0.0; // clearance for axles
module LinkShape()
// hull() rotated cylinders to make curved shape
for (a = [-an/2:1:an/2])
rotate([0, 0, a])
translate([ad, 0, 0])
cylinder(h = vth, d = hth);
*LinkShape();
module AxelHoles(sc) {
// "sc" allows cylinder diameter to be scaled for holes vs pins
aa = 0.40 * an; // axle hole angles
for (a = [-aa, aa])
rotate([0, 0, a])
translate([ad, 0, -eps])
cylinder(h = vth + 2*eps, d = pd*sc);
}
module Link(cutHoles)
rotate([0, -90, 90])
// Y
translate([-ad, 0, 0]) {
difference() {
LinkShape();
if (cutHoles)
AxelHoles(1);
}
}
*Link(true);
module PinAlignmentJig() {
difference() {
* translate([-12.5, -7.5, 0])
cube([25, 15, 2*vth+1]);
// link shape
translate([0, 0, 2*vth - eps])
scale([1.2, 1.4, 2.0])
rotate([90, 0, 0])
Link(false);
// the bottom link
translate([0, 0, vth - eps])
rotate([90, 0, 0])
scale(1.04)
Link(false);
// the top link
translate([0, 0, 2*vth + 1 + eps])
rotate([90, 0, 0])
scale(1.04)
Link(false);
// holes
translate([0, 21.51, -2])
rotate([0, 0, -90])
scale([1, 1, 9])
AxelHoles(1);
}
}
*PinAlignmentJig();
module PinAlignmentJigs() {
for (i = [0:1])
translate([0, i*20, 0])
PinAlignmentJig();
}
!PinAlignmentJigs();
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=F3scEWn0ftRANLG3-GTnbAjbkI31nmFOm1s5a8CzT6OhGNBCpsW6M99W4RFj8PPU&s=ffh_IJTdmlSed6QFlwoALbXa1s8VpbOJScDeKZnIWtQ&e=>
Virus-free. <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=F3scEWn0ftRANLG3-GTnbAjbkI31nmFOm1s5a8CzT6OhGNBCpsW6M99W4RFj8PPU&s=ffh_IJTdmlSed6QFlwoALbXa1s8VpbOJScDeKZnIWtQ&e=> www.avg.com
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On 1/21/2026 3:47 AM, jon jonbondy.com via Discuss wrote:
Good point. I've filed #6554
https://github.com/openscad/openscad/issues/6554. It's also confusing
that the limit reported in the message is twice the limit configured in
the UI.
Issue #3504. https://github.com/openscad/openscad/issues/3504
But: I don't duplicate that aspect of the failure, on 2026.01.03 on
Windows. Of course the same model with the same limit configured fails
in the same way, but I can change the model or increase the limit and
preview without problems.
This is discussed a little in #3504. I have no idea how these
algorithms work, but I see that the Design/Display CSG Products dump has
~16K entries in it. It's black magic that the previewer works at all;
as I understand it some cases cause the complexity to explode. (But I
thought the primary source of those explosions was intersection(), and
you don't use that.)
Random note: for this particular design, it appears that the configured
limit needs to be about 117K. 116K fails. (Remembering that 116K
corresponds to an error message that says 232K.)
Jordan said "I don't duplicate that aspect of the failure [OpenSCAD stopped working], on 2026.01.03 on Windows."
I just installed 2026.01.19. F6 works just fine with a limit of 100,000; F5 blows up as follows
[cid:part1.biMdqxeB.tHtx5Cgg@jonbondy.com]
Jon
On 1/21/2026 2:19 PM, Jordan Brown wrote:
On 1/21/2026 3:47 AM, jon jonbondy.com via Discuss wrote:
Good point. I've filed #6554https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openscad_openscad_issues_6554&d=DwMDaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=erO7bjuxtKaVsSv0wkmHA0mgZzKjlHFCSMlK5L0R4VnnpcJXWQKjTHuRmal1AcNs&s=vrTE0PZ0JtPy4dkBwVTvIJDOJ1iIyLff2urszXyOkSk&e=. It's also confusing that the limit reported in the message is twice the limit configured in the UI.
But: I don't duplicate that aspect of the failure, on 2026.01.03 on Windows. Of course the same model with the same limit configured fails in the same way, but I can change the model or increase the limit and preview without problems.
This is discussed a little in #3504. I have no idea how these algorithms work, but I see that the Design/Display CSG Products dump has ~16K entries in it. It's black magic that the previewer works at all; as I understand it some cases cause the complexity to explode. (But I thought the primary source of those explosions was intersection(), and you don't use that.)
Random note: for this particular design, it appears that the configured limit needs to be about 117K. 116K fails. (Remembering that 116K corresponds to an error message that says 232K.)
I cannot reproduce the "OpenSCAD is dead and has to be restarted” part either (macOS, latest build).
One thing to try: Disable Preferences->Advanced->Stop on the first warning.
That should give you slightly different output, as it will allow the preview process to complete. I’m curious if it still kills OpenSCAD for you.
Also, which OS is this?
-Marius
On Jan 21, 2026, at 17:47, jon jonbondy.com via Discuss discuss@lists.openscad.org wrote:
Jordan said "I don't duplicate that aspect of the failure [OpenSCAD stopped working], on 2026.01.03 on Windows."
I just installed 2026.01.19. F6 works just fine with a limit of 100,000; F5 blows up as follows
<AxUBVrO1IyHDhTiz.png>
Jon
On 1/21/2026 2:19 PM, Jordan Brown wrote:
On 1/21/2026 3:47 AM, jon jonbondy.com via Discuss wrote:
Good point. I've filed #6554 https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openscad_openscad_issues_6554&d=DwMDaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=erO7bjuxtKaVsSv0wkmHA0mgZzKjlHFCSMlK5L0R4VnnpcJXWQKjTHuRmal1AcNs&s=vrTE0PZ0JtPy4dkBwVTvIJDOJ1iIyLff2urszXyOkSk&e=. It's also confusing that the limit reported in the message is twice the limit configured in the UI.
But: I don't duplicate that aspect of the failure, on 2026.01.03 on Windows. Of course the same model with the same limit configured fails in the same way, but I can change the model or increase the limit and preview without problems.
This is discussed a little in #3504. I have no idea how these algorithms work, but I see that the Design/Display CSG Products dump has ~16K entries in it. It's black magic that the previewer works at all; as I understand it some cases cause the complexity to explode. (But I thought the primary source of those explosions was intersection(), and you don't use that.)
Random note: for this particular design, it appears that the configured limit needs to be about 117K. 116K fails. (Remembering that 116K corresponds to an error message that says 232K.)
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On 1/21/2026 2:47 PM, jon jonbondy.com wrote:
Jordan said "I don't duplicate that aspect of the failure [OpenSCAD
stopped working], on 2026.01.03 on Windows."
I just installed 2026.01.19. F6 works just fine with a limit of
100,000; F5 blows up as follows
Yes, that run fails.
But the claim is that OpenSCAD is then dead in the water, that preview
never works again and you must restart it.
Parsing design (AST generation)...
Used file cache size: 1 files
Compiling design (CSG Tree generation)...
ECHO: 23.25
Compiling design (CSG Products generation)...
Geometries in cache: 2
Geometry cache size in bytes: 26408
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
WARNING: Normalized tree is growing past 200000 elements. Aborting
normalization.
WARNING: CSG normalization resulted in an empty tree
Normalized tree has 0 elements!
Compile and preview finished.
Total rendering time: 0:00:00.580
I change the model to "cube();", and...
Parsing design (AST generation)...
Saved backup file:
C:/Users/Jordan/OneDrive/Documents/OpenSCAD/backups/bondy-backup-VjgqSRSB.scad
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 3
Geometry cache size in bytes: 27264
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 1 elements!
Compile and preview finished.
Total rendering time: 0:00:00.021
Or, going back to the original failure and changing the preference (but
not restarting the application)...
Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
ECHO: 23.25
Compiling design (CSG Products generation)...
Geometries in cache: 3
Geometry cache size in bytes: 27264
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 5372 elements!
Compile and preview finished.
Total rendering time: 0:00:00.613
Jon privately points out the "Execution aborted" message, and that's the
smoking gun for the difference in behavior.
He has "stop on first warning" set (which is generally a good idea), and
I don't have it set (don't remember why, probably testing that something
worked with it unset). When I set it, I do reproduce the "dead in the
water" behavior.
I did not intentionally do a Reply vs a Reply All...
I always took "stop on first warning" to mean "stop compiling on first
warning" not "stop and kill the OpenSCAD program on first warning".
I've used "stop on first warning" for a long time, and it has never
killed OpenSCAD before.
Jon
On 1/21/2026 6:51 PM, Jordan Brown wrote:
Jon privately points out the "Execution aborted" message, and that's
the smoking gun for the difference in behavior.
He has "stop on first warning" set (which is generally a good idea),
and I don't have it set (don't remember why, probably testing that
something worked with it unset). When I set it, I do reproduce the
"dead in the water" behavior.
Windows. And now I can't get it to fail.
Sigh
On 1/21/2026 5:57 PM, Marius Kintel via Discuss wrote:
I cannot reproduce the "OpenSCAD is dead and has to be restarted” part
either (macOS, latest build).
One thing to try: Disable Preferences->Advanced->Stop on the first
warning.
That should give you slightly different output, as it will allow the
preview process to complete. I’m curious if it still kills OpenSCAD
for you.
Also, which OS is this?
-Marius
On Jan 21, 2026, at 17:47, jon jonbondy.com via Discuss
discuss@lists.openscad.org wrote:
Jordan said "I don't duplicate that aspect of the failure [OpenSCAD
stopped working], on 2026.01.03 on Windows."
I just installed 2026.01.19. F6 works just fine with a limit of
100,000; F5 blows up as follows
<AxUBVrO1IyHDhTiz.png>
Jon
On 1/21/2026 2:19 PM, Jordan Brown wrote:
On 1/21/2026 3:47 AM, jon jonbondy.com via Discuss wrote:
Good point. I've filed #6554
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openscad_openscad_issues_6554&d=DwMDaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=erO7bjuxtKaVsSv0wkmHA0mgZzKjlHFCSMlK5L0R4VnnpcJXWQKjTHuRmal1AcNs&s=vrTE0PZ0JtPy4dkBwVTvIJDOJ1iIyLff2urszXyOkSk&e=.
It's also confusing that the limit reported in the message is twice
the limit configured in the UI.
But: I don't duplicate that aspect of the failure, on 2026.01.03 on
Windows. Of course the same model with the same limit configured
fails in the same way, but I can change the model or increase the
limit and preview without problems.
This is discussed a little in #3504. I have no idea how these
algorithms work, but I see that the Design/Display CSG Products dump
has ~16K entries in it. It's black magic that the previewer works
at all; as I understand it some cases cause the complexity to
explode. (But I thought the primary source of those explosions was
intersection(), and you don't use that.)
Random note: for this particular design, it appears that the
configured limit needs to be about 117K. 116K fails. (Remembering
that 116K corresponds to an error message that says 232K.)
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
On 1/21/2026 4:09 PM, jon jonbondy.com wrote:
I did not intentionally do a Reply vs a Reply All...
No matter. (I think it's far better that the occasional
intended-to-be-public message be sent privately, than that
intended-to-be-private messages ever be sent publicly.)
I always took "stop on first warning" to mean "stop compiling on first
warning" not "stop and kill the OpenSCAD program on first warning".
I've used "stop on first warning" for a long time, and it has never
killed OpenSCAD before.
Of course. Nothing should kill OpenSCAD like this. I am not at all
saying that setting stop-on-first-warning is wrong - quite the contrary,
really. I'm just explaining why you were seeing the problem and I
wasn't - and perhaps why others might or might not see it.
(I'd say that it's a bit broader than "stop compiling", that it's "stop
processing", wherever in the pipeline that might happen.)