Alternate triangulation bug

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Alternate triangulation bug

Ronaldo
As Parkinbot remarked recently in another thread, the alternate triangulation
OpenSCAD builds for non-triangular faces has some bugs. I could isolate a
small example where this comes clear. The code is a simple polyhedron (fully
inside an intercepting cube) with many triangular faces and 2 quadrangular
faces. The list faces0 contains just the triangular faces; faces1 includes
the 2 quadrangular faces and faces2 is the same as faces1 with the
quadrangular faces explicitly subdivided in triangles. The polyhedron
defined with faces2 renders fine. With faces0, it renders with a warning
(non-manifold) because of the 2 missing faces. With faces1, we get an access
violation from CGAL. I checked it with version 2017.08.31 (git c6f3f0d) in a
Windows 7 environment.

verts = [[107.118, 20.796, 3.69206], [101.912, 18.7279, -9.29348], [89.8439,
13.9336, -3.69206], [95.0496, 16.0017, 9.29348], [91.3134, 60.0577,
3.69206], [86.6335, 56.9797, -9.29348], [75.7842, 49.844, -3.69206],
[80.4641, 52.9221, 9.29348], [61.5224, 90.1203, 3.69206], [57.5616, 86.1595,
-9.29348], [48.3794, 76.9773, -3.69206], [52.3402, 80.9381, 9.29348]];
;

faces0 = [[0, 5, 1], [0, 4, 5], [1, 6, 2], [1, 5, 6], [2, 7, 3], [2, 6, 7],
[3, 4, 0], [3, 7, 4], [4, 9, 5], [4, 8, 9], [5, 10, 6], [5, 9, 10], [6, 11,
7], [6, 10, 11], [7, 8, 4], [7, 11, 8]];

faces1 = concat(faces0, [ [0, 1, 2, 3], [11, 10, 9, 8]] );

faces2 =  concat( faces0, [ [0, 1, 2], [0, 2, 3], [8, 11, 10], [8, 10, 9]]
);

intersection(){
  translate([0,0,-100]) cube(200);
  polyhedron( verts, faces1);
//  polyhedron( verts, faces0);
//  polyhedron( verts, faces2);
}

 



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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Alternate triangulation bug

kintel
Administrator

> On Jan 7, 2018, at 11:26 AM, Ronaldo <[hidden email]> wrote:
>
> As Parkinbot remarked recently in another thread, the alternate triangulation
> OpenSCAD builds for non-triangular faces has some bugs.

I believe this is covered by #2246, which I fixed yesterday: https://github.com/openscad/openscad/issues/2246

FYI: The bug was that we didn’t always catch when CGAL failed at accepting a polygon. I think our own triangulation has always worked.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Alternate triangulation bug

tp3
On 07.01.2018 17:34, Marius Kintel wrote:
>
>> On Jan 7, 2018, at 11:26 AM, Ronaldo <[hidden email]> wrote:
>>
>> As Parkinbot remarked recently in another thread, the alternate triangulation
>> OpenSCAD builds for non-triangular faces has some bugs.
>
> I believe this is covered by #2246, which I fixed yesterday:> https://github.com/openscad/openscad/issues/2246
>
And Windows snapshot builds are updated to include that fix.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Alternate triangulation bug

Ronaldo
I was not aware of #2246. I have checked my codes with the new version and it seems to work as expected. Thank you.

2018-01-07 14:38 GMT-02:00 Torsten Paul <[hidden email]>:
On 07.01.2018 17:34, Marius Kintel wrote:
>
>> On Jan 7, 2018, at 11:26 AM, Ronaldo <[hidden email]> wrote:
>>
>> As Parkinbot remarked recently in another thread, the alternate triangulation
>> OpenSCAD builds for non-triangular faces has some bugs.
>
> I believe this is covered by #2246, which I fixed yesterday:> https://github.com/openscad/openscad/issues/2246
>
And Windows snapshot builds are updated to include that fix.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org