discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

making hexagonal holes into a polyhedron.....

BB
Bruno Boettcher
Sun, Dec 17, 2023 10:04 PM

hello!
Once again something that looked fairly simple in the start got to a huge
headache....

i hope the attachment goes through, there you can see my actual tries to
get this working....
it started by wanting to remix a nice fountain found on thingieverse, but
where the sizes were just so wrong for me that my available pump didn't fit
into it....

So I needed some slanted outer walls, and pierced inner walls, since the
theme was hexagons, I did everything in hexagons.....

I started by using cubes, but the slanting didn't go too well.... so I
started with a polygon, but the need for a splash guard on certain walls
arose .... so  I went polyhedron.....

i noticed that my polyhedron had some funny features depending on the angle
looking onto it, but on compiling it didn't complain AFAIK.....

for the hole i still tried to go 2D first, with a lot of pain to my old
brain, i finally managed to get a centered and working hex grid....
extruded it and diffed it with the polyhedron, and now it looks frankly
weird..... nearly all of the polyhedron is gone and compiling well i get
the dreaded mesh is not closed.....

integrating the hexes directly into the polyhedron will be a major pain
considering my incompetence...  So if someone might be kind enough to point
out what I did wrong?

--
ciao
Bruno

---==========
http://nohkumado.eu/, http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr

hello! Once again something that looked fairly simple in the start got to a huge headache.... i hope the attachment goes through, there you can see my actual tries to get this working.... it started by wanting to remix a nice fountain found on thingieverse, but where the sizes were just so wrong for me that my available pump didn't fit into it.... So I needed some slanted outer walls, and pierced inner walls, since the theme was hexagons, I did everything in hexagons..... I started by using cubes, but the slanting didn't go too well.... so I started with a polygon, but the need for a splash guard on certain walls arose .... so I went polyhedron..... i noticed that my polyhedron had some funny features depending on the angle looking onto it, but on compiling it didn't complain AFAIK..... for the hole i still tried to go 2D first, with a lot of pain to my old brain, i finally managed to get a centered and working hex grid.... extruded it and diffed it with the polyhedron, and now it looks frankly weird..... nearly all of the polyhedron is gone and compiling well i get the dreaded mesh is not closed..... integrating the hexes directly into the polyhedron will be a major pain considering my incompetence... So if someone might be kind enough to point out what I did wrong? -- ciao Bruno =========================================== http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, <http://bboett.free.fr> http://aikido.zorn.free.fr
SP
Sanjeev Prabhakar
Mon, Dec 18, 2023 1:51 AM

if you press f12, it shows the top face turns "magenta", that means it is
not closed.
You need to check that

On Mon, 18 Dec 2023 at 03:35, Bruno Boettcher via Discuss <
discuss@lists.openscad.org> wrote:

hello!
Once again something that looked fairly simple in the start got to a huge
headache....

i hope the attachment goes through, there you can see my actual tries to
get this working....
it started by wanting to remix a nice fountain found on thingieverse, but
where the sizes were just so wrong for me that my available pump didn't fit
into it....

So I needed some slanted outer walls, and pierced inner walls, since the
theme was hexagons, I did everything in hexagons.....

I started by using cubes, but the slanting didn't go too well.... so I
started with a polygon, but the need for a splash guard on certain walls
arose .... so  I went polyhedron.....

i noticed that my polyhedron had some funny features depending on the
angle looking onto it, but on compiling it didn't complain AFAIK.....

for the hole i still tried to go 2D first, with a lot of pain to my old
brain, i finally managed to get a centered and working hex grid....
extruded it and diffed it with the polyhedron, and now it looks frankly
weird..... nearly all of the polyhedron is gone and compiling well i get
the dreaded mesh is not closed.....

integrating the hexes directly into the polyhedron will be a major pain
considering my incompetence...  So if someone might be kind enough to point
out what I did wrong?

--
ciao
Bruno

---==========
http://nohkumado.eu/, http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr


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

if you press f12, it shows the top face turns "magenta", that means it is not closed. You need to check that On Mon, 18 Dec 2023 at 03:35, Bruno Boettcher via Discuss < discuss@lists.openscad.org> wrote: > hello! > Once again something that looked fairly simple in the start got to a huge > headache.... > > i hope the attachment goes through, there you can see my actual tries to > get this working.... > it started by wanting to remix a nice fountain found on thingieverse, but > where the sizes were just so wrong for me that my available pump didn't fit > into it.... > > So I needed some slanted outer walls, and pierced inner walls, since the > theme was hexagons, I did everything in hexagons..... > > I started by using cubes, but the slanting didn't go too well.... so I > started with a polygon, but the need for a splash guard on certain walls > arose .... so I went polyhedron..... > > i noticed that my polyhedron had some funny features depending on the > angle looking onto it, but on compiling it didn't complain AFAIK..... > > for the hole i still tried to go 2D first, with a lot of pain to my old > brain, i finally managed to get a centered and working hex grid.... > extruded it and diffed it with the polyhedron, and now it looks frankly > weird..... nearly all of the polyhedron is gone and compiling well i get > the dreaded mesh is not closed..... > > integrating the hexes directly into the polyhedron will be a major pain > considering my incompetence... So if someone might be kind enough to point > out what I did wrong? > > -- > ciao > Bruno > > =========================================== > http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, > <http://bboett.free.fr> > http://aikido.zorn.free.fr > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Mon, Dec 18, 2023 2:11 AM

Is this you are looking for?
[image: Screenshot 2023-12-18 at 7.38.57 AM.png]

python code for the same is in the left window

On Mon, 18 Dec 2023 at 07:21, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

if you press f12, it shows the top face turns "magenta", that means it is
not closed.
You need to check that

On Mon, 18 Dec 2023 at 03:35, Bruno Boettcher via Discuss <
discuss@lists.openscad.org> wrote:

hello!
Once again something that looked fairly simple in the start got to a huge
headache....

i hope the attachment goes through, there you can see my actual tries to
get this working....
it started by wanting to remix a nice fountain found on thingieverse, but
where the sizes were just so wrong for me that my available pump didn't fit
into it....

So I needed some slanted outer walls, and pierced inner walls, since the
theme was hexagons, I did everything in hexagons.....

I started by using cubes, but the slanting didn't go too well.... so I
started with a polygon, but the need for a splash guard on certain walls
arose .... so  I went polyhedron.....

i noticed that my polyhedron had some funny features depending on the
angle looking onto it, but on compiling it didn't complain AFAIK.....

for the hole i still tried to go 2D first, with a lot of pain to my old
brain, i finally managed to get a centered and working hex grid....
extruded it and diffed it with the polyhedron, and now it looks frankly
weird..... nearly all of the polyhedron is gone and compiling well i get
the dreaded mesh is not closed.....

integrating the hexes directly into the polyhedron will be a major pain
considering my incompetence...  So if someone might be kind enough to point
out what I did wrong?

--
ciao
Bruno

---==========
http://nohkumado.eu/, http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr


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

Is this you are looking for? [image: Screenshot 2023-12-18 at 7.38.57 AM.png] python code for the same is in the left window On Mon, 18 Dec 2023 at 07:21, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > if you press f12, it shows the top face turns "magenta", that means it is > not closed. > You need to check that > > On Mon, 18 Dec 2023 at 03:35, Bruno Boettcher via Discuss < > discuss@lists.openscad.org> wrote: > >> hello! >> Once again something that looked fairly simple in the start got to a huge >> headache.... >> >> i hope the attachment goes through, there you can see my actual tries to >> get this working.... >> it started by wanting to remix a nice fountain found on thingieverse, but >> where the sizes were just so wrong for me that my available pump didn't fit >> into it.... >> >> So I needed some slanted outer walls, and pierced inner walls, since the >> theme was hexagons, I did everything in hexagons..... >> >> I started by using cubes, but the slanting didn't go too well.... so I >> started with a polygon, but the need for a splash guard on certain walls >> arose .... so I went polyhedron..... >> >> i noticed that my polyhedron had some funny features depending on the >> angle looking onto it, but on compiling it didn't complain AFAIK..... >> >> for the hole i still tried to go 2D first, with a lot of pain to my old >> brain, i finally managed to get a centered and working hex grid.... >> extruded it and diffed it with the polyhedron, and now it looks frankly >> weird..... nearly all of the polyhedron is gone and compiling well i get >> the dreaded mesh is not closed..... >> >> integrating the hexes directly into the polyhedron will be a major pain >> considering my incompetence... So if someone might be kind enough to point >> out what I did wrong? >> >> -- >> ciao >> Bruno >> >> =========================================== >> http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, >> <http://bboett.free.fr> >> http://aikido.zorn.free.fr >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
L
larry
Mon, Dec 18, 2023 2:21 AM

On Sun, 2023-12-17 at 23:04 +0100, Bruno Boettcher via Discuss wrote:

hello!
Once again something that looked fairly simple in the start got to a
huge headache....

i hope the attachment goes through, there you can see my actual tries
to get this working....
it started by wanting to remix a nice fountain found on thingieverse,
but where the sizes were just so wrong for me that my available pump
didn't fit into it....

It might be easier to help you if you would either supply a link to the
Thingiverse model, or to describe approximately what you are trying to
make.

So I needed some slanted outer walls, and pierced inner walls, since
the theme was hexagons, I did everything in hexagons.....

So is it a cube with slanted walls, perforated with hexagons?
If so, try something like this.

difference() {
hull() {
cube ([30,200,0.1], center=true);
translate ([0,0,200]) cube([26,190,0.1],center=true);
}
translate ([0,75,20])hexagon();
}

module hexagon() {
rotate([0,0,0])rotate([90,0,90])
#cylinder(50,18,18,center=true,$fn=6);
}

I started by using cubes, but the slanting didn't go too well.... so
I started with a polygon, but the need for a splash guard on certain
walls arose .... so  I went polyhedron.....

i noticed that my polyhedron had some funny features depending on the
angle looking onto it, but on compiling it didn't complain AFAIK.....

for the hole i still tried to go 2D first, with a lot of pain to my
old brain, i finally managed to get a centered and working hex
grid.... extruded it and diffed it with the polyhedron, and now it
looks frankly weird..... nearly all of the polyhedron is gone and
compiling well i get the dreaded mesh is not closed.....

integrating the hexes directly into the polyhedron will be a major
pain considering my incompetence...  So if someone might be kind
enough to point out what I did wrong?

--
ciao
Bruno

---==========
http://nohkumado.eu/, http://aikido.nohkumado.eu/,
http://aikido.zorn.free.fr


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

On Sun, 2023-12-17 at 23:04 +0100, Bruno Boettcher via Discuss wrote: > hello! > Once again something that looked fairly simple in the start got to a > huge headache.... > > i hope the attachment goes through, there you can see my actual tries > to get this working.... > it started by wanting to remix a nice fountain found on thingieverse, > but where the sizes were just so wrong for me that my available pump > didn't fit into it.... > It might be easier to help you if you would either supply a link to the Thingiverse model, or to describe approximately what you are trying to make. > So I needed some slanted outer walls, and pierced inner walls, since > the theme was hexagons, I did everything in hexagons..... So is it a cube with slanted walls, perforated with hexagons? If so, try something like this. difference() { hull() { cube ([30,200,0.1], center=true); translate ([0,0,200]) cube([26,190,0.1],center=true); } translate ([0,75,20])hexagon(); } module hexagon() { rotate([0,0,0])rotate([90,0,90]) #cylinder(50,18,18,center=true,$fn=6); } > I started by using cubes, but the slanting didn't go too well.... so > I started with a polygon, but the need for a splash guard on certain > walls arose .... so  I went polyhedron..... > > i noticed that my polyhedron had some funny features depending on the > angle looking onto it, but on compiling it didn't complain AFAIK..... > > for the hole i still tried to go 2D first, with a lot of pain to my > old brain, i finally managed to get a centered and working hex > grid.... extruded it and diffed it with the polyhedron, and now it > looks frankly weird..... nearly all of the polyhedron is gone and > compiling well i get the dreaded mesh is not closed..... > > integrating the hexes directly into the polyhedron will be a major > pain considering my incompetence...  So if someone might be kind > enough to point out what I did wrong? > > -- > ciao > Bruno > > =========================================== > http://nohkumado.eu/, http://aikido.nohkumado.eu/, > http://aikido.zorn.free.fr > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
BB
Bruno Boettcher
Mon, Dec 18, 2023 8:43 AM

Hello!
well as usual it started with a thing like
https://www.thingiverse.com/thing:5429421 and then i thought i could use
those hexwalls for other stuff as well, so i wanted to add that kind of
wall to my library...

Am Mo., 18. Dez. 2023 um 03:21 Uhr schrieb larry via Discuss <
discuss@lists.openscad.org>:

On Sun, 2023-12-17 at 23:04 +0100, Bruno Boettcher via Discuss wrote:
So is it a cube with slanted walls, perforated with hexagons?
If so, try something like this.

difference() {
hull() {
cube ([30,200,0.1], center=true);
translate ([0,0,200]) cube([26,190,0.1],center=true);
}
translate ([0,75,20])hexagon();
}

module hexagon() {
rotate([0,0,0])rotate([90,0,90])
#cylinder(50,18,18,center=true,$fn=6);
}

I started indeed with something like this, but the need arose to have the
point up or not, to have only half
a hexagon drawn or not etc, thus I built it explicitly with a polygon......

Since I am not very smart it took me some time for example to understand
that you can't mirror a hex grid where the flat sides
are down, so when you put 2 hexagon cups side by side, well the touching
walls are turned by 180° and thus don't overlap....

even with the points up, without filling in the half hexagons, in the above
case you end up with non symmetries that pose problems.... (if you want
something nice looking)....

so for the wall without splash guard (and those for the moment i don't need
pierced) thanks Sanjeev pointing out my error with the top side surface, it
nearly works now, preview is still horrible,  and on compiling i get the
not valid 2 manifold warning but it compiles, now i am off slanting also
the hex_grid pattern....

--
ciao
Bruno

---==========
http://nohkumado.eu/, http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr

Hello! well as usual it started with a thing like https://www.thingiverse.com/thing:5429421 and then i thought i could use those hexwalls for other stuff as well, so i wanted to add that kind of wall to my library... Am Mo., 18. Dez. 2023 um 03:21 Uhr schrieb larry via Discuss < discuss@lists.openscad.org>: > On Sun, 2023-12-17 at 23:04 +0100, Bruno Boettcher via Discuss wrote: > So is it a cube with slanted walls, perforated with hexagons? > If so, try something like this. > > difference() { > hull() { > cube ([30,200,0.1], center=true); > translate ([0,0,200]) cube([26,190,0.1],center=true); > } > translate ([0,75,20])hexagon(); > } > > module hexagon() { > rotate([0,0,0])rotate([90,0,90]) > #cylinder(50,18,18,center=true,$fn=6); > } > I started indeed with something like this, but the need arose to have the point up or not, to have only half a hexagon drawn or not etc, thus I built it explicitly with a polygon...... Since I am not very smart it took me some time for example to understand that you can't mirror a hex grid where the flat sides are down, so when you put 2 hexagon cups side by side, well the touching walls are turned by 180° and thus don't overlap.... even with the points up, without filling in the half hexagons, in the above case you end up with non symmetries that pose problems.... (if you want something nice looking).... so for the wall without splash guard (and those for the moment i don't need pierced) thanks Sanjeev pointing out my error with the top side surface, it nearly works now, preview is still horrible, and on compiling i get the not valid 2 manifold warning but it compiles, now i am off slanting also the hex_grid pattern.... -- ciao Bruno =========================================== http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, <http://bboett.free.fr> http://aikido.zorn.free.fr
SL
Steve Lelievre
Mon, Dec 18, 2023 12:40 PM

For those that don't want python extensions, the honeycomb pattern in 
pure OpenSCAD.

// Parameters
blockX = 300;
blockY = 500;
blockZ = 50;
WallThickness = 2;
cellSize = 50;                           // cell diameter measured from vertex to opposite vertex (when wall has zero thickness).

// Derived values used for construction
dHex = cellSize * sin(60);               // distance between cell centres
tileX = 2 * dHex * sin(60);              // honeycomb repetition distance in X
tileY = 2 * dHex;                         // honeycomb repetition distance in Y

// 2D honeycomb is made by repeating these 2D rectangular tiles
module tile() {
   difference() {
      square([tileX, tileY], center = true);
      for(i = [30 : 60 : 330]) translate([dHex * cos(i), dHex * sin(i)]) circle(d = cellSize - WallThickness, $fn = 6);
      circle(d = cellSize - WallThickness, $fn = 6);
   }
}

// lay out enough tiles for size of block then crop to exact size and extrude to desired block height
linear_extrude(blockZ) intersection() {
   rows = ceil(blockY / tileY);
   columns = ceil(blockX / tileX);
   for(a = [-columns / 2 : columns / 2]) for (b = [-rows / 2 : rows / 2]) translate([a * tileX, b * tileY]) tile();
   square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true);
}

// add block wall
linear_extrude(blockZ) difference() {
   square([blockX, blockY], center = true);
   square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true);
}

On 2023-12-17 6:11 p.m., Sanjeev Prabhakar via Discuss wrote:

Is this you are looking for?
Screenshot 2023-12-18 at 7.38.57 AM.png

python code for the same is in the left window

For those that don't want python extensions, the honeycomb pattern in  pure OpenSCAD. // Parameters blockX = 300; blockY = 500; blockZ = 50; WallThickness = 2; cellSize = 50;             // cell diameter measured from vertex to opposite vertex (when wall has zero thickness). // Derived values used for construction dHex = cellSize * sin(60);    // distance between cell centres tileX = 2 * dHex * sin(60);   // honeycomb repetition distance in X tileY = 2 * dHex;              // honeycomb repetition distance in Y // 2D honeycomb is made by repeating these 2D rectangular tiles module tile() {    difference() {       square([tileX, tileY], center = true);       for(i = [30 : 60 : 330]) translate([dHex * cos(i), dHex * sin(i)]) circle(d = cellSize - WallThickness, $fn = 6);       circle(d = cellSize - WallThickness, $fn = 6);    } } // lay out enough tiles for size of block then crop to exact size and extrude to desired block height linear_extrude(blockZ) intersection() {    rows = ceil(blockY / tileY);    columns = ceil(blockX / tileX);    for(a = [-columns / 2 : columns / 2]) for (b = [-rows / 2 : rows / 2]) translate([a * tileX, b * tileY]) tile();    square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true); } // add block wall linear_extrude(blockZ) difference() {    square([blockX, blockY], center = true);    square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true); } On 2023-12-17 6:11 p.m., Sanjeev Prabhakar via Discuss wrote: > Is this you are looking for? > Screenshot 2023-12-18 at 7.38.57 AM.png > > python code for the same is in the left window
GB
Glenn Butcher
Mon, Dec 18, 2023 1:36 PM

This!

I've been using $fn=6 cylinders to make hex bolt heads for some time
now, works like a treat.  Y'know, sometimes that flatblade screwdriver
makes a great pry bar...   :D

On 12/18/2023 5:40 AM, Steve Lelievre via Discuss wrote:

For those that don't want python extensions, the honeycomb pattern in 
pure OpenSCAD.

// Parameters
blockX = 300;
blockY = 500;
blockZ = 50;
WallThickness = 2;
cellSize = 50;                           // cell diameter measured from vertex to opposite vertex (when wall has zero thickness).

// Derived values used for construction
dHex = cellSize * sin(60);               // distance between cell centres
tileX = 2 * dHex * sin(60);              // honeycomb repetition distance in X
tileY = 2 * dHex;                         // honeycomb repetition distance in Y

// 2D honeycomb is made by repeating these 2D rectangular tiles
module tile() {
   difference() {
      square([tileX, tileY], center = true);
      for(i = [30 : 60 : 330]) translate([dHex * cos(i), dHex * sin(i)]) circle(d = cellSize - WallThickness, $fn = 6);
      circle(d = cellSize - WallThickness, $fn = 6);
   }
}

// lay out enough tiles for size of block then crop to exact size and extrude to desired block height
linear_extrude(blockZ) intersection() {
   rows = ceil(blockY / tileY);
   columns = ceil(blockX / tileX);
   for(a = [-columns / 2 : columns / 2]) for (b = [-rows / 2 : rows / 2]) translate([a * tileX, b * tileY]) tile();
   square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true);
}

// add block wall
linear_extrude(blockZ) difference() {
   square([blockX, blockY], center = true);
   square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true);
}

This! I've been using $fn=6 cylinders to make hex bolt heads for some time now, works like a treat.  Y'know, sometimes that flatblade screwdriver makes a great pry bar...   :D On 12/18/2023 5:40 AM, Steve Lelievre via Discuss wrote: > > For those that don't want python extensions, the honeycomb pattern in  > pure OpenSCAD. > > > // Parameters > blockX = 300; > blockY = 500; > blockZ = 50; > WallThickness = 2; > cellSize = 50;             // cell diameter measured from vertex to opposite vertex (when wall has zero thickness). > > // Derived values used for construction > dHex = cellSize * sin(60);    // distance between cell centres > tileX = 2 * dHex * sin(60);   // honeycomb repetition distance in X > tileY = 2 * dHex;              // honeycomb repetition distance in Y > > // 2D honeycomb is made by repeating these 2D rectangular tiles > module tile() { >    difference() { >       square([tileX, tileY], center = true); >       for(i = [30 : 60 : 330]) translate([dHex * cos(i), dHex * sin(i)]) circle(d = cellSize - WallThickness, $fn = 6); >       circle(d = cellSize - WallThickness, $fn = 6); >    } > } > > // lay out enough tiles for size of block then crop to exact size and extrude to desired block height > linear_extrude(blockZ) intersection() { >    rows = ceil(blockY / tileY); >    columns = ceil(blockX / tileX); >    for(a = [-columns / 2 : columns / 2]) for (b = [-rows / 2 : rows / 2]) translate([a * tileX, b * tileY]) tile(); >    square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true); > } > > // add block wall > linear_extrude(blockZ) difference() { >    square([blockX, blockY], center = true); >    square([blockX - 2 * WallThickness, blockY - 2 * WallThickness], center = true); > } >
RW
Raymond West
Mon, Dec 18, 2023 4:30 PM

Hi,

Here's  my attempt, code attached below. .

Best wishes,

Ray

On 17/12/2023 22:04, Bruno Boettcher via Discuss wrote:

hello!
Once again something that looked fairly simple in the start got to a
huge headache....

i hope the attachment goes through, there you can see my actual tries
to get this working....
it started by wanting to remix a nice fountain found on thingieverse,
but where the sizes were just so wrong for me that my available pump
didn't fit into it....

So I needed some slanted outer walls, and pierced inner walls, since
the theme was hexagons, I did everything in hexagons.....

I started by using cubes, but the slanting didn't go too well.... so I
started with a polygon, but the need for a splash guard on certain
walls arose .... so  I went polyhedron.....

i noticed that my polyhedron had some funny features depending on the
angle looking onto it, but on compiling it didn't complain AFAIK.....

for the hole i still tried to go 2D first, with a lot of pain to my
old brain, i finally managed to get a centered and working hex
grid.... extruded it and diffed it with the polyhedron, and now it
looks frankly weird..... nearly all of the polyhedron is gone and
compiling well i get the dreaded mesh is not closed.....

integrating the hexes directly into the polyhedron will be a major
pain considering my incompetence...  So if someone might be kind
enough to point out what I did wrong?

--
ciao
Bruno

---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr


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

Hi, Here's  my attempt, code attached below. . Best wishes, Ray On 17/12/2023 22:04, Bruno Boettcher via Discuss wrote: > hello! > Once again something that looked fairly simple in the start got to a > huge headache.... > > i hope the attachment goes through, there you can see my actual tries > to get this working.... > it started by wanting to remix a nice fountain found on thingieverse, > but where the sizes were just so wrong for me that my available pump > didn't fit into it.... > > So I needed some slanted outer walls, and pierced inner walls, since > the theme was hexagons, I did everything in hexagons..... > > I started by using cubes, but the slanting didn't go too well.... so I > started with a polygon, but the need for a splash guard on certain > walls arose .... so  I went polyhedron..... > > i noticed that my polyhedron had some funny features depending on the > angle looking onto it, but on compiling it didn't complain AFAIK..... > > for the hole i still tried to go 2D first, with a lot of pain to my > old brain, i finally managed to get a centered and working hex > grid.... extruded it and diffed it with the polyhedron, and now it > looks frankly weird..... nearly all of the polyhedron is gone and > compiling well i get the dreaded mesh is not closed..... > > integrating the hexes directly into the polyhedron will be a major > pain considering my incompetence...  So if someone might be kind > enough to point out what I did wrong? > > -- > ciao > Bruno > > =========================================== > http://nohkumado.eu/, > <http://bboett.free.fr>http://aikido.nohkumado.eu/, > <http://bboett.free.fr> > http://aikido.zorn.free.fr > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
SL
Steve Lelievre
Tue, Dec 19, 2023 1:54 AM

Today, Ray and I both posted code to make a honeycomb / hex grid. Ray's
approach is to simply subtract a load of hexagons from the required
area. Somehow my thought process took me down the route of defining a
module that creates a rectangular tile represents the basic repeat
pattern, and then I Iay down a bunch of my tiles.

It turns out that Ray's code renders much faster than mine. I suspect
the difference is that my version is repeatedly using a module, and
perhaps the module calculations are being repeated over and over, each
time producing an identical object That would certainly slow things down.

I have very little understanding of how OpenSCAD works internally but I
visualize it as using some kind of a hierarchic tree of objects. I did
not realize my module was going to be evaluated repeatedly. I realize
that a module with parameters likely needs to be recalculated, but I
somehow imagined that if there are no parameters involved there would be
some kind of copying of one branch of the tree to make another, thus
avoiding recalculation.

Okay, so now it seems to me that I was wrong in my assumption that a
modules would not always be recalculated. That's fine, but the mistake
that got me thinking ... would it be helpful to have a way to indicate
to OpenSCAD that a module only needs to be evaluated one time, and the
resulting object can simply be cloned on each subsequent use? (I guess I
could save the object generated by the module as an STL and then import
the STL for use over and over, but I'm asking about something I could do
within OpenSCAD.)

And, if there's no current way to do what I'm asking about, could it be
added in the future? Perhaps a special keyword to indicate that the
object generated on the first invocation can be cloned for all all other
invocations?

For today's example, it's easy enough to change how my program works to
be more like Ray's version, but I can image cases where a module is
useful for creating a complicated object but recalculating it for each
instance is to be avoided.

Steve

On 2023-12-18 8:30 a.m., Raymond West via Discuss wrote:

Hi,

Here's  my attempt, code attached below. .

Best wishes,

Ray

On 17/12/2023 22:04, Bruno Boettcher via Discuss wrote:

hello!
Once again something that looked fairly simple in the start got to a
huge headache....

i hope the attachment goes through, there you can see my actual tries
to get this working....
it started by wanting to remix a nice fountain found on thingieverse,
but where the sizes were just so wrong for me that my available pump
didn't fit into it....

So I needed some slanted outer walls, and pierced inner walls, since
the theme was hexagons, I did everything in hexagons.....

I started by using cubes, but the slanting didn't go too well.... so
I started with a polygon, but the need for a splash guard on certain
walls arose .... so  I went polyhedron.....

i noticed that my polyhedron had some funny features depending on the
angle looking onto it, but on compiling it didn't complain AFAIK.....

for the hole i still tried to go 2D first, with a lot of pain to my
old brain, i finally managed to get a centered and working hex
grid.... extruded it and diffed it with the polyhedron, and now it
looks frankly weird..... nearly all of the polyhedron is gone and
compiling well i get the dreaded mesh is not closed.....

integrating the hexes directly into the polyhedron will be a major
pain considering my incompetence...  So if someone might be kind
enough to point out what I did wrong?

--
ciao
Bruno

---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr


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


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

Today, Ray and I both posted code to make a honeycomb / hex grid. Ray's approach is to simply subtract a load of hexagons from the required area. Somehow my thought process took me down the route of defining a module that creates a rectangular tile represents the basic repeat pattern, and then I Iay down a bunch of my tiles. It turns out that Ray's code renders much faster than mine. I suspect the difference is that my version is repeatedly using a module, and perhaps the module calculations are being repeated over and over, each time producing an identical object That would certainly slow things down. I have very little understanding of how OpenSCAD works internally but I visualize it as using some kind of a hierarchic tree of objects. I did not realize my module was going to be evaluated repeatedly. I realize that a module with parameters likely needs to be recalculated, but I somehow imagined that if there are no parameters involved there would be some kind of copying of one branch of the tree to make another, thus avoiding recalculation. Okay, so now it seems to me that I was wrong in my assumption that a modules would not always be recalculated. That's fine, but the mistake that got me thinking ... would it be helpful to have a way to indicate to OpenSCAD that a module only needs to be evaluated one time, and the resulting object can simply be cloned on each subsequent use? (I guess I could save the object generated by the module as an STL and then import the STL for use over and over, but I'm asking about something I could do within OpenSCAD.) And, if there's no current way to do what I'm asking about, could it be added in the future? Perhaps a special keyword to indicate that the object generated on the first invocation can be cloned for all all other invocations? For today's example, it's easy enough to change how my program works to be more like Ray's version, but I can image cases where a module is useful for creating a complicated object but recalculating it for each instance is to be avoided. Steve On 2023-12-18 8:30 a.m., Raymond West via Discuss wrote: > > Hi, > > Here's  my attempt, code attached below. . > > Best wishes, > > > Ray > > On 17/12/2023 22:04, Bruno Boettcher via Discuss wrote: >> hello! >> Once again something that looked fairly simple in the start got to a >> huge headache.... >> >> i hope the attachment goes through, there you can see my actual tries >> to get this working.... >> it started by wanting to remix a nice fountain found on thingieverse, >> but where the sizes were just so wrong for me that my available pump >> didn't fit into it.... >> >> So I needed some slanted outer walls, and pierced inner walls, since >> the theme was hexagons, I did everything in hexagons..... >> >> I started by using cubes, but the slanting didn't go too well.... so >> I started with a polygon, but the need for a splash guard on certain >> walls arose .... so  I went polyhedron..... >> >> i noticed that my polyhedron had some funny features depending on the >> angle looking onto it, but on compiling it didn't complain AFAIK..... >> >> for the hole i still tried to go 2D first, with a lot of pain to my >> old brain, i finally managed to get a centered and working hex >> grid.... extruded it and diffed it with the polyhedron, and now it >> looks frankly weird..... nearly all of the polyhedron is gone and >> compiling well i get the dreaded mesh is not closed..... >> >> integrating the hexes directly into the polyhedron will be a major >> pain considering my incompetence...  So if someone might be kind >> enough to point out what I did wrong? >> >> -- >> ciao >> Bruno >> >> =========================================== >> http://nohkumado.eu/, >> <http://bboett.free.fr>http://aikido.nohkumado.eu/, >> <http://bboett.free.fr> >> http://aikido.zorn.free.fr >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
NH
nop head
Tue, Dec 19, 2023 10:02 AM

You are correct in thinking modules are always reevaluated but the geometry
they create can be cached and reused again. So the expensive
geometry calculations are not repeated but the script calculations are.

On Tue, 19 Dec 2023 at 01:54, Steve Lelievre via Discuss <
discuss@lists.openscad.org> wrote:

Today, Ray and I both posted code to make a honeycomb / hex grid. Ray's
approach is to simply subtract a load of hexagons from the required area.
Somehow my thought process took me down the route of defining a module that
creates a rectangular tile represents the basic repeat pattern, and then I
Iay down a bunch of my tiles.

It turns out that Ray's code renders much faster than mine. I suspect the
difference is that my version is repeatedly using a module, and perhaps the
module calculations are being repeated over and over, each time producing
an identical object That would certainly slow things down.

I have very little understanding of how OpenSCAD works internally but I
visualize it as using some kind of a hierarchic tree of objects. I did not
realize my module was going to be evaluated repeatedly. I realize that a
module with parameters likely needs to be recalculated, but I somehow
imagined that if there are no parameters involved there would be some kind
of copying of one branch of the tree to make another, thus avoiding
recalculation.

Okay, so now it seems to me that I was wrong in my assumption that a
modules would not always be recalculated. That's fine, but the mistake that
got me thinking ... would it be helpful to have a way to indicate to
OpenSCAD that a module only needs to be evaluated one time, and the
resulting object can simply be cloned on each subsequent use? (I guess I
could save the object generated by the module as an STL and then import the
STL for use over and over, but I'm asking about something I could do within
OpenSCAD.)

And, if there's no current way to do what I'm asking about, could it be
added in the future? Perhaps a special keyword to indicate that the object
generated on the first invocation can be cloned for all all other
invocations?

For today's example, it's easy enough to change how my program works to be
more like Ray's version, but I can image cases where a module is useful for
creating a complicated object but recalculating it for each instance is to
be avoided.

Steve

On 2023-12-18 8:30 a.m., Raymond West via Discuss wrote:

Hi,

Here's  my attempt, code attached below. .

Best wishes,

Ray
On 17/12/2023 22:04, Bruno Boettcher via Discuss wrote:

hello!
Once again something that looked fairly simple in the start got to a huge
headache....

i hope the attachment goes through, there you can see my actual tries to
get this working....
it started by wanting to remix a nice fountain found on thingieverse, but
where the sizes were just so wrong for me that my available pump didn't fit
into it....

So I needed some slanted outer walls, and pierced inner walls, since the
theme was hexagons, I did everything in hexagons.....

I started by using cubes, but the slanting didn't go too well.... so I
started with a polygon, but the need for a splash guard on certain walls
arose .... so  I went polyhedron.....

i noticed that my polyhedron had some funny features depending on the
angle looking onto it, but on compiling it didn't complain AFAIK.....

for the hole i still tried to go 2D first, with a lot of pain to my old
brain, i finally managed to get a centered and working hex grid....
extruded it and diffed it with the polyhedron, and now it looks frankly
weird..... nearly all of the polyhedron is gone and compiling well i get
the dreaded mesh is not closed.....

integrating the hexes directly into the polyhedron will be a major pain
considering my incompetence...  So if someone might be kind enough to point
out what I did wrong?

--
ciao
Bruno

---==========
http://nohkumado.eu/, http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr


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

You are correct in thinking modules are always reevaluated but the geometry they create can be cached and reused again. So the expensive geometry calculations are not repeated but the script calculations are. On Tue, 19 Dec 2023 at 01:54, Steve Lelievre via Discuss < discuss@lists.openscad.org> wrote: > > Today, Ray and I both posted code to make a honeycomb / hex grid. Ray's > approach is to simply subtract a load of hexagons from the required area. > Somehow my thought process took me down the route of defining a module that > creates a rectangular tile represents the basic repeat pattern, and then I > Iay down a bunch of my tiles. > > It turns out that Ray's code renders much faster than mine. I suspect the > difference is that my version is repeatedly using a module, and perhaps the > module calculations are being repeated over and over, each time producing > an identical object That would certainly slow things down. > > I have very little understanding of how OpenSCAD works internally but I > visualize it as using some kind of a hierarchic tree of objects. I did not > realize my module was going to be evaluated repeatedly. I realize that a > module with parameters likely needs to be recalculated, but I somehow > imagined that if there are no parameters involved there would be some kind > of copying of one branch of the tree to make another, thus avoiding > recalculation. > > Okay, so now it seems to me that I was wrong in my assumption that a > modules would not always be recalculated. That's fine, but the mistake that > got me thinking ... would it be helpful to have a way to indicate to > OpenSCAD that a module only needs to be evaluated one time, and the > resulting object can simply be cloned on each subsequent use? (I guess I > could save the object generated by the module as an STL and then import the > STL for use over and over, but I'm asking about something I could do within > OpenSCAD.) > > And, if there's no current way to do what I'm asking about, could it be > added in the future? Perhaps a special keyword to indicate that the object > generated on the first invocation can be cloned for all all other > invocations? > > For today's example, it's easy enough to change how my program works to be > more like Ray's version, but I can image cases where a module is useful for > creating a complicated object but recalculating it for each instance is to > be avoided. > > Steve > > > > > On 2023-12-18 8:30 a.m., Raymond West via Discuss wrote: > > Hi, > > Here's my attempt, code attached below. . > > Best wishes, > > > Ray > On 17/12/2023 22:04, Bruno Boettcher via Discuss wrote: > > hello! > Once again something that looked fairly simple in the start got to a huge > headache.... > > i hope the attachment goes through, there you can see my actual tries to > get this working.... > it started by wanting to remix a nice fountain found on thingieverse, but > where the sizes were just so wrong for me that my available pump didn't fit > into it.... > > So I needed some slanted outer walls, and pierced inner walls, since the > theme was hexagons, I did everything in hexagons..... > > I started by using cubes, but the slanting didn't go too well.... so I > started with a polygon, but the need for a splash guard on certain walls > arose .... so I went polyhedron..... > > i noticed that my polyhedron had some funny features depending on the > angle looking onto it, but on compiling it didn't complain AFAIK..... > > for the hole i still tried to go 2D first, with a lot of pain to my old > brain, i finally managed to get a centered and working hex grid.... > extruded it and diffed it with the polyhedron, and now it looks frankly > weird..... nearly all of the polyhedron is gone and compiling well i get > the dreaded mesh is not closed..... > > integrating the hexes directly into the polyhedron will be a major pain > considering my incompetence... So if someone might be kind enough to point > out what I did wrong? > > -- > ciao > Bruno > > =========================================== > http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, > <http://bboett.free.fr> > http://aikido.zorn.free.fr > > _______________________________________________ > 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 >