discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

how to fill an arbitrary 2D shape with honeycomb pattern?

DP
Dan Perry
Sun, Feb 5, 2023 1:07 AM

Thanks, Revar.  When I pasted your code into my program, I got this error
from OpenSCAD.  Do I need to update my copy of BOSL2, or is it something
else?
Dan

WARNING: variable p not specified as parameter in file wire_spool.scad,
line 182 [line 182 is: hex_rgn2 = grid_copies(spacing=5, size=size,
stagger=true, p=hex),]

ERROR: Assertion 'false' failed: "You called grid_copies() as a function,
but it is available only as a module" in file
../../OpenSCAD/libraries/BOSL2/utility.scad, line 790

TRACE: called by 'no_function' in file
../../OpenSCAD/libraries/BOSL2/distributors.scad, line 402

TRACE: called by 'grid_copies' in file wire_spool.scad, line 182

TRACE: called by 'honeycomb' in file wire_spool.scad, line 190

TRACE: called by 'honeycomb' in file wire_spool.scad, line 196

TRACE: called by 'color' in file wire_spool.scad, line 196

On Fri, Feb 3, 2023 at 12:00 PM Revar Desmera revarbat@gmail.com wrote:

I forgot to add parameters for hex size and cell wall thickness.  Here's
updated code:

function honeycomb(shape, spacing=10, hex_wall=1) =
let(
hex = hexagon(od=spacing-hex_wall/2, spin=180/6),
bounds = pointlist_bounds(shape),
size = bounds[1] - bounds[0],
hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true,
p=hex),
center = (bounds[0] + bounds[1]) / 2,
hex_rgn = move(center, p=hex_rgn2),
ihex_rgn = intersection(hex_rgn, shape),
out_rgn = difference(shape, ihex_rgn)
) out_rgn;

module honeycomb(shape, spacing=10, hex_wall=1) {
rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall);
region(rgn);
}

shape = star(n=5, step=2, d=100, spin=90/5);
%region(shape);
color("blue") honeycomb(shape, spacing=8, hex_wall=0.8);

  • Revar

On Feb 3, 2023, at 11:51 AM, Revar Desmera revarbat@gmail.com wrote:

Using BOSL2, a lot of the work can be done for you:

include <BOSL2/std.scad>
honeycomb(shape) =
let(
hex = hexagon(d=5, spin=180/6),
bounds = pointlist_bounds(shape),
size = bounds[1] - bounds[0],
hex_rgn2 = grid_copies(spacing=5, size=size, stagger=true, p=hex),
center = (bounds[0] + bounds[1]) / 2,
hex_rgn = move(center, p=hex_rgn2),
ihex_rgn = intersection(hex_rgn, shape),
out_rgn = difference(shape, ihex_rgn)
) out_rgn;

module honeycomb(shape) {
rgn = honeycomb(shape);
region(rgn);
}

shape = star(n=5, step=2, d=100, spin=90/5);
%region(shape);
color("blue") honeycomb(shape);

<Screenshot 2023-02-03 at 11.49.17 AM.png>

  • Revar

On Feb 3, 2023, at 9:14 AM, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I just wrote the function honeycomb and function to get the segments
inside any arbitrary enclosed section.
It is defined in such a way that only the segments which are completely
within the section are selected
<Screenshot 2023-02-03 at 10.37.14 PM.png>

On Fri, 3 Feb 2023 at 08:44, Dan Perry dan.p3rry@gmail.com wrote:

I would like to fill an arbitrary convex shape with hexagons (honeycomb
pattern).
I wrote a couple modules that do this on a circle and donut, but an
arbitrary shape is more challenging, primarily because I haven't found a
straightforward way to calculate the left/right/top/bottom extremes of an
arbitrary 2D shape, so I know where to start and stop.
(I'm planning to use BOSL2 point_in_region() once I figure out the range
of coordinates.  Suggestions are welcome😊)
Thanks,
Dan


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

Thanks, Revar. When I pasted your code into my program, I got this error from OpenSCAD. Do I need to update my copy of BOSL2, or is it something else? Dan WARNING: variable p not specified as parameter in file wire_spool.scad, line 182 [line 182 is: hex_rgn2 = grid_copies(spacing=5, size=size, stagger=true, p=hex),] ERROR: Assertion 'false' failed: "You called grid_copies() as a function, but it is available only as a module" in file ../../OpenSCAD/libraries/BOSL2/utility.scad, line 790 TRACE: called by 'no_function' in file ../../OpenSCAD/libraries/BOSL2/distributors.scad, line 402 TRACE: called by 'grid_copies' in file wire_spool.scad, line 182 TRACE: called by 'honeycomb' in file wire_spool.scad, line 190 TRACE: called by 'honeycomb' in file wire_spool.scad, line 196 TRACE: called by 'color' in file wire_spool.scad, line 196 On Fri, Feb 3, 2023 at 12:00 PM Revar Desmera <revarbat@gmail.com> wrote: > I forgot to add parameters for hex size and cell wall thickness. Here's > updated code: > > function honeycomb(shape, spacing=10, hex_wall=1) = > let( > hex = hexagon(od=spacing-hex_wall/2, spin=180/6), > bounds = pointlist_bounds(shape), > size = bounds[1] - bounds[0], > hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true, > p=hex), > center = (bounds[0] + bounds[1]) / 2, > hex_rgn = move(center, p=hex_rgn2), > ihex_rgn = intersection(hex_rgn, shape), > out_rgn = difference(shape, ihex_rgn) > ) out_rgn; > > module honeycomb(shape, spacing=10, hex_wall=1) { > rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall); > region(rgn); > } > > shape = star(n=5, step=2, d=100, spin=90/5); > %region(shape); > color("blue") honeycomb(shape, spacing=8, hex_wall=0.8); > > - Revar > > > On Feb 3, 2023, at 11:51 AM, Revar Desmera <revarbat@gmail.com> wrote: > > Using BOSL2, a lot of the work can be done for you: > > include <BOSL2/std.scad> > honeycomb(shape) = > let( > hex = hexagon(d=5, spin=180/6), > bounds = pointlist_bounds(shape), > size = bounds[1] - bounds[0], > hex_rgn2 = grid_copies(spacing=5, size=size, stagger=true, p=hex), > center = (bounds[0] + bounds[1]) / 2, > hex_rgn = move(center, p=hex_rgn2), > ihex_rgn = intersection(hex_rgn, shape), > out_rgn = difference(shape, ihex_rgn) > ) out_rgn; > > module honeycomb(shape) { > rgn = honeycomb(shape); > region(rgn); > } > > shape = star(n=5, step=2, d=100, spin=90/5); > %region(shape); > color("blue") honeycomb(shape); > > > <Screenshot 2023-02-03 at 11.49.17 AM.png> > > - Revar > > > > On Feb 3, 2023, at 9:14 AM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > > I just wrote the function honeycomb and function to get the segments > inside any arbitrary enclosed section. > It is defined in such a way that only the segments which are completely > within the section are selected > <Screenshot 2023-02-03 at 10.37.14 PM.png> > > > On Fri, 3 Feb 2023 at 08:44, Dan Perry <dan.p3rry@gmail.com> wrote: > >> I would like to fill an arbitrary convex shape with hexagons (honeycomb >> pattern). >> I wrote a couple modules that do this on a circle and donut, but an >> arbitrary shape is more challenging, primarily because I haven't found a >> straightforward way to calculate the left/right/top/bottom extremes of an >> arbitrary 2D shape, so I know where to start and stop. >> (I'm planning to use BOSL2 point_in_region() once I figure out the range >> of coordinates. Suggestions are welcome😊) >> Thanks, >> Dan >> >> >> >> >> _______________________________________________ >> 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 >
RD
Revar Desmera
Sun, Feb 5, 2023 1:10 AM

Sorry, that usage of grid_copies() is a recent addition to the library.  Upgrade to the latest revision and it should work.

  • Revar

On Feb 4, 2023, at 5:07 PM, Dan Perry dan.p3rry@gmail.com wrote:

Thanks, Revar.  When I pasted your code into my program, I got this error from OpenSCAD.  Do I need to update my copy of BOSL2, or is it something else?
Dan

WARNING: variable p not specified as parameter in file wire_spool.scad, line 182 <> [line 182 is: hex_rgn2 = grid_copies(spacing=5, size=size, stagger=true, p=hex),]
ERROR: Assertion 'false' failed: "You called grid_copies() as a function, but it is available only as a module" in file ../../OpenSCAD/libraries/BOSL2/utility.scad, line 790 <>

TRACE: called by 'no_function' in file ../../OpenSCAD/libraries/BOSL2/distributors.scad, line 402 <>

TRACE: called by 'grid_copies' in file wire_spool.scad, line 182 <>

TRACE: called by 'honeycomb' in file wire_spool.scad, line 190 <>

TRACE: called by 'honeycomb' in file wire_spool.scad, line 196 <>

TRACE: called by 'color' in file wire_spool.scad, line 196 <>

On Fri, Feb 3, 2023 at 12:00 PM Revar Desmera <revarbat@gmail.com mailto:revarbat@gmail.com> wrote:

I forgot to add parameters for hex size and cell wall thickness.  Here's updated code:

function honeycomb(shape, spacing=10, hex_wall=1) =
let(
hex = hexagon(od=spacing-hex_wall/2, spin=180/6),
bounds = pointlist_bounds(shape),
size = bounds[1] - bounds[0],
hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true, p=hex),
center = (bounds[0] + bounds[1]) / 2,
hex_rgn = move(center, p=hex_rgn2),
ihex_rgn = intersection(hex_rgn, shape),
out_rgn = difference(shape, ihex_rgn)
) out_rgn;

module honeycomb(shape, spacing=10, hex_wall=1) {
rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall);
region(rgn);
}

shape = star(n=5, step=2, d=100, spin=90/5);
%region(shape);
color("blue") honeycomb(shape, spacing=8, hex_wall=0.8);

  • Revar

On Feb 3, 2023, at 11:51 AM, Revar Desmera <revarbat@gmail.com mailto:revarbat@gmail.com> wrote:

Using BOSL2, a lot of the work can be done for you:

include <BOSL2/std.scad>
honeycomb(shape) =
let(
hex = hexagon(d=5, spin=180/6),
bounds = pointlist_bounds(shape),
size = bounds[1] - bounds[0],
hex_rgn2 = grid_copies(spacing=5, size=size, stagger=true, p=hex),
center = (bounds[0] + bounds[1]) / 2,
hex_rgn = move(center, p=hex_rgn2),
ihex_rgn = intersection(hex_rgn, shape),
out_rgn = difference(shape, ihex_rgn)
) out_rgn;

module honeycomb(shape) {
rgn = honeycomb(shape);
region(rgn);
}

shape = star(n=5, step=2, d=100, spin=90/5);
%region(shape);
color("blue") honeycomb(shape);

<Screenshot 2023-02-03 at 11.49.17 AM.png>

  • Revar

On Feb 3, 2023, at 9:14 AM, Sanjeev Prabhakar <sprabhakar2006@gmail.com mailto:sprabhakar2006@gmail.com> wrote:

I just wrote the function honeycomb and function to get the segments inside any arbitrary enclosed section.
It is defined in such a way that only the segments which are completely within the section are selected
<Screenshot 2023-02-03 at 10.37.14 PM.png>

On Fri, 3 Feb 2023 at 08:44, Dan Perry <dan.p3rry@gmail.com mailto:dan.p3rry@gmail.com> wrote:

I would like to fill an arbitrary convex shape with hexagons (honeycomb pattern).
I wrote a couple modules that do this on a circle and donut, but an arbitrary shape is more challenging, primarily because I haven't found a straightforward way to calculate the left/right/top/bottom extremes of an arbitrary 2D shape, so I know where to start and stop.
(I'm planning to use BOSL2 point_in_region() once I figure out the range of coordinates.  Suggestions are welcome😊)
Thanks,
Dan


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 mailto:discuss-leave@lists.openscad.org


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

Sorry, that usage of `grid_copies()` is a recent addition to the library. Upgrade to the latest revision and it should work. - Revar > On Feb 4, 2023, at 5:07 PM, Dan Perry <dan.p3rry@gmail.com> wrote: > > Thanks, Revar. When I pasted your code into my program, I got this error from OpenSCAD. Do I need to update my copy of BOSL2, or is it something else? > Dan > > WARNING: variable p not specified as parameter in file wire_spool.scad, line 182 <> [line 182 is: hex_rgn2 = grid_copies(spacing=5, size=size, stagger=true, p=hex),] > ERROR: Assertion 'false' failed: "You called grid_copies() as a function, but it is available only as a module" in file ../../OpenSCAD/libraries/BOSL2/utility.scad, line 790 <> > > TRACE: called by 'no_function' in file ../../OpenSCAD/libraries/BOSL2/distributors.scad, line 402 <> > > TRACE: called by 'grid_copies' in file wire_spool.scad, line 182 <> > > TRACE: called by 'honeycomb' in file wire_spool.scad, line 190 <> > > TRACE: called by 'honeycomb' in file wire_spool.scad, line 196 <> > > TRACE: called by 'color' in file wire_spool.scad, line 196 <> > > > > > > > > > > > On Fri, Feb 3, 2023 at 12:00 PM Revar Desmera <revarbat@gmail.com <mailto:revarbat@gmail.com>> wrote: >> I forgot to add parameters for hex size and cell wall thickness. Here's updated code: >> >> function honeycomb(shape, spacing=10, hex_wall=1) = >> let( >> hex = hexagon(od=spacing-hex_wall/2, spin=180/6), >> bounds = pointlist_bounds(shape), >> size = bounds[1] - bounds[0], >> hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true, p=hex), >> center = (bounds[0] + bounds[1]) / 2, >> hex_rgn = move(center, p=hex_rgn2), >> ihex_rgn = intersection(hex_rgn, shape), >> out_rgn = difference(shape, ihex_rgn) >> ) out_rgn; >> >> module honeycomb(shape, spacing=10, hex_wall=1) { >> rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall); >> region(rgn); >> } >> >> shape = star(n=5, step=2, d=100, spin=90/5); >> %region(shape); >> color("blue") honeycomb(shape, spacing=8, hex_wall=0.8); >> >> - Revar >> >> >>> On Feb 3, 2023, at 11:51 AM, Revar Desmera <revarbat@gmail.com <mailto:revarbat@gmail.com>> wrote: >>> >>> Using BOSL2, a lot of the work can be done for you: >>> >>> include <BOSL2/std.scad> >>> honeycomb(shape) = >>> let( >>> hex = hexagon(d=5, spin=180/6), >>> bounds = pointlist_bounds(shape), >>> size = bounds[1] - bounds[0], >>> hex_rgn2 = grid_copies(spacing=5, size=size, stagger=true, p=hex), >>> center = (bounds[0] + bounds[1]) / 2, >>> hex_rgn = move(center, p=hex_rgn2), >>> ihex_rgn = intersection(hex_rgn, shape), >>> out_rgn = difference(shape, ihex_rgn) >>> ) out_rgn; >>> >>> module honeycomb(shape) { >>> rgn = honeycomb(shape); >>> region(rgn); >>> } >>> >>> shape = star(n=5, step=2, d=100, spin=90/5); >>> %region(shape); >>> color("blue") honeycomb(shape); >>> >>> <Screenshot 2023-02-03 at 11.49.17 AM.png> >>> >>> - Revar >>> >>> >>> >>>> On Feb 3, 2023, at 9:14 AM, Sanjeev Prabhakar <sprabhakar2006@gmail.com <mailto:sprabhakar2006@gmail.com>> wrote: >>>> >>>> I just wrote the function honeycomb and function to get the segments inside any arbitrary enclosed section. >>>> It is defined in such a way that only the segments which are completely within the section are selected >>>> <Screenshot 2023-02-03 at 10.37.14 PM.png> >>>> >>>> >>>> On Fri, 3 Feb 2023 at 08:44, Dan Perry <dan.p3rry@gmail.com <mailto:dan.p3rry@gmail.com>> wrote: >>>>> I would like to fill an arbitrary convex shape with hexagons (honeycomb pattern). >>>>> I wrote a couple modules that do this on a circle and donut, but an arbitrary shape is more challenging, primarily because I haven't found a straightforward way to calculate the left/right/top/bottom extremes of an arbitrary 2D shape, so I know where to start and stop. >>>>> (I'm planning to use BOSL2 point_in_region() once I figure out the range of coordinates. Suggestions are welcome😊) >>>>> Thanks, >>>>> Dan >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 <mailto:discuss-leave@lists.openscad.org> >>> >> >> _______________________________________________ >> 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
RD
Revar Desmera
Sun, Feb 5, 2023 2:22 AM

Found a bug in the hex_wall setting.  Updated code:

function honeycomb(shape, spacing=10, hex_wall=1) =
let(
hex = hexagon(id=spacing-hex_wall, spin=180/6),
bounds = pointlist_bounds(shape),
size = bounds[1] - bounds[0],
hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true, p=hex),
center = (bounds[0] + bounds[1]) / 2,
hex_rgn = move(center, p=hex_rgn2),
ihex_rgn = intersection(hex_rgn, shape),
out_rgn = difference(shape, ihex_rgn)
) out_rgn;

module honeycomb(shape, spacing=10, hex_wall=1) {
rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall);
region(rgn);
}

shape = glued_circles(d=50, spread=50, tangent=30);
wall = 2;
linear_extrude(height=10) {
honeycomb(shape, spacing=10, hex_wall=wall);
stroke(shape, width=wall, closed=true);
}



  • Revar
Found a bug in the hex_wall setting. Updated code: function honeycomb(shape, spacing=10, hex_wall=1) = let( hex = hexagon(id=spacing-hex_wall, spin=180/6), bounds = pointlist_bounds(shape), size = bounds[1] - bounds[0], hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true, p=hex), center = (bounds[0] + bounds[1]) / 2, hex_rgn = move(center, p=hex_rgn2), ihex_rgn = intersection(hex_rgn, shape), out_rgn = difference(shape, ihex_rgn) ) out_rgn; module honeycomb(shape, spacing=10, hex_wall=1) { rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall); region(rgn); } shape = glued_circles(d=50, spread=50, tangent=30); wall = 2; linear_extrude(height=10) { honeycomb(shape, spacing=10, hex_wall=wall); stroke(shape, width=wall, closed=true); }  - Revar
SP
Sanjeev Prabhakar
Sun, Feb 5, 2023 3:49 AM

The circumscribing circle of Hexagon has radius the same length as the
sides of the hexagon.

So the function for honeycomb may be defined with a radius and number of
hexagons in 1 layer and number of such layers one above another.

for example:
function hexagon(radius, n1, n2)
where n1 can be the number of hexagons in 1 row
and n2 can be the number of such rows stacked one above another.

in one row the pitch distance between the centers of two hexagons should be
3r
from 1st layer to 2nd layer height should be r
sin(60) and to be moved to
the right or left by 1.5*r

On Sun, 5 Feb 2023 at 07:53, Revar Desmera revarbat@gmail.com wrote:

Found a bug in the hex_wall setting.  Updated code:

function honeycomb(shape, spacing=10, hex_wall=1) =
let(
hex = hexagon(id=spacing-hex_wall, spin=180/6),
bounds = pointlist_bounds(shape),
size = bounds[1] - bounds[0],
hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true,
p=hex),
center = (bounds[0] + bounds[1]) / 2,
hex_rgn = move(center, p=hex_rgn2),
ihex_rgn = intersection(hex_rgn, shape),
out_rgn = difference(shape, ihex_rgn)
) out_rgn;

module honeycomb(shape, spacing=10, hex_wall=1) {
rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall);
region(rgn);
}

shape = glued_circles(d=50, spread=50, tangent=30);
wall = 2;
linear_extrude(height=10) {
honeycomb(shape, spacing=10, hex_wall=wall);
stroke(shape, width=wall, closed=true);
}

[image: Screenshot 2023-02-04 at 6.21.29 PM.png]

  • Revar

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

The circumscribing circle of Hexagon has radius the same length as the sides of the hexagon. So the function for honeycomb may be defined with a radius and number of hexagons in 1 layer and number of such layers one above another. for example: function hexagon(radius, n1, n2) where n1 can be the number of hexagons in 1 row and n2 can be the number of such rows stacked one above another. in one row the pitch distance between the centers of two hexagons should be 3*r from 1st layer to 2nd layer height should be r*sin(60) and to be moved to the right or left by 1.5*r On Sun, 5 Feb 2023 at 07:53, Revar Desmera <revarbat@gmail.com> wrote: > Found a bug in the hex_wall setting. Updated code: > > function honeycomb(shape, spacing=10, hex_wall=1) = > let( > hex = hexagon(id=spacing-hex_wall, spin=180/6), > bounds = pointlist_bounds(shape), > size = bounds[1] - bounds[0], > hex_rgn2 = grid_copies(spacing=spacing, size=size, stagger=true, > p=hex), > center = (bounds[0] + bounds[1]) / 2, > hex_rgn = move(center, p=hex_rgn2), > ihex_rgn = intersection(hex_rgn, shape), > out_rgn = difference(shape, ihex_rgn) > ) out_rgn; > > module honeycomb(shape, spacing=10, hex_wall=1) { > rgn = honeycomb(shape, spacing=spacing, hex_wall=hex_wall); > region(rgn); > } > > shape = glued_circles(d=50, spread=50, tangent=30); > wall = 2; > linear_extrude(height=10) { > honeycomb(shape, spacing=10, hex_wall=wall); > stroke(shape, width=wall, closed=true); > } > > > > [image: Screenshot 2023-02-04 at 6.21.29 PM.png] > > - Revar > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
K
Ken
Sun, Feb 5, 2023 4:38 AM

Thanks Revar, that small change has saved me almost 24 hours printing
time and nearly 80m of filament. I had designed a rectangular parts
storage box with honeycomb shaped shelves using (in part) your code, but
couldn't make the walls of the honeycomb thin enough. Your fix enabled
me to make the walls the thickness I wanted. Now I can have my oddball
storage box- happy days!

On 2023-02-05 13:22, Revar Desmera wrote:

Found a bug in the hex_wall setting.  Updated code:

         hex = hexagon(id=spacing-hex_wall, spin=180/6),

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com/running.html
https://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.

Thanks Revar, that small change has saved me almost 24 hours printing time and nearly 80m of filament. I had designed a rectangular parts storage box with honeycomb shaped shelves using (in part) your code, but couldn't make the walls of the honeycomb thin enough. Your fix enabled me to make the walls the thickness I wanted. Now I can have my oddball storage box- happy days! On 2023-02-05 13:22, Revar Desmera wrote: > Found a bug in the hex_wall setting.  Updated code: > >         hex = hexagon(id=spacing-hex_wall, spin=180/6), > -- Cheers, Ken bats059@gmail.com https://vk7krj.com/running.html https://sstv.vk7krj.com/all_bands.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Our job as parents is to teach them to control all three.
J
jay@jdnd.co.uk
Sun, Feb 5, 2023 9:10 PM

i would really like to see a way to stop the code folding from including
white-space after the closing bracket, it is really irritating as
anything outside the end closing bracket is clearly not part of the code
to be folded or it wouldn't be after the closing of the statement.

example screenshot attached line 46 has no reason to fold with line 24,
it drives me up the wall having to put // after every closing bracket

bellow screenshot line 24 serves no purpose being visible after folding
and should fold to line 23.

and line 26 is not part of the fold block yet is has been folded

line 90 has a // that stop it folding any whitespace, but this shouldent
be necessary

Microsoft visual studio does a good job of folding code properly as an
example

(great shame visual studio is written by Microsoft, it hurts to admit
Microsoft managed to do something right)

i would really like to see a way to stop the code folding from including white-space after the closing bracket, it is really irritating as anything outside the end closing bracket is clearly not part of the code to be folded or it wouldn't be after the closing of the statement. example screenshot attached line 46 has no reason to fold with line 24, it drives me up the wall having to put // after every closing bracket bellow screenshot line 24 serves no purpose being visible after folding and should fold to line 23. and line 26 is not part of the fold block yet is has been folded line 90 has a // that stop it folding any whitespace, but this shouldent be necessary Microsoft visual studio does a good job of folding code properly as an example (great shame visual studio is written by Microsoft, it hurts to admit Microsoft managed to do something right)
LM
Leonard Martin Struttmann
Mon, Feb 6, 2023 12:02 AM

Apparently, there is an OpenSCAD extension for Visual Studio:
https://marketplace.visualstudio.com/items?itemName=Antyos.openscad

On Sun, Feb 5, 2023 at 3:10 PM jay@jdnd.co.uk wrote:

i would really like to see a way to stop the code folding from including
white-space after the closing bracket, it is really irritating as anything
outside the end closing bracket is clearly not part of the code to be
folded or it wouldn't be after the closing of the statement.

example screenshot attached line 46 has no reason to fold with line 24, it
drives me up the wall having to put // after every closing bracket

bellow screenshot line 24 serves no purpose being visible after folding
and should fold to line 23.

and line 26 is not part of the fold block yet is has been folded

line 90 has a // that stop it folding any whitespace, but this shouldent
be necessary

Microsoft visual studio does a good job of folding code properly as an
example

(great shame visual studio is written by Microsoft, it hurts to admit
Microsoft managed to do something right)


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

Apparently, there is an OpenSCAD extension for Visual Studio: https://marketplace.visualstudio.com/items?itemName=Antyos.openscad On Sun, Feb 5, 2023 at 3:10 PM <jay@jdnd.co.uk> wrote: > i would really like to see a way to stop the code folding from including > white-space after the closing bracket, it is really irritating as anything > outside the end closing bracket is clearly not part of the code to be > folded or it wouldn't be after the closing of the statement. > > example screenshot attached line 46 has no reason to fold with line 24, it > drives me up the wall having to put // after every closing bracket > > > > bellow screenshot line 24 serves no purpose being visible after folding > and should fold to line 23. > > and line 26 is not part of the fold block yet is has been folded > > line 90 has a // that stop it folding any whitespace, but this shouldent > be necessary > > > > Microsoft visual studio does a good job of folding code properly as an > example > > (great shame visual studio is written by Microsoft, it hurts to admit > Microsoft managed to do something right) > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
DP
Dan Perry
Mon, Feb 6, 2023 12:56 AM

I've been using the OpenSCAD extension for VSC for a couple months now, I'm
quite happy with it.
Dan

On Sun, Feb 5, 2023 at 4:03 PM Leonard Martin Struttmann <
lenstruttmann@gmail.com> wrote:

Apparently, there is an OpenSCAD extension for Visual Studio:
https://marketplace.visualstudio.com/items?itemName=Antyos.openscad

On Sun, Feb 5, 2023 at 3:10 PM jay@jdnd.co.uk wrote:

i would really like to see a way to stop the code folding from including
white-space after the closing bracket, it is really irritating as anything
outside the end closing bracket is clearly not part of the code to be
folded or it wouldn't be after the closing of the statement.

example screenshot attached line 46 has no reason to fold with line 24,
it drives me up the wall having to put // after every closing bracket

bellow screenshot line 24 serves no purpose being visible after folding
and should fold to line 23.

and line 26 is not part of the fold block yet is has been folded

line 90 has a // that stop it folding any whitespace, but this shouldent
be necessary

Microsoft visual studio does a good job of folding code properly as an
example

(great shame visual studio is written by Microsoft, it hurts to admit
Microsoft managed to do something right)


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've been using the OpenSCAD extension for VSC for a couple months now, I'm quite happy with it. Dan On Sun, Feb 5, 2023 at 4:03 PM Leonard Martin Struttmann < lenstruttmann@gmail.com> wrote: > Apparently, there is an OpenSCAD extension for Visual Studio: > https://marketplace.visualstudio.com/items?itemName=Antyos.openscad > > > On Sun, Feb 5, 2023 at 3:10 PM <jay@jdnd.co.uk> wrote: > >> i would really like to see a way to stop the code folding from including >> white-space after the closing bracket, it is really irritating as anything >> outside the end closing bracket is clearly not part of the code to be >> folded or it wouldn't be after the closing of the statement. >> >> example screenshot attached line 46 has no reason to fold with line 24, >> it drives me up the wall having to put // after every closing bracket >> >> >> >> bellow screenshot line 24 serves no purpose being visible after folding >> and should fold to line 23. >> >> and line 26 is not part of the fold block yet is has been folded >> >> line 90 has a // that stop it folding any whitespace, but this shouldent >> be necessary >> >> >> >> Microsoft visual studio does a good job of folding code properly as an >> example >> >> (great shame visual studio is written by Microsoft, it hurts to admit >> Microsoft managed to do something right) >> >> >> _______________________________________________ >> 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
Mon, Feb 6, 2023 1:18 AM

OpenSCAD uses QScintilla for the internal editor, and I think that means
changing this is beyond anything the OpenSCAD devs can do.

On Sun, Feb 5, 2023 at 6:58 PM Dan Perry dan.p3rry@gmail.com wrote:

I've been using the OpenSCAD extension for VSC for a couple months now,
I'm quite happy with it.
Dan

On Sun, Feb 5, 2023 at 4:03 PM Leonard Martin Struttmann <
lenstruttmann@gmail.com> wrote:

Apparently, there is an OpenSCAD extension for Visual Studio:
https://marketplace.visualstudio.com/items?itemName=Antyos.openscad

On Sun, Feb 5, 2023 at 3:10 PM jay@jdnd.co.uk wrote:

i would really like to see a way to stop the code folding from including
white-space after the closing bracket, it is really irritating as anything
outside the end closing bracket is clearly not part of the code to be
folded or it wouldn't be after the closing of the statement.

example screenshot attached line 46 has no reason to fold with line 24,
it drives me up the wall having to put // after every closing bracket

bellow screenshot line 24 serves no purpose being visible after folding
and should fold to line 23.

and line 26 is not part of the fold block yet is has been folded

line 90 has a // that stop it folding any whitespace, but this shouldent
be necessary

Microsoft visual studio does a good job of folding code properly as an
example

(great shame visual studio is written by Microsoft, it hurts to admit
Microsoft managed to do something right)


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 uses QScintilla for the internal editor, and I think that means changing this is beyond anything the OpenSCAD devs can do. On Sun, Feb 5, 2023 at 6:58 PM Dan Perry <dan.p3rry@gmail.com> wrote: > I've been using the OpenSCAD extension for VSC for a couple months now, > I'm quite happy with it. > Dan > > > On Sun, Feb 5, 2023 at 4:03 PM Leonard Martin Struttmann < > lenstruttmann@gmail.com> wrote: > >> Apparently, there is an OpenSCAD extension for Visual Studio: >> https://marketplace.visualstudio.com/items?itemName=Antyos.openscad >> >> >> On Sun, Feb 5, 2023 at 3:10 PM <jay@jdnd.co.uk> wrote: >> >>> i would really like to see a way to stop the code folding from including >>> white-space after the closing bracket, it is really irritating as anything >>> outside the end closing bracket is clearly not part of the code to be >>> folded or it wouldn't be after the closing of the statement. >>> >>> example screenshot attached line 46 has no reason to fold with line 24, >>> it drives me up the wall having to put // after every closing bracket >>> >>> >>> >>> bellow screenshot line 24 serves no purpose being visible after folding >>> and should fold to line 23. >>> >>> and line 26 is not part of the fold block yet is has been folded >>> >>> line 90 has a // that stop it folding any whitespace, but this shouldent >>> be necessary >>> >>> >>> >>> Microsoft visual studio does a good job of folding code properly as an >>> example >>> >>> (great shame visual studio is written by Microsoft, it hurts to admit >>> Microsoft managed to do something right) >>> >>> >>> _______________________________________________ >>> 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 >