JD
John David
Fri, Jun 19, 2026 6:13 PM
Where I have seen this more commonly is computing the intersection of NURB
surfaces, and it returns a series of shapes - typically lines, but if you
are computing solid geometry might be a volume. It would be very nice to
have a function, probably as part of BOSL2's NURBS/geometry implementation,
to compute this 1/2/3-D intersection. BTW, I am not sure what to call it.
What I remember in all Farin's books it is called an intersection, but it
could easily get confused with "intersect" two or more objects. Maybe
compute_intersection?
While writing this I came up with a possible way to "fake it". first
computer the intersection of those two objects, then do a series of
difference where you jiggle the objects up/down/back/forth by some small
epsilon. Doing this carefully should result in a very small 3D object at
the boundary you are looking for. Hmmm... intersection_boundary might be
another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
discuss@lists.openscad.org> wrote:
Yeah, merging overlapping scans is a relatively simple brute-force
operation. Aligning things that touch but don't overlap, not so much.
(It doesn't help a bit that the point clouds out of the scanner app are not
aligned with the coordinate axes, even though it can "see" the surface the
scanned object was sitting on.)
Most of the apps I've looked at assume overlap, not adjacency, so two parts
that fit together end up smashed into a blob.
-----Original Message-----
From: Jon Bondy via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 8:42 AM
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: lee.deraud@roadrunner.com; Jon Bondy jon@jonbondy.com
Subject: [OpenSCAD] Re: Storing information derived from the geometry into
variables
Slightly off topic...
I have used Cloud Compare to align two point clouds coming from my scanner
On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
Watching with interest. My use case is similar (I think), except some
or all of the shapes in question are imported STLs from scans.
Example 1: precisely aligning/combining two scanned shapes. The
scanner app can do this, but it requires parts that overlap
significantly. Not to mention that the resulting lump is a bit
unwieldy, and I still need to be able to manipulate the two pieces
Example 2: deriving the intersection edge between two scans, or a scan
and a OpenSCAD-generated object. Think car fender (scanned) and
wheelwell flare
(generated): determining the cut-line where the two pieces would join
together.
I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
but it's generally easier to deal with than homegrown Python code
using the open3d library.
-----Original Message-----
From: Thomas Richter via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 3:10 AM
To: OpenSCAD general discussion Mailing-list
discuss@lists.openscad.org
Cc: Thomas Richter tomselektropost@googlemail.com
Subject: [OpenSCAD] Storing information derived from the geometry into
variables
I am not sure if this is possible at all, I didn't even know exactly
how to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
I know that the union() is not absolutely necessary here but read on...
Is there any possibility to identify the edges or the vertices created
by the "intersection" of the two cubes and to store them into
variables? I know that this is not an intersection in the OpenSCAD
sense but I didn't know how to name it better.
Why would I want to do this? Sometimes I have quite complex models
where the orientation of certain elements is - for the sake of my
laziness - found by trial-and-error instead of analytically
calculating it. Nonetheless, sometimes I need the exact coordinates of
the edges / vertices / surfaces to place / orient further elements or to
calculate distances and angles.
In short, I'd like to be able to query the engine for specific
coordinates that are the result of union / difference / intersection
Where I have seen this more commonly is computing the intersection of NURB
surfaces, and it returns a series of shapes - typically lines, but if you
are computing solid geometry might be a volume. It would be very nice to
have a function, probably as part of BOSL2's NURBS/geometry implementation,
to compute this 1/2/3-D intersection. BTW, I am not sure what to call it.
What I remember in all Farin's books it is called an intersection, but it
could easily get confused with "intersect" two or more objects. Maybe
compute_intersection?
While writing this I came up with a possible way to "fake it". first
computer the intersection of those two objects, then do a series of
difference where you jiggle the objects up/down/back/forth by some small
epsilon. Doing this carefully should result in a very small 3D object at
the boundary you are looking for. Hmmm... intersection_boundary might be
another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
discuss@lists.openscad.org> wrote:
> Yeah, merging overlapping scans is a relatively simple brute-force
> operation. Aligning things that touch but don't overlap, not so much.
> (It doesn't help a bit that the point clouds out of the scanner app are not
> aligned with the coordinate axes, even though it can "see" the surface the
> scanned object was sitting on.)
>
> Most of the apps I've looked at assume overlap, not adjacency, so two parts
> that fit together end up smashed into a blob.
>
> -----Original Message-----
> From: Jon Bondy via Discuss <discuss@lists.openscad.org>
> Sent: Friday, June 19, 2026 8:42 AM
> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org>
> Cc: lee.deraud@roadrunner.com; Jon Bondy <jon@jonbondy.com>
> Subject: [OpenSCAD] Re: Storing information derived from the geometry into
> variables
>
> Slightly off topic...
>
> I have used Cloud Compare to align two point clouds coming from my scanner
>
>
> On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
> > Watching with interest. My use case is similar (I think), except some
> > or all of the shapes in question are imported STLs from scans.
> > Example 1: precisely aligning/combining two scanned shapes. The
> > scanner app can do this, but it requires parts that overlap
> > significantly. Not to mention that the resulting lump is a bit
> > unwieldy, and I still need to be able to manipulate the two pieces
> separately.
> > Example 2: deriving the intersection edge between two scans, or a scan
> > and a OpenSCAD-generated object. Think car fender (scanned) and
> > wheelwell flare
> > (generated): determining the cut-line where the two pieces would join
> > together.
> > I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
> > but it's generally easier to deal with than homegrown Python code
> > using the open3d library.
> >
> > -----Original Message-----
> > From: Thomas Richter via Discuss <discuss@lists.openscad.org>
> > Sent: Friday, June 19, 2026 3:10 AM
> > To: OpenSCAD general discussion Mailing-list
> > <discuss@lists.openscad.org>
> > Cc: Thomas Richter <tomselektropost@googlemail.com>
> > Subject: [OpenSCAD] Storing information derived from the geometry into
> > variables
> >
> > I am not sure if this is possible at all, I didn't even know exactly
> > how to name the question.
> >
> > Let's say we have the following example(!) code:
> >
> > union() {
> > cube([50, 5, 10]);
> > translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
> >
> > I know that the union() is not absolutely necessary here but read on...
> >
> > Is there any possibility to identify the edges or the vertices created
> > by the "intersection" of the two cubes and to store them into
> > variables? I know that this is not an intersection in the OpenSCAD
> > sense but I didn't know how to name it better.
> >
> > Why would I want to do this? Sometimes I have quite complex models
> > where the orientation of certain elements is - for the sake of my
> > laziness - found by trial-and-error instead of analytically
> > calculating it. Nonetheless, sometimes I need the exact coordinates of
> > the edges / vertices / surfaces to place / orient further elements or to
> calculate distances and angles.
> >
> > In short, I'd like to be able to query the engine for specific
> > coordinates that are the result of union / difference / intersection
> operations.
> > _______________________________________________
> > 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 email has been checked for viruses by AVG antivirus software.
> www.avg.com
> _______________________________________________
> 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
>
GS
Guenther Sohler
Fri, Jun 19, 2026 7:07 PM
if you are interested in filleting only the edges which are created during
the intersection/union,
you could exactly do that:: select those edges in the result, which did not
exist in either source.
our fork can do filleting like this:
e.g.
union(cube(10), cube(10,center=True ), r=3, fn=20)
watch out https://imgur.com/a/lSsMNlq
On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
discuss@lists.openscad.org> wrote:
Where I have seen this more commonly is computing the intersection of NURB
surfaces, and it returns a series of shapes - typically lines, but if you
are computing solid geometry might be a volume. It would be very nice to
have a function, probably as part of BOSL2's NURBS/geometry implementation,
to compute this 1/2/3-D intersection. BTW, I am not sure what to call it.
What I remember in all Farin's books it is called an intersection, but it
could easily get confused with "intersect" two or more objects. Maybe
compute_intersection?
While writing this I came up with a possible way to "fake it". first
computer the intersection of those two objects, then do a series of
difference where you jiggle the objects up/down/back/forth by some small
epsilon. Doing this carefully should result in a very small 3D object at
the boundary you are looking for. Hmmm... intersection_boundary might be
another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
discuss@lists.openscad.org> wrote:
Yeah, merging overlapping scans is a relatively simple brute-force
operation. Aligning things that touch but don't overlap, not so much.
(It doesn't help a bit that the point clouds out of the scanner app are
not
aligned with the coordinate axes, even though it can "see" the surface the
scanned object was sitting on.)
Most of the apps I've looked at assume overlap, not adjacency, so two
parts
that fit together end up smashed into a blob.
-----Original Message-----
From: Jon Bondy via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 8:42 AM
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: lee.deraud@roadrunner.com; Jon Bondy jon@jonbondy.com
Subject: [OpenSCAD] Re: Storing information derived from the geometry into
variables
Slightly off topic...
I have used Cloud Compare to align two point clouds coming from my scanner
On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
Watching with interest. My use case is similar (I think), except some
or all of the shapes in question are imported STLs from scans.
Example 1: precisely aligning/combining two scanned shapes. The
scanner app can do this, but it requires parts that overlap
significantly. Not to mention that the resulting lump is a bit
unwieldy, and I still need to be able to manipulate the two pieces
Example 2: deriving the intersection edge between two scans, or a scan
and a OpenSCAD-generated object. Think car fender (scanned) and
wheelwell flare
(generated): determining the cut-line where the two pieces would join
together.
I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
but it's generally easier to deal with than homegrown Python code
using the open3d library.
-----Original Message-----
From: Thomas Richter via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 3:10 AM
To: OpenSCAD general discussion Mailing-list
discuss@lists.openscad.org
Cc: Thomas Richter tomselektropost@googlemail.com
Subject: [OpenSCAD] Storing information derived from the geometry into
variables
I am not sure if this is possible at all, I didn't even know exactly
how to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
I know that the union() is not absolutely necessary here but read on...
Is there any possibility to identify the edges or the vertices created
by the "intersection" of the two cubes and to store them into
variables? I know that this is not an intersection in the OpenSCAD
sense but I didn't know how to name it better.
Why would I want to do this? Sometimes I have quite complex models
where the orientation of certain elements is - for the sake of my
laziness - found by trial-and-error instead of analytically
calculating it. Nonetheless, sometimes I need the exact coordinates of
the edges / vertices / surfaces to place / orient further elements or to
calculate distances and angles.
In short, I'd like to be able to query the engine for specific
coordinates that are the result of union / difference / intersection
if you are interested in filleting only the edges which are created during
the intersection/union,
you could exactly do that:: select those edges in the result, which did not
exist in either source.
our fork can do filleting like this:
e.g.
union(cube(10), cube(10,center=True ), r=3, fn=20)
watch out https://imgur.com/a/lSsMNlq
On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
discuss@lists.openscad.org> wrote:
> Where I have seen this more commonly is computing the intersection of NURB
> surfaces, and it returns a series of shapes - typically lines, but if you
> are computing solid geometry might be a volume. It would be very nice to
> have a function, probably as part of BOSL2's NURBS/geometry implementation,
> to compute this 1/2/3-D intersection. BTW, I am not sure what to call it.
> What I remember in all Farin's books it is called an intersection, but it
> could easily get confused with "intersect" two or more objects. Maybe
> compute_intersection?
>
> While writing this I came up with a possible way to "fake it". first
> computer the intersection of those two objects, then do a series of
> difference where you jiggle the objects up/down/back/forth by some small
> epsilon. Doing this carefully should result in a very small 3D object at
> the boundary you are looking for. Hmmm... intersection_boundary might be
> another name for the function...
>
> On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> Yeah, merging overlapping scans is a relatively simple brute-force
>> operation. Aligning things that touch but don't overlap, not so much.
>> (It doesn't help a bit that the point clouds out of the scanner app are
>> not
>> aligned with the coordinate axes, even though it can "see" the surface the
>> scanned object was sitting on.)
>>
>> Most of the apps I've looked at assume overlap, not adjacency, so two
>> parts
>> that fit together end up smashed into a blob.
>>
>> -----Original Message-----
>> From: Jon Bondy via Discuss <discuss@lists.openscad.org>
>> Sent: Friday, June 19, 2026 8:42 AM
>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org>
>> Cc: lee.deraud@roadrunner.com; Jon Bondy <jon@jonbondy.com>
>> Subject: [OpenSCAD] Re: Storing information derived from the geometry into
>> variables
>>
>> Slightly off topic...
>>
>> I have used Cloud Compare to align two point clouds coming from my scanner
>>
>>
>> On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
>> > Watching with interest. My use case is similar (I think), except some
>> > or all of the shapes in question are imported STLs from scans.
>> > Example 1: precisely aligning/combining two scanned shapes. The
>> > scanner app can do this, but it requires parts that overlap
>> > significantly. Not to mention that the resulting lump is a bit
>> > unwieldy, and I still need to be able to manipulate the two pieces
>> separately.
>> > Example 2: deriving the intersection edge between two scans, or a scan
>> > and a OpenSCAD-generated object. Think car fender (scanned) and
>> > wheelwell flare
>> > (generated): determining the cut-line where the two pieces would join
>> > together.
>> > I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
>> > but it's generally easier to deal with than homegrown Python code
>> > using the open3d library.
>> >
>> > -----Original Message-----
>> > From: Thomas Richter via Discuss <discuss@lists.openscad.org>
>> > Sent: Friday, June 19, 2026 3:10 AM
>> > To: OpenSCAD general discussion Mailing-list
>> > <discuss@lists.openscad.org>
>> > Cc: Thomas Richter <tomselektropost@googlemail.com>
>> > Subject: [OpenSCAD] Storing information derived from the geometry into
>> > variables
>> >
>> > I am not sure if this is possible at all, I didn't even know exactly
>> > how to name the question.
>> >
>> > Let's say we have the following example(!) code:
>> >
>> > union() {
>> > cube([50, 5, 10]);
>> > translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
>> >
>> > I know that the union() is not absolutely necessary here but read on...
>> >
>> > Is there any possibility to identify the edges or the vertices created
>> > by the "intersection" of the two cubes and to store them into
>> > variables? I know that this is not an intersection in the OpenSCAD
>> > sense but I didn't know how to name it better.
>> >
>> > Why would I want to do this? Sometimes I have quite complex models
>> > where the orientation of certain elements is - for the sake of my
>> > laziness - found by trial-and-error instead of analytically
>> > calculating it. Nonetheless, sometimes I need the exact coordinates of
>> > the edges / vertices / surfaces to place / orient further elements or to
>> calculate distances and angles.
>> >
>> > In short, I'd like to be able to query the engine for specific
>> > coordinates that are the result of union / difference / intersection
>> operations.
>> > _______________________________________________
>> > 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 email has been checked for viruses by AVG antivirus software.
>> www.avg.com
>> _______________________________________________
>> 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
JD
John David
Fri, Jun 19, 2026 7:45 PM
I remember the filleting examples. Nice work BTW. Maybe someone can play
with the filleting input parameters and see if you can make the radius
something insanely small (say an epsilon radius of 0.00001) which would
essentially give you two lines so close together it does not much matter
for the original posters needs/requirements. It is possible though that
this will break LOTS of things in Open/PythonSCAD.
That said, I would love to see this general functionality included in
BOSL2, or wherever it makes sense.
EBo --
On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
if you are interested in filleting only the edges which are created during
the intersection/union,
you could exactly do that:: select those edges in the result, which did
not exist in either source.
our fork can do filleting like this:
e.g.
union(cube(10), cube(10,center=True ), r=3, fn=20)
watch out https://imgur.com/a/lSsMNlq
On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
discuss@lists.openscad.org> wrote:
Where I have seen this more commonly is computing the intersection of
NURB surfaces, and it returns a series of shapes - typically lines, but if
you are computing solid geometry might be a volume. It would be very nice
to have a function, probably as part of BOSL2's NURBS/geometry
implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
what to call it. What I remember in all Farin's books it is called an
intersection, but it could easily get confused with "intersect" two or more
objects. Maybe compute_intersection?
While writing this I came up with a possible way to "fake it". first
computer the intersection of those two objects, then do a series of
difference where you jiggle the objects up/down/back/forth by some small
epsilon. Doing this carefully should result in a very small 3D object at
the boundary you are looking for. Hmmm... intersection_boundary might be
another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
discuss@lists.openscad.org> wrote:
Yeah, merging overlapping scans is a relatively simple brute-force
operation. Aligning things that touch but don't overlap, not so much.
(It doesn't help a bit that the point clouds out of the scanner app are
not
aligned with the coordinate axes, even though it can "see" the surface
the
scanned object was sitting on.)
Most of the apps I've looked at assume overlap, not adjacency, so two
parts
that fit together end up smashed into a blob.
-----Original Message-----
From: Jon Bondy via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 8:42 AM
To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org
Cc: lee.deraud@roadrunner.com; Jon Bondy jon@jonbondy.com
Subject: [OpenSCAD] Re: Storing information derived from the geometry
into
variables
Slightly off topic...
I have used Cloud Compare to align two point clouds coming from my
scanner
On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
Watching with interest. My use case is similar (I think), except some
or all of the shapes in question are imported STLs from scans.
Example 1: precisely aligning/combining two scanned shapes. The
scanner app can do this, but it requires parts that overlap
significantly. Not to mention that the resulting lump is a bit
unwieldy, and I still need to be able to manipulate the two pieces
Example 2: deriving the intersection edge between two scans, or a scan
and a OpenSCAD-generated object. Think car fender (scanned) and
wheelwell flare
(generated): determining the cut-line where the two pieces would join
together.
I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
but it's generally easier to deal with than homegrown Python code
using the open3d library.
-----Original Message-----
From: Thomas Richter via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 3:10 AM
To: OpenSCAD general discussion Mailing-list
discuss@lists.openscad.org
Cc: Thomas Richter tomselektropost@googlemail.com
Subject: [OpenSCAD] Storing information derived from the geometry into
variables
I am not sure if this is possible at all, I didn't even know exactly
how to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
I know that the union() is not absolutely necessary here but read on...
Is there any possibility to identify the edges or the vertices created
by the "intersection" of the two cubes and to store them into
variables? I know that this is not an intersection in the OpenSCAD
sense but I didn't know how to name it better.
Why would I want to do this? Sometimes I have quite complex models
where the orientation of certain elements is - for the sake of my
laziness - found by trial-and-error instead of analytically
calculating it. Nonetheless, sometimes I need the exact coordinates of
the edges / vertices / surfaces to place / orient further elements or
to
calculate distances and angles.
In short, I'd like to be able to query the engine for specific
coordinates that are the result of union / difference / intersection
I remember the filleting examples. Nice work BTW. Maybe someone can play
with the filleting input parameters and see if you can make the radius
something insanely small (say an epsilon radius of 0.00001) which would
essentially give you two lines so close together it does not much matter
for the original posters needs/requirements. It is possible though that
this will break LOTS of things in Open/PythonSCAD.
That said, I would love to see this general functionality included in
BOSL2, or wherever it makes sense.
EBo --
On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
> if you are interested in filleting only the edges which are created during
> the intersection/union,
>
> you could exactly do that:: select those edges in the result, which did
> not exist in either source.
>
> our fork can do filleting like this:
>
> e.g.
>
> union(cube(10), cube(10,center=True ), r=3, fn=20)
>
> watch out https://imgur.com/a/lSsMNlq
>
>
>
> On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> Where I have seen this more commonly is computing the intersection of
>> NURB surfaces, and it returns a series of shapes - typically lines, but if
>> you are computing solid geometry might be a volume. It would be very nice
>> to have a function, probably as part of BOSL2's NURBS/geometry
>> implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
>> what to call it. What I remember in all Farin's books it is called an
>> intersection, but it could easily get confused with "intersect" two or more
>> objects. Maybe compute_intersection?
>>
>> While writing this I came up with a possible way to "fake it". first
>> computer the intersection of those two objects, then do a series of
>> difference where you jiggle the objects up/down/back/forth by some small
>> epsilon. Doing this carefully should result in a very small 3D object at
>> the boundary you are looking for. Hmmm... intersection_boundary might be
>> another name for the function...
>>
>> On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
>> discuss@lists.openscad.org> wrote:
>>
>>> Yeah, merging overlapping scans is a relatively simple brute-force
>>> operation. Aligning things that touch but don't overlap, not so much.
>>> (It doesn't help a bit that the point clouds out of the scanner app are
>>> not
>>> aligned with the coordinate axes, even though it can "see" the surface
>>> the
>>> scanned object was sitting on.)
>>>
>>> Most of the apps I've looked at assume overlap, not adjacency, so two
>>> parts
>>> that fit together end up smashed into a blob.
>>>
>>> -----Original Message-----
>>> From: Jon Bondy via Discuss <discuss@lists.openscad.org>
>>> Sent: Friday, June 19, 2026 8:42 AM
>>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org
>>> >
>>> Cc: lee.deraud@roadrunner.com; Jon Bondy <jon@jonbondy.com>
>>> Subject: [OpenSCAD] Re: Storing information derived from the geometry
>>> into
>>> variables
>>>
>>> Slightly off topic...
>>>
>>> I have used Cloud Compare to align two point clouds coming from my
>>> scanner
>>>
>>>
>>> On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
>>> > Watching with interest. My use case is similar (I think), except some
>>> > or all of the shapes in question are imported STLs from scans.
>>> > Example 1: precisely aligning/combining two scanned shapes. The
>>> > scanner app can do this, but it requires parts that overlap
>>> > significantly. Not to mention that the resulting lump is a bit
>>> > unwieldy, and I still need to be able to manipulate the two pieces
>>> separately.
>>> > Example 2: deriving the intersection edge between two scans, or a scan
>>> > and a OpenSCAD-generated object. Think car fender (scanned) and
>>> > wheelwell flare
>>> > (generated): determining the cut-line where the two pieces would join
>>> > together.
>>> > I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
>>> > but it's generally easier to deal with than homegrown Python code
>>> > using the open3d library.
>>> >
>>> > -----Original Message-----
>>> > From: Thomas Richter via Discuss <discuss@lists.openscad.org>
>>> > Sent: Friday, June 19, 2026 3:10 AM
>>> > To: OpenSCAD general discussion Mailing-list
>>> > <discuss@lists.openscad.org>
>>> > Cc: Thomas Richter <tomselektropost@googlemail.com>
>>> > Subject: [OpenSCAD] Storing information derived from the geometry into
>>> > variables
>>> >
>>> > I am not sure if this is possible at all, I didn't even know exactly
>>> > how to name the question.
>>> >
>>> > Let's say we have the following example(!) code:
>>> >
>>> > union() {
>>> > cube([50, 5, 10]);
>>> > translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
>>> >
>>> > I know that the union() is not absolutely necessary here but read on...
>>> >
>>> > Is there any possibility to identify the edges or the vertices created
>>> > by the "intersection" of the two cubes and to store them into
>>> > variables? I know that this is not an intersection in the OpenSCAD
>>> > sense but I didn't know how to name it better.
>>> >
>>> > Why would I want to do this? Sometimes I have quite complex models
>>> > where the orientation of certain elements is - for the sake of my
>>> > laziness - found by trial-and-error instead of analytically
>>> > calculating it. Nonetheless, sometimes I need the exact coordinates of
>>> > the edges / vertices / surfaces to place / orient further elements or
>>> to
>>> calculate distances and angles.
>>> >
>>> > In short, I'd like to be able to query the engine for specific
>>> > coordinates that are the result of union / difference / intersection
>>> operations.
>>> > _______________________________________________
>>> > 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 email has been checked for viruses by AVG antivirus software.
>>> www.avg.com
>>> _______________________________________________
>>> 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
GS
Guenther Sohler
Fri, Jun 19, 2026 7:54 PM
Nope, using a radius of 0.0001 is just a matter of the model, it does not
affect the internals of the PythonOpenSCAD at all or break anything
internally.
But there is no need to misuse filleting exactly for that purpose.
If the Op is just interested in the edges at the junction of A and B he
could
A=get the edges of a.mesh()
B=get the edges of b.mesh()
C=get the edges of (a&b).mesh()
find edges in C which are not in A or B
my little 2 cents
On Fri, Jun 19, 2026 at 9:45 PM John David ebo.2112@gmail.com wrote:
I remember the filleting examples. Nice work BTW. Maybe someone can play
with the filleting input parameters and see if you can make the radius
something insanely small (say an epsilon radius of 0.00001) which would
essentially give you two lines so close together it does not much matter
for the original posters needs/requirements. It is possible though that
this will break LOTS of things in Open/PythonSCAD.
That said, I would love to see this general functionality included in
BOSL2, or wherever it makes sense.
EBo --
On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
if you are interested in filleting only the edges which are created
during the intersection/union,
you could exactly do that:: select those edges in the result, which did
not exist in either source.
our fork can do filleting like this:
e.g.
union(cube(10), cube(10,center=True ), r=3, fn=20)
watch out https://imgur.com/a/lSsMNlq
On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
discuss@lists.openscad.org> wrote:
Where I have seen this more commonly is computing the intersection of
NURB surfaces, and it returns a series of shapes - typically lines, but if
you are computing solid geometry might be a volume. It would be very nice
to have a function, probably as part of BOSL2's NURBS/geometry
implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
what to call it. What I remember in all Farin's books it is called an
intersection, but it could easily get confused with "intersect" two or more
objects. Maybe compute_intersection?
While writing this I came up with a possible way to "fake it". first
computer the intersection of those two objects, then do a series of
difference where you jiggle the objects up/down/back/forth by some small
epsilon. Doing this carefully should result in a very small 3D object at
the boundary you are looking for. Hmmm... intersection_boundary might be
another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
discuss@lists.openscad.org> wrote:
Yeah, merging overlapping scans is a relatively simple brute-force
operation. Aligning things that touch but don't overlap, not so much.
(It doesn't help a bit that the point clouds out of the scanner app are
not
aligned with the coordinate axes, even though it can "see" the surface
the
scanned object was sitting on.)
Most of the apps I've looked at assume overlap, not adjacency, so two
parts
that fit together end up smashed into a blob.
-----Original Message-----
From: Jon Bondy via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 8:42 AM
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: lee.deraud@roadrunner.com; Jon Bondy jon@jonbondy.com
Subject: [OpenSCAD] Re: Storing information derived from the geometry
into
variables
Slightly off topic...
I have used Cloud Compare to align two point clouds coming from my
scanner
On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
Watching with interest. My use case is similar (I think), except some
or all of the shapes in question are imported STLs from scans.
Example 1: precisely aligning/combining two scanned shapes. The
scanner app can do this, but it requires parts that overlap
significantly. Not to mention that the resulting lump is a bit
unwieldy, and I still need to be able to manipulate the two pieces
Example 2: deriving the intersection edge between two scans, or a
and a OpenSCAD-generated object. Think car fender (scanned) and
wheelwell flare
(generated): determining the cut-line where the two pieces would join
together.
I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
but it's generally easier to deal with than homegrown Python code
using the open3d library.
-----Original Message-----
From: Thomas Richter via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 3:10 AM
To: OpenSCAD general discussion Mailing-list
discuss@lists.openscad.org
Cc: Thomas Richter tomselektropost@googlemail.com
Subject: [OpenSCAD] Storing information derived from the geometry
variables
I am not sure if this is possible at all, I didn't even know exactly
how to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
I know that the union() is not absolutely necessary here but read
Is there any possibility to identify the edges or the vertices
by the "intersection" of the two cubes and to store them into
variables? I know that this is not an intersection in the OpenSCAD
sense but I didn't know how to name it better.
Why would I want to do this? Sometimes I have quite complex models
where the orientation of certain elements is - for the sake of my
laziness - found by trial-and-error instead of analytically
calculating it. Nonetheless, sometimes I need the exact coordinates
the edges / vertices / surfaces to place / orient further elements or
to
calculate distances and angles.
In short, I'd like to be able to query the engine for specific
coordinates that are the result of union / difference / intersection
Nope, using a radius of 0.0001 is just a matter of the model, it does not
affect the internals of the PythonOpenSCAD at all or break anything
internally.
But there is no need to misuse filleting exactly for that purpose.
If the Op is just interested in the edges at the junction of A and B he
could
A=get the edges of a.mesh()
B=get the edges of b.mesh()
C=get the edges of (a&b).mesh()
find edges in C which are not in A or B
my little 2 cents
On Fri, Jun 19, 2026 at 9:45 PM John David <ebo.2112@gmail.com> wrote:
> I remember the filleting examples. Nice work BTW. Maybe someone can play
> with the filleting input parameters and see if you can make the radius
> something insanely small (say an epsilon radius of 0.00001) which would
> essentially give you two lines so close together it does not much matter
> for the original posters needs/requirements. It is possible though that
> this will break LOTS of things in Open/PythonSCAD.
>
> That said, I would love to see this general functionality included in
> BOSL2, or wherever it makes sense.
>
> EBo --
>
> On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> if you are interested in filleting only the edges which are created
>> during the intersection/union,
>>
>> you could exactly do that:: select those edges in the result, which did
>> not exist in either source.
>>
>> our fork can do filleting like this:
>>
>> e.g.
>>
>> union(cube(10), cube(10,center=True ), r=3, fn=20)
>>
>> watch out https://imgur.com/a/lSsMNlq
>>
>>
>>
>> On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
>> discuss@lists.openscad.org> wrote:
>>
>>> Where I have seen this more commonly is computing the intersection of
>>> NURB surfaces, and it returns a series of shapes - typically lines, but if
>>> you are computing solid geometry might be a volume. It would be very nice
>>> to have a function, probably as part of BOSL2's NURBS/geometry
>>> implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
>>> what to call it. What I remember in all Farin's books it is called an
>>> intersection, but it could easily get confused with "intersect" two or more
>>> objects. Maybe compute_intersection?
>>>
>>> While writing this I came up with a possible way to "fake it". first
>>> computer the intersection of those two objects, then do a series of
>>> difference where you jiggle the objects up/down/back/forth by some small
>>> epsilon. Doing this carefully should result in a very small 3D object at
>>> the boundary you are looking for. Hmmm... intersection_boundary might be
>>> another name for the function...
>>>
>>> On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
>>> discuss@lists.openscad.org> wrote:
>>>
>>>> Yeah, merging overlapping scans is a relatively simple brute-force
>>>> operation. Aligning things that touch but don't overlap, not so much.
>>>> (It doesn't help a bit that the point clouds out of the scanner app are
>>>> not
>>>> aligned with the coordinate axes, even though it can "see" the surface
>>>> the
>>>> scanned object was sitting on.)
>>>>
>>>> Most of the apps I've looked at assume overlap, not adjacency, so two
>>>> parts
>>>> that fit together end up smashed into a blob.
>>>>
>>>> -----Original Message-----
>>>> From: Jon Bondy via Discuss <discuss@lists.openscad.org>
>>>> Sent: Friday, June 19, 2026 8:42 AM
>>>> To: OpenSCAD general discussion Mailing-list <
>>>> discuss@lists.openscad.org>
>>>> Cc: lee.deraud@roadrunner.com; Jon Bondy <jon@jonbondy.com>
>>>> Subject: [OpenSCAD] Re: Storing information derived from the geometry
>>>> into
>>>> variables
>>>>
>>>> Slightly off topic...
>>>>
>>>> I have used Cloud Compare to align two point clouds coming from my
>>>> scanner
>>>>
>>>>
>>>> On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
>>>> > Watching with interest. My use case is similar (I think), except some
>>>> > or all of the shapes in question are imported STLs from scans.
>>>> > Example 1: precisely aligning/combining two scanned shapes. The
>>>> > scanner app can do this, but it requires parts that overlap
>>>> > significantly. Not to mention that the resulting lump is a bit
>>>> > unwieldy, and I still need to be able to manipulate the two pieces
>>>> separately.
>>>> > Example 2: deriving the intersection edge between two scans, or a
>>>> scan
>>>> > and a OpenSCAD-generated object. Think car fender (scanned) and
>>>> > wheelwell flare
>>>> > (generated): determining the cut-line where the two pieces would join
>>>> > together.
>>>> > I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
>>>> > but it's generally easier to deal with than homegrown Python code
>>>> > using the open3d library.
>>>> >
>>>> > -----Original Message-----
>>>> > From: Thomas Richter via Discuss <discuss@lists.openscad.org>
>>>> > Sent: Friday, June 19, 2026 3:10 AM
>>>> > To: OpenSCAD general discussion Mailing-list
>>>> > <discuss@lists.openscad.org>
>>>> > Cc: Thomas Richter <tomselektropost@googlemail.com>
>>>> > Subject: [OpenSCAD] Storing information derived from the geometry
>>>> into
>>>> > variables
>>>> >
>>>> > I am not sure if this is possible at all, I didn't even know exactly
>>>> > how to name the question.
>>>> >
>>>> > Let's say we have the following example(!) code:
>>>> >
>>>> > union() {
>>>> > cube([50, 5, 10]);
>>>> > translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
>>>> >
>>>> > I know that the union() is not absolutely necessary here but read
>>>> on...
>>>> >
>>>> > Is there any possibility to identify the edges or the vertices
>>>> created
>>>> > by the "intersection" of the two cubes and to store them into
>>>> > variables? I know that this is not an intersection in the OpenSCAD
>>>> > sense but I didn't know how to name it better.
>>>> >
>>>> > Why would I want to do this? Sometimes I have quite complex models
>>>> > where the orientation of certain elements is - for the sake of my
>>>> > laziness - found by trial-and-error instead of analytically
>>>> > calculating it. Nonetheless, sometimes I need the exact coordinates
>>>> of
>>>> > the edges / vertices / surfaces to place / orient further elements or
>>>> to
>>>> calculate distances and angles.
>>>> >
>>>> > In short, I'd like to be able to query the engine for specific
>>>> > coordinates that are the result of union / difference / intersection
>>>> operations.
>>>> > _______________________________________________
>>>> > 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 email has been checked for viruses by AVG antivirus software.
>>>> www.avg.com
>>>> _______________________________________________
>>>> 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
>
>
JD
John David
Fri, Jun 19, 2026 7:59 PM
Nope, using a radius of 0.0001 is just a matter of the model, it does not
affect the internals of the PythonOpenSCAD at all or break anything
internally.
But there is no need to misuse filleting exactly for that purpose.
If the Op is just interested in the edges at the junction of A and B he
could
A=get the edges of a.mesh()
B=get the edges of b.mesh()
C=get the edges of (a&b).mesh()
find edges in C which are not in A or B
my little 2 cents
On Fri, Jun 19, 2026 at 9:45 PM John David ebo.2112@gmail.com wrote:
I remember the filleting examples. Nice work BTW. Maybe someone can
play with the filleting input parameters and see if you can make the radius
something insanely small (say an epsilon radius of 0.00001) which would
essentially give you two lines so close together it does not much matter
for the original posters needs/requirements. It is possible though that
this will break LOTS of things in Open/PythonSCAD.
That said, I would love to see this general functionality included in
BOSL2, or wherever it makes sense.
EBo --
On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
if you are interested in filleting only the edges which are created
during the intersection/union,
you could exactly do that:: select those edges in the result, which did
not exist in either source.
our fork can do filleting like this:
e.g.
union(cube(10), cube(10,center=True ), r=3, fn=20)
watch out https://imgur.com/a/lSsMNlq
On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
discuss@lists.openscad.org> wrote:
Where I have seen this more commonly is computing the intersection of
NURB surfaces, and it returns a series of shapes - typically lines, but if
you are computing solid geometry might be a volume. It would be very nice
to have a function, probably as part of BOSL2's NURBS/geometry
implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
what to call it. What I remember in all Farin's books it is called an
intersection, but it could easily get confused with "intersect" two or more
objects. Maybe compute_intersection?
While writing this I came up with a possible way to "fake it". first
computer the intersection of those two objects, then do a series of
difference where you jiggle the objects up/down/back/forth by some small
epsilon. Doing this carefully should result in a very small 3D object at
the boundary you are looking for. Hmmm... intersection_boundary might be
another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
discuss@lists.openscad.org> wrote:
Yeah, merging overlapping scans is a relatively simple brute-force
operation. Aligning things that touch but don't overlap, not so much.
(It doesn't help a bit that the point clouds out of the scanner app
are not
aligned with the coordinate axes, even though it can "see" the surface
the
scanned object was sitting on.)
Most of the apps I've looked at assume overlap, not adjacency, so two
parts
that fit together end up smashed into a blob.
-----Original Message-----
From: Jon Bondy via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 8:42 AM
To: OpenSCAD general discussion Mailing-list <
discuss@lists.openscad.org>
Cc: lee.deraud@roadrunner.com; Jon Bondy jon@jonbondy.com
Subject: [OpenSCAD] Re: Storing information derived from the geometry
into
variables
Slightly off topic...
I have used Cloud Compare to align two point clouds coming from my
scanner
On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
Watching with interest. My use case is similar (I think), except
or all of the shapes in question are imported STLs from scans.
Example 1: precisely aligning/combining two scanned shapes. The
scanner app can do this, but it requires parts that overlap
significantly. Not to mention that the resulting lump is a bit
unwieldy, and I still need to be able to manipulate the two pieces
Example 2: deriving the intersection edge between two scans, or a
and a OpenSCAD-generated object. Think car fender (scanned) and
wheelwell flare
(generated): determining the cut-line where the two pieces would
together.
I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either
variables
I am not sure if this is possible at all, I didn't even know exactly
how to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
I know that the union() is not absolutely necessary here but read
Is there any possibility to identify the edges or the vertices
by the "intersection" of the two cubes and to store them into
variables? I know that this is not an intersection in the OpenSCAD
sense but I didn't know how to name it better.
Why would I want to do this? Sometimes I have quite complex models
where the orientation of certain elements is - for the sake of my
laziness - found by trial-and-error instead of analytically
calculating it. Nonetheless, sometimes I need the exact coordinates
the edges / vertices / surfaces to place / orient further elements
or to
calculate distances and angles.
In short, I'd like to be able to query the engine for specific
coordinates that are the result of union / difference / intersection
@Guenther Sohler <guenther.sohler@gmail.com>
! I think you just solved his problem ;-) Also, thank you for the tip.
EBo --
On Fri, Jun 19, 2026 at 3:54 PM Guenther Sohler <guenther.sohler@gmail.com>
wrote:
> Nope, using a radius of 0.0001 is just a matter of the model, it does not
> affect the internals of the PythonOpenSCAD at all or break anything
> internally.
>
> But there is no need to misuse filleting exactly for that purpose.
> If the Op is just interested in the edges at the junction of A and B he
> could
>
> A=get the edges of a.mesh()
> B=get the edges of b.mesh()
> C=get the edges of (a&b).mesh()
>
> find edges in C which are not in A or B
>
> my little 2 cents
>
>
>
> On Fri, Jun 19, 2026 at 9:45 PM John David <ebo.2112@gmail.com> wrote:
>
>> I remember the filleting examples. Nice work BTW. Maybe someone can
>> play with the filleting input parameters and see if you can make the radius
>> something insanely small (say an epsilon radius of 0.00001) which would
>> essentially give you two lines so close together it does not much matter
>> for the original posters needs/requirements. It is possible though that
>> this will break LOTS of things in Open/PythonSCAD.
>>
>> That said, I would love to see this general functionality included in
>> BOSL2, or wherever it makes sense.
>>
>> EBo --
>>
>> On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
>> discuss@lists.openscad.org> wrote:
>>
>>> if you are interested in filleting only the edges which are created
>>> during the intersection/union,
>>>
>>> you could exactly do that:: select those edges in the result, which did
>>> not exist in either source.
>>>
>>> our fork can do filleting like this:
>>>
>>> e.g.
>>>
>>> union(cube(10), cube(10,center=True ), r=3, fn=20)
>>>
>>> watch out https://imgur.com/a/lSsMNlq
>>>
>>>
>>>
>>> On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
>>> discuss@lists.openscad.org> wrote:
>>>
>>>> Where I have seen this more commonly is computing the intersection of
>>>> NURB surfaces, and it returns a series of shapes - typically lines, but if
>>>> you are computing solid geometry might be a volume. It would be very nice
>>>> to have a function, probably as part of BOSL2's NURBS/geometry
>>>> implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
>>>> what to call it. What I remember in all Farin's books it is called an
>>>> intersection, but it could easily get confused with "intersect" two or more
>>>> objects. Maybe compute_intersection?
>>>>
>>>> While writing this I came up with a possible way to "fake it". first
>>>> computer the intersection of those two objects, then do a series of
>>>> difference where you jiggle the objects up/down/back/forth by some small
>>>> epsilon. Doing this carefully should result in a very small 3D object at
>>>> the boundary you are looking for. Hmmm... intersection_boundary might be
>>>> another name for the function...
>>>>
>>>> On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
>>>> discuss@lists.openscad.org> wrote:
>>>>
>>>>> Yeah, merging overlapping scans is a relatively simple brute-force
>>>>> operation. Aligning things that touch but don't overlap, not so much.
>>>>> (It doesn't help a bit that the point clouds out of the scanner app
>>>>> are not
>>>>> aligned with the coordinate axes, even though it can "see" the surface
>>>>> the
>>>>> scanned object was sitting on.)
>>>>>
>>>>> Most of the apps I've looked at assume overlap, not adjacency, so two
>>>>> parts
>>>>> that fit together end up smashed into a blob.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Jon Bondy via Discuss <discuss@lists.openscad.org>
>>>>> Sent: Friday, June 19, 2026 8:42 AM
>>>>> To: OpenSCAD general discussion Mailing-list <
>>>>> discuss@lists.openscad.org>
>>>>> Cc: lee.deraud@roadrunner.com; Jon Bondy <jon@jonbondy.com>
>>>>> Subject: [OpenSCAD] Re: Storing information derived from the geometry
>>>>> into
>>>>> variables
>>>>>
>>>>> Slightly off topic...
>>>>>
>>>>> I have used Cloud Compare to align two point clouds coming from my
>>>>> scanner
>>>>>
>>>>>
>>>>> On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
>>>>> > Watching with interest. My use case is similar (I think), except
>>>>> some
>>>>> > or all of the shapes in question are imported STLs from scans.
>>>>> > Example 1: precisely aligning/combining two scanned shapes. The
>>>>> > scanner app can do this, but it requires parts that overlap
>>>>> > significantly. Not to mention that the resulting lump is a bit
>>>>> > unwieldy, and I still need to be able to manipulate the two pieces
>>>>> separately.
>>>>> > Example 2: deriving the intersection edge between two scans, or a
>>>>> scan
>>>>> > and a OpenSCAD-generated object. Think car fender (scanned) and
>>>>> > wheelwell flare
>>>>> > (generated): determining the cut-line where the two pieces would
>>>>> join
>>>>> > together.
>>>>> > I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either
>>>>> job,
>>>>> > but it's generally easier to deal with than homegrown Python code
>>>>> > using the open3d library.
>>>>> >
>>>>> > -----Original Message-----
>>>>> > From: Thomas Richter via Discuss <discuss@lists.openscad.org>
>>>>> > Sent: Friday, June 19, 2026 3:10 AM
>>>>> > To: OpenSCAD general discussion Mailing-list
>>>>> > <discuss@lists.openscad.org>
>>>>> > Cc: Thomas Richter <tomselektropost@googlemail.com>
>>>>> > Subject: [OpenSCAD] Storing information derived from the geometry
>>>>> into
>>>>> > variables
>>>>> >
>>>>> > I am not sure if this is possible at all, I didn't even know exactly
>>>>> > how to name the question.
>>>>> >
>>>>> > Let's say we have the following example(!) code:
>>>>> >
>>>>> > union() {
>>>>> > cube([50, 5, 10]);
>>>>> > translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
>>>>> >
>>>>> > I know that the union() is not absolutely necessary here but read
>>>>> on...
>>>>> >
>>>>> > Is there any possibility to identify the edges or the vertices
>>>>> created
>>>>> > by the "intersection" of the two cubes and to store them into
>>>>> > variables? I know that this is not an intersection in the OpenSCAD
>>>>> > sense but I didn't know how to name it better.
>>>>> >
>>>>> > Why would I want to do this? Sometimes I have quite complex models
>>>>> > where the orientation of certain elements is - for the sake of my
>>>>> > laziness - found by trial-and-error instead of analytically
>>>>> > calculating it. Nonetheless, sometimes I need the exact coordinates
>>>>> of
>>>>> > the edges / vertices / surfaces to place / orient further elements
>>>>> or to
>>>>> calculate distances and angles.
>>>>> >
>>>>> > In short, I'd like to be able to query the engine for specific
>>>>> > coordinates that are the result of union / difference / intersection
>>>>> operations.
>>>>> > _______________________________________________
>>>>> > 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 email has been checked for viruses by AVG antivirus software.
>>>>> www.avg.com
>>>>> _______________________________________________
>>>>> 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
>>
>>
SP
Sanjeev Prabhakar
Sat, Jun 20, 2026 5:02 AM
I have written a lot of algorithms to get the intersection points between
any complex geometries
see the video below to do the same
https://youtu.be/tpGupGsnpu8
the library is written in python and you need to follow the tutorials
On Fri, 19 Jun 2026 at 15:40, Thomas Richter via Discuss <
discuss@lists.openscad.org> wrote:
I am not sure if this is possible at all, I didn't even know exactly how
to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]);
}
I know that the union() is not absolutely necessary here but read on...
Is there any possibility to identify the edges or the vertices created by
the "intersection" of the two cubes and to store them into variables? I
know that this is not an intersection in the OpenSCAD sense but I didn't
know how to name it better.
Why would I want to do this? Sometimes I have quite complex models where
the orientation of certain elements is - for the sake of my laziness -
found by trial-and-error instead of analytically calculating it.
Nonetheless, sometimes I need the exact coordinates of the edges / vertices
/ surfaces to place / orient further elements or to calculate distances and
angles.
In short, I'd like to be able to query the engine for specific coordinates
that are the result of union / difference / intersection operations.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I have written a lot of algorithms to get the intersection points between
any complex geometries
see the video below to do the same
https://youtu.be/tpGupGsnpu8
the library is written in python and you need to follow the tutorials
On Fri, 19 Jun 2026 at 15:40, Thomas Richter via Discuss <
discuss@lists.openscad.org> wrote:
> I am not sure if this is possible at all, I didn't even know exactly how
> to name the question.
>
> Let's say we have the following example(!) code:
>
> union() {
> cube([50, 5, 10]);
> translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]);
> }
>
> I know that the union() is not absolutely necessary here but read on...
>
> Is there any possibility to identify the edges or the vertices created by
> the "intersection" of the two cubes and to store them into variables? I
> know that this is not an intersection in the OpenSCAD sense but I didn't
> know how to name it better.
>
> Why would I want to do this? Sometimes I have quite complex models where
> the orientation of certain elements is - for the sake of my laziness -
> found by trial-and-error instead of analytically calculating it.
> Nonetheless, sometimes I need the exact coordinates of the edges / vertices
> / surfaces to place / orient further elements or to calculate distances and
> angles.
>
> In short, I'd like to be able to query the engine for specific coordinates
> that are the result of union / difference / intersection operations.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
TR
Thomas Richter
Sat, Jun 20, 2026 7:02 AM
What kind of code is this? I have never seen something like this in the OpenSCAD docs / tutorials before. I see that the concept is a solution to the problem but how to query the model? Whenever I try to assign a solid to a variable like a = cube(10); OpenSCAD fails complaining there is no function cube. What would be the exact syntax in terms of my initial example?
Am 19.06.2026 um 21:54 schrieb Guenther Sohler via Discuss discuss@lists.openscad.org:
Nope, using a radius of 0.0001 is just a matter of the model, it does not affect the internals of the PythonOpenSCAD at all or break anything internally.
But there is no need to misuse filleting exactly for that purpose.
If the Op is just interested in the edges at the junction of A and B he could
A=get the edges of a.mesh()
B=get the edges of b.mesh()
C=get the edges of (a&b).mesh()
find edges in C which are not in A or B
my little 2 cents
On Fri, Jun 19, 2026 at 9:45 PM John David ebo.2112@gmail.com wrote:
I remember the filleting examples. Nice work BTW. Maybe someone can play with the filleting input parameters and see if you can make the radius something insanely small (say an epsilon radius of 0.00001) which would essentially give you two lines so close together it does not much matter for the original posters needs/requirements. It is possible though that this will break LOTS of things in Open/PythonSCAD.
That said, I would love to see this general functionality included in BOSL2, or wherever it makes sense.
EBo --
On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss discuss@lists.openscad.org wrote:
if you are interested in filleting only the edges which are created during the intersection/union,
you could exactly do that:: select those edges in the result, which did not exist in either source.
our fork can do filleting like this:
e.g.
union(cube(10), cube(10,center=True ), r=3, fn=20)
watch out https://imgur.com/a/lSsMNlq
On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss discuss@lists.openscad.org wrote:
Where I have seen this more commonly is computing the intersection of NURB surfaces, and it returns a series of shapes - typically lines, but if you are computing solid geometry might be a volume. It would be very nice to have a function, probably as part of BOSL2's NURBS/geometry implementation, to compute this 1/2/3-D intersection. BTW, I am not sure what to call it. What I remember in all Farin's books it is called an intersection, but it could easily get confused with "intersect" two or more objects. Maybe compute_intersection?
While writing this I came up with a possible way to "fake it". first computer the intersection of those two objects, then do a series of difference where you jiggle the objects up/down/back/forth by some small epsilon. Doing this carefully should result in a very small 3D object at the boundary you are looking for. Hmmm... intersection_boundary might be another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss discuss@lists.openscad.org wrote:
Yeah, merging overlapping scans is a relatively simple brute-force
operation. Aligning things that touch but don't overlap, not so much.
(It doesn't help a bit that the point clouds out of the scanner app are not
aligned with the coordinate axes, even though it can "see" the surface the
scanned object was sitting on.)
Most of the apps I've looked at assume overlap, not adjacency, so two parts
that fit together end up smashed into a blob.
-----Original Message-----
From: Jon Bondy via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 8:42 AM
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: lee.deraud@roadrunner.com; Jon Bondy jon@jonbondy.com
Subject: [OpenSCAD] Re: Storing information derived from the geometry into
variables
Slightly off topic...
I have used Cloud Compare to align two point clouds coming from my scanner
On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
Watching with interest. My use case is similar (I think), except some
or all of the shapes in question are imported STLs from scans.
Example 1: precisely aligning/combining two scanned shapes. The
scanner app can do this, but it requires parts that overlap
significantly. Not to mention that the resulting lump is a bit
unwieldy, and I still need to be able to manipulate the two pieces
separately.
Example 2: deriving the intersection edge between two scans, or a scan
and a OpenSCAD-generated object. Think car fender (scanned) and
wheelwell flare
(generated): determining the cut-line where the two pieces would join
together.
I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
but it's generally easier to deal with than homegrown Python code
using the open3d library.
-----Original Message-----
From: Thomas Richter via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 3:10 AM
To: OpenSCAD general discussion Mailing-list
discuss@lists.openscad.org
Cc: Thomas Richter tomselektropost@googlemail.com
Subject: [OpenSCAD] Storing information derived from the geometry into
variables
I am not sure if this is possible at all, I didn't even know exactly
how to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
I know that the union() is not absolutely necessary here but read on...
Is there any possibility to identify the edges or the vertices created
by the "intersection" of the two cubes and to store them into
variables? I know that this is not an intersection in the OpenSCAD
sense but I didn't know how to name it better.
Why would I want to do this? Sometimes I have quite complex models
where the orientation of certain elements is - for the sake of my
laziness - found by trial-and-error instead of analytically
calculating it. Nonetheless, sometimes I need the exact coordinates of
the edges / vertices / surfaces to place / orient further elements or to
calculate distances and angles.
In short, I'd like to be able to query the engine for specific
coordinates that are the result of union / difference / intersection
What kind of code is this? I have never seen something like this in the OpenSCAD docs / tutorials before. I see that the concept is a solution to the problem but how to query the model? Whenever I try to assign a solid to a variable like ```a = cube(10);``` OpenSCAD fails complaining there is no function cube. What would be the exact syntax in terms of my initial example?
> Am 19.06.2026 um 21:54 schrieb Guenther Sohler via Discuss <discuss@lists.openscad.org>:
>
> Nope, using a radius of 0.0001 is just a matter of the model, it does not affect the internals of the PythonOpenSCAD at all or break anything internally.
>
> But there is no need to misuse filleting exactly for that purpose.
> If the Op is just interested in the edges at the junction of A and B he could
>
> A=get the edges of a.mesh()
> B=get the edges of b.mesh()
> C=get the edges of (a&b).mesh()
>
> find edges in C which are not in A or B
>
> my little 2 cents
>
>
>
>> On Fri, Jun 19, 2026 at 9:45 PM John David <ebo.2112@gmail.com> wrote:
>> I remember the filleting examples. Nice work BTW. Maybe someone can play with the filleting input parameters and see if you can make the radius something insanely small (say an epsilon radius of 0.00001) which would essentially give you two lines so close together it does not much matter for the original posters needs/requirements. It is possible though that this will break LOTS of things in Open/PythonSCAD.
>>
>> That said, I would love to see this general functionality included in BOSL2, or wherever it makes sense.
>>
>> EBo --
>>
>>> On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <discuss@lists.openscad.org> wrote:
>>> if you are interested in filleting only the edges which are created during the intersection/union,
>>>
>>> you could exactly do that:: select those edges in the result, which did not exist in either source.
>>>
>>> our fork can do filleting like this:
>>>
>>> e.g.
>>>
>>> union(cube(10), cube(10,center=True ), r=3, fn=20)
>>>
>>> watch out https://imgur.com/a/lSsMNlq
>>>
>>>
>>>
>>>> On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <discuss@lists.openscad.org> wrote:
>>>> Where I have seen this more commonly is computing the intersection of NURB surfaces, and it returns a series of shapes - typically lines, but if you are computing solid geometry might be a volume. It would be very nice to have a function, probably as part of BOSL2's NURBS/geometry implementation, to compute this 1/2/3-D intersection. BTW, I am not sure what to call it. What I remember in all Farin's books it is called an intersection, but it could easily get confused with "intersect" two or more objects. Maybe compute_intersection?
>>>>
>>>> While writing this I came up with a possible way to "fake it". first computer the intersection of those two objects, then do a series of difference where you jiggle the objects up/down/back/forth by some small epsilon. Doing this carefully should result in a very small 3D object at the boundary you are looking for. Hmmm... intersection_boundary might be another name for the function...
>>>>
>>>>> On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <discuss@lists.openscad.org> wrote:
>>>>> Yeah, merging overlapping scans is a relatively simple brute-force
>>>>> operation. Aligning things that touch but don't overlap, not so much.
>>>>> (It doesn't help a bit that the point clouds out of the scanner app are not
>>>>> aligned with the coordinate axes, even though it can "see" the surface the
>>>>> scanned object was sitting on.)
>>>>>
>>>>> Most of the apps I've looked at assume overlap, not adjacency, so two parts
>>>>> that fit together end up smashed into a blob.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Jon Bondy via Discuss <discuss@lists.openscad.org>
>>>>> Sent: Friday, June 19, 2026 8:42 AM
>>>>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org>
>>>>> Cc: lee.deraud@roadrunner.com; Jon Bondy <jon@jonbondy.com>
>>>>> Subject: [OpenSCAD] Re: Storing information derived from the geometry into
>>>>> variables
>>>>>
>>>>> Slightly off topic...
>>>>>
>>>>> I have used Cloud Compare to align two point clouds coming from my scanner
>>>>>
>>>>>
>>>>>> On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
>>>>>> Watching with interest. My use case is similar (I think), except some
>>>>>> or all of the shapes in question are imported STLs from scans.
>>>>>> Example 1: precisely aligning/combining two scanned shapes. The
>>>>>> scanner app can do this, but it requires parts that overlap
>>>>>> significantly. Not to mention that the resulting lump is a bit
>>>>>> unwieldy, and I still need to be able to manipulate the two pieces
>>>>>> separately.
>>>>>> Example 2: deriving the intersection edge between two scans, or a scan
>>>>>> and a OpenSCAD-generated object. Think car fender (scanned) and
>>>>>> wheelwell flare
>>>>>> (generated): determining the cut-line where the two pieces would join
>>>>>> together.
>>>>>> I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either job,
>>>>>> but it's generally easier to deal with than homegrown Python code
>>>>>> using the open3d library.
>>>>>> >
>>>>>> > -----Original Message-----
>>>>>> > From: Thomas Richter via Discuss <discuss@lists.openscad.org>
>>>>>> > Sent: Friday, June 19, 2026 3:10 AM
>>>>>> > To: OpenSCAD general discussion Mailing-list
>>>>>> > <discuss@lists.openscad.org>
>>>>>> > Cc: Thomas Richter <tomselektropost@googlemail.com>
>>>>>> > Subject: [OpenSCAD] Storing information derived from the geometry into
>>>>>> > variables
>>>>>> >
>>>>>> > I am not sure if this is possible at all, I didn't even know exactly
>>>>>> > how to name the question.
>>>>>> >
>>>>>> > Let's say we have the following example(!) code:
>>>>>> >
>>>>>> > union() {
>>>>>> > cube([50, 5, 10]);
>>>>>> > translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5, 10]); }
>>>>>> >
>>>>>> > I know that the union() is not absolutely necessary here but read on...
>>>>>> >
>>>>>> > Is there any possibility to identify the edges or the vertices created
>>>>>> > by the "intersection" of the two cubes and to store them into
>>>>>> > variables? I know that this is not an intersection in the OpenSCAD
>>>>>> > sense but I didn't know how to name it better.
>>>>>> >
>>>>>> > Why would I want to do this? Sometimes I have quite complex models
>>>>>> > where the orientation of certain elements is - for the sake of my
>>>>>> > laziness - found by trial-and-error instead of analytically
>>>>>> > calculating it. Nonetheless, sometimes I need the exact coordinates of
>>>>>> > the edges / vertices / surfaces to place / orient further elements or to
>>>>>> calculate distances and angles.
>>>>>> >
>>>>>> > In short, I'd like to be able to query the engine for specific
>>>>>> > coordinates that are the result of union / difference / intersection
>>>>>> operations.
MM
Michael Möller
Sat, Jun 20, 2026 7:32 AM
What kind of code is this? I have never seen something like this in the
OpenSCAD docs / tutorials before. I see that the concept is a solution to
the problem but how to query the model? Whenever I try to assign a solid to
a variable like a = cube(10); OpenSCAD fails complaining there is no
function cube. What would be the exact syntax in terms of my initial
example?
Am 19.06.2026 um 21:54 schrieb Guenther Sohler via Discuss <
Nope, using a radius of 0.0001 is just a matter of the model, it does
not affect the internals of the PythonOpenSCAD at all or break anything
internally.
But there is no need to misuse filleting exactly for that purpose.
If the Op is just interested in the edges at the junction of A and B he
A=get the edges of a.mesh()
B=get the edges of b.mesh()
C=get the edges of (a&b).mesh()
find edges in C which are not in A or B
my little 2 cents
On Fri, Jun 19, 2026 at 9:45 PM John David ebo.2112@gmail.com wrote:
I remember the filleting examples. Nice work BTW. Maybe someone can
play with the filleting input parameters and see if you can make the radius
something insanely small (say an epsilon radius of 0.00001) which would
essentially give you two lines so close together it does not much matter
for the original posters needs/requirements. It is possible though that
this will break LOTS of things in Open/PythonSCAD.
That said, I would love to see this general functionality included in
BOSL2, or wherever it makes sense.
On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
if you are interested in filleting only the edges which are created
during the intersection/union,
you could exactly do that:: select those edges in the result, which
did not exist in either source.
On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
Where I have seen this more commonly is computing the intersection of
NURB surfaces, and it returns a series of shapes - typically lines, but if
you are computing solid geometry might be a volume. It would be very nice
to have a function, probably as part of BOSL2's NURBS/geometry
implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
what to call it. What I remember in all Farin's books it is called an
intersection, but it could easily get confused with "intersect" two or more
objects. Maybe compute_intersection?
While writing this I came up with a possible way to "fake it". first
computer the intersection of those two objects, then do a series of
difference where you jiggle the objects up/down/back/forth by some small
epsilon. Doing this carefully should result in a very small 3D object at
the boundary you are looking for. Hmmm... intersection_boundary might be
another name for the function...
On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
Yeah, merging overlapping scans is a relatively simple brute-force
operation. Aligning things that touch but don't overlap, not so much.
(It doesn't help a bit that the point clouds out of the scanner app
aligned with the coordinate axes, even though it can "see" the
scanned object was sitting on.)
Most of the apps I've looked at assume overlap, not adjacency, so
that fit together end up smashed into a blob.
-----Original Message-----
From: Jon Bondy via Discuss discuss@lists.openscad.org
Sent: Friday, June 19, 2026 8:42 AM
To: OpenSCAD general discussion Mailing-list <
variables
Slightly off topic...
I have used Cloud Compare to align two point clouds coming from my
On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
Watching with interest. My use case is similar (I think), except
or all of the shapes in question are imported STLs from scans.
Example 1: precisely aligning/combining two scanned shapes. The
scanner app can do this, but it requires parts that overlap
significantly. Not to mention that the resulting lump is a bit
unwieldy, and I still need to be able to manipulate the two pieces
separately.
Example 2: deriving the intersection edge between two scans, or a
and a OpenSCAD-generated object. Think car fender (scanned) and
wheelwell flare
(generated): determining the cut-line where the two pieces would
together.
I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either
but it's generally easier to deal with than homegrown Python code
using the open3d library.
variables
I am not sure if this is possible at all, I didn't even know
how to name the question.
Let's say we have the following example(!) code:
union() {
cube([50, 5, 10]);
translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5,
I know that the union() is not absolutely necessary here but read
Is there any possibility to identify the edges or the vertices
by the "intersection" of the two cubes and to store them into
variables? I know that this is not an intersection in the
sense but I didn't know how to name it better.
Why would I want to do this? Sometimes I have quite complex
where the orientation of certain elements is - for the sake of my
laziness - found by trial-and-error instead of analytically
calculating it. Nonetheless, sometimes I need the exact
the edges / vertices / surfaces to place / orient further
calculate distances and angles.
In short, I'd like to be able to query the engine for specific
coordinates that are the result of union / difference /
Earlier in the thread:
You might look into
https://pythonscad.org/tutorial/python_specialities/
PythonSCAD is a superset of OpenSCAD and in python mode you can store
everything to variables.
lør. 20. jun. 2026, 09.03 skrev Thomas Richter via Discuss <
discuss@lists.openscad.org>:
> What kind of code is this? I have never seen something like this in the
> OpenSCAD docs / tutorials before. I see that the concept is a solution to
> the problem but how to query the model? Whenever I try to assign a solid to
> a variable like ```a = cube(10);``` OpenSCAD fails complaining there is no
> function cube. What would be the exact syntax in terms of my initial
> example?
>
> > Am 19.06.2026 um 21:54 schrieb Guenther Sohler via Discuss <
> discuss@lists.openscad.org>:
> >
> > Nope, using a radius of 0.0001 is just a matter of the model, it does
> not affect the internals of the PythonOpenSCAD at all or break anything
> internally.
> >
> > But there is no need to misuse filleting exactly for that purpose.
> > If the Op is just interested in the edges at the junction of A and B he
> could
> >
> > A=get the edges of a.mesh()
> > B=get the edges of b.mesh()
> > C=get the edges of (a&b).mesh()
> >
> > find edges in C which are not in A or B
> >
> > my little 2 cents
> >
> >
> >
> >> On Fri, Jun 19, 2026 at 9:45 PM John David <ebo.2112@gmail.com> wrote:
> >> I remember the filleting examples. Nice work BTW. Maybe someone can
> play with the filleting input parameters and see if you can make the radius
> something insanely small (say an epsilon radius of 0.00001) which would
> essentially give you two lines so close together it does not much matter
> for the original posters needs/requirements. It is possible though that
> this will break LOTS of things in Open/PythonSCAD.
> >>
> >> That said, I would love to see this general functionality included in
> BOSL2, or wherever it makes sense.
> >>
> >> EBo --
> >>
> >>> On Fri, Jun 19, 2026 at 3:07 PM Guenther Sohler via Discuss <
> discuss@lists.openscad.org> wrote:
> >>> if you are interested in filleting only the edges which are created
> during the intersection/union,
> >>>
> >>> you could exactly do that:: select those edges in the result, which
> did not exist in either source.
> >>>
> >>> our fork can do filleting like this:
> >>>
> >>> e.g.
> >>>
> >>> union(cube(10), cube(10,center=True ), r=3, fn=20)
> >>>
> >>> watch out https://imgur.com/a/lSsMNlq
> >>>
> >>>
> >>>
> >>>> On Fri, Jun 19, 2026 at 8:13 PM John David via Discuss <
> discuss@lists.openscad.org> wrote:
> >>>> Where I have seen this more commonly is computing the intersection of
> NURB surfaces, and it returns a series of shapes - typically lines, but if
> you are computing solid geometry might be a volume. It would be very nice
> to have a function, probably as part of BOSL2's NURBS/geometry
> implementation, to compute this 1/2/3-D intersection. BTW, I am not sure
> what to call it. What I remember in all Farin's books it is called an
> intersection, but it could easily get confused with "intersect" two or more
> objects. Maybe compute_intersection?
> >>>>
> >>>> While writing this I came up with a possible way to "fake it". first
> computer the intersection of those two objects, then do a series of
> difference where you jiggle the objects up/down/back/forth by some small
> epsilon. Doing this carefully should result in a very small 3D object at
> the boundary you are looking for. Hmmm... intersection_boundary might be
> another name for the function...
> >>>>
> >>>>> On Fri, Jun 19, 2026 at 1:32 PM Lee DeRaud via Discuss <
> discuss@lists.openscad.org> wrote:
> >>>>> Yeah, merging overlapping scans is a relatively simple brute-force
> >>>>> operation. Aligning things that touch but don't overlap, not so much.
> >>>>> (It doesn't help a bit that the point clouds out of the scanner app
> are not
> >>>>> aligned with the coordinate axes, even though it can "see" the
> surface the
> >>>>> scanned object was sitting on.)
> >>>>>
> >>>>> Most of the apps I've looked at assume overlap, not adjacency, so
> two parts
> >>>>> that fit together end up smashed into a blob.
> >>>>>
> >>>>> -----Original Message-----
> >>>>> From: Jon Bondy via Discuss <discuss@lists.openscad.org>
> >>>>> Sent: Friday, June 19, 2026 8:42 AM
> >>>>> To: OpenSCAD general discussion Mailing-list <
> discuss@lists.openscad.org>
> >>>>> Cc: lee.deraud@roadrunner.com; Jon Bondy <jon@jonbondy.com>
> >>>>> Subject: [OpenSCAD] Re: Storing information derived from the
> geometry into
> >>>>> variables
> >>>>>
> >>>>> Slightly off topic...
> >>>>>
> >>>>> I have used Cloud Compare to align two point clouds coming from my
> scanner
> >>>>>
> >>>>>
> >>>>>> On 6/19/2026 10:33 AM, Lee DeRaud via Discuss wrote:
> >>>>>> Watching with interest. My use case is similar (I think), except
> some
> >>>>>> or all of the shapes in question are imported STLs from scans.
> >>>>>> Example 1: precisely aligning/combining two scanned shapes. The
> >>>>>> scanner app can do this, but it requires parts that overlap
> >>>>>> significantly. Not to mention that the resulting lump is a bit
> >>>>>> unwieldy, and I still need to be able to manipulate the two pieces
> >>>>>> separately.
> >>>>>> Example 2: deriving the intersection edge between two scans, or a
> scan
> >>>>>> and a OpenSCAD-generated object. Think car fender (scanned) and
> >>>>>> wheelwell flare
> >>>>>> (generated): determining the cut-line where the two pieces would
> join
> >>>>>> together.
> >>>>>> I'm vaguely doubtful OpenSCAD/BOSL2 is the right tool for either
> job,
> >>>>>> but it's generally easier to deal with than homegrown Python code
> >>>>>> using the open3d library.
> >>>>>> >
> >>>>>> > -----Original Message-----
> >>>>>> > From: Thomas Richter via Discuss <discuss@lists.openscad.org>
> >>>>>> > Sent: Friday, June 19, 2026 3:10 AM
> >>>>>> > To: OpenSCAD general discussion Mailing-list
> >>>>>> > <discuss@lists.openscad.org>
> >>>>>> > Cc: Thomas Richter <tomselektropost@googlemail.com>
> >>>>>> > Subject: [OpenSCAD] Storing information derived from the geometry
> into
> >>>>>> > variables
> >>>>>> >
> >>>>>> > I am not sure if this is possible at all, I didn't even know
> exactly
> >>>>>> > how to name the question.
> >>>>>> >
> >>>>>> > Let's say we have the following example(!) code:
> >>>>>> >
> >>>>>> > union() {
> >>>>>> > cube([50, 5, 10]);
> >>>>>> > translate([20, -20, 0]) rotate([0, 0, 75]) cube([50, 5,
> 10]); }
> >>>>>> >
> >>>>>> > I know that the union() is not absolutely necessary here but read
> on...
> >>>>>> >
> >>>>>> > Is there any possibility to identify the edges or the vertices
> created
> >>>>>> > by the "intersection" of the two cubes and to store them into
> >>>>>> > variables? I know that this is not an intersection in the
> OpenSCAD
> >>>>>> > sense but I didn't know how to name it better.
> >>>>>> >
> >>>>>> > Why would I want to do this? Sometimes I have quite complex
> models
> >>>>>> > where the orientation of certain elements is - for the sake of my
> >>>>>> > laziness - found by trial-and-error instead of analytically
> >>>>>> > calculating it. Nonetheless, sometimes I need the exact
> coordinates of
> >>>>>> > the edges / vertices / surfaces to place / orient further
> elements or to
> >>>>>> calculate distances and angles.
> >>>>>> >
> >>>>>> > In short, I'd like to be able to query the engine for specific
> >>>>>> > coordinates that are the result of union / difference /
> intersection
> >>>>>> operations.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jordan Brown
Sat, Jun 20, 2026 4:14 PM
Alas, the answer is simple: No.
Some work has been done to provide a feature that would let you retrieve
information about the shape resulting from OpenSCAD operations, but it
has been stalled for years. See PR #4478
https://github.com/openscad/openscad/pull/4478 and OEP 8
https://github.com/openscad/openscad/wiki/OEP8%3A-Objects-%28dictionaries%3F%29%2C-Geometry-as-data%2C-and-Module-References.
A bit of internals, to explain why this isn't easy: OpenSCAD runs a
program in approximately three phases:
- It parses the program into an internal Abstract Syntax Tree form.
- It evaluates the AST, executing the program, to yield a Constructive
Solid Geometry tree.
- It processes the CSG tree to yield triangles and OpenGL operations
(preview) or to yield a triangle mesh (render).
While the program is being executed, in the second phase, it hasn't done
any geometry work yet. It doesn't know what the results are of the
union - and in fact, for preview and some specialty cases, it may never
do the required geometry work to determine those results.
Alas, the answer is simple: No.
Some work has been done to provide a feature that would let you retrieve
information about the shape resulting from OpenSCAD operations, but it
has been stalled for years. See PR #4478
<https://github.com/openscad/openscad/pull/4478> and OEP 8
<https://github.com/openscad/openscad/wiki/OEP8%3A-Objects-%28dictionaries%3F%29%2C-Geometry-as-data%2C-and-Module-References>.
A bit of internals, to explain why this isn't easy: OpenSCAD runs a
program in approximately three phases:
* It parses the program into an internal Abstract Syntax Tree form.
* It evaluates the AST, executing the program, to yield a Constructive
Solid Geometry tree.
* It processes the CSG tree to yield triangles and OpenGL operations
(preview) or to yield a triangle mesh (render).
While the program is being executed, in the second phase, it hasn't done
any geometry work yet. It doesn't *know* what the results are of the
union - and in fact, for preview and some specialty cases, it may never
do the required geometry work to determine those results.
WF
William F. Adams
Sat, Jun 20, 2026 4:30 PM
My approach for this sort of thing has been to code in parallel:
- a module which makes a specific piece of geometry
- a matching function which when passed a descriptor of some aspect of the dimensions of the geometry, calculates and then returns that dimension
it's a bit cumbersome, since one has to write, test and maintain the additional code, but once set up, it seems a workable approach, and one in keeping with both the capabilities and philosophy of OpenSCAD.
William
--
Sphinx of black quartz, judge my vow.
https://designinto3d.com/
My approach for this sort of thing has been to code in parallel:
- a module which makes a specific piece of geometry
- a matching function which when passed a descriptor of some aspect of the dimensions of the geometry, calculates and then returns that dimension
it's a bit cumbersome, since one has to write, test and maintain the additional code, but once set up, it seems a workable approach, and one in keeping with both the capabilities and philosophy of OpenSCAD.
William
--
Sphinx of black quartz, judge my vow.
https://designinto3d.com/