discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

teach me about polygons?

GH
Gene Heskett
Tue, Sep 7, 2021 2:09 PM

On Tuesday 07 September 2021 02:19:34 MichaelAtOz wrote:

A picture is worth a thousand words.

Sounds like you want outside thickness.

No, inside TBE.

Similar to this triangular example (lower corrected one) from:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Mi
s-ordered_faces

But neither triangular example shown there claims to be correct.

That I had whupped until I removed the top and bottom faces I don't need,
which should allow me to do and see more construction inside, using rest
of line // comments. Then the innards turned burple/magenta, but looked
out of order because I was effectively looking at the back side when I
was seeing the inside walls. That of course converts the direction from
cw to ccw.

So I next defined an inner polyhedron to be 1.5 mm smaller in xy and
declared a union of the bigger one and the smaller one inside it. but I
didn't get the expected solid walls, but a smaller box within the first
one. Then I tried to re-define that smaller box by adding or subtracting
two vars to make up the x,y parts. Is there a syntax that does allow a
point x,y,z to be stated as (ignore the parens)

[-var1+var2 (x position), var3-var4(y position), var5(z position)],

??

Or must I predefine each one with an assign starement that does allow the
math, putting only the resultant var in the x,y,z positions?

polyhedron

 (points = [

         [0, -10, 60], [0, 10, 60], [0, 10, 0], [0, -10, 0], [60,

-10, 60], [60, 10, 60],

         [10, -10, 50], [10, 10, 50], [10, 10, 30], [10, -10, 30],

[30, -10, 50], [30, 10, 50]

         ],

  faces = [

          [0,3,2],  [0,2,1],  [4,0,5],  [5,0,1],  [5,2,4], 

[4,2,3],

               [6,8,9],  [6,7,8],  [6,10,11],[6,11,7], [10,8,11],

          [10,9,8], [3,0,9],  [9,0,6],  [10,6, 0],[0,4,10],

               [3,9,10], [3,10,4], [1,7,11], [1,11,5], [1,8,7],

               [2,8,1],  [8,2,11], [5,11,2]

          ]

  );

[...]

Thank you MichaelAtOz.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Tuesday 07 September 2021 02:19:34 MichaelAtOz wrote: > A picture is worth a thousand words. > > Sounds like you want outside thickness. > No, inside TBE. > Similar to this triangular example (lower corrected one) from: > > https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Mi >s-ordered_faces But neither triangular example shown there claims to be correct. That I had whupped until I removed the top and bottom faces I don't need, which should allow me to do and see more construction inside, using rest of line // comments. Then the innards turned burple/magenta, but looked out of order because I was effectively looking at the back side when I was seeing the inside walls. That of course converts the direction from cw to ccw. So I next defined an inner polyhedron to be 1.5 mm smaller in xy and declared a union of the bigger one and the smaller one inside it. but I didn't get the expected solid walls, but a smaller box within the first one. Then I tried to re-define that smaller box by adding or subtracting two vars to make up the x,y parts. Is there a syntax that does allow a point x,y,z to be stated as (ignore the parens) [-var1+var2 (x position), var3-var4(y position), var5(z position)], ?? Or must I predefine each one with an assign starement that does allow the math, putting only the resultant var in the x,y,z positions? > polyhedron > > (points = [ > > [0, -10, 60], [0, 10, 60], [0, 10, 0], [0, -10, 0], [60, > -10, 60], [60, 10, 60], > > [10, -10, 50], [10, 10, 50], [10, 10, 30], [10, -10, 30], > [30, -10, 50], [30, 10, 50] > > ], > > faces = [ > > [0,3,2], [0,2,1], [4,0,5], [5,0,1], [5,2,4], > [4,2,3], > > [6,8,9], [6,7,8], [6,10,11],[6,11,7], [10,8,11], > > [10,9,8], [3,0,9], [9,0,6], [10,6, 0],[0,4,10], > > [3,9,10], [3,10,4], [1,7,11], [1,11,5], [1,8,7], > > [2,8,1], [8,2,11], [5,11,2] > > ] > > ); > [...] Thank you MichaelAtOz. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
GH
Gene Heskett
Tue, Sep 7, 2021 4:24 PM

On Tuesday 07 September 2021 03:54:58 Ronaldo Persiano wrote:

It is not clear to me why you need a polyhedron with missing faces but
to get it just drop the faces you don't want from the list of faces of
the polyhedron.

However, it should be clear that the incomplete
polyhedron, which doesn't enclose a volume, will not be rendered (F6)
and so no STL is possible to be produced although OpenSCAD is able to
produce the expected image in a preview (F5).

So in other words, I must define each wall as a separate polyhedron.
Nominaly 1.35mm thick to duplicate the steel part, within which I build
the piece I want to print and insert into the steel part.  That way,
each wall will be a sealed, selfcontained polyhedron, 4 of them to get
the box I desire. front, back, and both sides.

What I had intended to do was to make one bounding box to define the
working limits and shape of a box whose top and bottom are open, and
when I had the part itself built, which I should be able to do with 3
complete, closed polyhedrons, fitting exactly inside this bounding box,
and for the final render, comment out this outlining box, leaving the
part I need. Or, if because its open and won't render just leave it be,
since the openness will remove it from the .stl anyway.

But I've a disaster brewing, my coffee cup is empty and so is the pot,
first things first.

First question is, how much space do I need between the bounding box, and
the outer walls of what I'm making, to be assured that removal of the
bounding box will not affect what I build inside of it? Enough space to
prevent a merging IOW.

Thank you  Ronaldo.

Note also that a cube without the top face unioned with a similar cube
positioned on top of it but without its bottom face will not be
assembled as a valid object. Each polyhedron in a boolean operation
(union, intersection or difference) should be valid by itself, that
is, enclose a volume.

Got it. Finally...  I hope.

For each polyhedron you define, check it with View/Thrown Together.
Faces with inconsistent windings will be shown with different colors.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Tuesday 07 September 2021 03:54:58 Ronaldo Persiano wrote: > It is not clear to me why you need a polyhedron with missing faces but > to get it just drop the faces you don't want from the list of faces of > the polyhedron. > However, it should be clear that the incomplete > polyhedron, which doesn't enclose a volume, will not be rendered (F6) > and so no STL is possible to be produced although OpenSCAD is able to > produce the expected image in a preview (F5). So in other words, I must define each wall as a separate polyhedron. Nominaly 1.35mm thick to duplicate the steel part, within which I build the piece I want to print and insert into the steel part. That way, each wall will be a sealed, selfcontained polyhedron, 4 of them to get the box I desire. front, back, and both sides. What I had intended to do was to make one bounding box to define the working limits and shape of a box whose top and bottom are open, and when I had the part itself built, which I should be able to do with 3 complete, closed polyhedrons, fitting exactly inside this bounding box, and for the final render, comment out this outlining box, leaving the part I need. Or, if because its open and won't render just leave it be, since the openness will remove it from the .stl anyway. But I've a disaster brewing, my coffee cup is empty and so is the pot, first things first. First question is, how much space do I need between the bounding box, and the outer walls of what I'm making, to be assured that removal of the bounding box will not affect what I build inside of it? Enough space to prevent a merging IOW. Thank you Ronaldo. > Note also that a cube without the top face unioned with a similar cube > positioned on top of it but without its bottom face will not be > assembled as a valid object. Each polyhedron in a boolean operation > (union, intersection or difference) should be valid by itself, that > is, enclose a volume. Got it. Finally... I hope. > For each polyhedron you define, check it with View/Thrown Together. > Faces with inconsistent windings will be shown with different colors. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
JB
Jordan Brown
Tue, Sep 7, 2021 5:56 PM

On 9/7/2021 7:09 AM, Gene Heskett wrote:

Is there a syntax that does allow a point x,y,z to be stated as
(ignore the parens)
[-var1+var2 (x position), var3-var4(y position), var5(z position)],

??

You're overthinking it.  It's just an array; the elements can be any
expression.

[ -var1+var2, var3-var4, var5 ]

Others have said, but maybe not as simply and with examples:  you want
to define a polyhedron A that's the outside of the box, and another
polyhedron B that's the inside of the box (and out through the top and
bottom), and subtract B from A.

If you wanted to do this with cubes, you'd do something like:

difference() {
    cube([10,10,10]);
    translate([1,1,-1]) cube([8,8,12]);
}

The concept is the same with polyhedra; they're just individually harder
to define:

difference() {
    // Outer polyhedron
    polyhedron(points=[
        // bottom points
        [ 0,0,0 ],
        [ 10,0,0 ],
        [ 10,10,0 ],
        [ 0,10,0 ],
        // top points
        [ 0,0,10 ],
        [ 10,0,10 ],
        [ 10,10,10 ],
        [ 0,10,10 ],
    ], faces=[
        [0,1,2,3],	// bottom
        [0,4,5,1],	// front
        [1,5,6,2],	// right
        [2,6,7,3],	// back
        [3,7,4,0],	// left
        [4,7,6,5],	// top
    ]);
    // Inner polyhedron
    polyhedron(points=[
        // bottom points
        [ 1,1,-1 ],
        [ 9,1,-1 ],
        [ 9,9,-1 ],
        [ 1,9,-1 ],
        // top points
        [ 1,1,11 ],
        [ 9,1,11 ],
        [ 9,9,11 ],
        [ 1,9,11 ],
    ], faces=[
        [0,1,2,3],	// bottom
        [0,4,5,1],	// front
        [1,5,6,2],	// right
        [2,6,7,3],	// back
        [3,7,4,0],	// left
        [4,7,6,5],	// top
    ]);
}

You could, if you really wanted to, directly define the polyhedron that
is the box, complete with both the outside faces, the inside faces, the
top faces, and the  bottom faces, but that's a little more intricate:

polyhedron(points=[
    // bottom outer points
    [ 0,0,0 ],
    [ 10,0,0 ],
    [ 10,10,0 ],
    [ 0,10,0 ],
    // top outer points
    [ 0,0,10 ],
    [ 10,0,10 ],
    [ 10,10,10 ],
    [ 0,10,10 ],
    // bottom inner points
    [ 1,1,0 ],
    [ 9,1,0 ],
    [ 9,9,0 ],
    [ 1,9,0 ],
    // top inner points
    [ 1,1,10 ],
    [ 9,1,10 ],
    [ 9,9,10 ],
    [ 1,9,10 ],
], faces=[
    // Outer faces
    [0,4,5,1],
    [1,5,6,2],
    [2,6,7,3],
    [3,7,4,0],
    // Inner faces
    [8,9,13,12],
    [9,10,14,13],
    [10,11,15,14],
    [11,8,12,15],
    // top faces
    [ 4,12,13,5 ],
    [ 5,13,14,6 ],
    [ 6,14,15,7 ],
    [ 7,15,12,4 ],
    // bottom faces
    [ 0,1,9,8 ],
    [ 1,2,10,9 ],
    [ 2,3,11,10 ],
    [ 3,0,8,11 ],
]);

I don't build polyhedra very often, because they can be very complex to
build, but when I do I find them strangely satisfying, placing each
point exactly where I want it and connecting them exactly as I want them
connected.  And they're really really fast.

On 9/7/2021 7:09 AM, Gene Heskett wrote: > Is there a syntax that does allow a point x,y,z to be stated as > (ignore the parens) > [-var1+var2 (x position), var3-var4(y position), var5(z position)], > > ?? You're overthinking it.  It's just an array; the elements can be any expression. [ -var1+var2, var3-var4, var5 ] Others have said, but maybe not as simply and with examples:  you want to define a polyhedron A that's the outside of the box, and another polyhedron B that's the inside of the box (and out through the top and bottom), and subtract B from A. If you wanted to do this with cubes, you'd do something like: difference() { cube([10,10,10]); translate([1,1,-1]) cube([8,8,12]); } The concept is the same with polyhedra; they're just individually harder to define: difference() { // Outer polyhedron polyhedron(points=[ // bottom points [ 0,0,0 ], [ 10,0,0 ], [ 10,10,0 ], [ 0,10,0 ], // top points [ 0,0,10 ], [ 10,0,10 ], [ 10,10,10 ], [ 0,10,10 ], ], faces=[ [0,1,2,3], // bottom [0,4,5,1], // front [1,5,6,2], // right [2,6,7,3], // back [3,7,4,0], // left [4,7,6,5], // top ]); // Inner polyhedron polyhedron(points=[ // bottom points [ 1,1,-1 ], [ 9,1,-1 ], [ 9,9,-1 ], [ 1,9,-1 ], // top points [ 1,1,11 ], [ 9,1,11 ], [ 9,9,11 ], [ 1,9,11 ], ], faces=[ [0,1,2,3], // bottom [0,4,5,1], // front [1,5,6,2], // right [2,6,7,3], // back [3,7,4,0], // left [4,7,6,5], // top ]); } You could, if you really wanted to, directly define the polyhedron that is the box, complete with both the outside faces, the inside faces, the top faces, and the  bottom faces, but that's a little more intricate: polyhedron(points=[ // bottom outer points [ 0,0,0 ], [ 10,0,0 ], [ 10,10,0 ], [ 0,10,0 ], // top outer points [ 0,0,10 ], [ 10,0,10 ], [ 10,10,10 ], [ 0,10,10 ], // bottom inner points [ 1,1,0 ], [ 9,1,0 ], [ 9,9,0 ], [ 1,9,0 ], // top inner points [ 1,1,10 ], [ 9,1,10 ], [ 9,9,10 ], [ 1,9,10 ], ], faces=[ // Outer faces [0,4,5,1], [1,5,6,2], [2,6,7,3], [3,7,4,0], // Inner faces [8,9,13,12], [9,10,14,13], [10,11,15,14], [11,8,12,15], // top faces [ 4,12,13,5 ], [ 5,13,14,6 ], [ 6,14,15,7 ], [ 7,15,12,4 ], // bottom faces [ 0,1,9,8 ], [ 1,2,10,9 ], [ 2,3,11,10 ], [ 3,0,8,11 ], ]); I don't build polyhedra very often, because they can be very complex to build, but when I do I find them strangely satisfying, placing each point exactly where I want it and connecting them exactly as I want them connected.  And they're really really fast.
GH
Gene Heskett
Wed, Sep 8, 2021 12:12 AM

On Tuesday 07 September 2021 13:56:24 Jordan Brown wrote:

On 9/7/2021 7:09 AM, Gene Heskett wrote:

Is there a syntax that does allow a point x,y,z to be stated as
(ignore the parens)
[-var1+var2 (x position), var3-var4(y position), var5(z position)],

??

You're overthinking it.  It's just an array; the elements can be any
expression.

 [ -var1+var2, var3-var4, var5 ]

Others have said, but maybe not as simply and with examples:  you want
to define a polyhedron A that's the outside of the box, and another
polyhedron B that's the inside of the box (and out through the top and
bottom), and subtract B from A.

If you wanted to do this with cubes, you'd do something like:

 difference() {
     cube([10,10,10]);
     translate([1,1,-1]) cube([8,8,12]);
 }

The concept is the same with polyhedra; they're just individually
harder to define:

 difference() {
     // Outer polyhedron
     polyhedron(points=[
         // bottom points
         [ 0,0,0 ],
         [ 10,0,0 ],
         [ 10,10,0 ],
         [ 0,10,0 ],
         // top points
         [ 0,0,10 ],
         [ 10,0,10 ],
         [ 10,10,10 ],
         [ 0,10,10 ],
     ], faces=[
         [0,1,2,3],	// bottom
         [0,4,5,1],	// front
         [1,5,6,2],	// right
         [2,6,7,3],	// back
         [3,7,4,0],	// left
         [4,7,6,5],	// top
     ]);
     // Inner polyhedron
     polyhedron(points=[
         // bottom points
         [ 1,1,-1 ],
         [ 9,1,-1 ],
         [ 9,9,-1 ],
         [ 1,9,-1 ],
         // top points
         [ 1,1,11 ],
         [ 9,1,11 ],
         [ 9,9,11 ],
         [ 1,9,11 ],
     ], faces=[
         [0,1,2,3],	// bottom
         [0,4,5,1],	// front
         [1,5,6,2],	// right
         [2,6,7,3],	// back
         [3,7,4,0],	// left
         [4,7,6,5],	// top
     ]);
 }

You could, if you really wanted to, directly define the polyhedron
that is the box, complete with both the outside faces, the inside
faces, the top faces, and the  bottom faces, but that's a little more
intricate:

 polyhedron(points=[
     // bottom outer points
     [ 0,0,0 ],
     [ 10,0,0 ],
     [ 10,10,0 ],
     [ 0,10,0 ],
     // top outer points
     [ 0,0,10 ],
     [ 10,0,10 ],
     [ 10,10,10 ],
     [ 0,10,10 ],
     // bottom inner points
     [ 1,1,0 ],
     [ 9,1,0 ],
     [ 9,9,0 ],
     [ 1,9,0 ],
     // top inner points
     [ 1,1,10 ],
     [ 9,1,10 ],
     [ 9,9,10 ],
     [ 1,9,10 ],
 ], faces=[
     // Outer faces
     [0,4,5,1],
     [1,5,6,2],
     [2,6,7,3],
     [3,7,4,0],
     // Inner faces
     [8,9,13,12],
     [9,10,14,13],
     [10,11,15,14],
     [11,8,12,15],
     // top faces
     [ 4,12,13,5 ],
     [ 5,13,14,6 ],
     [ 6,14,15,7 ],
     [ 7,15,12,4 ],
     // bottom faces
     [ 0,1,9,8 ],
     [ 1,2,10,9 ],
     [ 2,3,11,10 ],
     [ 3,0,8,11 ],
 ]);

I don't build polyhedra very often, because they can be very complex
to build, but when I do I find them strangely satisfying, placing each
point exactly where I want it and connecting them exactly as I want
them connected.  And they're really really fast.

So I've already noted.

But I changed my strategy since each piece has to be a closed piece or it
won't render.  And I started with the empty space in front, filling it
up with a 3d block, but I can't get the back face list order correct
even playing the 10,000 monkeys with those 4 face points.  If I get that
block working, then I make 2 wings that project to the rear, as mirrors
of each other, with a union() tying the common or overlapping edges
together into one printable piece. And of course there's a width (+-y)
taper error that is exagerating the width taper a noticeable bit, so
that has to be run down and fixed. I just fixed a similar z problem so I
will eventually find the magic twanger and print a test sample. And I
need more sleep than I got last night, which is not helping.

Thanks Jordan. Take care and stay well.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Tuesday 07 September 2021 13:56:24 Jordan Brown wrote: > On 9/7/2021 7:09 AM, Gene Heskett wrote: > > Is there a syntax that does allow a point x,y,z to be stated as > > (ignore the parens) > > [-var1+var2 (x position), var3-var4(y position), var5(z position)], > > > > ?? > > You're overthinking it.  It's just an array; the elements can be any > expression. > > [ -var1+var2, var3-var4, var5 ] > > > Others have said, but maybe not as simply and with examples:  you want > to define a polyhedron A that's the outside of the box, and another > polyhedron B that's the inside of the box (and out through the top and > bottom), and subtract B from A. > > If you wanted to do this with cubes, you'd do something like: > > difference() { > cube([10,10,10]); > translate([1,1,-1]) cube([8,8,12]); > } > > The concept is the same with polyhedra; they're just individually > harder to define: > > difference() { > // Outer polyhedron > polyhedron(points=[ > // bottom points > [ 0,0,0 ], > [ 10,0,0 ], > [ 10,10,0 ], > [ 0,10,0 ], > // top points > [ 0,0,10 ], > [ 10,0,10 ], > [ 10,10,10 ], > [ 0,10,10 ], > ], faces=[ > [0,1,2,3], // bottom > [0,4,5,1], // front > [1,5,6,2], // right > [2,6,7,3], // back > [3,7,4,0], // left > [4,7,6,5], // top > ]); > // Inner polyhedron > polyhedron(points=[ > // bottom points > [ 1,1,-1 ], > [ 9,1,-1 ], > [ 9,9,-1 ], > [ 1,9,-1 ], > // top points > [ 1,1,11 ], > [ 9,1,11 ], > [ 9,9,11 ], > [ 1,9,11 ], > ], faces=[ > [0,1,2,3], // bottom > [0,4,5,1], // front > [1,5,6,2], // right > [2,6,7,3], // back > [3,7,4,0], // left > [4,7,6,5], // top > ]); > } > > You could, if you really wanted to, directly define the polyhedron > that is the box, complete with both the outside faces, the inside > faces, the top faces, and the  bottom faces, but that's a little more > intricate: > > polyhedron(points=[ > // bottom outer points > [ 0,0,0 ], > [ 10,0,0 ], > [ 10,10,0 ], > [ 0,10,0 ], > // top outer points > [ 0,0,10 ], > [ 10,0,10 ], > [ 10,10,10 ], > [ 0,10,10 ], > // bottom inner points > [ 1,1,0 ], > [ 9,1,0 ], > [ 9,9,0 ], > [ 1,9,0 ], > // top inner points > [ 1,1,10 ], > [ 9,1,10 ], > [ 9,9,10 ], > [ 1,9,10 ], > ], faces=[ > // Outer faces > [0,4,5,1], > [1,5,6,2], > [2,6,7,3], > [3,7,4,0], > // Inner faces > [8,9,13,12], > [9,10,14,13], > [10,11,15,14], > [11,8,12,15], > // top faces > [ 4,12,13,5 ], > [ 5,13,14,6 ], > [ 6,14,15,7 ], > [ 7,15,12,4 ], > // bottom faces > [ 0,1,9,8 ], > [ 1,2,10,9 ], > [ 2,3,11,10 ], > [ 3,0,8,11 ], > ]); > > I don't build polyhedra very often, because they can be very complex > to build, but when I do I find them strangely satisfying, placing each > point exactly where I want it and connecting them exactly as I want > them connected.  And they're really really fast. So I've already noted. But I changed my strategy since each piece has to be a closed piece or it won't render. And I started with the empty space in front, filling it up with a 3d block, but I can't get the back face list order correct even playing the 10,000 monkeys with those 4 face points. If I get that block working, then I make 2 wings that project to the rear, as mirrors of each other, with a union() tying the common or overlapping edges together into one printable piece. And of course there's a width (+-y) taper error that is exagerating the width taper a noticeable bit, so that has to be run down and fixed. I just fixed a similar z problem so I will eventually find the magic twanger and print a test sample. And I need more sleep than I got last night, which is not helping. Thanks Jordan. Take care and stay well. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
RW
Rob Ward
Wed, Sep 8, 2021 5:13 AM

Polyhedron definitions were very frustrating until I found this web page:

https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/

I have been able to build some quite useful polyhedra since using this
tool/approach. It is slow work, but steady. The logic of building the
shape is better understood by going in small, verifiable steps at a
time, and hence debugging unintended results becomes much easier as
well. The overall designs for me were much quicker to create and errors
weren't buried in a soup of triangles.

Rob

On 7/9/21 10:07 pm, nop head wrote:

You can't take a face of the polyhedron to get an open box. It is not
a manifold solid because the walls would infinitely thin. If it is an
irregular shape that can't be linear_extruded then make two solid
polyhedra, one for the outside and one for the inside and subtract them.

You don't need variables for each point in the polyhedra, they can be
any expression.

On Tue, 7 Sept 2021 at 12:35, Ray West <raywest@raywest.com
mailto:raywest@raywest.com> wrote:

 On 07/09/2021 08:54, Ronaldo Persiano wrote:

So how do I reorder
to leave out the top and bottom, all I want are the sides which will
then be built up on the inside to do the job, effectively

 winding up on

the printer as a half box with a big difference removing about

 half the

box.

 I'm still not sure what it looks like to you, but to me, from the
 above
 description, it would be two polygons (not polyhedron) , one
 inside the
 other, extruded, and top and bottom chopped off however you want by
 differences.  That will give a solid, and you can add
 features/whatever,
 as you wish.
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
 <mailto:discuss-leave@lists.openscad.org>

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

Polyhedron definitions were very frustrating until I found this web page: https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/ I have been able to build some quite useful polyhedra since using this tool/approach. It is slow work, but steady. The logic of building the shape is better understood by going in small, verifiable steps at a time, and hence debugging unintended results becomes much easier as well. The overall designs for me were much quicker to create and errors weren't buried in a soup of triangles. Rob On 7/9/21 10:07 pm, nop head wrote: > You can't take a face of the polyhedron to get an open box. It is not > a manifold solid because the walls would infinitely thin. If it is an > irregular shape that can't be linear_extruded then make two solid > polyhedra, one for the outside and one for the inside and subtract them. > > You don't need variables for each point in the polyhedra, they can be > any expression. > > On Tue, 7 Sept 2021 at 12:35, Ray West <raywest@raywest.com > <mailto:raywest@raywest.com>> wrote: > > > On 07/09/2021 08:54, Ronaldo Persiano wrote: > > So how do I reorder > > to leave out the top and bottom, all I want are the sides which will > > then be built up on the inside to do the job, effectively > winding up on > > the printer as a half box with a big difference removing about > half the > > box. > > > I'm still not sure what it looks like to you, but to me, from the > above > description, it would be two polygons (not polyhedron) , one > inside the > other, extruded, and top and bottom chopped off however you want by > differences.  That will give a solid, and you can add > features/whatever, > as you wish. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > <mailto:discuss-leave@lists.openscad.org> > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
D
dpa
Wed, Sep 8, 2021 10:23 AM

I know this is offtopic but close to the problem "I don't get polyhedron to
work".
I am too lazy for the Polyhedron chaos. If you do too, and have a lot of
points with something simple like a cube I suggest using hull() with small
spheres. It is, compared to the polyhedron, VERY simple. For example I take
the points in Robs link:

p = [
[-5,-5,0]
, [15,-5,0]
, [-5,15,0]
, [15,15,0]
, [0,0,10]
, [0,10,10]
, [10, 0,10]
, [10,10,10]
, [5,5,15]
];

// sphere diameter. To get the correct dimension it should be 0 but you
need something >0
d = 0.0001;

// this takes all points (in any order) and makes a 3D object:
hull() {
for (i=[0 : 1 : len(p)-1]) {
translate(p[i]) sphere(d);
}
}

This is not correct because it is always oversized. But in case of 3D-Print
or something similar +0.0001 doesn't matter and you don't need to build a
3D object first to understand the points and geometry to be able to
construct the virtual 3D object to get the right polyhedron. :)

Am Mi., 8. Sept. 2021 um 07:14 Uhr schrieb Rob Ward rl.ward@bigpond.com:

Polyhedron definitions were very frustrating until I found this web page:

https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/

I have been able to build some quite useful polyhedra since using this
tool/approach. It is slow work, but steady. The logic of building the shape
is better understood by going in small, verifiable steps at a time, and
hence debugging unintended results becomes much easier as well. The overall
designs for me were much quicker to create and errors weren't buried in a
soup of triangles.

Rob
On 7/9/21 10:07 pm, nop head wrote:

You can't take a face of the polyhedron to get an open box. It is not a
manifold solid because the walls would infinitely thin. If it is an
irregular shape that can't be linear_extruded then make two solid
polyhedra, one for the outside and one for the inside and subtract them.

You don't need variables for each point in the polyhedra, they can be any
expression.

On Tue, 7 Sept 2021 at 12:35, Ray West raywest@raywest.com wrote:

On 07/09/2021 08:54, Ronaldo Persiano wrote:

So how do I reorder
to leave out the top and bottom, all I want are the sides which will
then be built up on the inside to do the job, effectively winding up on
the printer as a half box with a big difference removing about half the
box.

I'm still not sure what it looks like to you, but to me, from the above
description, it would be two polygons (not polyhedron) , one inside the
other, extruded, and top and bottom chopped off however you want by
differences.  That will give a solid, and you can add features/whatever,
as you wish.


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

I know this is offtopic but close to the problem "I don't get polyhedron to work". I am too lazy for the Polyhedron chaos. If you do too, and have a lot of points with something simple like a cube I suggest using hull() with small spheres. It is, compared to the polyhedron, VERY simple. For example I take the points in Robs link: p = [ [-5,-5,0] , [15,-5,0] , [-5,15,0] , [15,15,0] , [0,0,10] , [0,10,10] , [10, 0,10] , [10,10,10] , [5,5,15] ]; // sphere diameter. To get the correct dimension it should be 0 but you need something >0 d = 0.0001; // this takes all points (in any order) and makes a 3D object: hull() { for (i=[0 : 1 : len(p)-1]) { translate(p[i]) sphere(d); } } This is not correct because it is always oversized. But in case of 3D-Print or something similar +0.0001 doesn't matter and you don't need to build a 3D object first to understand the points and geometry to be able to construct the virtual 3D object to get the right polyhedron. :) Am Mi., 8. Sept. 2021 um 07:14 Uhr schrieb Rob Ward <rl.ward@bigpond.com>: > Polyhedron definitions were very frustrating until I found this web page: > > > https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/ > > I have been able to build some quite useful polyhedra since using this > tool/approach. It is slow work, but steady. The logic of building the shape > is better understood by going in small, verifiable steps at a time, and > hence debugging unintended results becomes much easier as well. The overall > designs for me were much quicker to create and errors weren't buried in a > soup of triangles. > > Rob > On 7/9/21 10:07 pm, nop head wrote: > > You can't take a face of the polyhedron to get an open box. It is not a > manifold solid because the walls would infinitely thin. If it is an > irregular shape that can't be linear_extruded then make two solid > polyhedra, one for the outside and one for the inside and subtract them. > > You don't need variables for each point in the polyhedra, they can be any > expression. > > On Tue, 7 Sept 2021 at 12:35, Ray West <raywest@raywest.com> wrote: > >> >> On 07/09/2021 08:54, Ronaldo Persiano wrote: >> > So how do I reorder >> > to leave out the top and bottom, all I want are the sides which will >> > then be built up on the inside to do the job, effectively winding up on >> > the printer as a half box with a big difference removing about half the >> > box. >> >> >> I'm still not sure what it looks like to you, but to me, from the above >> description, it would be two polygons (not polyhedron) , one inside the >> other, extruded, and top and bottom chopped off however you want by >> differences. That will give a solid, and you can add features/whatever, >> as you wish. >> _______________________________________________ >> 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 >
FH
Father Horton
Wed, Sep 8, 2021 12:09 PM

The downside is that hulls are slow.

On Wed, Sep 8, 2021 at 5:23 AM dpa sc@pankd.de wrote:

I know this is offtopic but close to the problem "I don't get
polyhedron to work".
I am too lazy for the Polyhedron chaos. If you do too, and have a lot of
points with something simple like a cube I suggest using hull() with small
spheres. It is, compared to the polyhedron, VERY simple. For example I take
the points in Robs link:

p = [
[-5,-5,0]
, [15,-5,0]
, [-5,15,0]
, [15,15,0]
, [0,0,10]
, [0,10,10]
, [10, 0,10]
, [10,10,10]
, [5,5,15]
];

// sphere diameter. To get the correct dimension it should be 0 but you
need something >0
d = 0.0001;

// this takes all points (in any order) and makes a 3D object:
hull() {
for (i=[0 : 1 : len(p)-1]) {
translate(p[i]) sphere(d);
}
}

This is not correct because it is always oversized. But in case of
3D-Print or something similar +0.0001 doesn't matter and you don't need to
build a 3D object first to understand the points and geometry to be able to
construct the virtual 3D object to get the right polyhedron. :)

Am Mi., 8. Sept. 2021 um 07:14 Uhr schrieb Rob Ward rl.ward@bigpond.com:

Polyhedron definitions were very frustrating until I found this web page:

https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/

I have been able to build some quite useful polyhedra since using this
tool/approach. It is slow work, but steady. The logic of building the shape
is better understood by going in small, verifiable steps at a time, and
hence debugging unintended results becomes much easier as well. The overall
designs for me were much quicker to create and errors weren't buried in a
soup of triangles.

Rob
On 7/9/21 10:07 pm, nop head wrote:

You can't take a face of the polyhedron to get an open box. It is not a
manifold solid because the walls would infinitely thin. If it is an
irregular shape that can't be linear_extruded then make two solid
polyhedra, one for the outside and one for the inside and subtract them.

You don't need variables for each point in the polyhedra, they can be any
expression.

On Tue, 7 Sept 2021 at 12:35, Ray West raywest@raywest.com wrote:

On 07/09/2021 08:54, Ronaldo Persiano wrote:

So how do I reorder
to leave out the top and bottom, all I want are the sides which will
then be built up on the inside to do the job, effectively winding up on
the printer as a half box with a big difference removing about half the
box.

I'm still not sure what it looks like to you, but to me, from the above
description, it would be two polygons (not polyhedron) , one inside the
other, extruded, and top and bottom chopped off however you want by
differences.  That will give a solid, and you can add features/whatever,
as you wish.


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

The downside is that hulls are slow. On Wed, Sep 8, 2021 at 5:23 AM dpa <sc@pankd.de> wrote: > I know this is offtopic but close to the problem "I don't get > polyhedron to work". > I am too lazy for the Polyhedron chaos. If you do too, and have a lot of > points with something simple like a cube I suggest using hull() with small > spheres. It is, compared to the polyhedron, VERY simple. For example I take > the points in Robs link: > > p = [ > [-5,-5,0] > , [15,-5,0] > , [-5,15,0] > , [15,15,0] > , [0,0,10] > , [0,10,10] > , [10, 0,10] > , [10,10,10] > , [5,5,15] > ]; > > // sphere diameter. To get the correct dimension it should be 0 but you > need something >0 > d = 0.0001; > > // this takes all points (in any order) and makes a 3D object: > hull() { > for (i=[0 : 1 : len(p)-1]) { > translate(p[i]) sphere(d); > } > } > > This is not correct because it is always oversized. But in case of > 3D-Print or something similar +0.0001 doesn't matter and you don't need to > build a 3D object first to understand the points and geometry to be able to > construct the virtual 3D object to get the right polyhedron. :) > > Am Mi., 8. Sept. 2021 um 07:14 Uhr schrieb Rob Ward <rl.ward@bigpond.com>: > >> Polyhedron definitions were very frustrating until I found this web page: >> >> >> https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/ >> >> I have been able to build some quite useful polyhedra since using this >> tool/approach. It is slow work, but steady. The logic of building the shape >> is better understood by going in small, verifiable steps at a time, and >> hence debugging unintended results becomes much easier as well. The overall >> designs for me were much quicker to create and errors weren't buried in a >> soup of triangles. >> >> Rob >> On 7/9/21 10:07 pm, nop head wrote: >> >> You can't take a face of the polyhedron to get an open box. It is not a >> manifold solid because the walls would infinitely thin. If it is an >> irregular shape that can't be linear_extruded then make two solid >> polyhedra, one for the outside and one for the inside and subtract them. >> >> You don't need variables for each point in the polyhedra, they can be any >> expression. >> >> On Tue, 7 Sept 2021 at 12:35, Ray West <raywest@raywest.com> wrote: >> >>> >>> On 07/09/2021 08:54, Ronaldo Persiano wrote: >>> > So how do I reorder >>> > to leave out the top and bottom, all I want are the sides which will >>> > then be built up on the inside to do the job, effectively winding up on >>> > the printer as a half box with a big difference removing about half the >>> > box. >>> >>> >>> I'm still not sure what it looks like to you, but to me, from the above >>> description, it would be two polygons (not polyhedron) , one inside the >>> other, extruded, and top and bottom chopped off however you want by >>> differences. That will give a solid, and you can add features/whatever, >>> as you wish. >>> _______________________________________________ >>> 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 >
NH
nop head
Wed, Sep 8, 2021 12:50 PM

They are only slow if the objects inside need to be unioned. It is the CGAL
union that is slow. Turning on lazy union might speed it up.

If you translate all the spheres individually then the unionin is avoided
and it is fast. E.g.

translate(p[0]) sphere(d);
translate(p[1]) sphere(d);
...
translate(p[8]) sphere(d);

But that is tedious if it is a list.

On Wed, 8 Sept 2021 at 13:10, Father Horton fatherhorton@gmail.com wrote:

The downside is that hulls are slow.

On Wed, Sep 8, 2021 at 5:23 AM dpa sc@pankd.de wrote:

I know this is offtopic but close to the problem "I don't get
polyhedron to work".
I am too lazy for the Polyhedron chaos. If you do too, and have a lot of
points with something simple like a cube I suggest using hull() with small
spheres. It is, compared to the polyhedron, VERY simple. For example I take
the points in Robs link:

p = [
[-5,-5,0]
, [15,-5,0]
, [-5,15,0]
, [15,15,0]
, [0,0,10]
, [0,10,10]
, [10, 0,10]
, [10,10,10]
, [5,5,15]
];

// sphere diameter. To get the correct dimension it should be 0 but you
need something >0
d = 0.0001;

// this takes all points (in any order) and makes a 3D object:
hull() {
for (i=[0 : 1 : len(p)-1]) {
translate(p[i]) sphere(d);
}
}

This is not correct because it is always oversized. But in case of
3D-Print or something similar +0.0001 doesn't matter and you don't need to
build a 3D object first to understand the points and geometry to be able to
construct the virtual 3D object to get the right polyhedron. :)

Am Mi., 8. Sept. 2021 um 07:14 Uhr schrieb Rob Ward <rl.ward@bigpond.com

:

Polyhedron definitions were very frustrating until I found this web page:

https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/

I have been able to build some quite useful polyhedra since using this
tool/approach. It is slow work, but steady. The logic of building the shape
is better understood by going in small, verifiable steps at a time, and
hence debugging unintended results becomes much easier as well. The overall
designs for me were much quicker to create and errors weren't buried in a
soup of triangles.

Rob
On 7/9/21 10:07 pm, nop head wrote:

You can't take a face of the polyhedron to get an open box. It is not a
manifold solid because the walls would infinitely thin. If it is an
irregular shape that can't be linear_extruded then make two solid
polyhedra, one for the outside and one for the inside and subtract them.

You don't need variables for each point in the polyhedra, they can be
any expression.

On Tue, 7 Sept 2021 at 12:35, Ray West raywest@raywest.com wrote:

On 07/09/2021 08:54, Ronaldo Persiano wrote:

So how do I reorder
to leave out the top and bottom, all I want are the sides which will
then be built up on the inside to do the job, effectively winding up

on

the printer as a half box with a big difference removing about half

the

box.

I'm still not sure what it looks like to you, but to me, from the above
description, it would be two polygons (not polyhedron) , one inside the
other, extruded, and top and bottom chopped off however you want by
differences.  That will give a solid, and you can add
features/whatever,
as you wish.


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


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


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


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


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

They are only slow if the objects inside need to be unioned. It is the CGAL union that is slow. Turning on lazy union might speed it up. If you translate all the spheres individually then the unionin is avoided and it is fast. E.g. translate(p[0]) sphere(d); translate(p[1]) sphere(d); ... translate(p[8]) sphere(d); But that is tedious if it is a list. On Wed, 8 Sept 2021 at 13:10, Father Horton <fatherhorton@gmail.com> wrote: > The downside is that hulls are slow. > > On Wed, Sep 8, 2021 at 5:23 AM dpa <sc@pankd.de> wrote: > >> I know this is offtopic but close to the problem "I don't get >> polyhedron to work". >> I am too lazy for the Polyhedron chaos. If you do too, and have a lot of >> points with something simple like a cube I suggest using hull() with small >> spheres. It is, compared to the polyhedron, VERY simple. For example I take >> the points in Robs link: >> >> p = [ >> [-5,-5,0] >> , [15,-5,0] >> , [-5,15,0] >> , [15,15,0] >> , [0,0,10] >> , [0,10,10] >> , [10, 0,10] >> , [10,10,10] >> , [5,5,15] >> ]; >> >> // sphere diameter. To get the correct dimension it should be 0 but you >> need something >0 >> d = 0.0001; >> >> // this takes all points (in any order) and makes a 3D object: >> hull() { >> for (i=[0 : 1 : len(p)-1]) { >> translate(p[i]) sphere(d); >> } >> } >> >> This is not correct because it is always oversized. But in case of >> 3D-Print or something similar +0.0001 doesn't matter and you don't need to >> build a 3D object first to understand the points and geometry to be able to >> construct the virtual 3D object to get the right polyhedron. :) >> >> Am Mi., 8. Sept. 2021 um 07:14 Uhr schrieb Rob Ward <rl.ward@bigpond.com >> >: >> >>> Polyhedron definitions were very frustrating until I found this web page: >>> >>> >>> https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-polyhedrons-in-openscad/ >>> >>> I have been able to build some quite useful polyhedra since using this >>> tool/approach. It is slow work, but steady. The logic of building the shape >>> is better understood by going in small, verifiable steps at a time, and >>> hence debugging unintended results becomes much easier as well. The overall >>> designs for me were much quicker to create and errors weren't buried in a >>> soup of triangles. >>> >>> Rob >>> On 7/9/21 10:07 pm, nop head wrote: >>> >>> You can't take a face of the polyhedron to get an open box. It is not a >>> manifold solid because the walls would infinitely thin. If it is an >>> irregular shape that can't be linear_extruded then make two solid >>> polyhedra, one for the outside and one for the inside and subtract them. >>> >>> You don't need variables for each point in the polyhedra, they can be >>> any expression. >>> >>> On Tue, 7 Sept 2021 at 12:35, Ray West <raywest@raywest.com> wrote: >>> >>>> >>>> On 07/09/2021 08:54, Ronaldo Persiano wrote: >>>> > So how do I reorder >>>> > to leave out the top and bottom, all I want are the sides which will >>>> > then be built up on the inside to do the job, effectively winding up >>>> on >>>> > the printer as a half box with a big difference removing about half >>>> the >>>> > box. >>>> >>>> >>>> I'm still not sure what it looks like to you, but to me, from the above >>>> description, it would be two polygons (not polyhedron) , one inside the >>>> other, extruded, and top and bottom chopped off however you want by >>>> differences. That will give a solid, and you can add >>>> features/whatever, >>>> as you wish. >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
DM
Douglas Miller
Wed, Sep 8, 2021 12:54 PM

On 9/7/2021 10:09 AM, Gene Heskett wrote:

That I had whupped until I removed the top and bottom faces I don't need,

Right, because now you no longer have a valid solid. You just have four
faces with zero thickness.

So I next defined an inner polyhedron to be 1.5 mm smaller in xy and

Yep. That's the next step.

declared a union of the bigger one and the smaller one inside it. but I
didn't get the expected solid walls, but a smaller box within the first
one.

Union() combines two objects, so what you got /is/ the expected result.
You want the difference() of the two objects instead.

On 9/7/2021 10:09 AM, Gene Heskett wrote: > That I had whupped until I removed the top and bottom faces I don't need, Right, because now you no longer have a valid solid. You just have four faces with zero thickness. > So I next defined an inner polyhedron to be 1.5 mm smaller in xy and Yep. That's the next step. > declared a union of the bigger one and the smaller one inside it. but I > didn't get the expected solid walls, but a smaller box within the first > one. Union() combines two objects, so what you got /is/ the expected result. You want the difference() of the two objects instead.
GH
Gene Heskett
Wed, Sep 8, 2021 1:13 PM

On Wednesday 08 September 2021 01:13:49 Rob Ward wrote:

Polyhedron definitions were very frustrating until I found this web
page:

https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-poly
hedrons-in-openscad/

Thank you very much for the above link, Rob, that showed me how to fix
the faces order rather precisely in about 15 minutes including typing it
in. A very useful tool indeed. Now I can concentrate on fine tuning the
points to get the tapers under control and get this show on the road.

I have been able to build some quite useful polyhedra since using this
tool/approach. It is slow work, but steady. The logic of building the
shape is better understood by going in small, verifiable steps at a
time, and hence debugging unintended results becomes much easier as
well. The overall designs for me were much quicker to create and
errors weren't buried in a soup of triangles.

Rob

On 7/9/21 10:07 pm, nop head wrote:

You can't take a face of the polyhedron to get an open box. It is
not a manifold solid because the walls would infinitely thin. If it
is an irregular shape that can't be linear_extruded then make two
solid polyhedra, one for the outside and one for the inside and
subtract them.

For this 3d print job, once the vars are properly defined, a union of 3
polyhedra will do it as the last 2 should be y, -y mirrors of each
other.

You don't need variables for each point in the polyhedra, they can
be any expression.

Yes, I have since found the syntax that works, but its better to
predefine it, calculating it once, than to calculate it for every point
in an list array.

Reusable pre-defined vars are the way to accurate work IMO. You omly have
to do it right once.

You make mirrors by putting a - sign in front of the varname.

On Tue, 7 Sept 2021 at 12:35, Ray West <raywest@raywest.com
mailto:raywest@raywest.com> wrote:

 On 07/09/2021 08:54, Ronaldo Persiano wrote:

So how do I reorder
to leave out the top and bottom, all I want are the sides
which will then be built up on the inside to do the job,
effectively

 winding up on

the printer as a half box with a big difference removing about

 half the

box.

That idea is in the dustbin. Just unioning the 3 polyhedra should be able
to do it. As a math challenged old fart, I may have to ask a trig
question before I'm done. But right now I can go back to bed for the
rest of the night with a BWG on my face.  Thank you.

Cheers, Gene Heskett

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.

On Wednesday 08 September 2021 01:13:49 Rob Ward wrote: > Polyhedron definitions were very frustrating until I found this web > page: > > https://gusmith.wordpress.com/2015/09/18/simple-tool-for-creating-poly >hedrons-in-openscad/ Thank you very much for the above link, Rob, that showed me how to fix the faces order rather precisely in about 15 minutes including typing it in. A very useful tool indeed. Now I can concentrate on fine tuning the points to get the tapers under control and get this show on the road. > I have been able to build some quite useful polyhedra since using this > tool/approach. It is slow work, but steady. The logic of building the > shape is better understood by going in small, verifiable steps at a > time, and hence debugging unintended results becomes much easier as > well. The overall designs for me were much quicker to create and > errors weren't buried in a soup of triangles. > > Rob > > On 7/9/21 10:07 pm, nop head wrote: > > You can't take a face of the polyhedron to get an open box. It is > > not a manifold solid because the walls would infinitely thin. If it > > is an irregular shape that can't be linear_extruded then make two > > solid polyhedra, one for the outside and one for the inside and > > subtract them. For this 3d print job, once the vars are properly defined, a union of 3 polyhedra will do it as the last 2 should be y, -y mirrors of each other. > > You don't need variables for each point in the polyhedra, they can > > be any expression. Yes, I have since found the syntax that works, but its better to predefine it, calculating it once, than to calculate it for every point in an list array. Reusable pre-defined vars are the way to accurate work IMO. You omly have to do it right once. You make mirrors by putting a - sign in front of the varname. > > On Tue, 7 Sept 2021 at 12:35, Ray West <raywest@raywest.com > > <mailto:raywest@raywest.com>> wrote: > > > > On 07/09/2021 08:54, Ronaldo Persiano wrote: > > > So how do I reorder > > > to leave out the top and bottom, all I want are the sides > > > which will then be built up on the inside to do the job, > > > effectively > > > > winding up on > > > > > the printer as a half box with a big difference removing about > > > > half the > > > > > box. That idea is in the dustbin. Just unioning the 3 polyhedra should be able to do it. As a math challenged old fart, I may have to ask a trig question before I'm done. But right now I can go back to bed for the rest of the night with a BWG on my face. Thank you. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>