Hi,
I debugged this plugin. I found findBlock(s) return a NULL block, because the
block s is not read.
dxfInsert::assign(dxfFile* dxf, codeValue& cv)
{
std::string s = cv._string;
if (_done || (cv._groupCode == 0 && s != "INSERT")) {
_done = true;
return;
}
if (cv._groupCode == 2 && !_block) {
_blockName = s;
_block = dxf->findBlock(s);
......
}
I work around this problem to add the following code in drawScene,
void
dxfInsert::drawScene(dxfFile* dxf, scene* sc)
{
// INSERTs can be nested. So pull the current matrix
// and push it back after we fill our context
// This is a snapshot in time. I will rewrite all this to be cleaner,
// but for now, it seems working fine
// (with the files I have, the results are equal to Voloview,
// and better than Deep Exploration and Lightwave).
if (!_block)
{
_block = dxf->findBlock(_blockName);
}
// sanity check (useful when no block remains after all unsupported
entities have been filtered out)
if (!_block)
{
return;
}
....
}
Cheers,
Guopan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=24202#24202
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org