discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Object won't print and is giving me WARNING: Object may not be a valid 2-manifold and may need repair! What's wrong?

D
drewa1
Tue, May 22, 2018 2:46 AM

Here is my code for a honeycomb cell:
module hexagon(h,s,t,x){
difference(){
linear_extrude (height = h, center = false) circle (s, $fn=6, center =
true);
linear_extrude (height = h+1, center = false) translate ([0,0,-1])
circle (s-t, $fn=6, center = true);
}

}

module honeycomb (h,s,t,x){
hexagon(h,s,t,x);

 outsidenodes=[
/*0*/[s,0,h+x],
/*1*/[s,0,h],
/*2*/[s/2,(s*sqrt(3))/2,h],
/*3*/[-s/2,(s*sqrt(3))/2,h],
/*4*/[-s/2,(s*sqrt(3))/2,h+x],
/*5*/[-s,0,h],
/*6*/[-s/2,-(s*sqrt(3))/2,h],
/*7*/[-s/2,-(s*sqrt(3))/2,h+x],
/*8*/[s/2,-(s*sqrt(3))/2,h],
/*9*/[0,0,h+2*x]

];
outsideface=[
[1,0,9,2],
[8,9,0,1],
[6,7,9,8],
[5,9,7,6],
[3,4,9,5],
[2,9,4,3]
];

union(){
polyhedron (outsidenodes, outsideface) hexagon(h,s,t,x);
}

union(){
scale ([1-(2t)/(2s),1-(2t)/(2s),1]) polyhedron (outsidenodes,
outsideface);
}
}

honeycomb(10,5,1,(5*sqrt(2))/4);

And here is the console output:
Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
PolySet has nonplanar faces. Attempting alternate construction
PolySet has nonplanar faces. Attempting alternate construction
Geometries in cache: 9
Geometry cache size in bytes: 6624
CGAL Polyhedrons in cache: 4
CGAL cache size in bytes: 186912
Total rendering time: 0 hours, 0 minutes, 4 seconds
Top level object is a 3D object:
Simple:        no
Vertices:      33
Halfedges:    128
Edges:          64
Halffacets:    66
Facets:        33
Volumes:        2
WARNING: Object may not be a valid 2-manifold and may need repair!
Rendering finished.

I am relatively new to this, so any input is appreciated.  I am probably
missing something pretty basic.  How can I merge a polyhedron to an object
created with linear_extrude.  Is it something wrong with the polyhedron
itself?

Thanks in advance.

--
Sent from: http://forum.openscad.org/

Here is my code for a honeycomb cell: module hexagon(h,s,t,x){ difference(){ linear_extrude (height = h, center = false) circle (s, $fn=6, center = true); linear_extrude (height = h+1, center = false) translate ([0,0,-1]) circle (s-t, $fn=6, center = true); } } module honeycomb (h,s,t,x){ hexagon(h,s,t,x); outsidenodes=[ /*0*/[s,0,h+x], /*1*/[s,0,h], /*2*/[s/2,(s*sqrt(3))/2,h], /*3*/[-s/2,(s*sqrt(3))/2,h], /*4*/[-s/2,(s*sqrt(3))/2,h+x], /*5*/[-s,0,h], /*6*/[-s/2,-(s*sqrt(3))/2,h], /*7*/[-s/2,-(s*sqrt(3))/2,h+x], /*8*/[s/2,-(s*sqrt(3))/2,h], /*9*/[0,0,h+2*x] ]; outsideface=[ [1,0,9,2], [8,9,0,1], [6,7,9,8], [5,9,7,6], [3,4,9,5], [2,9,4,3] ]; union(){ polyhedron (outsidenodes, outsideface) hexagon(h,s,t,x); } union(){ scale ([1-(2*t)/(2*s),1-(2*t)/(2*s),1]) polyhedron (outsidenodes, outsideface); } } honeycomb(10,5,1,(5*sqrt(2))/4); And here is the console output: Compiling design (CSG Tree generation)... Rendering Polygon Mesh using CGAL... PolySet has nonplanar faces. Attempting alternate construction PolySet has nonplanar faces. Attempting alternate construction Geometries in cache: 9 Geometry cache size in bytes: 6624 CGAL Polyhedrons in cache: 4 CGAL cache size in bytes: 186912 Total rendering time: 0 hours, 0 minutes, 4 seconds Top level object is a 3D object: Simple: no Vertices: 33 Halfedges: 128 Edges: 64 Halffacets: 66 Facets: 33 Volumes: 2 WARNING: Object may not be a valid 2-manifold and may need repair! Rendering finished. I am relatively new to this, so any input is appreciated. I am probably missing something pretty basic. How can I merge a polyhedron to an object created with linear_extrude. Is it something wrong with the polyhedron itself? Thanks in advance. -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, May 22, 2018 3:05 AM

drewa1 wrote

Is it something wrong with the polyhedron
itself?

Yeo, comment out the hexagon call, leaving your polyhedron.
F5 then View/Thrown-together, see the purple. Read  this
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Mis-ordered_faces
.

Also note that those union() calls are not needed there. it is ued with
multible sub-objects inside the {}.
There is an implicit union of all objects in a module or main program.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

drewa1 wrote > Is it something wrong with the polyhedron > itself? Yeo, comment out the hexagon call, leaving your polyhedron. F5 then View/Thrown-together, see the purple. Read this <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Mis-ordered_faces> . Also note that those union() calls are not needed there. it is ued with multible sub-objects inside the {}. There is an implicit union of all objects in a module or main program. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, May 22, 2018 3:07 AM

That was meant to be YEP,


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

That was meant to be YEP, ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, May 22, 2018 3:12 AM

Also, you can't build an object that way with two poly's, you need to make it
enclosed (manifold - waterproof, no purple on the outside), so if you closed
off the bottom, then you could, for example, difference() a smaller one from
a larger one to make the hollow inside.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

Also, you can't build an object that way with two poly's, you need to make it enclosed (manifold - waterproof, no purple on the outside), so if you closed off the bottom, then you could, for example, difference() a smaller one from a larger one to make the hollow inside. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
D
drewa1
Tue, May 22, 2018 3:18 AM

How do I fix this, no matter what orientation I put a face in, it says
misordered.  Also, is this not clockwise orientation? Will the print work if
the face is ordered correctly?

--
Sent from: http://forum.openscad.org/

How do I fix this, no matter what orientation I put a face in, it says misordered. Also, is this not clockwise orientation? Will the print work if the face is ordered correctly? -- Sent from: http://forum.openscad.org/
D
drewa1
Tue, May 22, 2018 3:20 AM

What do you mean by this? Which part needs to be closed off? Separate the two
polyhedrons?

--
Sent from: http://forum.openscad.org/

What do you mean by this? Which part needs to be closed off? Separate the two polyhedrons? -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, May 22, 2018 3:33 AM

http://forum.openscad.org/file/t359/open_bottom_poly.jpg

This is one poly upside-down, note it has not got a bottom, just the top
shell.
In this case the faces are pointing outside but you see the inside purple
faces thru this hole.
It is not a valid 3D object.
If you put a face(s) on the bottom, that will cover the  hole and make it a
3D object.

Think of a cube() and what it would be like if you removed one face.

Then you can sale the 3D object smaller, and difference this from the
original, you will get a proper 3D object.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

<http://forum.openscad.org/file/t359/open_bottom_poly.jpg> This is one poly upside-down, note it has not got a bottom, just the top shell. In this case the faces are pointing outside but you see the inside purple faces thru this hole. It is not a valid 3D object. If you put a face(s) on the bottom, that will cover the hole and make it a 3D object. Think of a cube() and what it would be like if you removed one face. Then you can sale the 3D object smaller, and difference this from the original, you will get a proper 3D object. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, May 22, 2018 3:37 AM

Alternatively, if you want one object, you could add points to the poly to
build 'thickness' to the walls, conceptually like the triangular hole on the
poly in that wiki link.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

Alternatively, if you want one object, you could add points to the poly to build 'thickness' to the walls, conceptually like the triangular hole on the poly in that wiki link. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, May 22, 2018 3:42 AM

Try this:

difference() {
cube(50,true);
translate([0,0,10.01])
cube(30,true);
}

Compare how this has thickness and faces on the inside of the hole, building
an enclosed 3D object.
All the purple is inside that thickness.

That is what your shape needs to be like.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

Try this: difference() { cube(50,true); translate([0,0,10.01]) cube(30,true); } Compare how this has thickness and faces on the inside of the hole, building an enclosed 3D object. All the purple is inside that thickness. That is what your shape needs to be like. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Tue, May 22, 2018 3:49 AM

This may help
https://www.3dcreationlab.co.uk/tutorials/top-5-considerations-when-designing-for-3d-printing.php


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

Sent from: http://forum.openscad.org/

This may help https://www.3dcreationlab.co.uk/tutorials/top-5-considerations-when-designing-for-3d-printing.php ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/