[OpenSCAD] STL without render?

nop head nop.head at gmail.com
Wed Jun 1 10:04:27 EDT 2016


I am seeing all your messages twice on the mailing list so they are getting
there. When you post on the forum it always says it has not been accepted
to start with.

The preview works by rendering the primitive objects into the Z buffer and
using that to work out which bits are visible. For example when you union
two objects it just draws them both separately. It never actually works out
a 3D representation of the union, just a 2D picture of what it looks like
from one angle.

When you do F6 CGAL is used to calculate the 3D solids very accurately and
is very slow because it uses rational numbers instead of floating point.

Others maybe able to suggest faster alternatives. It is fast enough for the
designs I do so I haven't looked elsewhere.

On 1 June 2016 at 14:30, Ben Suter <ben.suter at gmail.com> wrote:

> Thank you both for your feedback and input!
>
> <quote author="nophead">
> No you can only save an image from the preview. The geometry hasn't been
> calculated at the point, just a picture of it using graphic rendering
> tricks.
> </quote>
>
> Aha, so the GPU did all the hard work of tessellating, etc. but we
> can't "recapture" that? Interesting how fast the GPU preview works (<
> 1 sec) compared to how long the render takes (2.3 hours).
>
> Four questions:
>
> 1. Are there any other tools like OpenSCAD that I could try, that also
> allow declarative description of 3D surfaces using cylinder and sphere
> primitives together with geometric transformations? Maybe tools that
> use the GPU or multiple cores for the "render" step?
>
> 2. I'd very much appreciate any tips or suggestions for alternatives:
> I don't need lighting, color, textures or such, I just want to
> describe the geometry using tapered cylinders and spheres, and then
> have the software convert this to a surface model (e.g. tessellate)
> suitable for 3D printing (e.g. STL, OBJ, VRML).
>
> 3. Sticking with OpenSCAD, is it better to have a "flat" or
> "hierarchical" scene graph?
> <quote author="bsuter">
> > PS: Currently my scene consists of a few thousand individual cylinders
> > and spheres, each with its own translation and rotation relative to
> > the origin. However, each of these segments naturally falls into a
> > geometrical hierarchy - so alternatively I could represent the scene
> > as a hierarchy of rotations and translations of each child segment
> > relative to its parent. Is there reason to believe that the
> > hierarchical representation (with few root nodes) would render faster?
> </quote>
>
> 4. I subscribed to this email list, but am not getting replies to this
> thread in my inbox. On the web interface (Nabble) I can see replies,
> but when I post a reply there myself, I get a message indicating that
> my reply "was not yet accepted to the mailing list". Any advice on how
> to improve this?
>
>
> On Wed, Jun 1, 2016 at 1:30 PM, Ben Suter <ben.suter at gmail.com> wrote:
> > Is it possible to save an STL file without going through the full render
> step?
> >
> > It frustrates me that I can *see* the surface model using "preview",
> > but apparently can not simply save this as an STL file?
> >
> > Background: I am using OpenSCAD to generate surface models of neurons,
> > because the ability to programmatically define 3D surfaces from a set
> > of tapered cylinders closely matches the way in which neuronal
> > geometry is represented when derived from experimental measurements.
> > My goal is to make an STL file that I can use for 3D printing - I
> > don't care about lighting, viewpoints, textures, colors. Just the pure
> > surface model.
> >
> > Currently the render takes 2.5 hours per neuron, severely limiting my
> > ability to process many neurons and making me doubt whether it's
> > feasible for me to assemble a single scene with ~50 neurons (as I had
> > hoped).
> >
> > In any case, I'm very happy to have found OpenSCAD and have to say
> > it's been a great pleasure using it in my processing pipeline. Thank
> > you, and please keep up the great work!
> >
> >
> > PS: Currently my scene consists of a few thousand individual cylinders
> > and spheres, each with its own translation and rotation relative to
> > the origin. However, each of these segments naturally falls into a
> > geometrical hierarchy - so alternatively I could represent the scene
> > as a hierarchy of rotations and translations of each child segment
> > relative to its parent. Is there reason to believe that the
> > hierarchical representation (with few root nodes) would render faster?
> >
> > PPS: Here's the console output after my latest render - note this is
> > on a 16-core Xeon / Windows 7 64-bit / 72 GB RAM / SSD / GTX 970
> > machine. Are there any OpenSCAD settings I should modify to make
> > better use of these resources?
> >
> > Geometries in cache: 6514
> > Geometry cache size in bytes: 60051248
> > CGAL Polyhedrons in cache: 0
> > CGAL cache size in bytes: 0
> > Total rendering time: 2 hours, 19 minutes, 58 seconds
> > Top level object is a 3D object:
> > Simple: yes
> > Vertices: 490328
> > Halfedges: 1703918
> > Edges: 851959
> > Halffacets: 730078
> > Facets: 365039
> > Volumes: 3
> > Rendering finished.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20160601/a07483b7/attachment-0002.html>


More information about the Discuss mailing list