Problem rendering a shape ...

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

Problem rendering a shape ...

softfoot

I have a simple program to import an STL file and then crop part of the shape away.

The preview function (F5) works as expected but when I render it (F6) CGAL throws
an error :-

ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL ERROR: assertion violation! Expr: target(s1).vertex()==target(s2).vertex() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_FM_decorator.h Line: 227

and the resulting display is as though the difference() wasn't applied.

The program is very simple (see below) and you can find the STL file HERE if you need it.

Am I missing or misunderstanding something ?? (wouldn't be the first time!)

Regards,
Dave

======================================================
include <BOSL/constants.scad>
use <BOSL/transforms.scad>
extra_width = 37;

module basis(){
        // Move the imported object along "x" to the origin
        // I got "143" from measuring distance from an edge to the YZ plane using "3DTool"
        move([-143.00,0,0])
        import("front.STL", convexity=5);
}

difference() {
        basis();
        translate([extra_width,-10,-20])
        cube([200,100,200]);
}
======================================================




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

Re: Problem rendering a shape ...

nophead
The STL has self intersections. See the red line below.

image.png

OpenSCAD will only work with manifold STLs, i.e. no holes, self intersections or degenerate triangles.

On Sat, 31 Oct 2020 at 18:42, David Slipper <[hidden email]> wrote:

I have a simple program to import an STL file and then crop part of the shape away.

The preview function (F5) works as expected but when I render it (F6) CGAL throws
an error :-

ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL ERROR: assertion violation! Expr: target(s1).vertex()==target(s2).vertex() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_FM_decorator.h Line: 227

and the resulting display is as though the difference() wasn't applied.

The program is very simple (see below) and you can find the STL file HERE if you need it.

Am I missing or misunderstanding something ?? (wouldn't be the first time!)

Regards,
Dave

======================================================
include <BOSL/constants.scad>
use <BOSL/transforms.scad>
extra_width = 37;

module basis(){
        // Move the imported object along "x" to the origin
        // I got "143" from measuring distance from an edge to the YZ plane using "3DTool"
        move([-143.00,0,0])
        import("front.STL", convexity=5);
}

difference() {
        basis();
        translate([extra_width,-10,-20])
        cube([200,100,200]);
}
======================================================



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Problem rendering a shape ...

softfoot

I had it "fixed" using netfab's online service and now I get a different error.

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_S2/SM_const_decorator.h Line: 329

Modified file available HERE

How did you get a copy of netfab basic ??  When I tried to download it it kept running around in a loop nd not starting the download.

Regards,
Dave


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

Re: Problem rendering a shape ...

nophead
That also has self intersections. 

I downloaded NetFabb basic many years ago, when it was a free download. It can detect self intersections but you need a paid version to fix them.

On Sat, 31 Oct 2020 at 20:50, David Slipper <[hidden email]> wrote:

I had it "fixed" using netfab's online service and now I get a different error.

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_S2/SM_const_decorator.h Line: 329

Modified file available HERE

How did you get a copy of netfab basic ??  When I tried to download it it kept running around in a loop nd not starting the download.

Regards,
Dave

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Problem rendering a shape ...

softfoot

Well their online service leaves something to be desired :-(

I found another STL file that is OK so I'll continue with that :-)

Thanks for all the help,
Dave


On 31/10/2020 20:54, nop head wrote:
That also has self intersections. 

I downloaded NetFabb basic many years ago, when it was a free download. It can detect self intersections but you need a paid version to fix them.

On Sat, 31 Oct 2020 at 20:50, David Slipper <[hidden email]> wrote:

I had it "fixed" using netfab's online service and now I get a different error.

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_S2/SM_const_decorator.h Line: 329

Modified file available HERE

How did you get a copy of netfab basic ??  When I tried to download it it kept running around in a loop nd not starting the download.

Regards,
Dave

_______________________________________________
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

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