discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Rendering error using polyhedron()

T
Trygon
Tue, Jul 28, 2015 3:02 PM

I have a problem rendering polyhedra built using a fairly lengthy OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0]) polyhedron(points=p,faces=f);

--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I have a problem rendering polyhedra built using a fairly lengthy OpenSCAD script. The following short script demonstrates the issue. Any help appreciated, thanks! // CUBE size=60 // Meshed with 2 triangles per face, except face x=0 which has 4 triangles // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. // If set to true, draws 2 cubes, on render: // "WARNING: Object may not be a valid 2-manifold and may need repair!" Show_Rendering_Error=true; p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], [0,0,60],[60,0,60],[60,60,60],[0,60,60], [0,30,0],[0,30,60]]; f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 [1,0,4],[1,4,5], // face y=0 [1,3,0],[2,3,1], // face z=0 [1,5,2],[2,5,6], // face x=60 [2,7,3],[6,7,2], // face y=60 [5,4,7],[5,7,6]]; // face z=60 polyhedron(points=p,faces=f); if (Show_Rendering_Error) translate([120,0,0]) polyhedron(points=p,faces=f); -- View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html Sent from the OpenSCAD mailing list archive at Nabble.com.
PF
Peter Falke
Tue, Jul 28, 2015 4:03 PM

You stitched your cube correctly.
The face x=0 is made up of 4 triangles.

Do you have problems with the exported STL?

2015-07-28 17:02 GMT+02:00 Trygon db5765@outlook.com:

I have a problem rendering polyhedra built using a fairly lengthy OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

You stitched your cube correctly. The face x=0 is made up of 4 triangles. Do you have problems with the exported STL? 2015-07-28 17:02 GMT+02:00 Trygon <db5765@outlook.com>: > I have a problem rendering polyhedra built using a fairly lengthy OpenSCAD > script. The following short script demonstrates the issue. Any help > appreciated, thanks! > > // CUBE size=60 > // Meshed with 2 triangles per face, except face x=0 which has 4 triangles > > // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. > // If set to true, draws 2 cubes, on render: > // "WARNING: Object may not be a valid 2-manifold and may need repair!" > Show_Rendering_Error=true; > > p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], > [0,0,60],[60,0,60],[60,60,60],[0,60,60], > [0,30,0],[0,30,60]]; > > f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 > [1,0,4],[1,4,5], // face y=0 > [1,3,0],[2,3,1], // face z=0 > [1,5,2],[2,5,6], // face x=60 > [2,7,3],[6,7,2], // face y=60 > [5,4,7],[5,7,6]]; // face z=60 > > polyhedron(points=p,faces=f); > if (Show_Rendering_Error) translate([120,0,0]) > polyhedron(points=p,faces=f); > > > > > > -- > View this message in context: > http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!
NH
nop head
Tue, Jul 28, 2015 4:13 PM

I don't think it is a valid triangulation because the vertices at 30 meet
the side of the triangles on the top and bottom, not at a vertex.

On 28 July 2015 at 17:03, Peter Falke stempeldergeschichte@googlemail.com
wrote:

You stitched your cube correctly.
The face x=0 is made up of 4 triangles.

Do you have problems with the exported STL?

2015-07-28 17:02 GMT+02:00 Trygon db5765@outlook.com:

I have a problem rendering polyhedra built using a fairly lengthy OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I don't think it is a valid triangulation because the vertices at 30 meet the side of the triangles on the top and bottom, not at a vertex. On 28 July 2015 at 17:03, Peter Falke <stempeldergeschichte@googlemail.com> wrote: > You stitched your cube correctly. > The face x=0 is made up of 4 triangles. > > Do you have problems with the exported STL? > > > 2015-07-28 17:02 GMT+02:00 Trygon <db5765@outlook.com>: > >> I have a problem rendering polyhedra built using a fairly lengthy OpenSCAD >> script. The following short script demonstrates the issue. Any help >> appreciated, thanks! >> >> // CUBE size=60 >> // Meshed with 2 triangles per face, except face x=0 which has 4 triangles >> >> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >> // If set to true, draws 2 cubes, on render: >> // "WARNING: Object may not be a valid 2-manifold and may need >> repair!" >> Show_Rendering_Error=true; >> >> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >> [0,30,0],[0,30,60]]; >> >> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >> [1,0,4],[1,4,5], // face y=0 >> [1,3,0],[2,3,1], // face z=0 >> [1,5,2],[2,5,6], // face x=60 >> [2,7,3],[6,7,2], // face y=60 >> [5,4,7],[5,7,6]]; // face z=60 >> >> polyhedron(points=p,faces=f); >> if (Show_Rendering_Error) translate([120,0,0]) >> polyhedron(points=p,faces=f); >> >> >> >> >> >> -- >> View this message in context: >> http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > > -- > stempeldergeschichte@googlemail.com <karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
PF
Peter Falke
Tue, Jul 28, 2015 4:35 PM

The problem starts if you do something with your cubes.
Like subtracting a cylinder.

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);
}

2015-07-28 18:13 GMT+02:00 nop head nop.head@gmail.com:

I don't think it is a valid triangulation because the vertices at 30 meet
the side of the triangles on the top and bottom, not at a vertex.

On 28 July 2015 at 17:03, Peter Falke <stempeldergeschichte@googlemail.com

wrote:

You stitched your cube correctly.
The face x=0 is made up of 4 triangles.

Do you have problems with the exported STL?

2015-07-28 17:02 GMT+02:00 Trygon db5765@outlook.com:

I have a problem rendering polyhedra built using a fairly lengthy
OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

The problem starts if you do something with your cubes. Like subtracting a cylinder. // CUBE size=60 // Meshed with 2 triangles per face, except face x=0 which has 4 triangles // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. // If set to true, draws 2 cubes, on render: // "WARNING: Object may not be a valid 2-manifold and may need repair!" Show_Rendering_Error=true; p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], [0,0,60],[60,0,60],[60,60,60],[0,60,60], [0,30,0],[0,30,60]]; f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 [1,0,4],[1,4,5], // face y=0 [1,3,0],[2,3,1], // face z=0 [1,5,2],[2,5,6], // face x=60 [2,7,3],[6,7,2], // face y=60 [5,4,7],[5,7,6]]; // face z=60 difference(){ union(){ polyhedron(points=p,faces=f); if (Show_Rendering_Error) translate([120,0,0]) polyhedron(points=p,faces=f); } rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); } ​ 2015-07-28 18:13 GMT+02:00 nop head <nop.head@gmail.com>: > I don't think it is a valid triangulation because the vertices at 30 meet > the side of the triangles on the top and bottom, not at a vertex. > > On 28 July 2015 at 17:03, Peter Falke <stempeldergeschichte@googlemail.com > > wrote: > >> You stitched your cube correctly. >> The face x=0 is made up of 4 triangles. >> >> Do you have problems with the exported STL? >> >> >> 2015-07-28 17:02 GMT+02:00 Trygon <db5765@outlook.com>: >> >>> I have a problem rendering polyhedra built using a fairly lengthy >>> OpenSCAD >>> script. The following short script demonstrates the issue. Any help >>> appreciated, thanks! >>> >>> // CUBE size=60 >>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>> triangles >>> >>> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >>> // If set to true, draws 2 cubes, on render: >>> // "WARNING: Object may not be a valid 2-manifold and may need >>> repair!" >>> Show_Rendering_Error=true; >>> >>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>> [0,30,0],[0,30,60]]; >>> >>> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>> [1,0,4],[1,4,5], // face y=0 >>> [1,3,0],[2,3,1], // face z=0 >>> [1,5,2],[2,5,6], // face x=60 >>> [2,7,3],[6,7,2], // face y=60 >>> [5,4,7],[5,7,6]]; // face z=60 >>> >>> polyhedron(points=p,faces=f); >>> if (Show_Rendering_Error) translate([120,0,0]) >>> polyhedron(points=p,faces=f); >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html >>> Sent from the OpenSCAD mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >> >> >> >> -- >> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >> >> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >> schreiben. >> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >> >> P.S. In case my e-mail is shorter than you enjoy: >> I am currently trying short replies instead of no replies at all. >> Please let me know, if you like to read more. >> >> Enjoy! >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!
R
runsun
Tue, Jul 28, 2015 4:39 PM

I believe it's not possible to render two physically separated polyhedra.
Check out another example  here
http://forum.openscad.org/A-faces-function-for-simple-polyhedra-td12809.html

Using the solid objects seems to be ok, though:

cube(20,30);
translate( [50,0,0] ) cube(20,30);

I have no idea why.

Is it possible for a 3D printer to print multiple objects at the same time?

If not, then rendering two objects makes no sense. If yes, why can't render
multiple polyhedra ?


$  Runsun Pan, PhD

$ -- libs: doctest , faces ( git ), offliner ( git );

tips: hash( 1 , 2 ), sweep , var

$ -- Linux Mint 17.1 Rebecca x64  + OpenSCAD 2015.03.15/2015.04.01.nightly

--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13341.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I believe it's not possible to render two physically separated polyhedra. Check out another example here <http://forum.openscad.org/A-faces-function-for-simple-polyhedra-td12809.html> Using the solid objects seems to be ok, though: cube(20,30); translate( [50,0,0] ) cube(20,30); I have no idea why. Is it possible for a 3D printer to print multiple objects at the same time? If not, then rendering two objects makes no sense. If yes, why can't render multiple polyhedra ? ----- $ Runsun Pan, PhD $ -- libs: doctest , faces ( git ), offliner ( git ); tips: hash( 1 , 2 ), sweep , var $ -- Linux Mint 17.1 Rebecca x64 + OpenSCAD 2015.03.15/2015.04.01.nightly -- View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13341.html Sent from the OpenSCAD mailing list archive at Nabble.com.
PF
Peter Falke
Tue, Jul 28, 2015 4:40 PM

The problems remains even if you let OpenSCAD do the tessellation of the x=0
face: [3,7,9,4,0,8], // face x=0

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[
//  [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[3,7,9,4,0,8], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);

2015-07-28 18:35 GMT+02:00 Peter Falke stempeldergeschichte@googlemail.com
:

The problem starts if you do something with your cubes.
Like subtracting a cylinder.

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);
}

2015-07-28 18:13 GMT+02:00 nop head nop.head@gmail.com:

I don't think it is a valid triangulation because the vertices at 30 meet
the side of the triangles on the top and bottom, not at a vertex.

On 28 July 2015 at 17:03, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:

You stitched your cube correctly.
The face x=0 is made up of 4 triangles.

Do you have problems with the exported STL?

2015-07-28 17:02 GMT+02:00 Trygon db5765@outlook.com:

I have a problem rendering polyhedra built using a fairly lengthy
OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

The problems remains even if you let OpenSCAD do the tessellation of the x=0 face: [3,7,9,4,0,8], // face x=0 // CUBE size=60 // Meshed with 2 triangles per face, except face x=0 which has 4 triangles // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. // If set to true, draws 2 cubes, on render: // "WARNING: Object may not be a valid 2-manifold and may need repair!" Show_Rendering_Error=true; p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], [0,0,60],[60,0,60],[60,60,60],[0,60,60], [0,30,0],[0,30,60]]; f=[ // [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 [3,7,9,4,0,8], // face x=0 [1,0,4],[1,4,5], // face y=0 [1,3,0],[2,3,1], // face z=0 [1,5,2],[2,5,6], // face x=60 [2,7,3],[6,7,2], // face y=60 [5,4,7],[5,7,6]]; // face z=60 difference(){ union(){ polyhedron(points=p,faces=f); if (Show_Rendering_Error) translate([120,0,0]) polyhedron(points=p,faces=f); } rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); 2015-07-28 18:35 GMT+02:00 Peter Falke <stempeldergeschichte@googlemail.com> : > The problem starts if you do something with your cubes. > Like subtracting a cylinder. > > > > // CUBE size=60 > // Meshed with 2 triangles per face, except face x=0 which has 4 triangles > > // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. > // If set to true, draws 2 cubes, on render: > // "WARNING: Object may not be a valid 2-manifold and may need repair!" > Show_Rendering_Error=true; > > p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], > [0,0,60],[60,0,60],[60,60,60],[0,60,60], > [0,30,0],[0,30,60]]; > > f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 > [1,0,4],[1,4,5], // face y=0 > [1,3,0],[2,3,1], // face z=0 > [1,5,2],[2,5,6], // face x=60 > [2,7,3],[6,7,2], // face y=60 > [5,4,7],[5,7,6]]; // face z=60 > > difference(){ > union(){ > polyhedron(points=p,faces=f); > if (Show_Rendering_Error) translate([120,0,0]) > polyhedron(points=p,faces=f); > } > rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); > } > ​ > > 2015-07-28 18:13 GMT+02:00 nop head <nop.head@gmail.com>: > >> I don't think it is a valid triangulation because the vertices at 30 meet >> the side of the triangles on the top and bottom, not at a vertex. >> >> On 28 July 2015 at 17:03, Peter Falke < >> stempeldergeschichte@googlemail.com> wrote: >> >>> You stitched your cube correctly. >>> The face x=0 is made up of 4 triangles. >>> >>> Do you have problems with the exported STL? >>> >>> >>> 2015-07-28 17:02 GMT+02:00 Trygon <db5765@outlook.com>: >>> >>>> I have a problem rendering polyhedra built using a fairly lengthy >>>> OpenSCAD >>>> script. The following short script demonstrates the issue. Any help >>>> appreciated, thanks! >>>> >>>> // CUBE size=60 >>>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>>> triangles >>>> >>>> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >>>> // If set to true, draws 2 cubes, on render: >>>> // "WARNING: Object may not be a valid 2-manifold and may need >>>> repair!" >>>> Show_Rendering_Error=true; >>>> >>>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>>> [0,30,0],[0,30,60]]; >>>> >>>> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>>> [1,0,4],[1,4,5], // face y=0 >>>> [1,3,0],[2,3,1], // face z=0 >>>> [1,5,2],[2,5,6], // face x=60 >>>> [2,7,3],[6,7,2], // face y=60 >>>> [5,4,7],[5,7,6]]; // face z=60 >>>> >>>> polyhedron(points=p,faces=f); >>>> if (Show_Rendering_Error) translate([120,0,0]) >>>> polyhedron(points=p,faces=f); >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html >>>> Sent from the OpenSCAD mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>> >>> >>> >>> -- >>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>> >>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>> schreiben. >>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>> >>> P.S. In case my e-mail is shorter than you enjoy: >>> I am currently trying short replies instead of no replies at all. >>> Please let me know, if you like to read more. >>> >>> Enjoy! >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >>> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > > -- > stempeldergeschichte@googlemail.com <karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!
NH
nop head
Tue, Jul 28, 2015 4:52 PM

You simply can't have vertices at 30 on one face without them also being a
vertex on the adjacent faces. The cube triangulated that way is not
manifold so as soon as CGAL operates on it it fails.

On 28 July 2015 at 17:40, Peter Falke stempeldergeschichte@googlemail.com
wrote:

The problems remains even if you let OpenSCAD do the tessellation of the
x=0
face: [3,7,9,4,0,8], // face x=0

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[
//  [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[3,7,9,4,0,8], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);

2015-07-28 18:35 GMT+02:00 Peter Falke <
stempeldergeschichte@googlemail.com>:

The problem starts if you do something with your cubes.
Like subtracting a cylinder.

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);
}

2015-07-28 18:13 GMT+02:00 nop head nop.head@gmail.com:

I don't think it is a valid triangulation because the vertices at 30
meet the side of the triangles on the top and bottom, not at a vertex.

On 28 July 2015 at 17:03, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:

You stitched your cube correctly.
The face x=0 is made up of 4 triangles.

Do you have problems with the exported STL?

2015-07-28 17:02 GMT+02:00 Trygon db5765@outlook.com:

I have a problem rendering polyhedra built using a fairly lengthy
OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

You simply can't have vertices at 30 on one face without them also being a vertex on the adjacent faces. The cube triangulated that way is not manifold so as soon as CGAL operates on it it fails. On 28 July 2015 at 17:40, Peter Falke <stempeldergeschichte@googlemail.com> wrote: > The problems remains even if you let OpenSCAD do the tessellation of the > x=0 > face: [3,7,9,4,0,8], // face x=0 > > // CUBE size=60 > // Meshed with 2 triangles per face, except face x=0 which has 4 triangles > > // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. > // If set to true, draws 2 cubes, on render: > // "WARNING: Object may not be a valid 2-manifold and may need repair!" > Show_Rendering_Error=true; > > p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], > [0,0,60],[60,0,60],[60,60,60],[0,60,60], > [0,30,0],[0,30,60]]; > > f=[ > // [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 > [3,7,9,4,0,8], // face x=0 > [1,0,4],[1,4,5], // face y=0 > [1,3,0],[2,3,1], // face z=0 > [1,5,2],[2,5,6], // face x=60 > [2,7,3],[6,7,2], // face y=60 > [5,4,7],[5,7,6]]; // face z=60 > > difference(){ > union(){ > polyhedron(points=p,faces=f); > if (Show_Rendering_Error) translate([120,0,0]) > polyhedron(points=p,faces=f); > } > rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); > > 2015-07-28 18:35 GMT+02:00 Peter Falke < > stempeldergeschichte@googlemail.com>: > >> The problem starts if you do something with your cubes. >> Like subtracting a cylinder. >> >> >> >> // CUBE size=60 >> // Meshed with 2 triangles per face, except face x=0 which has 4 triangles >> >> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >> // If set to true, draws 2 cubes, on render: >> // "WARNING: Object may not be a valid 2-manifold and may need >> repair!" >> Show_Rendering_Error=true; >> >> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >> [0,30,0],[0,30,60]]; >> >> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >> [1,0,4],[1,4,5], // face y=0 >> [1,3,0],[2,3,1], // face z=0 >> [1,5,2],[2,5,6], // face x=60 >> [2,7,3],[6,7,2], // face y=60 >> [5,4,7],[5,7,6]]; // face z=60 >> >> difference(){ >> union(){ >> polyhedron(points=p,faces=f); >> if (Show_Rendering_Error) translate([120,0,0]) >> polyhedron(points=p,faces=f); >> } >> rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); >> } >> ​ >> >> 2015-07-28 18:13 GMT+02:00 nop head <nop.head@gmail.com>: >> >>> I don't think it is a valid triangulation because the vertices at 30 >>> meet the side of the triangles on the top and bottom, not at a vertex. >>> >>> On 28 July 2015 at 17:03, Peter Falke < >>> stempeldergeschichte@googlemail.com> wrote: >>> >>>> You stitched your cube correctly. >>>> The face x=0 is made up of 4 triangles. >>>> >>>> Do you have problems with the exported STL? >>>> >>>> >>>> 2015-07-28 17:02 GMT+02:00 Trygon <db5765@outlook.com>: >>>> >>>>> I have a problem rendering polyhedra built using a fairly lengthy >>>>> OpenSCAD >>>>> script. The following short script demonstrates the issue. Any help >>>>> appreciated, thanks! >>>>> >>>>> // CUBE size=60 >>>>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>>>> triangles >>>>> >>>>> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >>>>> // If set to true, draws 2 cubes, on render: >>>>> // "WARNING: Object may not be a valid 2-manifold and may need >>>>> repair!" >>>>> Show_Rendering_Error=true; >>>>> >>>>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>>>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>>>> [0,30,0],[0,30,60]]; >>>>> >>>>> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>>>> [1,0,4],[1,4,5], // face y=0 >>>>> [1,3,0],[2,3,1], // face z=0 >>>>> [1,5,2],[2,5,6], // face x=60 >>>>> [2,7,3],[6,7,2], // face y=60 >>>>> [5,4,7],[5,7,6]]; // face z=60 >>>>> >>>>> polyhedron(points=p,faces=f); >>>>> if (Show_Rendering_Error) translate([120,0,0]) >>>>> polyhedron(points=p,faces=f); >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html >>>>> Sent from the OpenSCAD mailing list archive at Nabble.com. >>>>> >>>>> _______________________________________________ >>>>> OpenSCAD mailing list >>>>> Discuss@lists.openscad.org >>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>> >>>> >>>> >>>> >>>> -- >>>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>>> >>>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>>> schreiben. >>>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>>> >>>> P.S. In case my e-mail is shorter than you enjoy: >>>> I am currently trying short replies instead of no replies at all. >>>> Please let me know, if you like to read more. >>>> >>>> Enjoy! >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >>> >> >> >> -- >> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >> >> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >> schreiben. >> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >> >> P.S. In case my e-mail is shorter than you enjoy: >> I am currently trying short replies instead of no replies at all. >> Please let me know, if you like to read more. >> >> Enjoy! >> > > > > -- > stempeldergeschichte@googlemail.com <karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
NH
nop head
Tue, Jul 28, 2015 5:07 PM

Here is a version that works. I added the vertices at 30 to the facets they
touch on the top and bottom faces.

Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,8,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,9,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0]) polyhedron(points=p,faces=f);

On 28 July 2015 at 17:52, nop head nop.head@gmail.com wrote:

You simply can't have vertices at 30 on one face without them also being a
vertex on the adjacent faces. The cube triangulated that way is not
manifold so as soon as CGAL operates on it it fails.

On 28 July 2015 at 17:40, Peter Falke <stempeldergeschichte@googlemail.com

wrote:

The problems remains even if you let OpenSCAD do the tessellation of the
x=0
face: [3,7,9,4,0,8], // face x=0

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4 triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[
//  [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[3,7,9,4,0,8], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);

2015-07-28 18:35 GMT+02:00 Peter Falke <
stempeldergeschichte@googlemail.com>:

The problem starts if you do something with your cubes.
Like subtracting a cylinder.

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);
}

2015-07-28 18:13 GMT+02:00 nop head nop.head@gmail.com:

I don't think it is a valid triangulation because the vertices at 30
meet the side of the triangles on the top and bottom, not at a vertex.

On 28 July 2015 at 17:03, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:

You stitched your cube correctly.
The face x=0 is made up of 4 triangles.

Do you have problems with the exported STL?

2015-07-28 17:02 GMT+02:00 Trygon db5765@outlook.com:

I have a problem rendering polyhedra built using a fairly lengthy
OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Here is a version that works. I added the vertices at 30 to the facets they touch on the top and bottom faces. Show_Rendering_Error=true; p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], [0,0,60],[60,0,60],[60,60,60],[0,60,60], [0,30,0],[0,30,60]]; f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 [1,0,4],[1,4,5], // face y=0 [1,3,8,0],[2,3,1], // face z=0 [1,5,2],[2,5,6], // face x=60 [2,7,3],[6,7,2], // face y=60 [5,4,9,7],[5,7,6]]; // face z=60 polyhedron(points=p,faces=f); if (Show_Rendering_Error) translate([120,0,0]) polyhedron(points=p,faces=f); On 28 July 2015 at 17:52, nop head <nop.head@gmail.com> wrote: > You simply can't have vertices at 30 on one face without them also being a > vertex on the adjacent faces. The cube triangulated that way is not > manifold so as soon as CGAL operates on it it fails. > > On 28 July 2015 at 17:40, Peter Falke <stempeldergeschichte@googlemail.com > > wrote: > >> The problems remains even if you let OpenSCAD do the tessellation of the >> x=0 >> face: [3,7,9,4,0,8], // face x=0 >> >> // CUBE size=60 >> // Meshed with 2 triangles per face, except face x=0 which has 4 triangles >> >> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >> // If set to true, draws 2 cubes, on render: >> // "WARNING: Object may not be a valid 2-manifold and may need >> repair!" >> Show_Rendering_Error=true; >> >> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >> [0,30,0],[0,30,60]]; >> >> f=[ >> // [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >> [3,7,9,4,0,8], // face x=0 >> [1,0,4],[1,4,5], // face y=0 >> [1,3,0],[2,3,1], // face z=0 >> [1,5,2],[2,5,6], // face x=60 >> [2,7,3],[6,7,2], // face y=60 >> [5,4,7],[5,7,6]]; // face z=60 >> >> difference(){ >> union(){ >> polyhedron(points=p,faces=f); >> if (Show_Rendering_Error) translate([120,0,0]) >> polyhedron(points=p,faces=f); >> } >> rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); >> >> 2015-07-28 18:35 GMT+02:00 Peter Falke < >> stempeldergeschichte@googlemail.com>: >> >>> The problem starts if you do something with your cubes. >>> Like subtracting a cylinder. >>> >>> >>> >>> // CUBE size=60 >>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>> triangles >>> >>> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >>> // If set to true, draws 2 cubes, on render: >>> // "WARNING: Object may not be a valid 2-manifold and may need >>> repair!" >>> Show_Rendering_Error=true; >>> >>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>> [0,30,0],[0,30,60]]; >>> >>> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>> [1,0,4],[1,4,5], // face y=0 >>> [1,3,0],[2,3,1], // face z=0 >>> [1,5,2],[2,5,6], // face x=60 >>> [2,7,3],[6,7,2], // face y=60 >>> [5,4,7],[5,7,6]]; // face z=60 >>> >>> difference(){ >>> union(){ >>> polyhedron(points=p,faces=f); >>> if (Show_Rendering_Error) translate([120,0,0]) >>> polyhedron(points=p,faces=f); >>> } >>> rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); >>> } >>> ​ >>> >>> 2015-07-28 18:13 GMT+02:00 nop head <nop.head@gmail.com>: >>> >>>> I don't think it is a valid triangulation because the vertices at 30 >>>> meet the side of the triangles on the top and bottom, not at a vertex. >>>> >>>> On 28 July 2015 at 17:03, Peter Falke < >>>> stempeldergeschichte@googlemail.com> wrote: >>>> >>>>> You stitched your cube correctly. >>>>> The face x=0 is made up of 4 triangles. >>>>> >>>>> Do you have problems with the exported STL? >>>>> >>>>> >>>>> 2015-07-28 17:02 GMT+02:00 Trygon <db5765@outlook.com>: >>>>> >>>>>> I have a problem rendering polyhedra built using a fairly lengthy >>>>>> OpenSCAD >>>>>> script. The following short script demonstrates the issue. Any help >>>>>> appreciated, thanks! >>>>>> >>>>>> // CUBE size=60 >>>>>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>>>>> triangles >>>>>> >>>>>> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >>>>>> // If set to true, draws 2 cubes, on render: >>>>>> // "WARNING: Object may not be a valid 2-manifold and may need >>>>>> repair!" >>>>>> Show_Rendering_Error=true; >>>>>> >>>>>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>>>>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>>>>> [0,30,0],[0,30,60]]; >>>>>> >>>>>> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>>>>> [1,0,4],[1,4,5], // face y=0 >>>>>> [1,3,0],[2,3,1], // face z=0 >>>>>> [1,5,2],[2,5,6], // face x=60 >>>>>> [2,7,3],[6,7,2], // face y=60 >>>>>> [5,4,7],[5,7,6]]; // face z=60 >>>>>> >>>>>> polyhedron(points=p,faces=f); >>>>>> if (Show_Rendering_Error) translate([120,0,0]) >>>>>> polyhedron(points=p,faces=f); >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html >>>>>> Sent from the OpenSCAD mailing list archive at Nabble.com. >>>>>> >>>>>> _______________________________________________ >>>>>> OpenSCAD mailing list >>>>>> Discuss@lists.openscad.org >>>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>>>> >>>>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>>>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>>>> schreiben. >>>>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>>>> >>>>> P.S. In case my e-mail is shorter than you enjoy: >>>>> I am currently trying short replies instead of no replies at all. >>>>> Please let me know, if you like to read more. >>>>> >>>>> Enjoy! >>>>> >>>>> _______________________________________________ >>>>> OpenSCAD mailing list >>>>> Discuss@lists.openscad.org >>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>>> >>> >>> >>> -- >>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>> >>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>> schreiben. >>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>> >>> P.S. In case my e-mail is shorter than you enjoy: >>> I am currently trying short replies instead of no replies at all. >>> Please let me know, if you like to read more. >>> >>> Enjoy! >>> >> >> >> >> -- >> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >> >> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >> schreiben. >> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >> >> P.S. In case my e-mail is shorter than you enjoy: >> I am currently trying short replies instead of no replies at all. >> Please let me know, if you like to read more. >> >> Enjoy! >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> >
R
runsun
Tue, Jul 28, 2015 5:10 PM

nophead wrote

I don't think it is a valid triangulation because the vertices at 30 meet
the side of the triangles on the top and bottom, not at a vertex.

This is to illustrate nophead's point (The point-8 has the same issue, too)
:

http://forum.openscad.org/file/n13345/20150728_wrong_triang_1.png


$  Runsun Pan, PhD

$ -- libs: doctest , faces ( git ), offliner ( git );

tips: hash( 1 , 2 ), sweep , var

$ -- Linux Mint 17.1 Rebecca x64  + OpenSCAD 2015.03.15/2015.04.01.nightly

--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13345.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

nophead wrote > I don't think it is a valid triangulation because the vertices at 30 meet > the side of the triangles on the top and bottom, not at a vertex. This is to illustrate nophead's point (The point-8 has the same issue, too) : <http://forum.openscad.org/file/n13345/20150728_wrong_triang_1.png> ----- $ Runsun Pan, PhD $ -- libs: doctest , faces ( git ), offliner ( git ); tips: hash( 1 , 2 ), sweep , var $ -- Linux Mint 17.1 Rebecca x64 + OpenSCAD 2015.03.15/2015.04.01.nightly -- View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13345.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Tue, Jul 28, 2015 5:10 PM

On 28 July 2015 at 18:07, nop head nop.head@gmail.com wrote:

Here is a version that works. I added the vertices at 30 to the facets
they touch on the top and bottom faces.

Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,8,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,9,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

On 28 July 2015 at 17:52, nop head nop.head@gmail.com wrote:

You simply can't have vertices at 30 on one face without them also being
a vertex on the adjacent faces. The cube triangulated that way is not
manifold so as soon as CGAL operates on it it fails.

On 28 July 2015 at 17:40, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:

The problems remains even if you let OpenSCAD do the tessellation of the
x=0
face: [3,7,9,4,0,8], // face x=0

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[
//  [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[3,7,9,4,0,8], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);

2015-07-28 18:35 GMT+02:00 Peter Falke <
stempeldergeschichte@googlemail.com>:

The problem starts if you do something with your cubes.
Like subtracting a cylinder.

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

difference(){
union(){
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);
}
rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35);
}

2015-07-28 18:13 GMT+02:00 nop head nop.head@gmail.com:

I don't think it is a valid triangulation because the vertices at 30
meet the side of the triangles on the top and bottom, not at a vertex.

On 28 July 2015 at 17:03, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:

You stitched your cube correctly.
The face x=0 is made up of 4 triangles.

Do you have problems with the exported STL?

2015-07-28 17:02 GMT+02:00 Trygon db5765@outlook.com:

I have a problem rendering polyhedra built using a fairly lengthy
OpenSCAD
script.  The following short script demonstrates the issue. Any help
appreciated, thanks!

// CUBE size=60
// Meshed with 2 triangles per face, except face x=0 which has 4
triangles

// If set to false, draws 1 cube, renders OK, imports into MeshLab
OK.
// If set to true, draws 2 cubes, on render:
//    "WARNING: Object may not be a valid 2-manifold and may need
repair!"
Show_Rendering_Error=true;

p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0],
[0,0,60],[60,0,60],[60,60,60],[0,60,60],
[0,30,0],[0,30,60]];

f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0
[1,0,4],[1,4,5],                // face y=0
[1,3,0],[2,3,1],                // face z=0
[1,5,2],[2,5,6],                // face x=60
[2,7,3],[6,7,2],                // face y=60
[5,4,7],[5,7,6]];                // face z=60

polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([120,0,0])
polyhedron(points=p,faces=f);

--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

​ On 28 July 2015 at 18:07, nop head <nop.head@gmail.com> wrote: > Here is a version that works. I added the vertices at 30 to the facets > they touch on the top and bottom faces. > > Show_Rendering_Error=true; > > p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], > [0,0,60],[60,0,60],[60,60,60],[0,60,60], > [0,30,0],[0,30,60]]; > > f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 > [1,0,4],[1,4,5], // face y=0 > [1,3,8,0],[2,3,1], // face z=0 > [1,5,2],[2,5,6], // face x=60 > [2,7,3],[6,7,2], // face y=60 > [5,4,9,7],[5,7,6]]; // face z=60 > > polyhedron(points=p,faces=f); > if (Show_Rendering_Error) translate([120,0,0]) > polyhedron(points=p,faces=f); > > > On 28 July 2015 at 17:52, nop head <nop.head@gmail.com> wrote: > >> You simply can't have vertices at 30 on one face without them also being >> a vertex on the adjacent faces. The cube triangulated that way is not >> manifold so as soon as CGAL operates on it it fails. >> >> On 28 July 2015 at 17:40, Peter Falke < >> stempeldergeschichte@googlemail.com> wrote: >> >>> The problems remains even if you let OpenSCAD do the tessellation of the >>> x=0 >>> face: [3,7,9,4,0,8], // face x=0 >>> >>> // CUBE size=60 >>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>> triangles >>> >>> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >>> // If set to true, draws 2 cubes, on render: >>> // "WARNING: Object may not be a valid 2-manifold and may need >>> repair!" >>> Show_Rendering_Error=true; >>> >>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>> [0,30,0],[0,30,60]]; >>> >>> f=[ >>> // [3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>> [3,7,9,4,0,8], // face x=0 >>> [1,0,4],[1,4,5], // face y=0 >>> [1,3,0],[2,3,1], // face z=0 >>> [1,5,2],[2,5,6], // face x=60 >>> [2,7,3],[6,7,2], // face y=60 >>> [5,4,7],[5,7,6]]; // face z=60 >>> >>> difference(){ >>> union(){ >>> polyhedron(points=p,faces=f); >>> if (Show_Rendering_Error) translate([120,0,0]) >>> polyhedron(points=p,faces=f); >>> } >>> rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); >>> >>> 2015-07-28 18:35 GMT+02:00 Peter Falke < >>> stempeldergeschichte@googlemail.com>: >>> >>>> The problem starts if you do something with your cubes. >>>> Like subtracting a cylinder. >>>> >>>> >>>> >>>> // CUBE size=60 >>>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>>> triangles >>>> >>>> // If set to false, draws 1 cube, renders OK, imports into MeshLab OK. >>>> // If set to true, draws 2 cubes, on render: >>>> // "WARNING: Object may not be a valid 2-manifold and may need >>>> repair!" >>>> Show_Rendering_Error=true; >>>> >>>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>>> [0,30,0],[0,30,60]]; >>>> >>>> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>>> [1,0,4],[1,4,5], // face y=0 >>>> [1,3,0],[2,3,1], // face z=0 >>>> [1,5,2],[2,5,6], // face x=60 >>>> [2,7,3],[6,7,2], // face y=60 >>>> [5,4,7],[5,7,6]]; // face z=60 >>>> >>>> difference(){ >>>> union(){ >>>> polyhedron(points=p,faces=f); >>>> if (Show_Rendering_Error) translate([120,0,0]) >>>> polyhedron(points=p,faces=f); >>>> } >>>> rotate([0,90,0])translate([0,0,-10])cylinder(200,35,35); >>>> } >>>> ​ >>>> >>>> 2015-07-28 18:13 GMT+02:00 nop head <nop.head@gmail.com>: >>>> >>>>> I don't think it is a valid triangulation because the vertices at 30 >>>>> meet the side of the triangles on the top and bottom, not at a vertex. >>>>> >>>>> On 28 July 2015 at 17:03, Peter Falke < >>>>> stempeldergeschichte@googlemail.com> wrote: >>>>> >>>>>> You stitched your cube correctly. >>>>>> The face x=0 is made up of 4 triangles. >>>>>> >>>>>> Do you have problems with the exported STL? >>>>>> >>>>>> >>>>>> 2015-07-28 17:02 GMT+02:00 Trygon <db5765@outlook.com>: >>>>>> >>>>>>> I have a problem rendering polyhedra built using a fairly lengthy >>>>>>> OpenSCAD >>>>>>> script. The following short script demonstrates the issue. Any help >>>>>>> appreciated, thanks! >>>>>>> >>>>>>> // CUBE size=60 >>>>>>> // Meshed with 2 triangles per face, except face x=0 which has 4 >>>>>>> triangles >>>>>>> >>>>>>> // If set to false, draws 1 cube, renders OK, imports into MeshLab >>>>>>> OK. >>>>>>> // If set to true, draws 2 cubes, on render: >>>>>>> // "WARNING: Object may not be a valid 2-manifold and may need >>>>>>> repair!" >>>>>>> Show_Rendering_Error=true; >>>>>>> >>>>>>> p=[[0,0,0],[60,0,0],[60,60,0],[0,60,0], >>>>>>> [0,0,60],[60,0,60],[60,60,60],[0,60,60], >>>>>>> [0,30,0],[0,30,60]]; >>>>>>> >>>>>>> f=[[3,7,9],[9,8,3],[8,9,4],[0,8,4], // face x=0 >>>>>>> [1,0,4],[1,4,5], // face y=0 >>>>>>> [1,3,0],[2,3,1], // face z=0 >>>>>>> [1,5,2],[2,5,6], // face x=60 >>>>>>> [2,7,3],[6,7,2], // face y=60 >>>>>>> [5,4,7],[5,7,6]]; // face z=60 >>>>>>> >>>>>>> polyhedron(points=p,faces=f); >>>>>>> if (Show_Rendering_Error) translate([120,0,0]) >>>>>>> polyhedron(points=p,faces=f); >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336.html >>>>>>> Sent from the OpenSCAD mailing list archive at Nabble.com. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> OpenSCAD mailing list >>>>>>> Discuss@lists.openscad.org >>>>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>>>>> >>>>>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>>>>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>>>>> schreiben. >>>>>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>>>>> >>>>>> P.S. In case my e-mail is shorter than you enjoy: >>>>>> I am currently trying short replies instead of no replies at all. >>>>>> Please let me know, if you like to read more. >>>>>> >>>>>> Enjoy! >>>>>> >>>>>> _______________________________________________ >>>>>> OpenSCAD mailing list >>>>>> Discuss@lists.openscad.org >>>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> OpenSCAD mailing list >>>>> Discuss@lists.openscad.org >>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>>> >>>>> >>>> >>>> >>>> -- >>>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>>> >>>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>>> schreiben. >>>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>>> >>>> P.S. In case my e-mail is shorter than you enjoy: >>>> I am currently trying short replies instead of no replies at all. >>>> Please let me know, if you like to read more. >>>> >>>> Enjoy! >>>> >>> >>> >>> >>> -- >>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>> >>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>> schreiben. >>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>> >>> P.S. In case my e-mail is shorter than you enjoy: >>> I am currently trying short replies instead of no replies at all. >>> Please let me know, if you like to read more. >>> >>> Enjoy! >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >>> >> >