discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

crash

J
jon
Fri, Sep 1, 2017 8:49 PM

When I run the following program, OpenSCAD crashes with the MS C++
runtime message "this application has requested the Runtime to terminate
it in an unusual way".

How coy.

I just picked an arbitrary STL file to play with.  I suppose the error
could be dependent on that file.  The file is OK per NetFabb.  It
imports correctly into OpenSCAD and is about [100, 100, 30], so it fits
inside the "universe" cube.

Jon


// Universe cube must be bigger than part being loaded
universe_x = 1000;
universe_y = 1000;
universe_z = 1000;

// t is thickness of shell
t = 2;

// Name of part to convert to shell (must be in same directory)
part_to_shell = "d:/jon/octopus2.stl";

intersection() {
    import(part_to_shell);
    minkowski() {
        difference () {
            // Universe cube
            translate([-universe_x/2, -universe_y/2, -universe_z/2 ])
                cube([universe_x, universe_y, universe_z]);
            // Original part
            import(part_to_shell);
        }
        // Tool for the minkowski shell
        sphere(r=t, center=true);
    }
}

--
Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.

When I run the following program, OpenSCAD crashes with the MS C++ runtime message "this application has requested the Runtime to terminate it in an unusual way". How coy. I just picked an arbitrary STL file to play with.  I suppose the error could be dependent on that file.  The file is OK per NetFabb.  It imports correctly into OpenSCAD and is about [100, 100, 30], so it fits inside the "universe" cube. Jon --- // Universe cube must be bigger than part being loaded universe_x = 1000; universe_y = 1000; universe_z = 1000; // t is thickness of shell t = 2; // Name of part to convert to shell (must be in same directory) part_to_shell = "d:/jon/octopus2.stl"; intersection() {     import(part_to_shell);     minkowski() {         difference () {             // Universe cube             translate([-universe_x/2, -universe_y/2, -universe_z/2 ])                 cube([universe_x, universe_y, universe_z]);             // Original part             import(part_to_shell);         }         // Tool for the minkowski shell         sphere(r=t, center=true);     } } -- Sent from my desktop computer. I do not receive emails while away from my desk, nor do I receive texts on my main phone number (which is a land line). If you know that I am on the road, please text me. If you know that I am home, please email me.
MK
Marius Kintel
Fri, Sep 1, 2017 10:38 PM

Hi Jon,

Could you provide the STL file as well?
Also, what version of OpenSCAD is this?

-Marius

Hi Jon, Could you provide the STL file as well? Also, what version of OpenSCAD is this? -Marius
J
jon
Fri, Sep 1, 2017 10:43 PM

Attached.  I am running 2015.03.2 (for no particularly good reason other
than inertia)

:)

On 9/1/2017 6:38 PM, Marius Kintel wrote:

Hi Jon,

Could you provide the STL file as well?
Also, what version of OpenSCAD is this?

-Marius


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

--
Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.

Attached.  I am running 2015.03.2 (for no particularly good reason other than inertia) :) On 9/1/2017 6:38 PM, Marius Kintel wrote: > Hi Jon, > > Could you provide the STL file as well? > Also, what version of OpenSCAD is this? > > -Marius > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > -- Sent from my desktop computer. I do not receive emails while away from my desk, nor do I receive texts on my main phone number (which is a land line). If you know that I am on the road, please text me. If you know that I am home, please email me.
M
MichaelAtOz
Sat, Sep 2, 2017 2:55 AM

Note for mailing list.
STL is on forum, didn't make it to the mailing list.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

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

Note for mailing list. STL is on forum, didn't make it to the mailing list. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Sat, Sep 2, 2017 3:07 AM

I've come across this beasty before, STL was already in my test folder,
Netfabb image also.
Degenerate faces.
http://forum.openscad.org/file/t359/Octopus2_degen2.png
http://forum.openscad.org/file/t359/Octopus2_degen.jpg
http://forum.openscad.org/file/t359/Octopus_F5.jpg


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

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

I've come across this beasty before, STL was already in my test folder, Netfabb image also. Degenerate faces. <http://forum.openscad.org/file/t359/Octopus2_degen2.png> <http://forum.openscad.org/file/t359/Octopus2_degen.jpg> <http://forum.openscad.org/file/t359/Octopus_F5.jpg> ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- Sent from: http://forum.openscad.org/
MC
Mr C Camacho
Sat, Sep 2, 2017 8:11 AM

how difficult is it to make a general degenerate triangle test, could
stl's be filtered before
going to the existing (as is) importer ?

I'm thinking something like Heron's formula or other method for
calculating the area of
a triangle

On 02/09/17 04:07, MichaelAtOz wrote:

I've come across this beasty before, STL was already in my test folder,
Netfabb image also.
Degenerate faces.
http://forum.openscad.org/file/t359/Octopus2_degen2.png
http://forum.openscad.org/file/t359/Octopus2_degen.jpg
http://forum.openscad.org/file/t359/Octopus_F5.jpg


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

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


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

how difficult is it to make a general degenerate triangle test, could stl's be filtered before going to the existing (as is) importer ? I'm thinking something like Heron's formula or other method for calculating the area of a triangle On 02/09/17 04:07, MichaelAtOz wrote: > I've come across this beasty before, STL was already in my test folder, > Netfabb image also. > Degenerate faces. > <http://forum.openscad.org/file/t359/Octopus2_degen2.png> > <http://forum.openscad.org/file/t359/Octopus2_degen.jpg> > <http://forum.openscad.org/file/t359/Octopus_F5.jpg> > > > > ----- > Admin - PM me if you need anything, or if I've done something stupid... > > Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. > > The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
RD
Revar Desmera
Sat, Sep 2, 2017 9:20 AM

It's not actually all that hard to detect most non-manifold STLs.  I ended up writing a script in Python to detect when OpenScad outputs bad STL geometries. It stops my makefiles and forces me to tweak my sources to generate clean STLs.  The script even will launch OpenScad with a generated file so that it highlights holes and internal cleavages in red, overlaid over a transparent version of the STL.

The main trick is very simply to find edges in the geometry that do not have exactly two triangles associated with them.  Furthermore, my script looks for overlapping coplanar triangles with opposing normals, to find zero-width internal cleavages. I don't recall if it catches zero-area triangles, though.

My script is at https://github.com/revarbat/stl_normalize https://github.com/revarbat/stl_normalize

  • Revar

On Sep 2, 2017, at 1:11 AM, Mr C Camacho chris@bedroomcoders.co.uk wrote:

how difficult is it to make a general degenerate triangle test, could stl's be filtered before
going to the existing (as is) importer ?

I'm thinking something like Heron's formula or other method for calculating the area of
a triangle

On 02/09/17 04:07, MichaelAtOz wrote:

I've come across this beasty before, STL was already in my test folder,
Netfabb image also.
Degenerate faces.
http://forum.openscad.org/file/t359/Octopus2_degen2.png
http://forum.openscad.org/file/t359/Octopus2_degen.jpg
http://forum.openscad.org/file/t359/Octopus_F5.jpg


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

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


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

It's not actually all that hard to detect most non-manifold STLs. I ended up writing a script in Python to detect when OpenScad outputs bad STL geometries. It stops my makefiles and forces me to tweak my sources to generate clean STLs. The script even will launch OpenScad with a generated file so that it highlights holes and internal cleavages in red, overlaid over a transparent version of the STL. The main trick is very simply to find edges in the geometry that do not have exactly two triangles associated with them. Furthermore, my script looks for overlapping coplanar triangles with opposing normals, to find zero-width internal cleavages. I don't recall if it catches zero-area triangles, though. My script is at https://github.com/revarbat/stl_normalize <https://github.com/revarbat/stl_normalize> - Revar > On Sep 2, 2017, at 1:11 AM, Mr C Camacho <chris@bedroomcoders.co.uk> wrote: > > how difficult is it to make a general degenerate triangle test, could stl's be filtered before > going to the existing (as is) importer ? > > I'm thinking something like Heron's formula or other method for calculating the area of > a triangle > > > > On 02/09/17 04:07, MichaelAtOz wrote: >> I've come across this beasty before, STL was already in my test folder, >> Netfabb image also. >> Degenerate faces. >> <http://forum.openscad.org/file/t359/Octopus2_degen2.png> >> <http://forum.openscad.org/file/t359/Octopus2_degen.jpg> >> <http://forum.openscad.org/file/t359/Octopus_F5.jpg> >> >> >> >> ----- >> Admin - PM me if you need anything, or if I've done something stupid... >> >> Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. >> >> The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! >> -- >> Sent from: http://forum.openscad.org/ >> >> _______________________________________________ >> 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
A
arnholm@arnholm.org
Sat, Sep 2, 2017 11:48 AM

On 2017-09-02 04:55, MichaelAtOz wrote:

Note for mailing list.
STL is on forum, didn't make it to the mailing list.

I got it in the mail, so I guess I am not the only one.

Carsten Arnholm

On 2017-09-02 04:55, MichaelAtOz wrote: > Note for mailing list. > STL is on forum, didn't make it to the mailing list. I got it in the mail, so I guess I am not the only one. Carsten Arnholm
CA
Carsten Arnholm
Sat, Sep 2, 2017 3:26 PM

On 02. sep. 2017 00:43, jon wrote:

Attached.  I am running 2015.03.2 (for no particularly good reason other
than inertia)

:)

I tried the example using 2015.03-2 under Kubuntu 17.04. It crashed with
the following message:

CGAL error: assertion violation!
Expression : sf_old->mark()
File      : /usr/include/CGAL/Convex_decomposition_3/SM_walls.h
Line      : 565

Convex decomposition is part of Minkowski, so I guess that's where the
problem is. However, I did not evaluate if the input is reasonable.

Carsten Arnholm

On 02. sep. 2017 00:43, jon wrote: > Attached. I am running 2015.03.2 (for no particularly good reason other > than inertia) > > :) I tried the example using 2015.03-2 under Kubuntu 17.04. It crashed with the following message: CGAL error: assertion violation! Expression : sf_old->mark() File : /usr/include/CGAL/Convex_decomposition_3/SM_walls.h Line : 565 Convex decomposition is part of Minkowski, so I guess that's where the problem is. However, I did not evaluate if the input is reasonable. Carsten Arnholm
CA
Carsten Arnholm
Sat, Sep 2, 2017 3:45 PM

On 02. sep. 2017 17:26, Carsten Arnholm wrote:

I tried the example using 2015.03-2 under Kubuntu 17.04. It crashed with
the following message:

CGAL error: assertion violation!
Expression : sf_old->mark()
File      : /usr/include/CGAL/Convex_decomposition_3/SM_walls.h
Line      : 565

Convex decomposition is part of Minkowski, so I guess that's where the
problem is. However, I did not evaluate if the input is reasonable.

Trying the same in 2017.08.21.nightly (git 959b9c4)

The program does not core dump, but you get the same error, this time in
the OpenSCAD console pane

ERROR: CGAL error in CGALUtils::applyBinaryOperator UNKNOWN: CGAL ERROR:
assertion violation! Expr: sf_old->mark() File:
/usr/include/CGAL/Convex_decomposition_3/SM_walls.h Line: 565

Carsten Arnholm

On 02. sep. 2017 17:26, Carsten Arnholm wrote: > I tried the example using 2015.03-2 under Kubuntu 17.04. It crashed with > the following message: > > CGAL error: assertion violation! > Expression : sf_old->mark() > File : /usr/include/CGAL/Convex_decomposition_3/SM_walls.h > Line : 565 > > Convex decomposition is part of Minkowski, so I guess that's where the > problem is. However, I did not evaluate if the input is reasonable. Trying the same in 2017.08.21.nightly (git 959b9c4) The program does not core dump, but you get the same error, this time in the OpenSCAD console pane ERROR: CGAL error in CGALUtils::applyBinaryOperator UNKNOWN: CGAL ERROR: assertion violation! Expr: sf_old->mark() File: /usr/include/CGAL/Convex_decomposition_3/SM_walls.h Line: 565 Carsten Arnholm