AM
Adrian Mariano
Tue, Dec 9, 2025 1:13 PM
There is a way to query the BOSL2 version. Sadly it doesn’t produce a
useful result. Revar tried to configure GitHub to automatically increment a
version variable when new code was merged but this turned out to create a
bunch of problems and he eventually backed out that feature. The version
variable still exists but it’s not being incremented.
On Mon, Dec 8, 2025 at 22:57 larry via Discuss discuss@lists.openscad.org
wrote:
On Mon, 2025-12-08 at 19:59 -0500, Adrian Mariano via Discuss wrote:
If you get unknown module for attach_part then your BOSL2 is still
not updated. You need to figure that out. The code is correct and
produces the image Peter showed.
Is there a way to query the rev level of BOSL2?
On Mon, 2025-12-08 at 16:37 -0500, Adrian Mariano via Discuss
wrote:
larry, sounds like you need to update your BOSL2. The
attach_part()
feature is fairly new.
I did, but I put it in the wrong place. It's there now, but
Peter's
code still gives me the unknown module error for attach_part.
I think there's more to it. The code really doesn't look right.
I guess I'll try the attachment tutorial.
//----
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
diff()
tube( id=50, h = 10, rounding=1, wall=2) // the ring
let(tube=parent())
attach_part("inside")
prism_connector( // the solid tube on the inside of
circle(d=7), // the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
restore(tube)
tag("remove")
prism_connector( // the inside of the tubewith
circle(d=5), // exit on the outside of the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
);
//----
On Thu, 2025-08-14 at 10:58 +0200, Peter Kriens via Discuss
wrote:
Maybe if you're purely data driven?
What I like about the attachment model is how you never have
to
figure out positions. Worst case a shift from a well known
position
relative to another object. You can get highly complex
components
and
easily change major parts without having to refactor and
recalculate
a lot. Positions then quickly become complex to calculate
when
the
objects are at angles. I learned that for injection molding
everything is slightly angled to allow the release of the
mold
but it
means there are never any easy modulo 90 degree angles. (The
rounded_prism() is my hero).
The absolute crown enabled by the attachment model is
however,
the
prism_connector ...
PastedGraphic-3.png
When I try this one, it doesn't understand "attach_part()". I
could
not
find it in BOSL2.
diff()
tube( id=50, h = 10, rounding=1, wall=2)// the ring
let(tube=parent())
attach_part("inside")
prism_connector( // the solid tube on
the
inside of
circle(d=7), // the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
restore(tube)
tag("remove")
prism_connector( // the inside of the
tube
with
circle(d=5), // exit on the outside
of
the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
;
For me the attachment model of BOSL2 is the main reason I did
not
dive into Python. It is absolute stunning, it is now hard for
me
to
believe you can make complex modular components without them.
Peter Kriens
On 13 Aug 2025, at 20:46, Leonard Martin Struttmann via
Discuss
discuss@lists.openscad.org wrote:
That's good, and very efficient for designs of that type.
However, it's been years since I designed any models of
that
type.
The vast majority of my designs (models of existing printed
circuit
boards) consists of placing cubes and cylinders at known
distances
from the origin. And it's all table-driven. In my
workflow, I
never place a shape in reference to an existing shape.
On Wed, Aug 13, 2025 at 11:40 AM Jordan Brown
openscad@jordan.maileater.net wrote:
On 8/13/2025 4:32 AM, Leonard Martin Struttmann via
Discuss
wrote:
However, I have yet to find a use-case in my projects
where
attachments are easier than the native
translate()/rotate()
OpenSCAD primitives.
Quick: build a cube with a cylinder sticking out of the
right
side.
include <BOSL2/std.scad>
cube(10) attach(RIGHT) cylinder(h=10, r=3);
Yes, you can do that with rotate and translate. (Or is
it
translate and rotate?)
How about if the cylinder is sticking out the corner of
the
cube?
include <BOSL2/std.scad>
cube(10) attach(RIGHT+FRONT+TOP) cylinder(h=10, r=3);
Now put a sphere at the end of the cylinder, with the
sphere
barely touching the cylinder:
include <BOSL2/std.scad>
cube(10)
attach(RIGHT) cylinder(h=10, r=3)
attach(TOP, BOTTOM) sphere(r=3);
cubesz = 10;
cylh = 10;
spherer = 3;
cube(cubesz);
translate([cubesz, cubesz/2, cubesz/2])
rotate([0,90,0]) {
cylinder(h=cylh, r=3);
translate([0,0,cylh + spherer])
sphere(r=spherer);
}
Note: I didn't need the variables, but I did if I
wanted
to
avoid duplicating the numbers.
There is a way to query the BOSL2 version. Sadly it doesn’t produce a
useful result. Revar tried to configure GitHub to automatically increment a
version variable when new code was merged but this turned out to create a
bunch of problems and he eventually backed out that feature. The version
variable still exists but it’s not being incremented.
On Mon, Dec 8, 2025 at 22:57 larry via Discuss <discuss@lists.openscad.org>
wrote:
> On Mon, 2025-12-08 at 19:59 -0500, Adrian Mariano via Discuss wrote:
> > If you get unknown module for attach_part then your BOSL2 is still
> > not updated. You need to figure that out. The code is correct and
> > produces the image Peter showed.
>
> Is there a way to query the rev level of BOSL2?
>
> > On Mon, Dec 8, 2025 at 7:15 PM larry via Discuss
> > <discuss@lists.openscad.org> wrote:
> > > On Mon, 2025-12-08 at 16:37 -0500, Adrian Mariano via Discuss
> > > wrote:
> > > > larry, sounds like you need to update your BOSL2. The
> > > > attach_part()
> > > > feature is fairly new.
> > >
> > > I did, but I put it in the wrong place. It's there now, but
> > > Peter's
> > > code still gives me the unknown module error for attach_part.
> > > I think there's more to it. The code really doesn't look right.
> > >
> > > I guess I'll try the attachment tutorial.
> > >
> > > //----
> > > include <BOSL2/std.scad>
> > > $fn= $preview ? 60 : 180;
> > >
> > > diff()
> > > tube( id=50, h = 10, rounding=1, wall=2) // the ring
> > > let(tube=parent())
> > > attach_part("inside")
> > > prism_connector( // the solid tube on the inside of
> > > circle(d=7), // the ring
> > > parent(), LEFT,
> > > parent(), RIGHT,
> > > fillet=1
> > > )
> > > restore(tube)
> > > tag("remove")
> > > prism_connector( // the inside of the tubewith
> > > circle(d=5), // exit on the outside of the ring
> > > parent(), LEFT,
> > > parent(), RIGHT,
> > > fillet=1
> > > );
> > > //----
> > >
> > > > On Mon, Dec 8, 2025 at 11:06 AM larry via Discuss
> > > > <discuss@lists.openscad.org> wrote:
> > > > > On Thu, 2025-08-14 at 10:58 +0200, Peter Kriens via Discuss
> > > > > wrote:
> > > > > > Maybe if you're purely data driven?
> > > > > >
> > > > > > What I like about the attachment model is how you never have
> > > > > > to
> > > > > > figure out positions. Worst case a shift from a well known
> > > > > > position
> > > > > > relative to another object. You can get highly complex
> > > > > > components
> > > > > > and
> > > > > > easily change major parts without having to refactor and
> > > > > > recalculate
> > > > > > a lot. Positions then quickly become complex to calculate
> > > > > > when
> > > > > > the
> > > > > > objects are at angles. I learned that for injection molding
> > > > > > everything is slightly angled to allow the release of the
> > > > > > mold
> > > > > > but it
> > > > > > means there are never any easy modulo 90 degree angles. (The
> > > > > > rounded_prism() is my hero).
> > > > > >
> > > > > > The absolute crown enabled by the attachment model is
> > > > > > however,
> > > > > > the
> > > > > > prism_connector ...
> > > > > >
> > > > > > PastedGraphic-3.png
> > > > >
> > > > > When I try this one, it doesn't understand "attach_part()". I
> > > > > could
> > > > > not
> > > > > find it in BOSL2.
> > > > >
> > > > > > > diff()
> > > > > > > tube( id=50, h = 10, rounding=1, wall=2)// the ring
> > > > > > > let(tube=parent())
> > > > > > > attach_part("inside")
> > > > > > > prism_connector( // the solid tube on
> > > > > > > the
> > > > > > > inside of
> > > > > > > circle(d=7), // the ring
> > > > > > > parent(), LEFT,
> > > > > > > parent(), RIGHT,
> > > > > > > fillet=1
> > > > > > > )
> > > > > > > restore(tube)
> > > > > > > tag("remove")
> > > > > > > prism_connector( // the inside of the
> > > > > > > tube
> > > > > > > with
> > > > > > > circle(d=5), // exit on the outside
> > > > > > > of
> > > > > > > the ring
> > > > > > > parent(), LEFT,
> > > > > > > parent(), RIGHT,
> > > > > > > fillet=1
> > > > > > > )
> > > > > > > ;
> > > > > >
> > > > > >
> > > > > > For me the attachment model of BOSL2 is the main reason I did
> > > > > > not
> > > > > > dive into Python. It is absolute stunning, it is now hard for
> > > > > > me
> > > > > > to
> > > > > > believe you can make complex modular components without them.
> > > > > >
> > > > > > Peter Kriens
> > > > > >
> > > > > >
> > > > > >
> > > > > > > On 13 Aug 2025, at 20:46, Leonard Martin Struttmann via
> > > > > > > Discuss
> > > > > > > <discuss@lists.openscad.org> wrote:
> > > > > > >
> > > > > > > That's good, and very efficient for designs of that type.
> > > > > > >
> > > > > > > However, it's been years since I designed any models of
> > > > > > > that
> > > > > > > type.
> > > > > > > The vast majority of my designs (models of existing printed
> > > > > > > circuit
> > > > > > > boards) consists of placing cubes and cylinders at known
> > > > > > > distances
> > > > > > > from the origin. And it's all table-driven. In my
> > > > > > > workflow, I
> > > > > > > never place a shape in reference to an existing shape.
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Aug 13, 2025 at 11:40 AM Jordan Brown
> > > > > > > <openscad@jordan.maileater.net> wrote:
> > > > > > > > On 8/13/2025 4:32 AM, Leonard Martin Struttmann via
> > > > > > > > Discuss
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > However, I have yet to find a use-case in my projects
> > > > > > > > > where
> > > > > > > > > attachments are easier than the native
> > > > > > > > > translate()/rotate()
> > > > > > > > > OpenSCAD primitives.
> > > > > > > >
> > > > > > > > Quick: build a cube with a cylinder sticking out of the
> > > > > > > > right
> > > > > > > > side.
> > > > > > > >
> > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > >
> > > > > > > > > cube(10) attach(RIGHT) cylinder(h=10, r=3);
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Yes, you can do that with rotate and translate. (Or is
> > > > > > > > it
> > > > > > > > translate and rotate?)
> > > > > > > > How about if the cylinder is sticking out the corner of
> > > > > > > > the
> > > > > > > > cube?
> > > > > > > >
> > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > >
> > > > > > > > > cube(10) attach(RIGHT+FRONT+TOP) cylinder(h=10, r=3);
> > > > > > > >
> > > > > > > > Now put a sphere at the end of the cylinder, with the
> > > > > > > > sphere
> > > > > > > > barely touching the cylinder:
> > > > > > > >
> > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > >
> > > > > > > > > cube(10)
> > > > > > > > > attach(RIGHT) cylinder(h=10, r=3)
> > > > > > > > > attach(TOP, BOTTOM) sphere(r=3);
> > > > > > > >
> > > > > > > > Versus:
> > > > > > > >
> > > > > > > > > cubesz = 10;
> > > > > > > > > cylh = 10;
> > > > > > > > > spherer = 3;
> > > > > > > > > cube(cubesz);
> > > > > > > > > translate([cubesz, cubesz/2, cubesz/2])
> > > > > > > > > rotate([0,90,0]) {
> > > > > > > > > cylinder(h=cylh, r=3);
> > > > > > > > > translate([0,0,cylh + spherer])
> > > > > > > > > sphere(r=spherer);
> > > > > > > > > }
> > > > > > > >
> > > > > > > > Note: I didn't *need* the variables, but I did if I
> > > > > > > > wanted
> > > > > > > > to
> > > > > > > > avoid duplicating the numbers.
> > > > > > > >
> > > > > > > >
> > > > > > > _______________________________________________
> > > > > > > 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
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jon Bondy
Tue, Dec 9, 2025 1:28 PM
It is interesting to me that, after decades, GitHub has not come up with
a way to calculate and display version information that actually works.
On 12/9/2025 8:13 AM, Adrian Mariano via Discuss wrote:
There is a way to query the BOSL2 version. Sadly it doesn’t produce a
useful result. Revar tried to configure GitHub to automatically
increment a version variable when new code was merged but this turned
out to create a bunch of problems and he eventually backed out that
feature. The version variable still exists but it’s not being
incremented.
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
It is interesting to me that, after decades, GitHub has not come up with
a way to calculate and display version information that actually works.
On 12/9/2025 8:13 AM, Adrian Mariano via Discuss wrote:
> There is a way to query the BOSL2 version. Sadly it doesn’t produce a
> useful result. Revar tried to configure GitHub to automatically
> increment a version variable when new code was merged but this turned
> out to create a bunch of problems and he eventually backed out that
> feature. The version variable still exists but it’s not being
> incremented.
>
>
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
JB
Jon Bondy
Tue, Dec 9, 2025 2:34 PM
Jordan:
Very helpful. Thank you.
Can I do something similar to get the most recent OpenSCAD?
Jon
On 12/9/2025 12:07 AM, Jordan Brown via Discuss wrote:
I use "git" to manage my BOSL2 installation.
I went to the OpenSCAD/libraries directory, and I said "git clone
https://github.com/revarbat/BOSL2". That gave me a BOSL2 installation.
Later, I go to that OpenSCAD/libraries/BOSL2 directory and say "git
pull", and it updates my BOSL2 installation.
I think I got my git for Windows here:
https://git-scm.com/install/windows but you could presumably use one
of the GUIs similarly, assuming that it will let you put your worktree
wherever you want to.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
Jordan:
Very helpful. Thank you.
Can I do something similar to get the most recent OpenSCAD?
Jon
On 12/9/2025 12:07 AM, Jordan Brown via Discuss wrote:
> I use "git" to manage my BOSL2 installation.
>
> I went to the OpenSCAD/libraries directory, and I said "git clone
> https://github.com/revarbat/BOSL2". That gave me a BOSL2 installation.
>
> Later, I go to that OpenSCAD/libraries/BOSL2 directory and say "git
> pull", and it updates my BOSL2 installation.
>
> I think I got my git for Windows here:
> https://git-scm.com/install/windows but you could presumably use one
> of the GUIs similarly, assuming that it will let you put your worktree
> wherever you want to.
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
PK
Peter Kriens
Tue, Dec 9, 2025 2:44 PM
I do not think https://github.com/revarbat/BOSL2 is the right URL to the BOSL2 repo? I think it should be https://github.com/BelfrySCAD/BOSL2/ or git@github.com:BelfrySCAD/BOSL2.git I think you use Revar's private repo that might run behind the actual one.
I actually make every project a Github repository and use dependencies like BOSL2 as a submodule. I too often experienced that if a library was updated it killed my code. Having a submodule for a project leeps the version the same as you worked on until you explicitly update it. And updates are completely independent on other projects.
Peter
On 9 Dec 2025, at 06:07, Jordan Brown via Discuss discuss@lists.openscad.org wrote:
I use "git" to manage my BOSL2 installation.
I went to the OpenSCAD/libraries directory, and I said "git clone https://github.com/revarbat/BOSL2". That gave me a BOSL2 installation.
Later, I go to that OpenSCAD/libraries/BOSL2 directory and say "git pull", and it updates my BOSL2 installation.
I think I got my git for Windows here: https://git-scm.com/install/windows but you could presumably use one of the GUIs similarly, assuming that it will let you put your worktree wherever you want to.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I do not think https://github.com/revarbat/BOSL2 is the right URL to the BOSL2 repo? I think it should be https://github.com/BelfrySCAD/BOSL2/ or git@github.com:BelfrySCAD/BOSL2.git I think you use Revar's private repo that might run behind the actual one.
I actually make every project a Github repository and use dependencies like BOSL2 as a submodule. I too often experienced that if a library was updated it killed my code. Having a submodule for a project leeps the version the same as you worked on until you explicitly update it. And updates are completely independent on other projects.
Peter
> On 9 Dec 2025, at 06:07, Jordan Brown via Discuss <discuss@lists.openscad.org> wrote:
>
> I use "git" to manage my BOSL2 installation.
>
> I went to the OpenSCAD/libraries directory, and I said "git clone https://github.com/revarbat/BOSL2". That gave me a BOSL2 installation.
>
> Later, I go to that OpenSCAD/libraries/BOSL2 directory and say "git pull", and it updates my BOSL2 installation.
>
> I think I got my git for Windows here: https://git-scm.com/install/windows but you could presumably use one of the GUIs similarly, assuming that it will let you put your worktree wherever you want to.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jon Bondy
Tue, Dec 9, 2025 2:51 PM
Peter:
Jordan's process appears to have worked for me.
Jon
On 12/9/2025 9:44 AM, Peter Kriens via Discuss wrote:
On 9 Dec 2025, at 06:07, Jordan Brown via Discuss
discuss@lists.openscad.org wrote:
I use "git" to manage my BOSL2 installation.
I went to the OpenSCAD/libraries directory, and I said "git clone
https://github.com/revarbat/BOSL2". That gave me a BOSL2 installation.
Later, I go to that OpenSCAD/libraries/BOSL2 directory and say "git
pull", and it updates my BOSL2 installation.
I think I got my git for Windows here:
https://git-scm.com/install/windows but you could presumably use one
of the GUIs similarly, assuming that it will let you put your
worktree wherever you want to.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
Peter:
Jordan's process appears to have worked for me.
Jon
On 12/9/2025 9:44 AM, Peter Kriens via Discuss wrote:
> I do not think https://github.com/revarbat/BOSL2
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_revarbat_BOSL2&d=DwMFAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=wSuymtCTYeYZuOULTBFKlna9lWEWQvheoG3oEd1kCXjGDHLhSdvzyAUdqGCNIm7x&s=jGG7WzByI3vJ25Rak3r8Tza14ME7SQ7Q_zdOM0rYa8g&e=> is
> the right URL to the BOSL2 repo? I think it should be
> https://github.com/BelfrySCAD/BOSL2/
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_&d=DwMFAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=wSuymtCTYeYZuOULTBFKlna9lWEWQvheoG3oEd1kCXjGDHLhSdvzyAUdqGCNIm7x&s=mVfm6DS8-FxMYoRIhpud6g2qvF9Ym4kYBQCjv-YkxtY&e=> or
> git@github.com:BelfrySCAD/BOSL2.git I think you use Revar's private
> repo that might run behind the actual one.
>
> I actually make every project a Github repository and use dependencies
> like BOSL2 as a submodule. I too often experienced that if a library
> was updated it killed my code. Having a submodule for a project leeps
> the version the same as you worked on until you explicitly update it.
> And updates are completely independent on other projects.
>
> Peter
>
>
>> On 9 Dec 2025, at 06:07, Jordan Brown via Discuss
>> <discuss@lists.openscad.org> wrote:
>>
>> I use "git" to manage my BOSL2 installation.
>>
>> I went to the OpenSCAD/libraries directory, and I said "git clone
>> https://github.com/revarbat/BOSL2". That gave me a BOSL2 installation.
>>
>> Later, I go to that OpenSCAD/libraries/BOSL2 directory and say "git
>> pull", and it updates my BOSL2 installation.
>>
>> I think I got my git for Windows here:
>> https://git-scm.com/install/windows but you could presumably use one
>> of the GUIs similarly, assuming that it will let you put your
>> worktree wherever you want to.
>> _______________________________________________
>> 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
L
larry
Tue, Dec 9, 2025 8:04 PM
On Tue, 2025-12-09 at 08:13 -0500, Adrian Mariano via Discuss wrote:
There is a way to query the BOSL2 version. Sadly it doesn’t produce a
useful result. Revar tried to configure GitHub to automatically
increment a version variable when new code was merged but this turned
out to create a bunch of problems and he eventually backed out that
feature. The version variable still exists but it’s not being
incremented.
That's OK. I solved the problem by getting rid of the second BOSL2 in a
different library directory.
I mentioned that I have questions about Peter's code.
It looks like the code from diff) to the closing parenthesis after
filet=1, defines the solid tube, but if I comment out everything after
that, I don't see a solid tube, but only a . As a test, I changed
diff() to difference(), and there it is. So far, I think I sort of
understand most of it, except for wondering what the "inside" refers
to.
On Mon, 2025-12-08 at 19:59 -0500, Adrian Mariano via Discuss
wrote:
If you get unknown module for attach_part then your BOSL2 is
still
not updated. You need to figure that out. The code is correct
and
produces the image Peter showed.
Is there a way to query the rev level of BOSL2?
On Mon, 2025-12-08 at 16:37 -0500, Adrian Mariano via Discuss
wrote:
larry, sounds like you need to update your BOSL2. The
attach_part()
feature is fairly new.
I did, but I put it in the wrong place. It's there now, but
Peter's
code still gives me the unknown module error for attach_part.
I think there's more to it. The code really doesn't look right.
I guess I'll try the attachment tutorial.
//----
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
diff()
tube( id=50, h = 10, rounding=1, wall=2) // the ring
let(tube=parent())
attach_part("inside")
prism_connector( // the solid tube on the inside of
circle(d=7), // the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
restore(tube)
tag("remove")
prism_connector( // the inside of the tubewith
circle(d=5), // exit on the outside of the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
);
//----
On Thu, 2025-08-14 at 10:58 +0200, Peter Kriens via Discuss
wrote:
Maybe if you're purely data driven?
What I like about the attachment model is how you never
have
to
figure out positions. Worst case a shift from a well
known
position
relative to another object. You can get highly complex
components
and
easily change major parts without having to refactor and
recalculate
a lot. Positions then quickly become complex to calculate
when
the
objects are at angles. I learned that for injection
molding
everything is slightly angled to allow the release of the
mold
but it
means there are never any easy modulo 90 degree angles.
(The
rounded_prism() is my hero).
The absolute crown enabled by the attachment model is
however,
the
prism_connector ...
PastedGraphic-3.png
When I try this one, it doesn't understand "attach_part()".
I
could
not
find it in BOSL2.
diff()
tube( id=50, h = 10, rounding=1, wall=2)// the ring
let(tube=parent())
attach_part("inside")
prism_connector( // the solid tube
on
the
inside of
circle(d=7), // the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
restore(tube)
tag("remove")
prism_connector( // the inside of
the
tube
with
circle(d=5), // exit on the
outside
of
the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
;
For me the attachment model of BOSL2 is the main reason I
did
not
dive into Python. It is absolute stunning, it is now hard
for
me
to
believe you can make complex modular components without
them.
Peter Kriens
On 13 Aug 2025, at 20:46, Leonard Martin Struttmann via
Discuss
discuss@lists.openscad.org wrote:
That's good, and very efficient for designs of that
type.
However, it's been years since I designed any models of
that
type.
The vast majority of my designs (models of existing
printed
circuit
boards) consists of placing cubes and cylinders at
known
distances
from the origin. And it's all table-driven. In my
workflow, I
never place a shape in reference to an existing shape.
On Wed, Aug 13, 2025 at 11:40 AM Jordan Brown
openscad@jordan.maileater.net wrote:
On 8/13/2025 4:32 AM, Leonard Martin Struttmann via
Discuss
wrote:
However, I have yet to find a use-case in my
projects
where
attachments are easier than the native
translate()/rotate()
OpenSCAD primitives.
Quick: build a cube with a cylinder sticking out of
the
right
side.
include <BOSL2/std.scad>
cube(10) attach(RIGHT) cylinder(h=10, r=3);
Yes, you can do that with rotate and translate. (Or
is
it
translate and rotate?)
How about if the cylinder is sticking out the corner
of
the
cube?
include <BOSL2/std.scad>
cube(10) attach(RIGHT+FRONT+TOP) cylinder(h=10,
r=3);
Now put a sphere at the end of the cylinder, with the
sphere
barely touching the cylinder:
include <BOSL2/std.scad>
cube(10)
attach(RIGHT) cylinder(h=10, r=3)
attach(TOP, BOTTOM) sphere(r=3);
cubesz = 10;
cylh = 10;
spherer = 3;
cube(cubesz);
translate([cubesz, cubesz/2, cubesz/2])
rotate([0,90,0]) {
cylinder(h=cylh, r=3);
translate([0,0,cylh + spherer])
sphere(r=spherer);
}
Note: I didn't need the variables, but I did if I
wanted
to
avoid duplicating the numbers.
On Tue, 2025-12-09 at 08:13 -0500, Adrian Mariano via Discuss wrote:
> There is a way to query the BOSL2 version. Sadly it doesn’t produce a
> useful result. Revar tried to configure GitHub to automatically
> increment a version variable when new code was merged but this turned
> out to create a bunch of problems and he eventually backed out that
> feature. The version variable still exists but it’s not being
> incremented.
That's OK. I solved the problem by getting rid of the second BOSL2 in a
different library directory.
I mentioned that I have questions about Peter's code.
It looks like the code from diff) to the closing parenthesis after
filet=1, defines the solid tube, but if I comment out everything after
that, I don't see a solid tube, but only a . As a test, I changed
diff() to difference(), and there it is. So far, I think I sort of
understand most of it, except for wondering what the "inside" refers
to.
> On Mon, Dec 8, 2025 at 22:57 larry via Discuss
> <discuss@lists.openscad.org> wrote:
> > On Mon, 2025-12-08 at 19:59 -0500, Adrian Mariano via Discuss
> > wrote:
> > > If you get unknown module for attach_part then your BOSL2 is
> > > still
> > > not updated. You need to figure that out. The code is correct
> > > and
> > > produces the image Peter showed.
> >
> > Is there a way to query the rev level of BOSL2?
> >
> > > On Mon, Dec 8, 2025 at 7:15 PM larry via Discuss
> > > <discuss@lists.openscad.org> wrote:
> > > > On Mon, 2025-12-08 at 16:37 -0500, Adrian Mariano via Discuss
> > > > wrote:
> > > > > larry, sounds like you need to update your BOSL2. The
> > > > > attach_part()
> > > > > feature is fairly new.
> > > >
> > > > I did, but I put it in the wrong place. It's there now, but
> > > > Peter's
> > > > code still gives me the unknown module error for attach_part.
> > > > I think there's more to it. The code really doesn't look right.
> > > >
> > > > I guess I'll try the attachment tutorial.
> > > >
> > > > //----
> > > > include <BOSL2/std.scad>
> > > > $fn= $preview ? 60 : 180;
> > > >
> > > > diff()
> > > > tube( id=50, h = 10, rounding=1, wall=2) // the ring
> > > > let(tube=parent())
> > > > attach_part("inside")
> > > > prism_connector( // the solid tube on the inside of
> > > > circle(d=7), // the ring
> > > > parent(), LEFT,
> > > > parent(), RIGHT,
> > > > fillet=1
> > > > )
> > > > restore(tube)
> > > > tag("remove")
> > > > prism_connector( // the inside of the tubewith
> > > > circle(d=5), // exit on the outside of the ring
> > > > parent(), LEFT,
> > > > parent(), RIGHT,
> > > > fillet=1
> > > > );
> > > > //----
> > > >
> > > > > On Mon, Dec 8, 2025 at 11:06 AM larry via Discuss
> > > > > <discuss@lists.openscad.org> wrote:
> > > > > > On Thu, 2025-08-14 at 10:58 +0200, Peter Kriens via Discuss
> > > > > > wrote:
> > > > > > > Maybe if you're purely data driven?
> > > > > > >
> > > > > > > What I like about the attachment model is how you never
> > > > > > > have
> > > > > > > to
> > > > > > > figure out positions. Worst case a shift from a well
> > > > > > > known
> > > > > > > position
> > > > > > > relative to another object. You can get highly complex
> > > > > > > components
> > > > > > > and
> > > > > > > easily change major parts without having to refactor and
> > > > > > > recalculate
> > > > > > > a lot. Positions then quickly become complex to calculate
> > > > > > > when
> > > > > > > the
> > > > > > > objects are at angles. I learned that for injection
> > > > > > > molding
> > > > > > > everything is slightly angled to allow the release of the
> > > > > > > mold
> > > > > > > but it
> > > > > > > means there are never any easy modulo 90 degree angles.
> > > > > > > (The
> > > > > > > rounded_prism() is my hero).
> > > > > > >
> > > > > > > The absolute crown enabled by the attachment model is
> > > > > > > however,
> > > > > > > the
> > > > > > > prism_connector ...
> > > > > > >
> > > > > > > PastedGraphic-3.png
> > > > > >
> > > > > > When I try this one, it doesn't understand "attach_part()".
> > > > > > I
> > > > > > could
> > > > > > not
> > > > > > find it in BOSL2.
> > > > > >
> > > > > > > > diff()
> > > > > > > > tube( id=50, h = 10, rounding=1, wall=2)// the ring
> > > > > > > > let(tube=parent())
> > > > > > > > attach_part("inside")
> > > > > > > > prism_connector( // the solid tube
> > > > > > > > on
> > > > > > > > the
> > > > > > > > inside of
> > > > > > > > circle(d=7), // the ring
> > > > > > > > parent(), LEFT,
> > > > > > > > parent(), RIGHT,
> > > > > > > > fillet=1
> > > > > > > > )
> > > > > > > > restore(tube)
> > > > > > > > tag("remove")
> > > > > > > > prism_connector( // the inside of
> > > > > > > > the
> > > > > > > > tube
> > > > > > > > with
> > > > > > > > circle(d=5), // exit on the
> > > > > > > > outside
> > > > > > > > of
> > > > > > > > the ring
> > > > > > > > parent(), LEFT,
> > > > > > > > parent(), RIGHT,
> > > > > > > > fillet=1
> > > > > > > > )
> > > > > > > > ;
> > > > > > >
> > > > > > >
> > > > > > > For me the attachment model of BOSL2 is the main reason I
> > > > > > > did
> > > > > > > not
> > > > > > > dive into Python. It is absolute stunning, it is now hard
> > > > > > > for
> > > > > > > me
> > > > > > > to
> > > > > > > believe you can make complex modular components without
> > > > > > > them.
> > > > > > >
> > > > > > > Peter Kriens
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > On 13 Aug 2025, at 20:46, Leonard Martin Struttmann via
> > > > > > > > Discuss
> > > > > > > > <discuss@lists.openscad.org> wrote:
> > > > > > > >
> > > > > > > > That's good, and very efficient for designs of that
> > > > > > > > type.
> > > > > > > >
> > > > > > > > However, it's been years since I designed any models of
> > > > > > > > that
> > > > > > > > type.
> > > > > > > > The vast majority of my designs (models of existing
> > > > > > > > printed
> > > > > > > > circuit
> > > > > > > > boards) consists of placing cubes and cylinders at
> > > > > > > > known
> > > > > > > > distances
> > > > > > > > from the origin. And it's all table-driven. In my
> > > > > > > > workflow, I
> > > > > > > > never place a shape in reference to an existing shape.
> > > > > > > >
> > > > > > > >
> > > > > > > > On Wed, Aug 13, 2025 at 11:40 AM Jordan Brown
> > > > > > > > <openscad@jordan.maileater.net> wrote:
> > > > > > > > > On 8/13/2025 4:32 AM, Leonard Martin Struttmann via
> > > > > > > > > Discuss
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > However, I have yet to find a use-case in my
> > > > > > > > > > projects
> > > > > > > > > > where
> > > > > > > > > > attachments are easier than the native
> > > > > > > > > > translate()/rotate()
> > > > > > > > > > OpenSCAD primitives.
> > > > > > > > >
> > > > > > > > > Quick: build a cube with a cylinder sticking out of
> > > > > > > > > the
> > > > > > > > > right
> > > > > > > > > side.
> > > > > > > > >
> > > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > > >
> > > > > > > > > > cube(10) attach(RIGHT) cylinder(h=10, r=3);
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Yes, you can do that with rotate and translate. (Or
> > > > > > > > > is
> > > > > > > > > it
> > > > > > > > > translate and rotate?)
> > > > > > > > > How about if the cylinder is sticking out the corner
> > > > > > > > > of
> > > > > > > > > the
> > > > > > > > > cube?
> > > > > > > > >
> > > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > > >
> > > > > > > > > > cube(10) attach(RIGHT+FRONT+TOP) cylinder(h=10,
> > > > > > > > > > r=3);
> > > > > > > > >
> > > > > > > > > Now put a sphere at the end of the cylinder, with the
> > > > > > > > > sphere
> > > > > > > > > barely touching the cylinder:
> > > > > > > > >
> > > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > > >
> > > > > > > > > > cube(10)
> > > > > > > > > > attach(RIGHT) cylinder(h=10, r=3)
> > > > > > > > > > attach(TOP, BOTTOM) sphere(r=3);
> > > > > > > > >
> > > > > > > > > Versus:
> > > > > > > > >
> > > > > > > > > > cubesz = 10;
> > > > > > > > > > cylh = 10;
> > > > > > > > > > spherer = 3;
> > > > > > > > > > cube(cubesz);
> > > > > > > > > > translate([cubesz, cubesz/2, cubesz/2])
> > > > > > > > > > rotate([0,90,0]) {
> > > > > > > > > > cylinder(h=cylh, r=3);
> > > > > > > > > > translate([0,0,cylh + spherer])
> > > > > > > > > > sphere(r=spherer);
> > > > > > > > > > }
> > > > > > > > >
> > > > > > > > > Note: I didn't *need* the variables, but I did if I
> > > > > > > > > wanted
> > > > > > > > > to
> > > > > > > > > avoid duplicating the numbers.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > 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
> > _______________________________________________
> > 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
AM
Adrian Mariano
Tue, Dec 9, 2025 10:12 PM
Not sure what you're seeing with Peter's code. First of all, be aware that
the entire thing is one code block, so the diff() applies to the entire
block. The "inside" in attach_part refers to the inside part of the parent
object. The parent object is tube() and tubes happen to have a part called
"inside" which is the inside surface of the tube. In contrast, the "tube"
description obtained by tube=parent() refers to the outside of the tube,
since it was created before selecting the "inside" part.
I'm not sure what you see since your text was incomplete and there is no
pic. If I remove the second section starting with "restore(tube)" then I
get a ring with a solid cylinder running across the interior. The removed
section is responsible for hollowing out the tube that runs across the
inside of the ring.
On Tue, Dec 9, 2025 at 3:05 PM larry via Discuss discuss@lists.openscad.org
wrote:
On Tue, 2025-12-09 at 08:13 -0500, Adrian Mariano via Discuss wrote:
There is a way to query the BOSL2 version. Sadly it doesn’t produce a
useful result. Revar tried to configure GitHub to automatically
increment a version variable when new code was merged but this turned
out to create a bunch of problems and he eventually backed out that
feature. The version variable still exists but it’s not being
incremented.
That's OK. I solved the problem by getting rid of the second BOSL2 in a
different library directory.
I mentioned that I have questions about Peter's code.
It looks like the code from diff) to the closing parenthesis after
filet=1, defines the solid tube, but if I comment out everything after
that, I don't see a solid tube, but only a . As a test, I changed
diff() to difference(), and there it is. So far, I think I sort of
understand most of it, except for wondering what the "inside" refers
to.
On Mon, 2025-12-08 at 19:59 -0500, Adrian Mariano via Discuss
wrote:
If you get unknown module for attach_part then your BOSL2 is
still
not updated. You need to figure that out. The code is correct
and
produces the image Peter showed.
Is there a way to query the rev level of BOSL2?
On Mon, 2025-12-08 at 16:37 -0500, Adrian Mariano via Discuss
wrote:
larry, sounds like you need to update your BOSL2. The
attach_part()
feature is fairly new.
I did, but I put it in the wrong place. It's there now, but
Peter's
code still gives me the unknown module error for attach_part.
I think there's more to it. The code really doesn't look right.
I guess I'll try the attachment tutorial.
//----
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;
diff()
tube( id=50, h = 10, rounding=1, wall=2) // the ring
let(tube=parent())
attach_part("inside")
prism_connector( // the solid tube on the inside of
circle(d=7), // the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
restore(tube)
tag("remove")
prism_connector( // the inside of the tubewith
circle(d=5), // exit on the outside of the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
);
//----
On Thu, 2025-08-14 at 10:58 +0200, Peter Kriens via Discuss
wrote:
Maybe if you're purely data driven?
What I like about the attachment model is how you never
have
to
figure out positions. Worst case a shift from a well
known
position
relative to another object. You can get highly complex
components
and
easily change major parts without having to refactor and
recalculate
a lot. Positions then quickly become complex to calculate
when
the
objects are at angles. I learned that for injection
molding
everything is slightly angled to allow the release of the
mold
but it
means there are never any easy modulo 90 degree angles.
(The
rounded_prism() is my hero).
The absolute crown enabled by the attachment model is
however,
the
prism_connector ...
PastedGraphic-3.png
When I try this one, it doesn't understand "attach_part()".
I
could
not
find it in BOSL2.
diff()
tube( id=50, h = 10, rounding=1, wall=2)// the ring
let(tube=parent())
attach_part("inside")
prism_connector( // the solid tube
on
the
inside of
circle(d=7), // the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
restore(tube)
tag("remove")
prism_connector( // the inside of
the
tube
with
circle(d=5), // exit on the
outside
of
the ring
parent(), LEFT,
parent(), RIGHT,
fillet=1
)
;
For me the attachment model of BOSL2 is the main reason I
did
not
dive into Python. It is absolute stunning, it is now hard
for
me
to
believe you can make complex modular components without
them.
Peter Kriens
On 13 Aug 2025, at 20:46, Leonard Martin Struttmann via
Discuss
discuss@lists.openscad.org wrote:
That's good, and very efficient for designs of that
type.
However, it's been years since I designed any models of
that
type.
The vast majority of my designs (models of existing
printed
circuit
boards) consists of placing cubes and cylinders at
known
distances
from the origin. And it's all table-driven. In my
workflow, I
never place a shape in reference to an existing shape.
On Wed, Aug 13, 2025 at 11:40 AM Jordan Brown
openscad@jordan.maileater.net wrote:
On 8/13/2025 4:32 AM, Leonard Martin Struttmann via
Discuss
wrote:
However, I have yet to find a use-case in my
projects
where
attachments are easier than the native
translate()/rotate()
OpenSCAD primitives.
Quick: build a cube with a cylinder sticking out of
the
right
side.
include <BOSL2/std.scad>
cube(10) attach(RIGHT) cylinder(h=10, r=3);
Yes, you can do that with rotate and translate. (Or
is
it
translate and rotate?)
How about if the cylinder is sticking out the corner
of
the
cube?
include <BOSL2/std.scad>
cube(10) attach(RIGHT+FRONT+TOP) cylinder(h=10,
r=3);
Now put a sphere at the end of the cylinder, with the
sphere
barely touching the cylinder:
include <BOSL2/std.scad>
cube(10)
attach(RIGHT) cylinder(h=10, r=3)
attach(TOP, BOTTOM) sphere(r=3);
cubesz = 10;
cylh = 10;
spherer = 3;
cube(cubesz);
translate([cubesz, cubesz/2, cubesz/2])
rotate([0,90,0]) {
cylinder(h=cylh, r=3);
translate([0,0,cylh + spherer])
sphere(r=spherer);
}
Note: I didn't need the variables, but I did if I
wanted
to
avoid duplicating the numbers.
Not sure what you're seeing with Peter's code. First of all, be aware that
the entire thing is one code block, so the diff() applies to the entire
block. The "inside" in attach_part refers to the inside part of the parent
object. The parent object is tube() and tubes happen to have a part called
"inside" which is the inside surface of the tube. In contrast, the "tube"
description obtained by tube=parent() refers to the outside of the tube,
since it was created before selecting the "inside" part.
I'm not sure what you see since your text was incomplete and there is no
pic. If I remove the second section starting with "restore(tube)" then I
get a ring with a solid cylinder running across the interior. The removed
section is responsible for hollowing out the tube that runs across the
inside of the ring.
On Tue, Dec 9, 2025 at 3:05 PM larry via Discuss <discuss@lists.openscad.org>
wrote:
> On Tue, 2025-12-09 at 08:13 -0500, Adrian Mariano via Discuss wrote:
> > There is a way to query the BOSL2 version. Sadly it doesn’t produce a
> > useful result. Revar tried to configure GitHub to automatically
> > increment a version variable when new code was merged but this turned
> > out to create a bunch of problems and he eventually backed out that
> > feature. The version variable still exists but it’s not being
> > incremented.
>
> That's OK. I solved the problem by getting rid of the second BOSL2 in a
> different library directory.
>
> I mentioned that I have questions about Peter's code.
>
> It looks like the code from diff) to the closing parenthesis after
> filet=1, defines the solid tube, but if I comment out everything after
> that, I don't see a solid tube, but only a . As a test, I changed
> diff() to difference(), and there it is. So far, I think I sort of
> understand most of it, except for wondering what the "inside" refers
> to.
>
> > On Mon, Dec 8, 2025 at 22:57 larry via Discuss
> > <discuss@lists.openscad.org> wrote:
> > > On Mon, 2025-12-08 at 19:59 -0500, Adrian Mariano via Discuss
> > > wrote:
> > > > If you get unknown module for attach_part then your BOSL2 is
> > > > still
> > > > not updated. You need to figure that out. The code is correct
> > > > and
> > > > produces the image Peter showed.
> > >
> > > Is there a way to query the rev level of BOSL2?
> > >
> > > > On Mon, Dec 8, 2025 at 7:15 PM larry via Discuss
> > > > <discuss@lists.openscad.org> wrote:
> > > > > On Mon, 2025-12-08 at 16:37 -0500, Adrian Mariano via Discuss
> > > > > wrote:
> > > > > > larry, sounds like you need to update your BOSL2. The
> > > > > > attach_part()
> > > > > > feature is fairly new.
> > > > >
> > > > > I did, but I put it in the wrong place. It's there now, but
> > > > > Peter's
> > > > > code still gives me the unknown module error for attach_part.
> > > > > I think there's more to it. The code really doesn't look right.
> > > > >
> > > > > I guess I'll try the attachment tutorial.
> > > > >
> > > > > //----
> > > > > include <BOSL2/std.scad>
> > > > > $fn= $preview ? 60 : 180;
> > > > >
> > > > > diff()
> > > > > tube( id=50, h = 10, rounding=1, wall=2) // the ring
> > > > > let(tube=parent())
> > > > > attach_part("inside")
> > > > > prism_connector( // the solid tube on the inside of
> > > > > circle(d=7), // the ring
> > > > > parent(), LEFT,
> > > > > parent(), RIGHT,
> > > > > fillet=1
> > > > > )
> > > > > restore(tube)
> > > > > tag("remove")
> > > > > prism_connector( // the inside of the tubewith
> > > > > circle(d=5), // exit on the outside of the ring
> > > > > parent(), LEFT,
> > > > > parent(), RIGHT,
> > > > > fillet=1
> > > > > );
> > > > > //----
> > > > >
> > > > > > On Mon, Dec 8, 2025 at 11:06 AM larry via Discuss
> > > > > > <discuss@lists.openscad.org> wrote:
> > > > > > > On Thu, 2025-08-14 at 10:58 +0200, Peter Kriens via Discuss
> > > > > > > wrote:
> > > > > > > > Maybe if you're purely data driven?
> > > > > > > >
> > > > > > > > What I like about the attachment model is how you never
> > > > > > > > have
> > > > > > > > to
> > > > > > > > figure out positions. Worst case a shift from a well
> > > > > > > > known
> > > > > > > > position
> > > > > > > > relative to another object. You can get highly complex
> > > > > > > > components
> > > > > > > > and
> > > > > > > > easily change major parts without having to refactor and
> > > > > > > > recalculate
> > > > > > > > a lot. Positions then quickly become complex to calculate
> > > > > > > > when
> > > > > > > > the
> > > > > > > > objects are at angles. I learned that for injection
> > > > > > > > molding
> > > > > > > > everything is slightly angled to allow the release of the
> > > > > > > > mold
> > > > > > > > but it
> > > > > > > > means there are never any easy modulo 90 degree angles.
> > > > > > > > (The
> > > > > > > > rounded_prism() is my hero).
> > > > > > > >
> > > > > > > > The absolute crown enabled by the attachment model is
> > > > > > > > however,
> > > > > > > > the
> > > > > > > > prism_connector ...
> > > > > > > >
> > > > > > > > PastedGraphic-3.png
> > > > > > >
> > > > > > > When I try this one, it doesn't understand "attach_part()".
> > > > > > > I
> > > > > > > could
> > > > > > > not
> > > > > > > find it in BOSL2.
> > > > > > >
> > > > > > > > > diff()
> > > > > > > > > tube( id=50, h = 10, rounding=1, wall=2)// the ring
> > > > > > > > > let(tube=parent())
> > > > > > > > > attach_part("inside")
> > > > > > > > > prism_connector( // the solid tube
> > > > > > > > > on
> > > > > > > > > the
> > > > > > > > > inside of
> > > > > > > > > circle(d=7), // the ring
> > > > > > > > > parent(), LEFT,
> > > > > > > > > parent(), RIGHT,
> > > > > > > > > fillet=1
> > > > > > > > > )
> > > > > > > > > restore(tube)
> > > > > > > > > tag("remove")
> > > > > > > > > prism_connector( // the inside of
> > > > > > > > > the
> > > > > > > > > tube
> > > > > > > > > with
> > > > > > > > > circle(d=5), // exit on the
> > > > > > > > > outside
> > > > > > > > > of
> > > > > > > > > the ring
> > > > > > > > > parent(), LEFT,
> > > > > > > > > parent(), RIGHT,
> > > > > > > > > fillet=1
> > > > > > > > > )
> > > > > > > > > ;
> > > > > > > >
> > > > > > > >
> > > > > > > > For me the attachment model of BOSL2 is the main reason I
> > > > > > > > did
> > > > > > > > not
> > > > > > > > dive into Python. It is absolute stunning, it is now hard
> > > > > > > > for
> > > > > > > > me
> > > > > > > > to
> > > > > > > > believe you can make complex modular components without
> > > > > > > > them.
> > > > > > > >
> > > > > > > > Peter Kriens
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > > On 13 Aug 2025, at 20:46, Leonard Martin Struttmann via
> > > > > > > > > Discuss
> > > > > > > > > <discuss@lists.openscad.org> wrote:
> > > > > > > > >
> > > > > > > > > That's good, and very efficient for designs of that
> > > > > > > > > type.
> > > > > > > > >
> > > > > > > > > However, it's been years since I designed any models of
> > > > > > > > > that
> > > > > > > > > type.
> > > > > > > > > The vast majority of my designs (models of existing
> > > > > > > > > printed
> > > > > > > > > circuit
> > > > > > > > > boards) consists of placing cubes and cylinders at
> > > > > > > > > known
> > > > > > > > > distances
> > > > > > > > > from the origin. And it's all table-driven. In my
> > > > > > > > > workflow, I
> > > > > > > > > never place a shape in reference to an existing shape.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Wed, Aug 13, 2025 at 11:40 AM Jordan Brown
> > > > > > > > > <openscad@jordan.maileater.net> wrote:
> > > > > > > > > > On 8/13/2025 4:32 AM, Leonard Martin Struttmann via
> > > > > > > > > > Discuss
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > However, I have yet to find a use-case in my
> > > > > > > > > > > projects
> > > > > > > > > > > where
> > > > > > > > > > > attachments are easier than the native
> > > > > > > > > > > translate()/rotate()
> > > > > > > > > > > OpenSCAD primitives.
> > > > > > > > > >
> > > > > > > > > > Quick: build a cube with a cylinder sticking out of
> > > > > > > > > > the
> > > > > > > > > > right
> > > > > > > > > > side.
> > > > > > > > > >
> > > > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > > > >
> > > > > > > > > > > cube(10) attach(RIGHT) cylinder(h=10, r=3);
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Yes, you can do that with rotate and translate. (Or
> > > > > > > > > > is
> > > > > > > > > > it
> > > > > > > > > > translate and rotate?)
> > > > > > > > > > How about if the cylinder is sticking out the corner
> > > > > > > > > > of
> > > > > > > > > > the
> > > > > > > > > > cube?
> > > > > > > > > >
> > > > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > > > >
> > > > > > > > > > > cube(10) attach(RIGHT+FRONT+TOP) cylinder(h=10,
> > > > > > > > > > > r=3);
> > > > > > > > > >
> > > > > > > > > > Now put a sphere at the end of the cylinder, with the
> > > > > > > > > > sphere
> > > > > > > > > > barely touching the cylinder:
> > > > > > > > > >
> > > > > > > > > > > include <BOSL2/std.scad>
> > > > > > > > > > >
> > > > > > > > > > > cube(10)
> > > > > > > > > > > attach(RIGHT) cylinder(h=10, r=3)
> > > > > > > > > > > attach(TOP, BOTTOM) sphere(r=3);
> > > > > > > > > >
> > > > > > > > > > Versus:
> > > > > > > > > >
> > > > > > > > > > > cubesz = 10;
> > > > > > > > > > > cylh = 10;
> > > > > > > > > > > spherer = 3;
> > > > > > > > > > > cube(cubesz);
> > > > > > > > > > > translate([cubesz, cubesz/2, cubesz/2])
> > > > > > > > > > > rotate([0,90,0]) {
> > > > > > > > > > > cylinder(h=cylh, r=3);
> > > > > > > > > > > translate([0,0,cylh + spherer])
> > > > > > > > > > > sphere(r=spherer);
> > > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > > > Note: I didn't *need* the variables, but I did if I
> > > > > > > > > > wanted
> > > > > > > > > > to
> > > > > > > > > > avoid duplicating the numbers.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > _______________________________________________
> > > > > > > > > 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
> > > _______________________________________________
> > > 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
Tue, Dec 9, 2025 10:58 PM
On 12/9/2025 5:28 AM, Jon Bondy via Discuss wrote:
It is interesting to me that, after decades, GitHub has not come up
with a way to calculate and display version information that actually
works.
Version identification in a distributed source code control system is
... unobvious.
I pull a clone, and make some changes. What version is it?
You pull a clone, and make some changes. What version is it?
I pull from you, rebase my changes on top of yours, and make some more
changes. What version is it?
Fred separately pulls my first set of changes (but not my second), and
your first set of changes, adds some of his own, and pushes that back to
the original repo. What version is that?
Fred rebases all of those changes together, and force pushes it. What
version is that?
You could consider the commit time of the most recent changeset. But
what about branches? There could be a brand new commit today against
last year's branch... it's the newest thing on that branch, but far
older than the main branch. Maybe the branch plus the timestamp of the
last commit? But then there's rebasing and forced pushes.
The changeset ID uniquely identifies the entire state of the repository,
but tells you nothing at all about the timing or history. About all you
can say is "these two repos are the same".
The only thing that's a true and complete identifier, and sort of
orderable, is the entire version history, but even that isn't really
enough when you consider the possibility of rewriting history.
On 12/9/2025 5:28 AM, Jon Bondy via Discuss wrote:
> It is interesting to me that, after decades, GitHub has not come up
> with a way to calculate and display version information that actually
> works.
Version identification in a distributed source code control system is
... unobvious.
I pull a clone, and make some changes. What version is it?
You pull a clone, and make some changes. What version is it?
I pull from you, rebase my changes on top of yours, and make some more
changes. What version is it?
Fred separately pulls my first set of changes (but not my second), and
your first set of changes, adds some of his own, and pushes that back to
the original repo. What version is that?
Fred rebases all of those changes together, and force pushes it. What
version is that?
You could consider the commit time of the most recent changeset. But
what about branches? There could be a brand new commit today against
last year's branch... it's the newest thing on that branch, but far
older than the main branch. Maybe the branch plus the timestamp of the
last commit? But then there's rebasing and forced pushes.
The changeset ID uniquely identifies the entire state of the repository,
but tells you nothing at all about the timing or history. About all you
can say is "these two repos are the same".
The only thing that's a true and complete identifier, and sort of
orderable, is the entire version history, but even that isn't really
enough when you consider the possibility of rewriting history.
JB
Jordan Brown
Tue, Dec 9, 2025 11:02 PM
On 12/9/2025 6:34 AM, Jon Bondy wrote:
Can I do something similar to get the most recent OpenSCAD?
Sources, sure.
Binaries, no.
For sources, my personal tools are at
https://github.com/jordanbrown0/tools
"osclone" will clone an OpenSCAD repo and its subrepos.
"pull" will update an OpenSCAD repo and its subrepos.
"osc.cmk" runs cmake to set up a build environment.
"osc.mk" builds.
"osc.tests" runs the tests.
These are my personal tools, not products. Don't expect to be able to
use them without studying them and understanding at least sort of what
they do.
On 12/9/2025 6:34 AM, Jon Bondy wrote:
> Can I do something similar to get the most recent OpenSCAD?
Sources, sure.
Binaries, no.
For sources, my personal tools are at
https://github.com/jordanbrown0/tools
"osclone" will clone an OpenSCAD repo and its subrepos.
"pull" will update an OpenSCAD repo and its subrepos.
"osc.cmk" runs cmake to set up a build environment.
"osc.mk" builds.
"osc.tests" runs the tests.
These are my personal tools, not products. Don't expect to be able to
use them without studying them and understanding at least sort of what
they do.
JB
Jordan Brown
Tue, Dec 9, 2025 11:04 PM
On 12/9/2025 6:44 AM, Peter Kriens wrote:
I do not think https://github.com/revarbat/BOSL2 is the right URL to
the BOSL2 repo? I think it should
be https://github.com/BelfrySCAD/BOSL2/ or git@github.com:BelfrySCAD/BOSL2.git
I think you use Revar's private repo that might run behind the actual one.
Yeah, I think you're right. I don't know where I got that. I think
it's what my copy is currently cloned from, but I don't know why.
On 12/9/2025 6:44 AM, Peter Kriens wrote:
> I do not think https://github.com/revarbat/BOSL2 is the right URL to
> the BOSL2 repo? I think it should
> be https://github.com/BelfrySCAD/BOSL2/ or git@github.com:BelfrySCAD/BOSL2.git
> I think you use Revar's private repo that might run behind the actual one.
Yeah, I think you're right. I don't know where I got that. I think
it's what my copy is currently cloned from, but I don't know why.