nophead wrote
Here is a version that works. I added the vertices at 30 to the facets
they
touch on the top and bottom faces.
This means that my idea "can't render multiple polyhedra at the same time"
is wrong.
Gotta go back to check everything I have and re-write my history :( ....
Thx.
At the mean time. this raises another question, though: If it's not valid,
why the rendering is successful w/o error when there's only one poly ?
$ 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-tp13336p13347.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I guess when there is just one tree node containing a polyset OpenScad
simple renders it. As soon as there is more than one node it uses CGAL to
do at least a top level implicit union and CGAL needs manifold objects.
On 28 July 2015 at 18:15, runsun runsun@gmail.com wrote:
nophead wrote
Here is a version that works. I added the vertices at 30 to the facets
they
touch on the top and bottom faces.
This means that my idea "can't render multiple polyhedra at the same time"
is wrong.
Gotta go back to check everything I have and re-write my history :( ....
Thx.
At the mean time. this raises another question, though: If it's not valid,
why the rendering is successful w/o error when there's only one poly ?
$ 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-tp13336p13347.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
Hi,
Thanks for all your input Peter, Nophead & Runsun, much appreciated!
Interesting explanation from Nophead as to why it renders OK with only one
Polyhedron, but not with two.
Here is version 2 of the problem, now no vertices that are mid-facet on the
adjacent face. Same problem as before, renders fine with one polyhedron,
fails with two.
Thanks again for your comments...
// If set to false, draws 1 polyhedron, renders OK, imports to MeshLab OK.
// If set to true, draws 2 identical polyhedra, on render:
// "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;
p=[[0,-10,-5],[2,-10,-5],[8,-10,-5],[8,10,-5],[2,10,-5],[0,10,-5],[2,0,-5],
[0,-10,5], [2,-10,5], [8,-10,5], [8,10,5], [2,10,5], [0,10,5], [2,0,5]];
f=[[8,7,13],[13,12,11],[9,8,10],[8,11,10],
[6,0,1],[4,5,6],[3,1,2],[3,4,1],
[7,8,1],[8,9,2],[9,10,3],[10,11,4],[11,12,5],[12,13,6],[13,7,0],
[1,0,7],[2,1,8],[3,2,9],[4,3,10],[5,4,11],[6,5,12],[0,6,13]];
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([15,0,0]) polyhedron(points=p,faces=f);
--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13358.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
On 28 July 2015 at 22:13, Trygon db5765@outlook.com wrote:
Hi,
Thanks for all your input Peter, Nophead & Runsun, much appreciated!
Interesting explanation from Nophead as to why it renders OK with only one
Polyhedron, but not with two.
Here is version 2 of the problem, now no vertices that are mid-facet on the
adjacent face.
Are you sure? I still see some bad triangles. Every edge should be shared
by exactly 2 triangles. It's not enough to have 2 edges shared with 1 edge
of a third triangle.
You need to follow a formal algorithm to triangulate successfully. Have a
look at articles like
http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/polygon-triangulation-r3334
There is an online polygon builder tool, I think we really need a
polyhedron builder tool!
Same problem. Change the second vertex from 2,-1-5 to 3,-10,5 to see a hole
open up. That hole is there topologically when it is at 2 as well. It just
has zero area.
On 28 July 2015 at 22:13, Trygon db5765@outlook.com wrote:
Hi,
Thanks for all your input Peter, Nophead & Runsun, much appreciated!
Interesting explanation from Nophead as to why it renders OK with only one
Polyhedron, but not with two.
Here is version 2 of the problem, now no vertices that are mid-facet on the
adjacent face. Same problem as before, renders fine with one polyhedron,
fails with two.
Thanks again for your comments...
// If set to false, draws 1 polyhedron, renders OK, imports to MeshLab OK.
// If set to true, draws 2 identical polyhedra, on render:
// "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;
p=[[0,-10,-5],[2,-10,-5],[8,-10,-5],[8,10,-5],[2,10,-5],[0,10,-5],[2,0,-5],
[0,-10,5], [2,-10,5], [8,-10,5], [8,10,5], [2,10,5], [0,10,5], [2,0,5]];
f=[[8,7,13],[13,12,11],[9,8,10],[8,11,10],
[6,0,1],[4,5,6],[3,1,2],[3,4,1],
[7,8,1],[8,9,2],[9,10,3],[10,11,4],[11,12,5],[12,13,6],[13,7,0],
[1,0,7],[2,1,8],[3,2,9],[4,3,10],[5,4,11],[6,5,12],[0,6,13]];
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([15,0,0]) polyhedron(points=p,faces=f);
--
View this message in context:
http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13358.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
Hi Bob,
Whoops... having re-checked it in MeshLab, yes you are right.
Thanks, I had better tweek my mesh builder.
--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13361.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Wherever you have four or more co-planar points, you can group them into multi-point faces instead of just triangles:
f=[ [0,1,2,3,4,5,6]
,[13,12,11,10,9,8,7]
,[7,8,9,2,1,0]
,[10,11,12,5,4,3]
,[12,13,6,5]
,[13,7,0,6]
,[9,10,3,2]
];
…although collapsing the angled face ([12,13,7,0,6,5]) seems to work too:
f=[ [0,1,2,3,4,5,6]
,[13,12,11,10,9,8,7]
,[7,8,9,2,1,0]
,[10,11,12,5,4,3]
,[12,13,7,0,6,5]
,[9,10,3,2]
];
I forget which release started supporting this, but it’s been there for a while now.
Andrew.
On Jul 28, 2015, at 5:13 PM, Trygon db5765@outlook.com wrote:
Hi,
Thanks for all your input Peter, Nophead & Runsun, much appreciated!
Interesting explanation from Nophead as to why it renders OK with only one
Polyhedron, but not with two.
Here is version 2 of the problem, now no vertices that are mid-facet on the
adjacent face. Same problem as before, renders fine with one polyhedron,
fails with two.
Thanks again for your comments...
// If set to false, draws 1 polyhedron, renders OK, imports to MeshLab OK.
// If set to true, draws 2 identical polyhedra, on render:
// "WARNING: Object may not be a valid 2-manifold and may need repair!"
Show_Rendering_Error=true;
p=[[0,-10,-5],[2,-10,-5],[8,-10,-5],[8,10,-5],[2,10,-5],[0,10,-5],[2,0,-5],
[0,-10,5], [2,-10,5], [8,-10,5], [8,10,5], [2,10,5], [0,10,5], [2,0,5]];
f=[[8,7,13],[13,12,11],[9,8,10],[8,11,10],
[6,0,1],[4,5,6],[3,1,2],[3,4,1],
[7,8,1],[8,9,2],[9,10,3],[10,11,4],[11,12,5],[12,13,6],[13,7,0],
[1,0,7],[2,1,8],[3,2,9],[4,3,10],[5,4,11],[6,5,12],[0,6,13]];
polyhedron(points=p,faces=f);
if (Show_Rendering_Error) translate([15,0,0]) polyhedron(points=p,faces=f);
--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13358.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
Nophead,
Thanks for the clear explanation of the problem - zero area hole, move
vertex & hole opens up - I like that.
--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13363.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
"Ear clipping" algorithm now incorporated into my mesh building code as
suggested by BobC
(http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/polygon-triangulation-r3334).
Now all working correctly.
--
View this message in context: http://forum.openscad.org/Rendering-error-using-polyhedron-tp13336p13366.html
Sent from the OpenSCAD mailing list archive at Nabble.com.