discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

rounding edges on a strange shape

JB
Jon Bondy
Thu, May 14, 2026 5:02 PM

Works fine here, using a recent snapshot of OpenSCAD and BOSL2

On 5/14/2026 12:48 PM, Karl Exler via Discuss wrote:

include<BOSL2/std.scad>

side = difference([  fwd(10, square([38, 30])),
                     move([-10,-5], zrot(27, square(100))),
                     move([15,17], zrot(-27, square(100)))
                 ])[0];

rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5);

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

Works fine here, using a recent snapshot of OpenSCAD and BOSL2 On 5/14/2026 12:48 PM, Karl Exler via Discuss wrote: > include<BOSL2/std.scad> > > side = difference([  fwd(10, square([38, 30])), >                      move([-10,-5], zrot(27, square(100))), >                      move([15,17], zrot(-27, square(100))) >                  ])[0]; > > rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5); -- This email has been checked for viruses by AVG antivirus software. www.avg.com
DP
Dan Perry
Thu, May 14, 2026 5:16 PM

Your code worked for me.  Seems like OpenSCAD doesn't know the location of
your BOSL2 library.
Dan

On Thu, May 14, 2026 at 9:48 AM Karl Exler via Discuss <
discuss@lists.openscad.org> wrote:

sorry for using wrong terminology... I simply tried this code.. and
received an error

include<BOSL2/std.scad>

side = difference([  fwd(10, square([38, 30])),
move([-10,-5], zrot(27, square(100))),
move([15,17], zrot(-27, square(100)))
])[0];

rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5);

Karl

Am 14.05.26 um 18:03 schrieb Dan Perry via Discuss:

Using a module as a function? Show your code.

Dan

On Thu, May 14, 2026 at 9:01 AM Karl Exler via Discuss <
discuss@lists.openscad.org> wrote:

I am always trying to learn from the profs... ;-) But now OpenScad says
that it don´t know the function "rounded_prism"

I renewed my BOSL2 Library... but .. nope

What I am doing wrong?

KARL
Am 14.05.26 um 15:05 schrieb Jon Bondy via Discuss:

Adrian:

As always, your code is more sophisticated than I am.  I did not know the
"trick" of converting a 2D object to 3D by appending the "[0]", for
example.  Your examples are always educational.

In the end, I created a complex shape (consisting of 5 connected
moderately complex shapes) and used minkowski() to smooth the entire thing,
after which I difference()'d in the various holes that needed drilling.

Jon

On 5/13/2026 4:08 PM, Adrian Mariano via Discuss wrote:

I think the methods I suggested are easier.  Using rounded_prism just
rounds the shape you provide, no fussing around.  As I previously noted you
can also do this with offset_sweep combined with round_corners, and I
didn't think of it but also convex_offset_extrude combined with round2d().

include<BOSL2/std.scad>

side = difference([  fwd(10, square([38, 30])),
move([-10,-5], zrot(27, square(100))),
move([15,17], zrot(-27, square(100)))
])[0];

rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5);

On Wed, May 13, 2026 at 3:08 PM Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:

I always start off thinking I must avoid minkowski(), but it works well
in this situation.

I had to take a medium sized project, with many difference() statements,
and refactor it into pre-difference() and post-difference() portions, then
minkowski() the union of the pre-diffs and finally apply the post-diffs.
An interesting exercise.

:)

On 5/13/2026 2:54 AM, Ken via Discuss wrote:

minkowski seems to work ok?

include <BOSL2/std.scad>

eps = 0.01;
slop = 0.2;
$fa = 3;
$fs = 0.2;
inches = 25.4;

minkowski()
{
difference() {
down(10)
cube([22, 38, 30]);
// slanted top
translate([-50, -10, -5])
rotate([27, 0, 0])
cube(100);
// slanted bottom
translate([-50, 15, 17])
rotate([-27, 0, 0])
cube(100);
}
sphere (1);
}

On 13/5/26 11:48, Jon Bondy via Discuss wrote:

Any easy way to round the edges on this shape?

include <BOSL2/std.scad>

eps = 0.01;
slop = 0.2;
$fa = 3;
$fs = 0.2;
inches = 25.4;

difference() {
down(10)
cube([22, 38, 30]);
// slanted top
translate([-50, -10, -5])
rotate([27, 0, 0])
cube(100);
// slanted bottom
translate([-50, 15, 17])
rotate([-27, 0, 0])
cube(100);
}

--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com https://urldefense.proofpoint.com/v2/url?u=https-3A__vk7krj.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=h2RQwWIEhzj5wT2tfBV5hTt7t1xPZaMbjwOjDfl0ah2G6y4KAI3Al6kkFDzgaBso&s=nA_RFW5V5ZW2_ZH1eaUa1-g8cao0E2wOQCTIvNvbMcw&e=https://vk7krj.com/running.html https://urldefense.proofpoint.com/v2/url?u=https-3A__vk7krj.com_running.html&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=h2RQwWIEhzj5wT2tfBV5hTt7t1xPZaMbjwOjDfl0ah2G6y4KAI3Al6kkFDzgaBso&s=PAaZSXR0Y5M0oUMgy5hY_8kX1QELcQmFFNpzXBYJGms&e=

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!


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

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=LIZtHBFkfs-kequwsv0Kn3k1RZnJ7zKMPING6dH8cJPrRWRgerqEBk23ywJkYliD&s=eUb1B-tyP6lkGfXKsWlj_FAQ3pFzxp2ADerTfd0qFnY&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=LIZtHBFkfs-kequwsv0Kn3k1RZnJ7zKMPING6dH8cJPrRWRgerqEBk23ywJkYliD&s=eUb1B-tyP6lkGfXKsWlj_FAQ3pFzxp2ADerTfd0qFnY&e=
<#m_2506447718323006207_m_-511053714183435358_m_7018855624604288762_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


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


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

Your code worked for me. Seems like OpenSCAD doesn't know the location of your BOSL2 library. Dan On Thu, May 14, 2026 at 9:48 AM Karl Exler via Discuss < discuss@lists.openscad.org> wrote: > sorry for using wrong terminology... I simply tried this code.. and > received an error > > > include<BOSL2/std.scad> > > side = difference([ fwd(10, square([38, 30])), > move([-10,-5], zrot(27, square(100))), > move([15,17], zrot(-27, square(100))) > ])[0]; > > rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5); > > Karl > > > Am 14.05.26 um 18:03 schrieb Dan Perry via Discuss: > > Using a module as a function? Show your code. > > Dan > > > On Thu, May 14, 2026 at 9:01 AM Karl Exler via Discuss < > discuss@lists.openscad.org> wrote: > >> I am always trying to learn from the profs... ;-) But now OpenScad says >> that it don´t know the function "rounded_prism" >> >> I renewed my BOSL2 Library... but .. nope >> >> What I am doing wrong? >> >> KARL >> Am 14.05.26 um 15:05 schrieb Jon Bondy via Discuss: >> >> Adrian: >> >> As always, your code is more sophisticated than I am. I did not know the >> "trick" of converting a 2D object to 3D by appending the "[0]", for >> example. Your examples are always educational. >> >> In the end, I created a complex shape (consisting of 5 connected >> moderately complex shapes) and used minkowski() to smooth the entire thing, >> after which I difference()'d in the various holes that needed drilling. >> >> Jon >> >> >> On 5/13/2026 4:08 PM, Adrian Mariano via Discuss wrote: >> >> I think the methods I suggested are easier. Using rounded_prism just >> rounds the shape you provide, no fussing around. As I previously noted you >> can also do this with offset_sweep combined with round_corners, and I >> didn't think of it but also convex_offset_extrude combined with round2d(). >> >> include<BOSL2/std.scad> >> >> side = difference([ fwd(10, square([38, 30])), >> move([-10,-5], zrot(27, square(100))), >> move([15,17], zrot(-27, square(100))) >> ])[0]; >> >> rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5); >> >> >> On Wed, May 13, 2026 at 3:08 PM Jon Bondy via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> I always start off thinking I must avoid minkowski(), but it works well >>> in this situation. >>> >>> I had to take a medium sized project, with many difference() statements, >>> and refactor it into pre-difference() and post-difference() portions, then >>> minkowski() the union of the pre-diffs and finally apply the post-diffs. >>> An interesting exercise. >>> >>> :) >>> >>> On 5/13/2026 2:54 AM, Ken via Discuss wrote: >>> >>> minkowski seems to work ok? >>> >>> >>> include <BOSL2/std.scad> >>> >>> eps = 0.01; >>> slop = 0.2; >>> $fa = 3; >>> $fs = 0.2; >>> inches = 25.4; >>> >>> minkowski() >>> { >>> difference() { >>> down(10) >>> cube([22, 38, 30]); >>> // slanted top >>> translate([-50, -10, -5]) >>> rotate([27, 0, 0]) >>> cube(100); >>> // slanted bottom >>> translate([-50, 15, 17]) >>> rotate([-27, 0, 0]) >>> cube(100); >>> } >>> sphere (1); >>> } >>> >>> On 13/5/26 11:48, Jon Bondy via Discuss wrote: >>> >>> Any easy way to round the edges on this shape? >>> >>> >>> >>> >>> include <BOSL2/std.scad> >>> >>> eps = 0.01; >>> slop = 0.2; >>> $fa = 3; >>> $fs = 0.2; >>> inches = 25.4; >>> >>> difference() { >>> down(10) >>> cube([22, 38, 30]); >>> // slanted top >>> translate([-50, -10, -5]) >>> rotate([27, 0, 0]) >>> cube(100); >>> // slanted bottom >>> translate([-50, 15, 17]) >>> rotate([-27, 0, 0]) >>> cube(100); >>> } >>> >>> >>> >>> -- >>> Cheers, Kenbats059@gmail.comhttps://vk7krj.com <https://urldefense.proofpoint.com/v2/url?u=https-3A__vk7krj.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=h2RQwWIEhzj5wT2tfBV5hTt7t1xPZaMbjwOjDfl0ah2G6y4KAI3Al6kkFDzgaBso&s=nA_RFW5V5ZW2_ZH1eaUa1-g8cao0E2wOQCTIvNvbMcw&e=>https://vk7krj.com/running.html <https://urldefense.proofpoint.com/v2/url?u=https-3A__vk7krj.com_running.html&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=h2RQwWIEhzj5wT2tfBV5hTt7t1xPZaMbjwOjDfl0ah2G6y4KAI3Al6kkFDzgaBso&s=PAaZSXR0Y5M0oUMgy5hY_8kX1QELcQmFFNpzXBYJGms&e=> >>> ---------------------------------------- >>> A baby can be defined as an ego with a noise at one end and a smell at the other. >>> Your job as parents is to teach them to control all three. >>> My job as a grandad is to tell you how you are doing it all wrong! >>> >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >>> >>> >>> <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=LIZtHBFkfs-kequwsv0Kn3k1RZnJ7zKMPING6dH8cJPrRWRgerqEBk23ywJkYliD&s=eUb1B-tyP6lkGfXKsWlj_FAQ3pFzxp2ADerTfd0qFnY&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=LIZtHBFkfs-kequwsv0Kn3k1RZnJ7zKMPING6dH8cJPrRWRgerqEBk23ywJkYliD&s=eUb1B-tyP6lkGfXKsWlj_FAQ3pFzxp2ADerTfd0qFnY&e=> >>> <#m_2506447718323006207_m_-511053714183435358_m_7018855624604288762_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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
JB
Jordan Brown
Thu, May 14, 2026 5:22 PM

On 5/14/2026 6:05 AM, Jon Bondy via Discuss wrote:

I did not know the "trick" of converting a 2D object to 3D by
appending the "[0]", for example.

There's no trick, and the [0] doesn't convert a 2D object to 3D.

BOSL2's difference() function returns a list of lists of points. It's a
list of lists because the result of a difference can be more than one
polygon.

Adding the [0] does what it always does:  it yields the first element in
the list - in this case, the one and only list of points in the result.

That list of points is converted into a 3D object by rounded_prism,
because that's what rounded_prism does: construct a polyhedron from one
or two lists of points, rounding the edges.

include<BOSL2/std.scad>

side = difference([  fwd(10, square([38, 30])),
                     move([-10,-5], zrot(27, square(100))),
                     move([15,17], zrot(-27, square(100)))
                 ])[0];

rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5);

On 5/14/2026 6:05 AM, Jon Bondy via Discuss wrote: > > I did not know the "trick" of converting a 2D object to 3D by > appending the "[0]", for example. > There's no trick, and the [0] doesn't convert a 2D object to 3D. BOSL2's difference() function returns a list of lists of points. It's a list of lists because the result of a difference can be more than one polygon. Adding the [0] does what it always does:  it yields the first element in the list - in this case, the one and only list of points in the result. That list of points is converted into a 3D object by rounded_prism, because that's what rounded_prism does: construct a polyhedron from one or two lists of points, rounding the edges. >> include<BOSL2/std.scad> >> >> side = difference([  fwd(10, square([38, 30])), >>                      move([-10,-5], zrot(27, square(100))), >>                      move([15,17], zrot(-27, square(100))) >>                  ])[0]; >> >> rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5);
JB
Jordan Brown
Thu, May 14, 2026 5:24 PM

On 5/14/2026 9:48 AM, Karl Exler via Discuss wrote:

sorry for using wrong terminology... I simply tried this code.. and
received an error

And the error that you got was...?

(Make sure to include all errors, not just the last one.)

On 5/14/2026 9:48 AM, Karl Exler via Discuss wrote: > sorry for using wrong terminology... I simply tried this code.. and > received an error > And the error that you got was...? (Make sure to include all errors, not just the last one.)
JJ
jon jonbondy.com
Thu, May 14, 2026 9:53 PM

Ah.  So BOSL2 has a difference() and OpenSCAD has a difference() and
there is no way to know which one you are using at any one time?

I know that this kind of overloading is popular, and that I am in the
minority, and that it is too late, but I really dislike this situation.

On 5/14/2026 1:22 PM, Jordan Brown wrote:

On 5/14/2026 6:05 AM, Jon Bondy via Discuss wrote:

I did not know the "trick" of converting a 2D object to 3D by
appending the "[0]", for example.

There's no trick, and the [0] doesn't convert a 2D object to 3D.

BOSL2's difference() function returns a list of lists of points.  It's
a list of lists because the result of a difference can be more than
one polygon.

Adding the [0] does what it always does:  it yields the first element
in the list - in this case, the one and only list of points in the result.

That list of points is converted into a 3D object by rounded_prism,
because that's what rounded_prism does: construct a polyhedron from
one or two lists of points, rounding the edges.

include<BOSL2/std.scad>

side = difference([  fwd(10, square([38, 30])),
                     move([-10,-5], zrot(27, square(100))),
                     move([15,17], zrot(-27, square(100)))
                 ])[0];

rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5);

Ah.  So BOSL2 has a difference() and OpenSCAD has a difference() and there is no way to know which one you are using at any one time? I know that this kind of overloading is popular, and that I am in the minority, and that it is too late, but I really dislike this situation. On 5/14/2026 1:22 PM, Jordan Brown wrote: > On 5/14/2026 6:05 AM, Jon Bondy via Discuss wrote: >> >> I did not know the "trick" of converting a 2D object to 3D by >> appending the "[0]", for example. >> > There's no trick, and the [0] doesn't convert a 2D object to 3D. > > BOSL2's difference() function returns a list of lists of points.  It's > a list of lists because the result of a difference can be more than > one polygon. > > Adding the [0] does what it always does:  it yields the first element > in the list - in this case, the one and only list of points in the result. > > That list of points is converted into a 3D object by rounded_prism, > because that's what rounded_prism does: construct a polyhedron from > one or two lists of points, rounding the edges. > > >>> include<BOSL2/std.scad> >>> >>> side = difference([  fwd(10, square([38, 30])), >>>                      move([-10,-5], zrot(27, square(100))), >>>                      move([15,17], zrot(-27, square(100))) >>>                  ])[0]; >>> >>> rounded_prism(side, height=22, joint_sides=5, joint_top=5, joint_bot=5);
AM
Adrian Mariano
Thu, May 14, 2026 10:20 PM

Well, not exactly.  OpenSCAD has a difference MODULE.  And BOSL2 has a
difference FUNCTION.  You always know which one you are using because if
you are using a module it's the native OpenSCAD difference() and if you're
using a function it's the BOSL2 function.  Assuming that you understand the
difference between functions and modules, the situation should be clear.
We made the decision to do things this way because it seemed to us to be
very clean and natural, especially since in many cases the module and
function form take exactly the same arguments and then do the same
thing---just the function returns a point list and the module returns
geometry.  Almost every module in BOSL2 has a matching function form.  It
seemed like tremendous clutter would be created (as well as increased
complication in the docs) if the function forms all had different names
than the module forms.

On Thu, May 14, 2026 at 5:53 PM jon jonbondy.com via Discuss <
discuss@lists.openscad.org> wrote:

Ah.  So BOSL2 has a difference() and OpenSCAD has a difference() and
there is no way to know which one you are using at any one time?

I know that this kind of overloading is popular, and that I am in the
minority, and that it is too late, but I really dislike this situation.

On 5/14/2026 1:22 PM, Jordan Brown wrote:

On 5/14/2026 6:05 AM, Jon Bondy via Discuss wrote:

I did not know the "trick" of converting a 2D object to 3D by
appending the "[0]", for example.

There's no trick, and the [0] doesn't convert a 2D object to 3D.

BOSL2's difference() function returns a list of lists of points.  It's
a list of lists because the result of a difference can be more than
one polygon.

Adding the [0] does what it always does:  it yields the first element
in the list - in this case, the one and only list of points in the

result.

That list of points is converted into a 3D object by rounded_prism,
because that's what rounded_prism does: construct a polyhedron from
one or two lists of points, rounding the edges.

include<BOSL2/std.scad>

side = difference([  fwd(10, square([38, 30])),
move([-10,-5], zrot(27, square(100))),
move([15,17], zrot(-27, square(100)))
])[0];

rounded_prism(side, height=22, joint_sides=5, joint_top=5,

joint_bot=5);


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

Well, not exactly. OpenSCAD has a difference MODULE. And BOSL2 has a difference FUNCTION. You always know which one you are using because if you are using a module it's the native OpenSCAD difference() and if you're using a function it's the BOSL2 function. Assuming that you understand the difference between functions and modules, the situation should be clear. We made the decision to do things this way because it seemed to us to be very clean and natural, especially since in many cases the module and function form take exactly the same arguments and then do the same thing---just the function returns a point list and the module returns geometry. Almost every module in BOSL2 has a matching function form. It seemed like tremendous clutter would be created (as well as increased complication in the docs) if the function forms all had different names than the module forms. On Thu, May 14, 2026 at 5:53 PM jon jonbondy.com via Discuss < discuss@lists.openscad.org> wrote: > Ah. So BOSL2 has a difference() and OpenSCAD has a difference() and > there is no way to know which one you are using at any one time? > > I know that this kind of overloading is popular, and that I am in the > minority, and that it is too late, but I really dislike this situation. > > > On 5/14/2026 1:22 PM, Jordan Brown wrote: > > On 5/14/2026 6:05 AM, Jon Bondy via Discuss wrote: > >> > >> I did not know the "trick" of converting a 2D object to 3D by > >> appending the "[0]", for example. > >> > > There's no trick, and the [0] doesn't convert a 2D object to 3D. > > > > BOSL2's difference() function returns a list of lists of points. It's > > a list of lists because the result of a difference can be more than > > one polygon. > > > > Adding the [0] does what it always does: it yields the first element > > in the list - in this case, the one and only list of points in the > result. > > > > That list of points is converted into a 3D object by rounded_prism, > > because that's what rounded_prism does: construct a polyhedron from > > one or two lists of points, rounding the edges. > > > > > >>> include<BOSL2/std.scad> > >>> > >>> side = difference([ fwd(10, square([38, 30])), > >>> move([-10,-5], zrot(27, square(100))), > >>> move([15,17], zrot(-27, square(100))) > >>> ])[0]; > >>> > >>> rounded_prism(side, height=22, joint_sides=5, joint_top=5, > joint_bot=5); > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org