STL won't render in CGAL

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

STL won't render in CGAL

nophead
If this STL is imported it looks fine in OpenCSG but says there is nothing to render with F6.

NetFabb studio thinks it is fine.



LM8UU.stl (118K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

kintel
Administrator

On Feb 22, 2012, at 01:25 AM, nop head wrote:

> If this STL is imported it looks fine in OpenCSG but says there is nothing to render with F6.
>
> NetFabb studio thinks it is fine.
> penscad

On Feb 22, 2012, at 22:40 PM, nop head wrote:

> If this STL is imported it looks fine in OpenCSG but says there is nothing to render with F6.
>
> Parsing design (AST generation)...
> [...]
> WARNING: No top level geometry to render
>
> NetFabb studio thinks it is fine.

Both your files render fine here, both in F5 and F6 mode.

Which build of OpenSCAD are you using?
Could you do Help->Library info and post the contents?

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

nophead


On 23 February 2012 22:39, Marius Kintel <[hidden email]> wrote:

On Feb 22, 2012, at 01:25 AM, nop head wrote:

> If this STL is imported it looks fine in OpenCSG but says there is nothing to render with F6.
>
> NetFabb studio thinks it is fine.
> penscad

On Feb 22, 2012, at 22:40 PM, nop head wrote:

> If this STL is imported it looks fine in OpenCSG but says there is nothing to render with F6.
>
> Parsing design (AST generation)...
> [...]
> WARNING: No top level geometry to render
>
> NetFabb studio thinks it is fine.

Both your files render fine here, both in F5 and F6 mode.

Which build of OpenSCAD are you using?
Could you do Help->Library info and post the contents?

It's the 29.01.12 version and it doesn't have the Help-Library command. It working now though. I think what happened is I re-wrote the file with NetFabb and it changed it but this old version of openscad did not update its cached version of the STL.

I tried it with the original file that was emailed to me and that fails with an assertion.

New module: LM8UU 0x1db4138

Module cache size: 0 modules

Compiling design (CSG Tree generation)...

Rendering Polygon Mesh using CGAL...

CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation!

Expr: pe_prev->is_border() || !internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()

File: /home/brad/code/mingw-cross-env/usr/lib/gcc/i686-pc-mingw32/4.6.2/../../../../i686-pc-mingw32/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h

Line: 252

PolySets in cache: 1

PolySet cache size in bytes: 38800

CGAL Polyhedrons in cache: 34

CGAL cache size in bytes: 0

Total rendering time: 0 hours, 0 minutes, 0 seconds

WARNING: No top level geometry to render


Funnily enough when I load it into NetFabb it says it is fine, but when I save it NetFabbt says "some file formats do not include enough information. This may result in errors. Degenerate triangles created: 4" and at this point I fixed it. I think the only bug was the old version of openscad did not see the new STL after I had fixed it.


I don't understand how Netfabb can read it OK but has to fix it before it can be saved as an STL since it has just read it from an STL. Seems like it can read floats with greater precession that it can write them or something.


Did you get the first version I sent eventually as it was too big for the mailing list?


Are you interested in the one that causes the error? It was presumably created by openscad, because it is part of Prusa 2 I believe.

 
 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

kintel
Administrator
On Feb 24, 2012, at 00:33 AM, nop head wrote:

> Did you get the first version I sent eventually as it was too big for the mailing list?
>
I got both.

> Are you interested in the one that causes the error? It was presumably created by openscad, because it is part of Prusa 2 I believe.
>  
I expect this to be an incarnation of this bug:
https://github.com/openscad/openscad/issues/13

..but please feed me with more examples. Whenever this gets fixes, it helps having more test data.

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

nophead
OK here it is

On 23 February 2012 23:46, Marius Kintel <[hidden email]> wrote:
On Feb 24, 2012, at 00:33 AM, nop head wrote:

> Did you get the first version I sent eventually as it was too big for the mailing list?
>
I got both.

> Are you interested in the one that causes the error? It was presumably created by openscad, because it is part of Prusa 2 I believe.
>
I expect this to be an incarnation of this bug:
https://github.com/openscad/openscad/issues/13

..but please feed me with more examples. Whenever this gets fixes, it helps having more test data.

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


LM8UU.stl (123K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

clothbot
In reply to this post by kintel
Throwing an idea out there:  To handle more general "bad STL" import issues, could a surface reconstruction option be added import() that makes use of CGAL's built-in Surface Reconstruction capabilities?


It might also open up some options for folks using mesh editors like Blender and Rhino3D where, for the most part, the STL triangles have "properly oriented normals" w.r.t visible surfaces vs holes but aren't manifold.

Another completely different approach might be to use the 3D Skin Surface Meshing support:  http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Skin_surface_3/Chapter_main.html

That could be really cool in itself, generating blobby structures from simple point-sets.

Thoughts?

Andrew.

--

"The future is already here.  It's just not very evenly distributed" -- William Gibson

Me: http://clothbot.com/wiki/



Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

Giles Bathgate-2
On 24 February 2012 14:12, Andrew Plumb <[hidden email]> wrote:
> Throwing an idea out there:  To handle more general "bad STL" import issues,
> could a surface reconstruction option be added import() that makes use of
> CGAL's built-in Surface Reconstruction capabilities?

I chatted to Marius about this on instant messenger one time. I think
its a really good idea.

Also I think polygon simplification might be useful.

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Surface_mesh_simplification/Chapter_main.html


> It might also open up some options for folks using mesh editors like Blender
> and Rhino3D where, for the most part, the STL triangles have "properly
> oriented normals" w.r.t visible surfaces vs holes but aren't manifold.
>
> Another completely different approach might be to use the 3D Skin Surface
> Meshing support:
>  http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Skin_surface_3/Chapter_main.html
>
> That could be really cool in itself, generating blobby structures from
> simple point-sets.
>
> Thoughts?

I was interested in this as well,  I am not sure yet how to turn a
point set into the data set required which is a grey level image


Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

Alan Cox
In reply to this post by clothbot
On Fri, 24 Feb 2012 09:12:57 -0500
Andrew Plumb <[hidden email]> wrote:

> Throwing an idea out there:  To handle more general "bad STL" import issues, could a surface reconstruction option be added import() that makes use of CGAL's built-in Surface Reconstruction capabilities?
>
> See http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Surface_reconstruction_points_3/Chapter_main.html
>
> It might also open up some options for folks using mesh editors like Blender and Rhino3D where, for the most part, the STL triangles have "properly oriented normals" w.r.t visible surfaces vs holes but aren't manifold.
>
> Another completely different approach might be to use the 3D Skin Surface Meshing support:  http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Skin_surface_3/Chapter_main.html
>
> That could be really cool in itself, generating blobby structures from simple point-sets.

There are some very sophisticated libraries and tool sets for these which
are much beloved of the Kinect hackers. It would indeed be awesome to be
able to grab a Kinect point cloud scan into an OpenSCAD object but I
can't help feeling that it's not part of openscad but a use for the STL
import as and when it works.

Alan

Reply | Threaded
Open this post in threaded view
|

Re: STL won't render in CGAL

Alan Cox
In reply to this post by Giles Bathgate-2
For Poisson surface reconstruction of a point cloud

http://vr.tu-freiberg.de/scivi/