[vtkusers] The VTK Journal-New Submission

David Doria daviddoria+vtk at gmail.com
Mon Feb 1 07:35:30 EST 2010


On Mon, Feb 1, 2010 at 1:59 AM, Alexandre GOUAILLARD
<agouaillard at gmail.com> wrote:
> dear mike,
>
> STL is not a scene format, it never includes cameras, objects, ect
>
> You could find STL specs, but here is a simple wikipedia extract
> (http://en.wikipedia.org/wiki/STL_(file_format)) for your convenience:
> """
> STL files describe only the surface geometry of a three dimensional
> object without any representation of color, texture or other common
> CAD model attributes.
> [...]
> An STL file describes a raw unstructured triangulated surface by the
> unit normal and vertices (ordered by the right-hand rule) of the
> triangles using a three-dimensional Cartesian coordinate system.
> """
>
> VRML and OBJ were defined to include much more than that and the VTK
> implementation rightfully reflects that. Without even entering into
> NURBs and other free forms surfaces, or the group-smoothing, LOD
> algorithms that OBJ format supports, rendering and material
> informations are inherently part of the graphic scene.
>
> again, an extract of the .obj specs, for your convenience:
> """
> Display/render attributes
>
> o       bevel interpolation (bevel)
> o       color interpolation (c_interp)
> o       dissolve interpolation (d_interp)
> o       level of detail (lod)
> o       material name (usemtl)
> o       material library (mtllib)
> o       shadow casting (shadow_obj)
> o       ray tracing (trace_obj)
> o       curve approximation technique (ctech)
> o       surface approximation technique (stech)
> """
>
> Of course,
> 1. if you are dealing with an explicit discrete surface (let's say a
> triangulation)
> 2. If you are only interested in the discrete geometry and topology
> (as in cells, as you are gonna loose the topological information that
> is explicit written as grouping in the obj file),
> 3. assuming that you are dealing with only one surface with a unique
> connected component,
>
> You could write an OBJ file directly from a polydata.
>
> Converting a stack of image to a surface is off topic.
>
> You are right, vtkRendering windows might not be an option on some
> platform. Should you consider another file format to save your model
> to then?
>
> regards.
>
> alex.

Alex,

You are correct. However, the intent was to simply write "simple,
point and triangle only" data to a subset of the OBJ format because I
have run into several cases where this is the only format that could
be read and I needed to write my mesh to it. If there is such a
philosophical problem with it, I will not debate if it should be added
to VTK. But let it live on the VTK journal for others who run into my
situation.

Thanks,

David



More information about the vtkusers mailing list