TR
Thomas Richter
Fri, Jun 19, 2026 10:09 AM
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.
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.
RW
Raymond West
Fri, Jun 19, 2026 11:40 AM
Not possible in openscad, not sure about in bosl2/whatever. For the
general case, the problem is in defining what you want. I think you want
these points?
Selected points:
[20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
[21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
[26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
[25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
[21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
[26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
[25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
[20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
I would be interested to know if, when you get a definitive reply,if
those values are correct
Best wishes,
Ray
On 19/06/2026 11:09, Thomas Richter via Discuss 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
Not possible in openscad, not sure about in bosl2/whatever. For the
general case, the problem is in defining what you want. I think you want
these points?
Selected points:
[20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
[21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
[26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
[25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
[21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
[26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
[25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
[20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
I would be interested to know if, when you get a definitive reply,if
those values are correct
Best wishes,
Ray
On 19/06/2026 11:09, Thomas Richter via Discuss 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
RW
Raymond West
Fri, Jun 19, 2026 11:49 AM
Here's the polyhedron for your shape, so you get the tris if you want.
polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]],
faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
-------- Forwarded Message --------
Subject: Re: [OpenSCAD] Storing information derived from the geometry
into variables
Date: Fri, 19 Jun 2026 12:40:02 +0100
From: Raymond West raywest@raywest.com
To: Thomas Richter via Discuss discuss@lists.openscad.org
Not possible in openscad, not sure about in bosl2/whatever. For the
general case, the problem is in defining what you want. I think you want
these points?
Selected points:
[20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
[21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
[26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
[25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
[21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
[26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
[25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
[20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
I would be interested to know if, when you get a definitive reply,if
those values are correct
Best wishes,
Ray
On 19/06/2026 11:09, Thomas Richter via Discuss 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
Here's the polyhedron for your shape, so you get the tris if you want.
polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]],
faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
-------- Forwarded Message --------
Subject: Re: [OpenSCAD] Storing information derived from the geometry
into variables
Date: Fri, 19 Jun 2026 12:40:02 +0100
From: Raymond West <raywest@raywest.com>
To: Thomas Richter via Discuss <discuss@lists.openscad.org>
Not possible in openscad, not sure about in bosl2/whatever. For the
general case, the problem is in defining what you want. I think you want
these points?
Selected points:
[20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
[21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
[26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
[25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
[21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
[26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
[25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
[20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
I would be interested to know if, when you get a definitive reply,if
those values are correct
Best wishes,
Ray
On 19/06/2026 11:09, Thomas Richter via Discuss 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
Fri, Jun 19, 2026 11:54 AM
Dear Ray,
thank you. Please don't put any further effort into solving it for this particular code. I put an exclamation mark behind "example" in my text to make clear this is not the real problem I try to solve. Sorry for misleading you.
I am looking for a general way to achieve what I was asking for since I expect to face more problems of this kind in the future.
Best,
Thomas
Am 19.06.2026 um 13:49 schrieb Raymond West via Discuss discuss@lists.openscad.org:
Here's the polyhedron for your shape, so you get the tris if you want.
polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]], faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
-------- Forwarded Message -------- Subject: Re: [OpenSCAD] Storing information derived from the geometry into variables Date: Fri, 19 Jun 2026 12:40:02 +0100 From: Raymond West raywest@raywest.com To: Thomas Richter via Discuss discuss@lists.openscad.org
Not possible in openscad, not sure about in bosl2/whatever. For the general case, the problem is in defining what you want. I think you want these points?
Selected points:
[20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
[21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
[26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
[25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
[21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
[26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
[25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
[20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
I would be interested to know if, when you get a definitive reply,if those values are correct
Best wishes,
Ray
On 19/06/2026 11:09, Thomas Richter via Discuss 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
Dear Ray,
thank you. Please don't put any further effort into solving it for this particular code. I put an exclamation mark behind "example" in my text to make clear this is not the real problem I try to solve. Sorry for misleading you.
I am looking for a general way to achieve what I was asking for since I expect to face more problems of this kind in the future.
Best,
Thomas
> Am 19.06.2026 um 13:49 schrieb Raymond West via Discuss <discuss@lists.openscad.org>:
>
> Here's the polyhedron for your shape, so you get the tris if you want.
>
>
> polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]], faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
>
>
> -------- Forwarded Message -------- Subject: Re: [OpenSCAD] Storing information derived from the geometry into variables Date: Fri, 19 Jun 2026 12:40:02 +0100 From: Raymond West <raywest@raywest.com> To: Thomas Richter via Discuss <discuss@lists.openscad.org>
>
> Not possible in openscad, not sure about in bosl2/whatever. For the general case, the problem is in defining what you want. I think you want these points?
> Selected points:
> [20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
> [21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
> [26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
> [25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
> [21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
> [26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
> [25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
> [20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
>
> I would be interested to know if, when you get a definitive reply,if those values are correct
>
> Best wishes,
>
> Ray
>
> On 19/06/2026 11:09, Thomas Richter via Discuss 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
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
GS
Guenther Sohler
Fri, Jun 19, 2026 12:22 PM
Dear Ray,
thank you. Please don't put any further effort into solving it for this
particular code. I put an exclamation mark behind "example" in my text to
make clear this is not the real problem I try to solve. Sorry for
misleading you.
I am looking for a general way to achieve what I was asking for since I
expect to face more problems of this kind in the future.
Best,
Thomas
Am 19.06.2026 um 13:49 schrieb Raymond West via Discuss <
Here's the polyhedron for your shape, so you get the tris if you want.
polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]],
faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
-------- Forwarded Message -------- Subject: Re: [OpenSCAD] Storing
Not possible in openscad, not sure about in bosl2/whatever. For the
general case, the problem is in defining what you want. I think you want
these points?
Selected points:
[20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
[21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
[26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
[25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
[21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
[26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
[25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
[20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
I would be interested to know if, when you get a definitive reply,if
Best wishes,
Ray
On 19/06/2026 11:09, Thomas Richter via Discuss 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.
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.
cheers
On Fri, Jun 19, 2026 at 1:55 PM Thomas Richter via Discuss <
discuss@lists.openscad.org> wrote:
> Dear Ray,
>
> thank you. Please don't put any further effort into solving it for this
> particular code. I put an exclamation mark behind "example" in my text to
> make clear this is not the real problem I try to solve. Sorry for
> misleading you.
>
> I am looking for a general way to achieve what I was asking for since I
> expect to face more problems of this kind in the future.
>
> Best,
> Thomas
>
> > Am 19.06.2026 um 13:49 schrieb Raymond West via Discuss <
> discuss@lists.openscad.org>:
> >
> > Here's the polyhedron for your shape, so you get the tris if you want.
> >
> >
> >
> polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]],
> faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
> >
> >
> > -------- Forwarded Message -------- Subject: Re: [OpenSCAD] Storing
> information derived from the geometry into variables Date: Fri, 19 Jun 2026
> 12:40:02 +0100 From: Raymond West <raywest@raywest.com> To: Thomas
> Richter via Discuss <discuss@lists.openscad.org>
> >
> > Not possible in openscad, not sure about in bosl2/whatever. For the
> general case, the problem is in defining what you want. I think you want
> these points?
> > Selected points:
> > [20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
> > [21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
> > [26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
> > [25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
> > [21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
> > [26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
> > [25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
> > [20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
> >
> > I would be interested to know if, when you get a definitive reply,if
> those values are correct
> >
> > Best wishes,
> >
> > Ray
> >
> > On 19/06/2026 11:09, Thomas Richter via Discuss 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
> > _______________________________________________
> > 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 1:36 PM
It has been awhile since I came across an example of someone doing this in
OpenSCAD or PythonSCAD, but others have does exactly the same thing. Yes,
it would be nice if we could label geometry features, such as your
geometric or part intersection/boundary (or whatever terms we choose to
label them).
Does anyone else remember the example (probably a year or three ago) where
someone needed to know the line where two shapes met? I seam to remember
that one of the shapes was complex like a NURB surface...
EBo --
On Fri, Jun 19, 2026 at 8:23 AM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
Dear Ray,
thank you. Please don't put any further effort into solving it for this
particular code. I put an exclamation mark behind "example" in my text to
make clear this is not the real problem I try to solve. Sorry for
misleading you.
I am looking for a general way to achieve what I was asking for since I
expect to face more problems of this kind in the future.
Best,
Thomas
Am 19.06.2026 um 13:49 schrieb Raymond West via Discuss <
Here's the polyhedron for your shape, so you get the tris if you want.
polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]],
faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
-------- Forwarded Message -------- Subject: Re: [OpenSCAD] Storing
Not possible in openscad, not sure about in bosl2/whatever. For the
general case, the problem is in defining what you want. I think you want
these points?
Selected points:
[20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
[21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
[26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
[25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
[21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
[26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
[25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
[20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
I would be interested to know if, when you get a definitive reply,if
Best wishes,
Ray
On 19/06/2026 11:09, Thomas Richter via Discuss 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.
It has been awhile since I came across an example of someone doing this in
OpenSCAD or PythonSCAD, but others have does exactly the same thing. Yes,
it would be nice if we could label geometry features, such as your
geometric or part intersection/boundary (or whatever terms we choose to
label them).
Does anyone else remember the example (probably a year or three ago) where
someone needed to know the line where two shapes met? I seam to remember
that one of the shapes was complex like a NURB surface...
EBo --
On Fri, Jun 19, 2026 at 8:23 AM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
>
> 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.
>
> cheers
>
> On Fri, Jun 19, 2026 at 1:55 PM Thomas Richter via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> Dear Ray,
>>
>> thank you. Please don't put any further effort into solving it for this
>> particular code. I put an exclamation mark behind "example" in my text to
>> make clear this is not the real problem I try to solve. Sorry for
>> misleading you.
>>
>> I am looking for a general way to achieve what I was asking for since I
>> expect to face more problems of this kind in the future.
>>
>> Best,
>> Thomas
>>
>> > Am 19.06.2026 um 13:49 schrieb Raymond West via Discuss <
>> discuss@lists.openscad.org>:
>> >
>> > Here's the polyhedron for your shape, so you get the tris if you want.
>> >
>> >
>> >
>> polyhedron(points=[[0,0,0],[15.1704,-18.7059,0],[20,-20,0],[20.1826,0,0],[0,0,10],[15.1704,-18.7059,10],[20,-20,10],[20.1826,0,10],[0,5,0],[21.5223,5,0],[0,5,10],[21.5223,5,10],[25.359,0,0],[50,0,0],[25.359,0,10],[50,0,10],[26.6987,5,0],[28.1113,29.5904,0],[32.941,28.2963,0],[50,5,0],[26.6987,5,10],[28.1113,29.5904,10],[32.941,28.2963,10],[50,5,10]],
>> faces=[[0,8,3],[0,10,8],[8,12,3],[8,9,13],[0,3,7],[0,4,10],[0,7,4],[4,7,10],[10,7,14],[10,15,11],[8,10,9],[10,11,9],[8,13,12],[13,9,16],[16,19,13],[13,15,12],[13,19,15],[15,14,12],[14,15,10],[15,20,11],[15,19,23],[15,23,20],[19,16,20],[19,20,23],[2,1,3],[2,5,1],[2,12,6],[2,3,12],[1,7,3],[2,6,5],[1,5,7],[6,14,5],[6,12,14],[5,14,7],[21,9,11],[17,16,9],[18,20,16],[18,16,17],[17,9,21],[18,17,22],[22,11,20],[18,22,20],[22,17,21],[22,21,11]]);
>> >
>> >
>> > -------- Forwarded Message -------- Subject: Re: [OpenSCAD] Storing
>> information derived from the geometry into variables Date: Fri, 19 Jun 2026
>> 12:40:02 +0100 From: Raymond West <raywest@raywest.com> To: Thomas
>> Richter via Discuss <discuss@lists.openscad.org>
>> >
>> > Not possible in openscad, not sure about in bosl2/whatever. For the
>> general case, the problem is in defining what you want. I think you want
>> these points?
>> > Selected points:
>> > [20.1826, 0, 10], // (mesh 0, vertex 7 | OBJ index 8)
>> > [21.5223, 5, 10], // (mesh 0, vertex 11 | OBJ index 12)
>> > [26.6987, 5, 10], // (mesh 0, vertex 20 | OBJ index 21)
>> > [25.359, 0, 10], // (mesh 0, vertex 14 | OBJ index 15)
>> > [21.5223, 5, 0], // (mesh 0, vertex 9 | OBJ index 10)
>> > [26.6987, 5, 0], // (mesh 0, vertex 16 | OBJ index 17)
>> > [25.359, 0, 0], // (mesh 0, vertex 12 | OBJ index 13)
>> > [20.1826, 0, 0], // (mesh 0, vertex 3 | OBJ index 4)
>> >
>> > I would be interested to know if, when you get a definitive reply,if
>> those values are correct
>> >
>> > Best wishes,
>> >
>> > Ray
>> >
>> > On 19/06/2026 11:09, Thomas Richter via Discuss 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
>> > _______________________________________________
>> > 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
LD
lee.deraud@roadrunner.com
Fri, Jun 19, 2026 2:33 PM
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
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
RW
Raymond West
Fri, Jun 19, 2026 3:27 PM
The fundamental problem, is that if openscad could do what you want, you
would have to describe what you want to openscad. since it does not
except interactive input from a pointing device, other than in measuring
between points or edges. Then your specification becomes complicated for
a general purpose solution. A similar simple problem, say is being able
to select maybe five edges of a cube to be bevelled. (A cube would be
relatively easy to specify edges, but hopefully you get to what I'm
alluding.) Raw Openscad, does not allow much in the way of interactive
design, if any. Therefore, in principal, openscad, as it stands, is the
wrong tool for doing that sort of thing.
On 19/06/2026 15:33, 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
The fundamental problem, is that if openscad could do what you want, you
would have to describe what you want to openscad. since it does not
except interactive input from a pointing device, other than in measuring
between points or edges. Then your specification becomes complicated for
a general purpose solution. A similar simple problem, say is being able
to select maybe five edges of a cube to be bevelled. (A cube would be
relatively easy to specify edges, but hopefully you get to what I'm
alluding.) Raw Openscad, does not allow much in the way of interactive
design, if any. Therefore, in principal, openscad, as it stands, is the
wrong tool for doing that sort of thing.
On 19/06/2026 15:33, 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
JB
Jon Bondy
Fri, Jun 19, 2026 3:42 PM
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
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
LD
lee.deraud@roadrunner.com
Fri, Jun 19, 2026 5:32 PM
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
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