discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Problem rendering a shape ...

DS
David Slipper
Sat, Oct 31, 2020 6:40 PM

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]);
}

---=====================

NH
nop head
Sat, Oct 31, 2020 7:12 PM

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

[image: 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 softfoot@hotmail.com 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
https://www.dropbox.com/s/3t0i6hmpr2811sl/front.STL?dl=0 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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

The STL has self intersections. See the red line below. [image: 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 <softfoot@hotmail.com> 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 > <https://www.dropbox.com/s/3t0i6hmpr2811sl/front.STL?dl=0> 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
DS
David Slipper
Sat, Oct 31, 2020 8:49 PM

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

NH
nop head
Sat, Oct 31, 2020 8:54 PM

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 softfoot@hotmail.com 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
https://www.dropbox.com/s/w8pnbbhufm59m0k/front_fixed.STL?dl=0
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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <softfoot@hotmail.com> 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 > <https://www.dropbox.com/s/w8pnbbhufm59m0k/front_fixed.STL?dl=0> > 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
DS
David Slipper
Sat, Oct 31, 2020 9:22 PM

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 <softfoot@hotmail.com> 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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

<pre class="moz-quote-pre" wrap="">_______________________________________________
OpenSCAD mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Discuss@lists.openscad.org">Discuss@lists.openscad.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org">http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org</a>