File crashing openscad, change one digit, doesn't crash

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

File crashing openscad, change one digit, doesn't crash

tjhowse
http://pastebin.com/KXPej5E1

Line 94, change that to -90 and it doesn't crash. -91 does crash.

I simplified it down to: http://pastebin.com/AQDNNKi7

And it doesn't crash. Tested on OpenSCAD 2011.11.27, OpenSCAD 2011.11.01 and OpenSCAD 2011.09.27, same results.

Hope this helps.

-tjhowse.
Reply | Threaded
Open this post in threaded view
|

Re: File crashing openscad, change one digit, doesn't crash

kintel
Administrator
On Dec 10, 2011, at 10:36 AM, tjhowse wrote:

> http://pastebin.com/KXPej5E1
>
Thanks.

FYI, this is a minimal example producing the same crash:

render() {
  cube(10);
  rotate([-100,0,0]) cube(10);
}

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: File crashing openscad, change one digit, doesn't crash

Triffid Hunter
On Mon, Dec 12, 2011 at 10:16 AM, Marius Kintel <[hidden email]> wrote:
> render() {
>  cube(10);
>  rotate([-100,0,0]) cube(10);
> }

is it because they have two coincident vertices and an edge?

Reply | Threaded
Open this post in threaded view
|

Re: File crashing openscad, change one digit, doesn't crash

kintel
Administrator
On Dec 12, 2011, at 00:43 AM, Triffid Hunter wrote:
>
> is it because they have two coincident vertices and an edge?

yes - it's not manifold, and causes a crash in conjunction with render().
The quick-fix is to report this and not make it crash, which I'm working on.

  -Marius



Reply | Threaded
Open this post in threaded view
|

Re: File crashing openscad, change one digit, doesn't crash

kintel
Administrator
In reply to this post by Triffid Hunter
On Dec 12, 2011, at 00:43 AM, Triffid Hunter wrote:

> On Mon, Dec 12, 2011 at 10:16 AM, Marius Kintel <[hidden email]> wrote:
>> render() {
>>  cube(10);
>>  rotate([-100,0,0]) cube(10);
>> }
>
Fixed in master. It will just issue an error and give an empty result for the render() operation in question.

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: File crashing openscad, change one digit, doesn't crash

Giles Bathgate-2
The following doesn't cause a crash in RapCAD

cube(10);
 rotate([-100,0,0]) cube(10);


I would not expect it to give an "empty" result.

I don't have a render() function but if I understand correctly render
forces it to use CGAL instead of openCSG? In which case its redundant
in RapCAD since there is no openCSG support.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: File crashing openscad, change one digit, doesn't crash

kintel
Administrator
On Dec 14, 2011, at 08:53 AM, Giles Bathgate wrote:

> The following doesn't cause a crash in RapCAD
>
> cube(10);
>  rotate([-100,0,0]) cube(10);
>
> I would not expect it to give an "empty" result.
>
The result can be represented by a Nef_polyhedron_3, but not a regular Polyhedron. Since render() uses a Polyhedron it fails (this could be rewritten for the CGAL case; I've added a FIXME for that).

Since RapCAD doesn't use OpenCSG, the failing conversion isn't done until you export, where RapCAD crashes as well.

I'd be interested in how to work around this if you have any ideas.

 -Marius