Hi Piotr,

I've merged your changes that look good to me :-)

The only change I've made is to remove the assert(sizeof(unsigned int)
== 4) as I'm not comfortable with the use of assert through the OSG
code base.  I find assert a poor solution as it only gets compiled in
on debug so will only catch errors when developers use a debug build
and will not prevent errors for end users or developers using release
builds.  A better solution is to add a runtime check that is ran on
all builds, to this end I've added a :

    if (sizeof(unsigned int) != 4)
    {
        OSG_NOTICE<<"Waring: STL reading not supported as unsigned int
is not 4 bytes on this system."<<std::endl;
        return ReadResult::ERROR_IN_READING_FILE;
    }

With this change in place I've checked all the changes in to
svn/trunk.  I don't have an stl files to test against right now so
will have to defer to others to check.

Robert.

On 31 July 2012 12:38, Piotr Domagalski <[email protected]> wrote:
> Hi,
>
> I've rewritten some bits of the STL plugin in order to support ASCII STL
> files with multiple named solids (reading and writing). The names are also
> used as OSG nodes names.
>
> - Also, a 'dontSaveNormals' was added. It allows to ignore normals when
> writing an STL file. For example, it is useful for me when writing an STL
> file for CFD simulations.
>
> - Some comments and code formatting were improved (to be consistent with the
> formatting already used in the plugin).
>
> - With 'separateFiles' option files are now named fooX.stl instead of
> foo.stlX
>
> The changes have been tested on various STL, both ASCII and binary found on
> the net. The change was based on the trunk branch.
>
> --
> Piotr Domagalski
> Poznan Supercomputing and Networking Center
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to