discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Scaling

SP
Sanjeev Prabhakar
Wed, Apr 29, 2026 4:22 PM

It seems the solution by Mr.Mark is not equally spaced circles
Below the superimposed picture you can see the difference.
The marked circles are equally spaced to >10 decimal points.

[image: Screenshot 2026-04-29 at 9.46.19 PM.png]

On Wed, 29 Apr 2026 at 16:38, jon jonbondy.com via Discuss <
discuss@lists.openscad.org> wrote:

Interesting that something so apparently simple is not.

On 4/28/2026 9:45 PM, Jordan Brown wrote:

On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote:

Yes.  Exactly.  I wanted to use a for() and rotate() to spread the
holes around the circle and then scale() it to get them in the right
location.  Nice concept.  Not easy to implement.

Mark's trig approach seems like the best so far

Note that the trig approach does not yield evenly spaced holes, except
in some distorted-angle sense.

I messed around for a while trying to find a for()-rotate() answer,
but failed.  It seems like there ought to be one, probably pretty
ugly, but I'm not coming up with it.


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

It seems the solution by Mr.Mark is not equally spaced circles Below the superimposed picture you can see the difference. The marked circles are equally spaced to >10 decimal points. [image: Screenshot 2026-04-29 at 9.46.19 PM.png] On Wed, 29 Apr 2026 at 16:38, jon jonbondy.com via Discuss < discuss@lists.openscad.org> wrote: > Interesting that something so apparently simple is not. > > > On 4/28/2026 9:45 PM, Jordan Brown wrote: > > On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote: > >> > >> Yes. Exactly. I wanted to use a for() and rotate() to spread the > >> holes around the circle and then scale() it to get them in the right > >> location. Nice concept. Not easy to implement. > >> > >> Mark's trig approach seems like the best so far > >> > > Note that the trig approach does not yield evenly spaced holes, except > > in some distorted-angle sense. > > > > > > I messed around for a while trying to find a for()-rotate() answer, > > but failed. It seems like there ought to be one, probably pretty > > ugly, but I'm not coming up with it. > > > > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RW
Raymond West
Wed, Apr 29, 2026 4:52 PM

after a bit of my description and explanation, deepseek came up with the
following, for equally spaced points around an ellipse

// ===== User parameters =====
dp = 200;                   // Diameter of original circle
num_points = 7;            // Number of equally spaced points
start_angle_deg = 90;       // Starting angle in degrees (0 = right, 90
= top)
step_deg =0 .1;               // Integration step in degrees (smaller =
more accurate, but more recursions)
ellipse_smoothness = 120;   // $fn for the ellipse (higher = smoother)

// ===== Ellipse geometry (scale([1,1.5]) circle) =====
a = dp / 2;                 // semi‑axis X = 100
b = 1.5 * dp / 2;           // semi‑axis Y = 150

// Point on ellipse for angle in degrees
function pt(phi_deg) = [a * cos(phi_deg), b * sin(phi_deg)];

// Derivative with respect to degrees (includes PI/180 conversion)
function dx_dphi(phi_deg) = -a * sin(phi_deg) * PI/180;
function dy_dphi(phi_deg) =  b * cos(phi_deg) * PI/180;
function ds(phi_deg) = norm([dx_dphi(phi_deg), dy_dphi(phi_deg)]);

// Build list of phi from 0 to 360 degrees (inclusive)
phi_list = [ for (i = [0:step_deg:360]) i ];

// Recursively compute cumulative arc lengths (depth = len(phi_list)-1 ≈
180)
function cum_arcs(i = 0, cum = 0, result = [0]) =
    i >= len(phi_list)-1 ? result :
    let( dphi = phi_list[i+1] - phi_list[i],
         ds_mid = (ds(phi_list[i]) + ds(phi_list[i+1])) / 2,
         new_cum = cum + ds_mid * dphi )
    cum_arcs(i+1, new_cum, concat(result, [new_cum]));

arc_cum = cum_arcs();                       // cumulative arc lengths
total_len = arc_cum[len(arc_cum)-1];       // full circumference
step_len = total_len / num_points;          // arc length between points

// Linear search to find phi for a given target arc length
function phi_for_arc(target, idx = 0) =
    idx >= len(arc_cum)-1 ? phi_list[len(phi_list)-1] :
    target <= arc_cum[idx+1] ?
        let( t = (target - arc_cum[idx]) / (arc_cum[idx+1] -
arc_cum[idx]) )
        phi_list[idx] + t * (phi_list[idx+1] - phi_list[idx]) :
    phi_for_arc(target, idx+1);

// Generate points equally spaced by arc length, starting at
start_angle_deg.
// We offset the target arc lengths so that the first point lies at
start_angle_deg.
// First find the arc length from 0 to start_angle_deg:
start_arc = phi_for_arc(start_angle_deg) ?
    // phi_for_arc returns phi, not arc. We need arc at that phi. Use
linear interpolation.
    let( idx = floor(start_angle_deg / step_deg),
         t = (start_angle_deg - phi_list[idx]) / (phi_list[idx+1] -
phi_list[idx]),
         arc = arc_cum[idx] + t * (arc_cum[idx+1] - arc_cum[idx]) ) arc
: 0;

points = [ for (k = [0:num_points-1])
            let( target = start_arc + k * step_len )
            let( wrapped = target % total_len )
            pt(phi_for_arc(wrapped)) ];

// ===== Draw the smoothed ellipse =====
scale([1, 1.5]) circle(d = dp, $fn = ellipse_smoothness);

// ===== Draw the points =====
color("red")
for (p = points) translate(p) circle(r = 2.5, $fn = 16);

// ===== Debug output =====
echo("Total circumference =", total_len);
echo("Step length =", step_len);
echo("Start angle =", start_angle_deg, "degrees");
echo("Points (x,y):");
for (p = points) echo(p);

On 29/04/2026 17:22, Sanjeev Prabhakar via Discuss wrote:

It seems the solution by Mr.Mark is not equally spaced circles
Below the superimposed picture you can see the difference.
The marked circles are equally spaced to >10 decimal points.

Screenshot 2026-04-29 at 9.46.19 PM.png

On Wed, 29 Apr 2026 at 16:38, jon jonbondy.com http://jonbondy.com
via Discuss discuss@lists.openscad.org wrote:

 Interesting that something so apparently simple is not.


 On 4/28/2026 9:45 PM, Jordan Brown wrote:

On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote:

Yes.  Exactly.  I wanted to use a for() and rotate() to spread the
holes around the circle and then scale() it to get them in the

 right

location.  Nice concept.  Not easy to implement.

Mark's trig approach seems like the best so far

Note that the trig approach does not yield evenly spaced holes,

 except

in some distorted-angle sense.

I messed around for a while trying to find a for()-rotate() answer,
but failed.  It seems like there ought to be one, probably pretty
ugly, but I'm not coming up with it.

 _______________________________________________
 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

after a bit of my description and explanation, deepseek came up with the following, for equally spaced points around an ellipse // ===== User parameters ===== dp = 200;                   // Diameter of original circle num_points = 7;            // Number of equally spaced points start_angle_deg = 90;       // Starting angle in degrees (0 = right, 90 = top) step_deg =0 .1;               // Integration step in degrees (smaller = more accurate, but more recursions) ellipse_smoothness = 120;   // $fn for the ellipse (higher = smoother) // ===== Ellipse geometry (scale([1,1.5]) circle) ===== a = dp / 2;                 // semi‑axis X = 100 b = 1.5 * dp / 2;           // semi‑axis Y = 150 // Point on ellipse for angle in degrees function pt(phi_deg) = [a * cos(phi_deg), b * sin(phi_deg)]; // Derivative with respect to degrees (includes PI/180 conversion) function dx_dphi(phi_deg) = -a * sin(phi_deg) * PI/180; function dy_dphi(phi_deg) =  b * cos(phi_deg) * PI/180; function ds(phi_deg) = norm([dx_dphi(phi_deg), dy_dphi(phi_deg)]); // Build list of phi from 0 to 360 degrees (inclusive) phi_list = [ for (i = [0:step_deg:360]) i ]; // Recursively compute cumulative arc lengths (depth = len(phi_list)-1 ≈ 180) function cum_arcs(i = 0, cum = 0, result = [0]) =     i >= len(phi_list)-1 ? result :     let( dphi = phi_list[i+1] - phi_list[i],          ds_mid = (ds(phi_list[i]) + ds(phi_list[i+1])) / 2,          new_cum = cum + ds_mid * dphi )     cum_arcs(i+1, new_cum, concat(result, [new_cum])); arc_cum = cum_arcs();                       // cumulative arc lengths total_len = arc_cum[len(arc_cum)-1];       // full circumference step_len = total_len / num_points;          // arc length between points // Linear search to find phi for a given target arc length function phi_for_arc(target, idx = 0) =     idx >= len(arc_cum)-1 ? phi_list[len(phi_list)-1] :     target <= arc_cum[idx+1] ?         let( t = (target - arc_cum[idx]) / (arc_cum[idx+1] - arc_cum[idx]) )         phi_list[idx] + t * (phi_list[idx+1] - phi_list[idx]) :     phi_for_arc(target, idx+1); // Generate points equally spaced by arc length, starting at start_angle_deg. // We offset the target arc lengths so that the first point lies at start_angle_deg. // First find the arc length from 0 to start_angle_deg: start_arc = phi_for_arc(start_angle_deg) ?     // phi_for_arc returns phi, not arc. We need arc at that phi. Use linear interpolation.     let( idx = floor(start_angle_deg / step_deg),          t = (start_angle_deg - phi_list[idx]) / (phi_list[idx+1] - phi_list[idx]),          arc = arc_cum[idx] + t * (arc_cum[idx+1] - arc_cum[idx]) ) arc : 0; points = [ for (k = [0:num_points-1])             let( target = start_arc + k * step_len )             let( wrapped = target % total_len )             pt(phi_for_arc(wrapped)) ]; // ===== Draw the smoothed ellipse ===== scale([1, 1.5]) circle(d = dp, $fn = ellipse_smoothness); // ===== Draw the points ===== color("red") for (p = points) translate(p) circle(r = 2.5, $fn = 16); // ===== Debug output ===== echo("Total circumference =", total_len); echo("Step length =", step_len); echo("Start angle =", start_angle_deg, "degrees"); echo("Points (x,y):"); for (p = points) echo(p); On 29/04/2026 17:22, Sanjeev Prabhakar via Discuss wrote: > It seems the solution by Mr.Mark is not equally spaced circles > Below the superimposed picture you can see the difference. > The marked circles are equally spaced to >10 decimal points. > > Screenshot 2026-04-29 at 9.46.19 PM.png > > > On Wed, 29 Apr 2026 at 16:38, jon jonbondy.com <http://jonbondy.com> > via Discuss <discuss@lists.openscad.org> wrote: > > Interesting that something so apparently simple is not. > > > On 4/28/2026 9:45 PM, Jordan Brown wrote: > > On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote: > >> > >> Yes.  Exactly.  I wanted to use a for() and rotate() to spread the > >> holes around the circle and then scale() it to get them in the > right > >> location.  Nice concept.  Not easy to implement. > >> > >> Mark's trig approach seems like the best so far > >> > > Note that the trig approach does not yield evenly spaced holes, > except > > in some distorted-angle sense. > > > > > > I messed around for a while trying to find a for()-rotate() answer, > > but failed.  It seems like there ought to be one, probably pretty > > ugly, but I'm not coming up with it. > > > > > > > _______________________________________________ > 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
JJ
jon jonbondy.com
Wed, Apr 29, 2026 5:13 PM

Close enough for my purposes!

On 4/29/2026 12:22 PM, Sanjeev Prabhakar wrote:
It seems the solution by Mr.Mark is not equally spaced circles
Below the superimposed picture you can see the difference.
The marked circles are equally spaced to >10 decimal points.

[Screenshot 2026-04-29 at 9.46.19 PM.png]

On Wed, 29 Apr 2026 at 16:38, jon jonbondy.comhttps://urldefense.proofpoint.com/v2/url?u=http-3A__jonbondy.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=7JJW1DCc20wn6Cwia9Eh75XpEMY1TRqn1m0cp7ZyQXhNniVXb4p9ck0fPwdink15&s=Cw04wmNdwswdyAallTGE058wkh8on5PDlPr9Gy5zZnY&e= via Discuss <discuss@lists.openscad.orgmailto:discuss@lists.openscad.org> wrote:
Interesting that something so apparently simple is not.

On 4/28/2026 9:45 PM, Jordan Brown wrote:

On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote:

Yes.  Exactly.  I wanted to use a for() and rotate() to spread the
holes around the circle and then scale() it to get them in the right
location.  Nice concept.  Not easy to implement.

Mark's trig approach seems like the best so far

Note that the trig approach does not yield evenly spaced holes, except
in some distorted-angle sense.

I messed around for a while trying to find a for()-rotate() answer,
but failed.  It seems like there ought to be one, probably pretty
ugly, but I'm not coming up with it.


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

Close enough for my purposes! On 4/29/2026 12:22 PM, Sanjeev Prabhakar wrote: It seems the solution by Mr.Mark is not equally spaced circles Below the superimposed picture you can see the difference. The marked circles are equally spaced to >10 decimal points. [Screenshot 2026-04-29 at 9.46.19 PM.png] On Wed, 29 Apr 2026 at 16:38, jon jonbondy.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__jonbondy.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=7JJW1DCc20wn6Cwia9Eh75XpEMY1TRqn1m0cp7ZyQXhNniVXb4p9ck0fPwdink15&s=Cw04wmNdwswdyAallTGE058wkh8on5PDlPr9Gy5zZnY&e=> via Discuss <discuss@lists.openscad.org<mailto:discuss@lists.openscad.org>> wrote: Interesting that something so apparently simple is not. On 4/28/2026 9:45 PM, Jordan Brown wrote: > On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote: >> >> Yes. Exactly. I wanted to use a for() and rotate() to spread the >> holes around the circle and then scale() it to get them in the right >> location. Nice concept. Not easy to implement. >> >> Mark's trig approach seems like the best so far >> > Note that the trig approach does not yield evenly spaced holes, except > in some distorted-angle sense. > > > I messed around for a while trying to find a for()-rotate() answer, > but failed. It seems like there ought to be one, probably pretty > ugly, but I'm not coming up with it. > > > _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org<mailto:discuss-leave@lists.openscad.org>
AM
Adrian Mariano
Wed, Apr 29, 2026 6:43 PM

This is asking AI to write code that already exists in libraries including
BOSL2. It looks like the same solution as path_copies.

On Wed, Apr 29, 2026 at 12:53 Raymond West via Discuss <
discuss@lists.openscad.org> wrote:

after a bit of my description and explanation, deepseek came up with the
following, for equally spaced points around an ellipse

// ===== User parameters =====
dp = 200;                  // Diameter of original circle
num_points = 7;            // Number of equally spaced points
start_angle_deg = 90;      // Starting angle in degrees (0 = right, 90 =
top)
step_deg =0 .1;              // Integration step in degrees (smaller =
more accurate, but more recursions)
ellipse_smoothness = 120;  // $fn for the ellipse (higher = smoother)

// ===== Ellipse geometry (scale([1,1.5]) circle) =====
a = dp / 2;                // semi‑axis X = 100
b = 1.5 * dp / 2;          // semi‑axis Y = 150

// Point on ellipse for angle in degrees
function pt(phi_deg) = [a * cos(phi_deg), b * sin(phi_deg)];

// Derivative with respect to degrees (includes PI/180 conversion)
function dx_dphi(phi_deg) = -a * sin(phi_deg) * PI/180;
function dy_dphi(phi_deg) =  b * cos(phi_deg) * PI/180;
function ds(phi_deg) = norm([dx_dphi(phi_deg), dy_dphi(phi_deg)]);

// Build list of phi from 0 to 360 degrees (inclusive)
phi_list = [ for (i = [0:step_deg:360]) i ];

// Recursively compute cumulative arc lengths (depth = len(phi_list)-1 ≈
180)
function cum_arcs(i = 0, cum = 0, result = [0]) =
i >= len(phi_list)-1 ? result :
let( dphi = phi_list[i+1] - phi_list[i],
ds_mid = (ds(phi_list[i]) + ds(phi_list[i+1])) / 2,
new_cum = cum + ds_mid * dphi )
cum_arcs(i+1, new_cum, concat(result, [new_cum]));

arc_cum = cum_arcs();                      // cumulative arc lengths
total_len = arc_cum[len(arc_cum)-1];      // full circumference
step_len = total_len / num_points;          // arc length between points

// Linear search to find phi for a given target arc length
function phi_for_arc(target, idx = 0) =
idx >= len(arc_cum)-1 ? phi_list[len(phi_list)-1] :
target <= arc_cum[idx+1] ?
let( t = (target - arc_cum[idx]) / (arc_cum[idx+1] - arc_cum[idx])
)
phi_list[idx] + t * (phi_list[idx+1] - phi_list[idx]) :
phi_for_arc(target, idx+1);

// Generate points equally spaced by arc length, starting at
start_angle_deg.
// We offset the target arc lengths so that the first point lies at
start_angle_deg.
// First find the arc length from 0 to start_angle_deg:
start_arc = phi_for_arc(start_angle_deg) ?
// phi_for_arc returns phi, not arc. We need arc at that phi. Use
linear interpolation.
let( idx = floor(start_angle_deg / step_deg),
t = (start_angle_deg - phi_list[idx]) / (phi_list[idx+1] -
phi_list[idx]),
arc = arc_cum[idx] + t * (arc_cum[idx+1] - arc_cum[idx]) ) arc :
0;

points = [ for (k = [0:num_points-1])
let( target = start_arc + k * step_len )
let( wrapped = target % total_len )
pt(phi_for_arc(wrapped)) ];

// ===== Draw the smoothed ellipse =====
scale([1, 1.5]) circle(d = dp, $fn = ellipse_smoothness);

// ===== Draw the points =====
color("red")
for (p = points) translate(p) circle(r = 2.5, $fn = 16);

// ===== Debug output =====
echo("Total circumference =", total_len);
echo("Step length =", step_len);
echo("Start angle =", start_angle_deg, "degrees");
echo("Points (x,y):");
for (p = points) echo(p);
On 29/04/2026 17:22, Sanjeev Prabhakar via Discuss wrote:

It seems the solution by Mr.Mark is not equally spaced circles
Below the superimposed picture you can see the difference.
The marked circles are equally spaced to >10 decimal points.

[image: Screenshot 2026-04-29 at 9.46.19 PM.png]

On Wed, 29 Apr 2026 at 16:38, jon jonbondy.com via Discuss <
discuss@lists.openscad.org> wrote:

Interesting that something so apparently simple is not.

On 4/28/2026 9:45 PM, Jordan Brown wrote:

On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote:

Yes.  Exactly.  I wanted to use a for() and rotate() to spread the
holes around the circle and then scale() it to get them in the right
location.  Nice concept.  Not easy to implement.

Mark's trig approach seems like the best so far

Note that the trig approach does not yield evenly spaced holes, except
in some distorted-angle sense.

I messed around for a while trying to find a for()-rotate() answer,
but failed.  It seems like there ought to be one, probably pretty
ugly, but I'm not coming up with it.


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


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

This is asking AI to write code that already exists in libraries including BOSL2. It looks like the same solution as path_copies. On Wed, Apr 29, 2026 at 12:53 Raymond West via Discuss < discuss@lists.openscad.org> wrote: > after a bit of my description and explanation, deepseek came up with the > following, for equally spaced points around an ellipse > > // ===== User parameters ===== > dp = 200; // Diameter of original circle > num_points = 7; // Number of equally spaced points > start_angle_deg = 90; // Starting angle in degrees (0 = right, 90 = > top) > step_deg =0 .1; // Integration step in degrees (smaller = > more accurate, but more recursions) > ellipse_smoothness = 120; // $fn for the ellipse (higher = smoother) > > // ===== Ellipse geometry (scale([1,1.5]) circle) ===== > a = dp / 2; // semi‑axis X = 100 > b = 1.5 * dp / 2; // semi‑axis Y = 150 > > // Point on ellipse for angle in degrees > function pt(phi_deg) = [a * cos(phi_deg), b * sin(phi_deg)]; > > // Derivative with respect to degrees (includes PI/180 conversion) > function dx_dphi(phi_deg) = -a * sin(phi_deg) * PI/180; > function dy_dphi(phi_deg) = b * cos(phi_deg) * PI/180; > function ds(phi_deg) = norm([dx_dphi(phi_deg), dy_dphi(phi_deg)]); > > // Build list of phi from 0 to 360 degrees (inclusive) > phi_list = [ for (i = [0:step_deg:360]) i ]; > > // Recursively compute cumulative arc lengths (depth = len(phi_list)-1 ≈ > 180) > function cum_arcs(i = 0, cum = 0, result = [0]) = > i >= len(phi_list)-1 ? result : > let( dphi = phi_list[i+1] - phi_list[i], > ds_mid = (ds(phi_list[i]) + ds(phi_list[i+1])) / 2, > new_cum = cum + ds_mid * dphi ) > cum_arcs(i+1, new_cum, concat(result, [new_cum])); > > arc_cum = cum_arcs(); // cumulative arc lengths > total_len = arc_cum[len(arc_cum)-1]; // full circumference > step_len = total_len / num_points; // arc length between points > > // Linear search to find phi for a given target arc length > function phi_for_arc(target, idx = 0) = > idx >= len(arc_cum)-1 ? phi_list[len(phi_list)-1] : > target <= arc_cum[idx+1] ? > let( t = (target - arc_cum[idx]) / (arc_cum[idx+1] - arc_cum[idx]) > ) > phi_list[idx] + t * (phi_list[idx+1] - phi_list[idx]) : > phi_for_arc(target, idx+1); > > // Generate points equally spaced by arc length, starting at > start_angle_deg. > // We offset the target arc lengths so that the first point lies at > start_angle_deg. > // First find the arc length from 0 to start_angle_deg: > start_arc = phi_for_arc(start_angle_deg) ? > // phi_for_arc returns phi, not arc. We need arc at that phi. Use > linear interpolation. > let( idx = floor(start_angle_deg / step_deg), > t = (start_angle_deg - phi_list[idx]) / (phi_list[idx+1] - > phi_list[idx]), > arc = arc_cum[idx] + t * (arc_cum[idx+1] - arc_cum[idx]) ) arc : > 0; > > points = [ for (k = [0:num_points-1]) > let( target = start_arc + k * step_len ) > let( wrapped = target % total_len ) > pt(phi_for_arc(wrapped)) ]; > > // ===== Draw the smoothed ellipse ===== > scale([1, 1.5]) circle(d = dp, $fn = ellipse_smoothness); > > // ===== Draw the points ===== > color("red") > for (p = points) translate(p) circle(r = 2.5, $fn = 16); > > // ===== Debug output ===== > echo("Total circumference =", total_len); > echo("Step length =", step_len); > echo("Start angle =", start_angle_deg, "degrees"); > echo("Points (x,y):"); > for (p = points) echo(p); > On 29/04/2026 17:22, Sanjeev Prabhakar via Discuss wrote: > > It seems the solution by Mr.Mark is not equally spaced circles > Below the superimposed picture you can see the difference. > The marked circles are equally spaced to >10 decimal points. > > [image: Screenshot 2026-04-29 at 9.46.19 PM.png] > > > On Wed, 29 Apr 2026 at 16:38, jon jonbondy.com via Discuss < > discuss@lists.openscad.org> wrote: > >> Interesting that something so apparently simple is not. >> >> >> On 4/28/2026 9:45 PM, Jordan Brown wrote: >> > On 4/28/2026 6:01 PM, Jon Bondy via Discuss wrote: >> >> >> >> Yes. Exactly. I wanted to use a for() and rotate() to spread the >> >> holes around the circle and then scale() it to get them in the right >> >> location. Nice concept. Not easy to implement. >> >> >> >> Mark's trig approach seems like the best so far >> >> >> > Note that the trig approach does not yield evenly spaced holes, except >> > in some distorted-angle sense. >> > >> > >> > I messed around for a while trying to find a for()-rotate() answer, >> > but failed. It seems like there ought to be one, probably pretty >> > ugly, but I'm not coming up with it. >> > >> > >> > >> _______________________________________________ >> 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 > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RW
Raymond West
Wed, Apr 29, 2026 9:23 PM

On 29/04/2026 19:43, Adrian Mariano via Discuss wrote:

This is asking AI to write code that already exists in libraries
including BOSL2. It looks like the same solution as path_copies.

That is all that most folk do, find something that already exists.
That is why the cheap llms are better at python, than openscad, say,
since there is far more of it out there. The fun then comes in sorting
the good from the bad. fwiw, deepseek logs where it is looking, what
it tests, revises etc. I think it has more emphasis on its neuralnet,
or euivalent.

On 29/04/2026 19:43, Adrian Mariano via Discuss wrote: > This is asking AI to write code that already exists in libraries > including BOSL2. It looks like the same solution as path_copies. > > That is all that most folk do, find something that already exists. > That is why the cheap llms are better at python, than openscad, say, > since there is far more of it out there. The fun then comes in sorting > the good from the bad. fwiw, deepseek logs where it is looking, what > it tests, revises etc. I think it has more emphasis on its neuralnet, > or euivalent.