MP
Marcus Poller
Fri, Sep 30, 2022 10:25 PM
Dear OpenSCAD users,
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand why.
Here's the context:
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to the sides of the box. The printer cannot print overhangs without support structure, but overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski() and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-11_probedrucke.scad)
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
Affected OpenSCAD Versions:
- OpenSCAD version 2021.01
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem I created. It's very hard to do extensive testing, because each attempt consumes a lot of CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
Cheers,
Marcus
Dear OpenSCAD users,
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand why.
Here's the context:
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to the sides of the box. The printer cannot print overhangs without support structure, but overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski() and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
* minkowski to printable angles, use cube() and intersect() to cut a piece of proper size. Suffers from a drain of CPU for the minkowski
* minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece of proper size. I can provide an example, but its file size is 80 MBytes
* user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
* ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-09-25_probedruck_textur.scad)
* WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-11_probedrucke.scad)
* finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
Affected OpenSCAD Versions:
* OpenSCAD version 2021.01
* OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem I created. It's very hard to do extensive testing, because each attempt consumes a lot of CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
Cheers,
Marcus
MM
Michael Marx
Fri, Sep 30, 2022 11:51 PM
DON'T PREVIEW THIS AS IS.
Marcus, please cut it down to a test case which does not run forever, I imagine l & h being smaller
could help.
-----Original Message-----
From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
Sent: Sat, 1 Oct 2022 08:26
To: discuss@lists.openscad.org
Subject: [OpenSCAD] minkowski + mesh is not closed
Dear OpenSCAD users,
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
why.
Here's the context:
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
the sides of the box. The printer cannot print overhangs without support structure, but
overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
11_probedrucke.scad)
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
x-y-plance)
Affected OpenSCAD Versions:
- OpenSCAD version 2021.01
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem I
created. It's very hard to do extensive testing, because each attempt consumes a lot of
CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
Cheers,
Marcus
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
DON'T PREVIEW THIS AS IS.
Marcus, please cut it down to a test case which does not run forever, I imagine l & h being smaller
could help.
> -----Original Message-----
> From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
> Sent: Sat, 1 Oct 2022 08:26
> To: discuss@lists.openscad.org
> Subject: [OpenSCAD] minkowski + mesh is not closed
>
> Dear OpenSCAD users,
>
> I am new to this list. Please bear with me, feedback is welcome.
>
> I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
> why.
>
> Here's the context:
> I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
> texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
> the sides of the box. The printer cannot print overhangs without support structure, but
> overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
> can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
> and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
> structure first by applying a linear_extrude() before applying minkowski();
>
> I have tried various combinations to get a slice of wooden texture:
>
> * minkowski to printable angles, use cube() and intersect() to cut a piece of proper
> size. Suffers from a drain of CPU for the minkowski
> * minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
> of proper size. I can provide an example, but its file size is 80 MBytes
> * user intersect, apply minkowski.
>
> Each of the approaches failes in one of those ways:
>
> * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
> 09-25_probedruck_textur.scad)
> * WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
> 11_probedrucke.scad)
> * finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
> x-y-plance)
>
> Affected OpenSCAD Versions:
>
> * OpenSCAD version 2021.01
> * OpenSCAD version 2022.09.20.ai12175
>
> I do not understand what I'm doing wrong and could use some advice what kind of problem I
> created. It's very hard to do extensive testing, because each attempt consumes a lot of
> CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
> I attached my samples. The error messages vary between preview and render.
>
> Cheers,
> Marcus
>
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
MM
Michael Marx
Sat, Oct 1, 2022 2:50 AM
2h13m on my system... and peaked just under 4GB memory.
With l=25, h=20, 1m28s, so if anyone want to play start from there.
-----Original Message-----
From: Michael Marx [mailto:michael@marx.id.au]
Sent: Sat, 1 Oct 2022 09:51
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
DON'T PREVIEW THIS AS IS.
Marcus, please cut it down to a test case which does not run forever, I imagine l & h
being smaller
could help.
-----Original Message-----
From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
Sent: Sat, 1 Oct 2022 08:26
To: discuss@lists.openscad.org
Subject: [OpenSCAD] minkowski + mesh is not closed
Dear OpenSCAD users,
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not
why.
Here's the context:
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply
texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
the sides of the box. The printer cannot print overhangs without support structure, but
overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a
of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
11_probedrucke.scad)
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece
x-y-plance)
Affected OpenSCAD Versions:
- OpenSCAD version 2021.01
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem
created. It's very hard to do extensive testing, because each attempt consumes a lot of
CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
Cheers,
Marcus
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
2h13m on my system... and peaked just under 4GB memory.
With l=25, h=20, 1m28s, so if anyone want to play start from there.
> -----Original Message-----
> From: Michael Marx [mailto:michael@marx.id.au]
> Sent: Sat, 1 Oct 2022 09:51
> To: 'OpenSCAD general discussion'
> Subject: [OpenSCAD] Re: minkowski + mesh is not closed
>
> DON'T PREVIEW THIS AS IS.
>
> Marcus, please cut it down to a test case which does not run forever, I imagine l & h
> being smaller
> could help.
>
> > -----Original Message-----
> > From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
> > Sent: Sat, 1 Oct 2022 08:26
> > To: discuss@lists.openscad.org
> > Subject: [OpenSCAD] minkowski + mesh is not closed
> >
> > Dear OpenSCAD users,
> >
> > I am new to this list. Please bear with me, feedback is welcome.
> >
> > I have got an issue that OpenSCAD tells me my shape was not closed and I do not
> understand
> > why.
> >
> > Here's the context:
> > I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply
> a
> > texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
> > the sides of the box. The printer cannot print overhangs without support structure, but
> > overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
> > can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
> > and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
> > structure first by applying a linear_extrude() before applying minkowski();
> >
> > I have tried various combinations to get a slice of wooden texture:
> >
> > * minkowski to printable angles, use cube() and intersect() to cut a piece of proper
> > size. Suffers from a drain of CPU for the minkowski
> > * minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a
> piece
> > of proper size. I can provide an example, but its file size is 80 MBytes
> > * user intersect, apply minkowski.
> >
> > Each of the approaches failes in one of those ways:
> >
> > * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
> > 09-25_probedruck_textur.scad)
> > * WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
> > 11_probedrucke.scad)
> > * finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece
> in
> > x-y-plance)
> >
> > Affected OpenSCAD Versions:
> >
> > * OpenSCAD version 2021.01
> > * OpenSCAD version 2022.09.20.ai12175
> >
> > I do not understand what I'm doing wrong and could use some advice what kind of problem
> I
> > created. It's very hard to do extensive testing, because each attempt consumes a lot of
> > CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
> > I attached my samples. The error messages vary between preview and render.
> >
> > Cheers,
> > Marcus
> >
>
>
>
> --
> This email has been checked for viruses by AVG antivirus software.
> www.avg.com
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
SP
Sanjeev Prabhakar
Sat, Oct 1, 2022 2:57 AM
Can you share a picture of what you are trying to do?
On Sat, 1 Oct 2022 at 08:21, Michael Marx michael.marx@tpg.com.au wrote:
2h13m on my system... and peaked just under 4GB memory.
With l=25, h=20, 1m28s, so if anyone want to play start from there.
-----Original Message-----
From: Michael Marx [mailto:michael@marx.id.au]
Sent: Sat, 1 Oct 2022 09:51
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
DON'T PREVIEW THIS AS IS.
Marcus, please cut it down to a test case which does not run forever, I
being smaller
could help.
-----Original Message-----
From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
Sent: Sat, 1 Oct 2022 08:26
To: discuss@lists.openscad.org
Subject: [OpenSCAD] minkowski + mesh is not closed
Dear OpenSCAD users,
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and
why.
Here's the context:
I want to 3d-print a box that looks like it's made of wood. Therefore
texture (SVG) that resembles the annual rings of a tree. I want to
the sides of the box. The printer cannot print overhangs without
overhanging angles of 45° (from base to overhanging outer side) are
can convert the SVG to a 3d-structure with 45° rises on every side by
and applying a cylindrical cone. Of course I need to cheat and convert
structure first by applying a linear_extrude() before applying
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use
cube()+intersect() to cut a
of proper size. I can provide an example, but its file size is 80
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to
CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair!
11_probedrucke.scad)
- finishes rendering with an empty screen
(2022-09-25_probedruck_textur.scad 3rd piece
x-y-plance)
Affected OpenSCAD Versions:
- OpenSCAD version 2021.01
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice
created. It's very hard to do extensive testing, because each attempt
CPU and patience. As a side it would be nice to get advice on how to
I attached my samples. The error messages vary between preview and
Can you share a picture of what you are trying to do?
On Sat, 1 Oct 2022 at 08:21, Michael Marx <michael.marx@tpg.com.au> wrote:
> 2h13m on my system... and peaked just under 4GB memory.
>
> With l=25, h=20, 1m28s, so if anyone want to play start from there.
>
> > -----Original Message-----
> > From: Michael Marx [mailto:michael@marx.id.au]
> > Sent: Sat, 1 Oct 2022 09:51
> > To: 'OpenSCAD general discussion'
> > Subject: [OpenSCAD] Re: minkowski + mesh is not closed
> >
> > DON'T PREVIEW THIS AS IS.
> >
> > Marcus, please cut it down to a test case which does not run forever, I
> imagine l & h
> > being smaller
> > could help.
> >
> > > -----Original Message-----
> > > From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
> > > Sent: Sat, 1 Oct 2022 08:26
> > > To: discuss@lists.openscad.org
> > > Subject: [OpenSCAD] minkowski + mesh is not closed
> > >
> > > Dear OpenSCAD users,
> > >
> > > I am new to this list. Please bear with me, feedback is welcome.
> > >
> > > I have got an issue that OpenSCAD tells me my shape was not closed and
> I do not
> > understand
> > > why.
> > >
> > > Here's the context:
> > > I want to 3d-print a box that looks like it's made of wood. Therefore
> I decided to apply
> > a
> > > texture (SVG) that resembles the annual rings of a tree. I want to
> apply that texture to
> > > the sides of the box. The printer cannot print overhangs without
> support structure, but
> > > overhanging angles of 45° (from base to overhanging outer side) are
> fine. So I thought I
> > > can convert the SVG to a 3d-structure with 45° rises on every side by
> using minkowski()
> > > and applying a cylindrical cone. Of course I need to cheat and convert
> the 2d SVG to 3d
> > > structure first by applying a linear_extrude() before applying
> minkowski();
> > >
> > > I have tried various combinations to get a slice of wooden texture:
> > >
> > > * minkowski to printable angles, use cube() and intersect() to cut a
> piece of proper
> > > size. Suffers from a drain of CPU for the minkowski
> > > * minkowski SVG, render, export as STL. Import STL, use
> cube()+intersect() to cut a
> > piece
> > > of proper size. I can provide an example, but its file size is 80
> MBytes
> > > * user intersect, apply minkowski.
> > >
> > > Each of the approaches failes in one of those ways:
> > >
> > > * ERROR: The given mesh is not closed! Unable to convert to
> CGAL_Nef_Polyhedron. (2022-
> > > 09-25_probedruck_textur.scad)
> > > * WARNING: Object may not be a valid 2-manifold and may need repair!
> (2022-09-
> > > 11_probedrucke.scad)
> > > * finishes rendering with an empty screen
> (2022-09-25_probedruck_textur.scad 3rd piece
> > in
> > > x-y-plance)
> > >
> > > Affected OpenSCAD Versions:
> > >
> > > * OpenSCAD version 2021.01
> > > * OpenSCAD version 2022.09.20.ai12175
> > >
> > > I do not understand what I'm doing wrong and could use some advice
> what kind of problem
> > I
> > > created. It's very hard to do extensive testing, because each attempt
> consumes a lot of
> > > CPU and patience. As a side it would be nice to get advice on how to
> cut CPU time.
> > > I attached my samples. The error messages vary between preview and
> render.
> > >
> > > Cheers,
> > > Marcus
> > >
> >
> >
> >
> > --
> > This email has been checked for viruses by AVG antivirus software.
> > www.avg.com
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>
>
> --
> This email has been checked for viruses by AVG antivirus software.
> www.avg.com
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
MM
Michael Marx
Sat, Oct 1, 2022 3:10 AM
Correction, that 2h13m was just sample_piece(),
without base() & antiwarp(), which should be minor,
and without the bottom four cube_intersect() conekowski_2d()'s, so god knows how long that would
be...they look expensive.
Same for the 1m28s.
A subsequent (same reduced code) l=30 h=30, was F5=2m20s, F6=0m15s.
Sanjeev, this is what the reduced 2h13m produced, looks similar on the back face.
-----Original Message-----
Sent: Sat, 1 Oct 2022 12:50
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
2h13m on my system... and peaked just under 4GB memory.
With l=25, h=20, 1m28s, so if anyone want to play start from there.
-----Original Message-----
Sent: Sat, 1 Oct 2022 09:51
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
DON'T PREVIEW THIS AS IS.
Marcus, please cut it down to a test case which does not run forever, I imagine l & h
-----Original Message-----
Sent: Sat, 1 Oct 2022 08:26
Subject: [OpenSCAD] minkowski + mesh is not closed
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to
texture (SVG) that resembles the annual rings of a tree. I want to apply that texture
the sides of the box. The printer cannot print overhangs without support structure,
overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought
can convert the SVG to a 3d-structure with 45° rises on every side by using
and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to
structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a
of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron.
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd
Affected OpenSCAD Versions:
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of
created. It's very hard to do extensive testing, because each attempt consumes a lot
CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
This email has been checked for viruses by AVG antivirus software.
This email has been checked for viruses by AVG antivirus software.
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
Correction, that 2h13m was just sample_piece(),
without base() & antiwarp(), which should be minor,
and without the bottom four cube_intersect() conekowski_2d()'s, so god knows how long that would
be...they look expensive.
Same for the 1m28s.
A subsequent (same reduced code) l=30 h=30, was F5=2m20s, F6=0m15s.
Sanjeev, this is what the reduced 2h13m produced, looks similar on the back face.
> -----Original Message-----
> From: Michael Marx [mailto:michael.marx@tpg.com.au]
> Sent: Sat, 1 Oct 2022 12:50
> To: 'OpenSCAD general discussion'
> Subject: [OpenSCAD] Re: minkowski + mesh is not closed
>
> 2h13m on my system... and peaked just under 4GB memory.
>
> With l=25, h=20, 1m28s, so if anyone want to play start from there.
>
> > -----Original Message-----
> > From: Michael Marx [mailto:michael@marx.id.au]
> > Sent: Sat, 1 Oct 2022 09:51
> > To: 'OpenSCAD general discussion'
> > Subject: [OpenSCAD] Re: minkowski + mesh is not closed
> >
> > DON'T PREVIEW THIS AS IS.
> >
> > Marcus, please cut it down to a test case which does not run forever, I imagine l & h
> > being smaller
> > could help.
> >
> > > -----Original Message-----
> > > From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
> > > Sent: Sat, 1 Oct 2022 08:26
> > > To: discuss@lists.openscad.org
> > > Subject: [OpenSCAD] minkowski + mesh is not closed
> > >
> > > Dear OpenSCAD users,
> > >
> > > I am new to this list. Please bear with me, feedback is welcome.
> > >
> > > I have got an issue that OpenSCAD tells me my shape was not closed and I do not
> > understand
> > > why.
> > >
> > > Here's the context:
> > > I want to 3d-print a box that looks like it's made of wood. Therefore I decided to
> apply
> > a
> > > texture (SVG) that resembles the annual rings of a tree. I want to apply that texture
> to
> > > the sides of the box. The printer cannot print overhangs without support structure,
> but
> > > overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought
> I
> > > can convert the SVG to a 3d-structure with 45° rises on every side by using
> minkowski()
> > > and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to
> 3d
> > > structure first by applying a linear_extrude() before applying minkowski();
> > >
> > > I have tried various combinations to get a slice of wooden texture:
> > >
> > > * minkowski to printable angles, use cube() and intersect() to cut a piece of proper
> > > size. Suffers from a drain of CPU for the minkowski
> > > * minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a
> > piece
> > > of proper size. I can provide an example, but its file size is 80 MBytes
> > > * user intersect, apply minkowski.
> > >
> > > Each of the approaches failes in one of those ways:
> > >
> > > * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron.
> (2022-
> > > 09-25_probedruck_textur.scad)
> > > * WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
> > > 11_probedrucke.scad)
> > > * finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd
> piece
> > in
> > > x-y-plance)
> > >
> > > Affected OpenSCAD Versions:
> > >
> > > * OpenSCAD version 2021.01
> > > * OpenSCAD version 2022.09.20.ai12175
> > >
> > > I do not understand what I'm doing wrong and could use some advice what kind of
> problem
> > I
> > > created. It's very hard to do extensive testing, because each attempt consumes a lot
> of
> > > CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
> > > I attached my samples. The error messages vary between preview and render.
> > >
> > > Cheers,
> > > Marcus
> > >
> >
> >
> >
> > --
> > This email has been checked for viruses by AVG antivirus software.
> > www.avg.com
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>
>
> --
> This email has been checked for viruses by AVG antivirus software.
> www.avg.com
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
SP
Sanjeev Prabhakar
Sat, Oct 1, 2022 3:20 AM
Oh, that seems complicated
I was thinking of something like the attached image.
This took around 5 minutes in my computer (M1 Macbook air)
On Sat, 1 Oct 2022 at 08:42, Michael Marx michael@marx.id.au wrote:
Correction, that 2h13m was just sample_piece(),
without base() & antiwarp(), which should be minor,
and without the bottom four cube_intersect() conekowski_2d()'s, so god
knows how long that would be...they look expensive.
Same for the 1m28s.
A subsequent (same reduced code) l=30 h=30, was F5=2m20s, F6=0m15s.
Sanjeev, this is what the reduced 2h13m produced, looks similar on the
back face.
-----Original Message-----
Sent: Sat, 1 Oct 2022 12:50
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
2h13m on my system... and peaked just under 4GB memory.
With l=25, h=20, 1m28s, so if anyone want to play start from there.
-----Original Message-----
Sent: Sat, 1 Oct 2022 09:51
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
DON'T PREVIEW THIS AS IS.
Marcus, please cut it down to a test case which does not run forever,
-----Original Message-----
Sent: Sat, 1 Oct 2022 08:26
Subject: [OpenSCAD] minkowski + mesh is not closed
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed
I want to 3d-print a box that looks like it's made of wood.
texture (SVG) that resembles the annual rings of a tree. I want to
the sides of the box. The printer cannot print overhangs without
overhanging angles of 45° (from base to overhanging outer side) are
can convert the SVG to a 3d-structure with 45° rises on every side
and applying a cylindrical cone. Of course I need to cheat and
structure first by applying a linear_extrude() before applying
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use
cube()+intersect() to cut a
of proper size. I can provide an example, but its file size is 80
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need
- finishes rendering with an empty screen
(2022-09-25_probedruck_textur.scad 3rd
Affected OpenSCAD Versions:
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice
created. It's very hard to do extensive testing, because each
CPU and patience. As a side it would be nice to get advice on how to
I attached my samples. The error messages vary between preview and
This email has been checked for viruses by AVG antivirus software.
This email has been checked for viruses by AVG antivirus software.
Oh, that seems complicated
I was thinking of something like the attached image.
This took around 5 minutes in my computer (M1 Macbook air)
On Sat, 1 Oct 2022 at 08:42, Michael Marx <michael@marx.id.au> wrote:
> *Correction*, that 2h13m was just sample_piece(),
>
> without base() & antiwarp(), which should be minor,
>
> and without the bottom four cube_intersect() conekowski_2d()'s, so god
> knows how long that would be...they look expensive.
>
>
>
> Same for the 1m28s.
>
> A subsequent (same reduced code) l=30 h=30, was F5=2m20s, F6=0m15s.
>
>
>
> Sanjeev, this is what the reduced 2h13m produced, looks similar on the
> back face.
>
>
>
>
>
>
>
> > -----Original Message-----
>
> > From: Michael Marx [mailto:michael.marx@tpg.com.au]
>
> > Sent: Sat, 1 Oct 2022 12:50
>
> > To: 'OpenSCAD general discussion'
>
> > Subject: [OpenSCAD] Re: minkowski + mesh is not closed
>
> >
>
> > 2h13m on my system... and peaked just under 4GB memory.
>
> >
>
> > With l=25, h=20, 1m28s, so if anyone want to play start from there.
>
> >
>
> > > -----Original Message-----
>
> > > From: Michael Marx [mailto:michael@marx.id.au]
>
> > > Sent: Sat, 1 Oct 2022 09:51
>
> > > To: 'OpenSCAD general discussion'
>
> > > Subject: [OpenSCAD] Re: minkowski + mesh is not closed
>
> > >
>
> > > DON'T PREVIEW THIS AS IS.
>
> > >
>
> > > Marcus, please cut it down to a test case which does not run forever,
> I imagine l & h
>
> > > being smaller
>
> > > could help.
>
> > >
>
> > > > -----Original Message-----
>
> > > > From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
>
> > > > Sent: Sat, 1 Oct 2022 08:26
>
> > > > To: discuss@lists.openscad.org
>
> > > > Subject: [OpenSCAD] minkowski + mesh is not closed
>
> > > >
>
> > > > Dear OpenSCAD users,
>
> > > >
>
> > > > I am new to this list. Please bear with me, feedback is welcome.
>
> > > >
>
> > > > I have got an issue that OpenSCAD tells me my shape was not closed
> and I do not
>
> > > understand
>
> > > > why.
>
> > > >
>
> > > > Here's the context:
>
> > > > I want to 3d-print a box that looks like it's made of wood.
> Therefore I decided to
>
> > apply
>
> > > a
>
> > > > texture (SVG) that resembles the annual rings of a tree. I want to
> apply that texture
>
> > to
>
> > > > the sides of the box. The printer cannot print overhangs without
> support structure,
>
> > but
>
> > > > overhanging angles of 45° (from base to overhanging outer side) are
> fine. So I thought
>
> > I
>
> > > > can convert the SVG to a 3d-structure with 45° rises on every side
> by using
>
> > minkowski()
>
> > > > and applying a cylindrical cone. Of course I need to cheat and
> convert the 2d SVG to
>
> > 3d
>
> > > > structure first by applying a linear_extrude() before applying
> minkowski();
>
> > > >
>
> > > > I have tried various combinations to get a slice of wooden texture:
>
> > > >
>
> > > > * minkowski to printable angles, use cube() and intersect() to cut
> a piece of proper
>
> > > > size. Suffers from a drain of CPU for the minkowski
>
> > > > * minkowski SVG, render, export as STL. Import STL, use
> cube()+intersect() to cut a
>
> > > piece
>
> > > > of proper size. I can provide an example, but its file size is 80
> MBytes
>
> > > > * user intersect, apply minkowski.
>
> > > >
>
> > > > Each of the approaches failes in one of those ways:
>
> > > >
>
> > > > * ERROR: The given mesh is not closed! Unable to convert to
> CGAL_Nef_Polyhedron.
>
> > (2022-
>
> > > > 09-25_probedruck_textur.scad)
>
> > > > * WARNING: Object may not be a valid 2-manifold and may need
> repair! (2022-09-
>
> > > > 11_probedrucke.scad)
>
> > > > * finishes rendering with an empty screen
> (2022-09-25_probedruck_textur.scad 3rd
>
> > piece
>
> > > in
>
> > > > x-y-plance)
>
> > > >
>
> > > > Affected OpenSCAD Versions:
>
> > > >
>
> > > > * OpenSCAD version 2021.01
>
> > > > * OpenSCAD version 2022.09.20.ai12175
>
> > > >
>
> > > > I do not understand what I'm doing wrong and could use some advice
> what kind of
>
> > problem
>
> > > I
>
> > > > created. It's very hard to do extensive testing, because each
> attempt consumes a lot
>
> > of
>
> > > > CPU and patience. As a side it would be nice to get advice on how to
> cut CPU time.
>
> > > > I attached my samples. The error messages vary between preview and
> render.
>
> > > >
>
> > > > Cheers,
>
> > > > Marcus
>
> > > >
>
> > >
>
> > >
>
> > >
>
> > > --
>
> > > This email has been checked for viruses by AVG antivirus software.
>
> > > www.avg.com
>
> > > _______________________________________________
>
> > > OpenSCAD mailing list
>
> > > To unsubscribe send an email to discuss-leave@lists.openscad.org
>
> >
>
> >
>
> > --
>
> > This email has been checked for viruses by AVG antivirus software.
>
> > www.avg.com
>
> > _______________________________________________
>
> > OpenSCAD mailing list
>
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>
> [image: width=]
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> Virus-free.www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> <#m_-2484108180385737096_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
MM
Michael Marx
Sat, Oct 1, 2022 5:54 AM
Marcus,
First, you should add convexity=10 to all your linear_extrude()'s, 10 may not be perfect, but is a
good number. This fixes preview strange effects, like faces disappearing when moving the display.
Alternatively, if it is not a hungry operation wrap
the linear_extrude() in render() {},
Next time, please comment out or stick into a test module those expensive operations,
like the three at the bottom and mention they can be tested separately.
I normally load up a file and hit F5 to see what's going on, getting a 2hr preview up front is not
nice.
If you have specific errors, it is nice to try to cut down your model to try and find the main
culprit. Try using '*' to block out chunks, a but of trial & error.
Each of the approaches fails in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- finishes rendering with an empty screen
(2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
A. Is the first error only with the sample_piece() or with the three operations at the bottom of
the file included?
B. Is the empty screen just with the 3rd piece, or are all the other bits rendered as well?
As a side it would be nice to get advice on how to cut CPU time.
As you have found minkowski() is expensive. intersection() can be too.
More on this later.
But make things smaller when testing, bigger usually means more faces, means more processing.
I added:
sf=1/25;
and made your scale
scale([sf,sf]) import("holztextur.svg",center=true);
So you can make l & h smaller, shrink the scale too, this makes for quicker tests.
(However sometimes that can make some errors disappear - like some CGAL errors)
Breaking this down may help others.
First 2022-09-25_probedruck_textur.scad
Module sample_piece() has two sides,
the plane square edged, cheap re CPU, but no 45 degree solution,
though small recesses may be printable. Comment that out for testing.
Then the other side with the minkowski. Expensive.
Then there are three tests at the bottom, commenting those out for now.
I have not looked at the other .scad yet.
For now, can you answer A. & B. above, ATM I don't know which bits you are trying to debug.
With
sf=1/50;
l=10;
w=2;
h=10;
&
module sample_piece(){
//render()
union(){
cube([l,w,h]);
*translate([0,w+eh,0]) rotate([90,0,0]) linear_extrude(eh, convexity=10) wooden_texture_2d();
rotate([90,0,0])
intersection()
{
linear_extrude(1, convexity=10)
square([l,h]);
minkowski(){
linear_extrude(pseudo_3d, convexity=10)
wooden_texture_2d();
cone();
}
}
}
}
That previews in 10m, and renders in 22s.
-----Original Message-----
Sent: Sat, 1 Oct 2022 08:26
Subject: [OpenSCAD] minkowski + mesh is not closed
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
the sides of the box. The printer cannot print overhangs without support structure, but
overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
Affected OpenSCAD Versions:
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem I
created. It's very hard to do extensive testing, because each attempt consumes a lot of
CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
Marcus,
First, you should add convexity=10 to all your linear_extrude()'s, 10 may not be perfect, but is a
good number. This fixes preview strange effects, like faces disappearing when moving the display.
Alternatively, if it is not a hungry operation wrap
the linear_extrude() in render() {},
Next time, please comment out or stick into a test module those expensive operations,
like the three at the bottom and mention they can be tested separately.
I normally load up a file and hit F5 to see what's going on, getting a 2hr preview up front is not
nice.
If you have specific errors, it is nice to try to cut down your model to try and find the main
culprit. Try using '*' to block out chunks, a but of trial & error.
> Each of the approaches fails in one of those ways:
> * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
> 09-25_probedruck_textur.scad)
> * finishes rendering with an empty screen
(2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
A. Is the first error only with the sample_piece() or with the three operations at the bottom of
the file included?
B. Is the empty screen just with the 3rd piece, or are all the other bits rendered as well?
> As a side it would be nice to get advice on how to cut CPU time.
As you have found minkowski() is expensive. intersection() can be too.
More on this later.
But make things smaller when testing, bigger usually means more faces, means more processing.
I added:
sf=1/25;
and made your scale
scale([sf,sf]) import("holztextur.svg",center=true);
So you can make l & h smaller, shrink the scale too, this makes for quicker tests.
(However sometimes that can make some errors disappear - like some CGAL errors)
Breaking this down may help others.
First 2022-09-25_probedruck_textur.scad
Module sample_piece() has two sides,
the plane square edged, cheap re CPU, but no 45 degree solution,
though small recesses may be printable. Comment that out for testing.
Then the other side with the minkowski. Expensive.
Then there are three tests at the bottom, commenting those out for now.
I have not looked at the other .scad yet.
For now, can you answer A. & B. above, ATM I don't know which bits you are trying to debug.
With
sf=1/50;
l=10;
w=2;
h=10;
&
module sample_piece(){
//render()
union(){
cube([l,w,h]);
*translate([0,w+eh,0]) rotate([90,0,0]) linear_extrude(eh, convexity=10) wooden_texture_2d();
rotate([90,0,0])
intersection()
{
linear_extrude(1, convexity=10)
square([l,h]);
minkowski(){
linear_extrude(pseudo_3d, convexity=10)
wooden_texture_2d();
cone();
}
}
}
}
That previews in 10m, and renders in 22s.
> -----Original Message-----
> From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
> Sent: Sat, 1 Oct 2022 08:26
> To: discuss@lists.openscad.org
> Subject: [OpenSCAD] minkowski + mesh is not closed
>
> Dear OpenSCAD users,
>
> I am new to this list. Please bear with me, feedback is welcome.
>
> I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
> why.
>
> Here's the context:
> I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
> texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
> the sides of the box. The printer cannot print overhangs without support structure, but
> overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
> can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
> and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
> structure first by applying a linear_extrude() before applying minkowski();
>
> I have tried various combinations to get a slice of wooden texture:
>
> * minkowski to printable angles, use cube() and intersect() to cut a piece of proper
> size. Suffers from a drain of CPU for the minkowski
> * minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
> of proper size. I can provide an example, but its file size is 80 MBytes
> * user intersect, apply minkowski.
>
> Each of the approaches failes in one of those ways:
>
> * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
> 09-25_probedruck_textur.scad)
> * WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
> 11_probedrucke.scad)
> * finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
> x-y-plance)
>
> Affected OpenSCAD Versions:
>
> * OpenSCAD version 2021.01
> * OpenSCAD version 2022.09.20.ai12175
>
> I do not understand what I'm doing wrong and could use some advice what kind of problem I
> created. It's very hard to do extensive testing, because each attempt consumes a lot of
> CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
> I attached my samples. The error messages vary between preview and render.
>
> Cheers,
> Marcus
>
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
MM
Michael Marx
Sat, Oct 1, 2022 6:31 AM
and with 2021.01 (can't run newer ones), it has many degenerate faces (yellow) & some
self-intersections (magenta).
Just reporting this for now.
It may explain CGAL errors.
From: Michael Marx [mailto:michael@marx.id.au]
Sent: Sat, 1 Oct 2022 15:54
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
Marcus,
First, you should add convexity=10 to all your linear_extrude()'s, 10 may not be perfect, but is a
good number. This fixes preview strange effects, like faces disappearing when moving the display.
Alternatively, if it is not a hungry operation wrap
the linear_extrude() in render() {},
Next time, please comment out or stick into a test module those expensive operations,
like the three at the bottom and mention they can be tested separately.
I normally load up a file and hit F5 to see what's going on, getting a 2hr preview up front is not
nice.
If you have specific errors, it is nice to try to cut down your model to try and find the main
culprit. Try using '*' to block out chunks, a but of trial & error.
Each of the approaches fails in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- finishes rendering with an empty screen
(2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
A. Is the first error only with the sample_piece() or with the three operations at the bottom of
the file included?
B. Is the empty screen just with the 3rd piece, or are all the other bits rendered as well?
As a side it would be nice to get advice on how to cut CPU time.
As you have found minkowski() is expensive. intersection() can be too.
More on this later.
But make things smaller when testing, bigger usually means more faces, means more processing.
I added:
sf=1/25;
and made your scale
scale([sf,sf]) import("holztextur.svg",center=true);
So you can make l & h smaller, shrink the scale too, this makes for quicker tests.
(However sometimes that can make some errors disappear - like some CGAL errors)
Breaking this down may help others.
First 2022-09-25_probedruck_textur.scad
Module sample_piece() has two sides,
the plane square edged, cheap re CPU, but no 45 degree solution,
though small recesses may be printable. Comment that out for testing.
Then the other side with the minkowski. Expensive.
Then there are three tests at the bottom, commenting those out for now.
I have not looked at the other .scad yet.
For now, can you answer A. & B. above, ATM I don't know which bits you are trying to debug.
With
sf=1/50;
l=10;
w=2;
h=10;
&
module sample_piece(){
//render()
union(){
cube([l,w,h]);
*translate([0,w+eh,0]) rotate([90,0,0]) linear_extrude(eh, convexity=10) wooden_texture_2d();
rotate([90,0,0])
intersection()
{
linear_extrude(1, convexity=10)
square([l,h]);
minkowski(){
linear_extrude(pseudo_3d, convexity=10)
wooden_texture_2d();
cone();
}
}
}
}
That previews in 10m, and renders in 22s.
-----Original Message-----
Sent: Sat, 1 Oct 2022 08:26
Subject: [OpenSCAD] minkowski + mesh is not closed
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
the sides of the box. The printer cannot print overhangs without support structure, but
overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
Affected OpenSCAD Versions:
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem I
created. It's very hard to do extensive testing, because each attempt consumes a lot of
CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_con
tent=emailclient> width=www.avg.com
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
and with 2021.01 (can't run newer ones), it has many degenerate faces (yellow) & some
self-intersections (magenta).
Just reporting this for now.
It may explain CGAL errors.
_____
From: Michael Marx [mailto:michael@marx.id.au]
Sent: Sat, 1 Oct 2022 15:54
To: 'OpenSCAD general discussion'
Subject: [OpenSCAD] Re: minkowski + mesh is not closed
Marcus,
First, you should add convexity=10 to all your linear_extrude()'s, 10 may not be perfect, but is a
good number. This fixes preview strange effects, like faces disappearing when moving the display.
Alternatively, if it is not a hungry operation wrap
the linear_extrude() in render() {},
Next time, please comment out or stick into a test module those expensive operations,
like the three at the bottom and mention they can be tested separately.
I normally load up a file and hit F5 to see what's going on, getting a 2hr preview up front is not
nice.
If you have specific errors, it is nice to try to cut down your model to try and find the main
culprit. Try using '*' to block out chunks, a but of trial & error.
> Each of the approaches fails in one of those ways:
> * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
> 09-25_probedruck_textur.scad)
> * finishes rendering with an empty screen
(2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
A. Is the first error only with the sample_piece() or with the three operations at the bottom of
the file included?
B. Is the empty screen just with the 3rd piece, or are all the other bits rendered as well?
> As a side it would be nice to get advice on how to cut CPU time.
As you have found minkowski() is expensive. intersection() can be too.
More on this later.
But make things smaller when testing, bigger usually means more faces, means more processing.
I added:
sf=1/25;
and made your scale
scale([sf,sf]) import("holztextur.svg",center=true);
So you can make l & h smaller, shrink the scale too, this makes for quicker tests.
(However sometimes that can make some errors disappear - like some CGAL errors)
Breaking this down may help others.
First 2022-09-25_probedruck_textur.scad
Module sample_piece() has two sides,
the plane square edged, cheap re CPU, but no 45 degree solution,
though small recesses may be printable. Comment that out for testing.
Then the other side with the minkowski. Expensive.
Then there are three tests at the bottom, commenting those out for now.
I have not looked at the other .scad yet.
For now, can you answer A. & B. above, ATM I don't know which bits you are trying to debug.
With
sf=1/50;
l=10;
w=2;
h=10;
&
module sample_piece(){
//render()
union(){
cube([l,w,h]);
*translate([0,w+eh,0]) rotate([90,0,0]) linear_extrude(eh, convexity=10) wooden_texture_2d();
rotate([90,0,0])
intersection()
{
linear_extrude(1, convexity=10)
square([l,h]);
minkowski(){
linear_extrude(pseudo_3d, convexity=10)
wooden_texture_2d();
cone();
}
}
}
}
That previews in 10m, and renders in 22s.
> -----Original Message-----
> From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
> Sent: Sat, 1 Oct 2022 08:26
> To: discuss@lists.openscad.org
> Subject: [OpenSCAD] minkowski + mesh is not closed
>
> Dear OpenSCAD users,
>
> I am new to this list. Please bear with me, feedback is welcome.
>
> I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
> why.
>
> Here's the context:
> I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
> texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
> the sides of the box. The printer cannot print overhangs without support structure, but
> overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
> can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
> and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
> structure first by applying a linear_extrude() before applying minkowski();
>
> I have tried various combinations to get a slice of wooden texture:
>
> * minkowski to printable angles, use cube() and intersect() to cut a piece of proper
> size. Suffers from a drain of CPU for the minkowski
> * minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
> of proper size. I can provide an example, but its file size is 80 MBytes
> * user intersect, apply minkowski.
>
> Each of the approaches failes in one of those ways:
>
> * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
> 09-25_probedruck_textur.scad)
> * WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
> 11_probedrucke.scad)
> * finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
> x-y-plance)
>
> Affected OpenSCAD Versions:
>
> * OpenSCAD version 2021.01
> * OpenSCAD version 2022.09.20.ai12175
>
> I do not understand what I'm doing wrong and could use some advice what kind of problem I
> created. It's very hard to do extensive testing, because each attempt consumes a lot of
> CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
> I attached my samples. The error messages vary between preview and render.
>
> Cheers,
> Marcus
>
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_con
tent=emailclient> width=www.avg.com
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
MM
Michael Marx
Sat, Oct 1, 2022 6:51 AM
BTW,
how big is the final box?
how fine-grained do you want the wood effect?
Performance is a factor of size & fine detail.
You could show an example of say the largest side, with l, h & sf with just:
module sample_piece_flat(){
union(){
cube([l,w,h]);
translate([0,w+eh,0])
rotate([90,0,0])
linear_extrude(eh, convexity=10)
wooden_texture_2d();
}
}
That previews quickly.
-----Original Message-----
Sent: Sat, 1 Oct 2022 08:26
Subject: [OpenSCAD] minkowski + mesh is not closed
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
the sides of the box. The printer cannot print overhangs without support structure, but
overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper
size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
Affected OpenSCAD Versions:
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem I
created. It's very hard to do extensive testing, because each attempt consumes a lot of
CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
BTW,
how big is the final box?
how fine-grained do you want the wood effect?
Performance is a factor of size & fine detail.
You could show an example of say the largest side, with l, h & sf with just:
module sample_piece_flat(){
union(){
cube([l,w,h]);
translate([0,w+eh,0])
rotate([90,0,0])
linear_extrude(eh, convexity=10)
wooden_texture_2d();
}
}
That previews quickly.
> -----Original Message-----
> From: Marcus Poller [mailto:h-openscad.org@crystaldown.de]
> Sent: Sat, 1 Oct 2022 08:26
> To: discuss@lists.openscad.org
> Subject: [OpenSCAD] minkowski + mesh is not closed
>
> Dear OpenSCAD users,
>
> I am new to this list. Please bear with me, feedback is welcome.
>
> I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand
> why.
>
> Here's the context:
> I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a
> texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to
> the sides of the box. The printer cannot print overhangs without support structure, but
> overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I
> can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski()
> and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d
> structure first by applying a linear_extrude() before applying minkowski();
>
> I have tried various combinations to get a slice of wooden texture:
>
> * minkowski to printable angles, use cube() and intersect() to cut a piece of proper
> size. Suffers from a drain of CPU for the minkowski
> * minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece
> of proper size. I can provide an example, but its file size is 80 MBytes
> * user intersect, apply minkowski.
>
> Each of the approaches failes in one of those ways:
>
> * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-
> 09-25_probedruck_textur.scad)
> * WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-
> 11_probedrucke.scad)
> * finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in
> x-y-plance)
>
> Affected OpenSCAD Versions:
>
> * OpenSCAD version 2021.01
> * OpenSCAD version 2022.09.20.ai12175
>
> I do not understand what I'm doing wrong and could use some advice what kind of problem I
> created. It's very hard to do extensive testing, because each attempt consumes a lot of
> CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
> I attached my samples. The error messages vary between preview and render.
>
> Cheers,
> Marcus
>
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
HJ
Hugo Jackson
Sat, Oct 1, 2022 7:01 AM
Have you considered something like the following as an approach to your general problem:
/* Sample piece for wooden texture options - uses overhang options and Minkowski*/
/* v2 2022-09-28 translation to English to ease support of OpenSCAD Mailinglist*/
l=100;
//w=2;
h=80;
//eh=0.5;
//pseudo_3d=0.001;
//base_layer_height=0.15;
//warp_protect_distance=4;
module wooden_texture_2d(){
intersection(){
translate([l,0,0]) scale([1/10,1/10]) import("holztextur.svg",center=true);
square([l,h]);
}
}
height = 1;
resolution = .05;
for(z = [0:resolution:height - resolution])
translate([0,0,z])
linear_extrude(resolution)
offset(z)
wooden_texture_2d();
Simply set “height” to the height of the thickness of the ‘wooden' panel and “resolution” to something that’s some multiple finer than the layer height for the printer you will be using.
This will give you a 3 dimensional 45 degree sloped object of the 2d pattern you started with.
You can use a coarser resolution when you are developing, and increase it when you are ready to render, although preview is pretty zippy for the sample you provided at .05 resolution.
Rendering is still slow, but if you’re preparing this for an FDM printer it’ll still be incredibly faster than using minkowski.
Hope this is useful.
On Sep 30, 2022, at 3:25 PM, Marcus Poller h-openscad.org@crystaldown.de wrote:
Dear OpenSCAD users,
I am new to this list. Please bear with me, feedback is welcome.
I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand why.
Here's the context:
I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to the sides of the box. The printer cannot print overhangs without support structure, but overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski() and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d structure first by applying a linear_extrude() before applying minkowski();
I have tried various combinations to get a slice of wooden texture:
- minkowski to printable angles, use cube() and intersect() to cut a piece of proper size. Suffers from a drain of CPU for the minkowski
- minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece of proper size. I can provide an example, but its file size is 80 MBytes
- user intersect, apply minkowski.
Each of the approaches failes in one of those ways:
- ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-09-25_probedruck_textur.scad)
- WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-11_probedrucke.scad)
- finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
Affected OpenSCAD Versions:
- OpenSCAD version 2021.01
- OpenSCAD version 2022.09.20.ai12175
I do not understand what I'm doing wrong and could use some advice what kind of problem I created. It's very hard to do extensive testing, because each attempt consumes a lot of CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
I attached my samples. The error messages vary between preview and render.
Cheers,
Marcus
<holztextur.svg><2022-09-11_probedrucke.scad><2022-09-25_probedruck_textur.scad>_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Have you considered something like the following as an approach to your general problem:
/* Sample piece for wooden texture options - uses overhang options and Minkowski*/
/* v2 2022-09-28 translation to English to ease support of OpenSCAD Mailinglist*/
l=100;
//w=2;
h=80;
//eh=0.5;
//pseudo_3d=0.001;
//base_layer_height=0.15;
//warp_protect_distance=4;
module wooden_texture_2d(){
intersection(){
translate([l,0,0]) scale([1/10,1/10]) import("holztextur.svg",center=true);
square([l,h]);
}
}
height = 1;
resolution = .05;
for(z = [0:resolution:height - resolution])
translate([0,0,z])
linear_extrude(resolution)
offset(z)
wooden_texture_2d();
Simply set “height” to the height of the thickness of the ‘wooden' panel and “resolution” to something that’s some multiple finer than the layer height for the printer you will be using.
This will give you a 3 dimensional 45 degree sloped object of the 2d pattern you started with.
You can use a coarser resolution when you are developing, and increase it when you are ready to render, although preview is pretty zippy for the sample you provided at .05 resolution.
Rendering is still slow, but if you’re preparing this for an FDM printer it’ll still be incredibly faster than using minkowski.
Hope this is useful.
> On Sep 30, 2022, at 3:25 PM, Marcus Poller <h-openscad.org@crystaldown.de> wrote:
>
> Dear OpenSCAD users,
>
> I am new to this list. Please bear with me, feedback is welcome.
>
> I have got an issue that OpenSCAD tells me my shape was not closed and I do not understand why.
>
> Here's the context:
> I want to 3d-print a box that looks like it's made of wood. Therefore I decided to apply a texture (SVG) that resembles the annual rings of a tree. I want to apply that texture to the sides of the box. The printer cannot print overhangs without support structure, but overhanging angles of 45° (from base to overhanging outer side) are fine. So I thought I can convert the SVG to a 3d-structure with 45° rises on every side by using minkowski() and applying a cylindrical cone. Of course I need to cheat and convert the 2d SVG to 3d structure first by applying a linear_extrude() before applying minkowski();
>
> I have tried various combinations to get a slice of wooden texture:
>
> * minkowski to printable angles, use cube() and intersect() to cut a piece of proper size. Suffers from a drain of CPU for the minkowski
> * minkowski SVG, render, export as STL. Import STL, use cube()+intersect() to cut a piece of proper size. I can provide an example, but its file size is 80 MBytes
> * user intersect, apply minkowski.
>
> Each of the approaches failes in one of those ways:
>
> * ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. (2022-09-25_probedruck_textur.scad)
> * WARNING: Object may not be a valid 2-manifold and may need repair! (2022-09-11_probedrucke.scad)
> * finishes rendering with an empty screen (2022-09-25_probedruck_textur.scad 3rd piece in x-y-plance)
>
> Affected OpenSCAD Versions:
>
> * OpenSCAD version 2021.01
> * OpenSCAD version 2022.09.20.ai12175
>
> I do not understand what I'm doing wrong and could use some advice what kind of problem I created. It's very hard to do extensive testing, because each attempt consumes a lot of CPU and patience. As a side it would be nice to get advice on how to cut CPU time.
> I attached my samples. The error messages vary between preview and render.
>
> Cheers,
> Marcus
>
>
> <holztextur.svg><2022-09-11_probedrucke.scad><2022-09-25_probedruck_textur.scad>_______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org