[brlcad-devel] Question on adding Binary object data
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Alex V. <ale...@tr...> - 2009-06-15 16:53:55
|
Hi all, I don't know if I should be asking for help on the dev mailing list or not, but I suppose I will quickly be told to stop if this is the incorrect procedure. I've been trying to add a binary file into a ".g" BRL-CAD file using the 'rt_mk_binunif()' function. This seems to work fine when I create a file using 'db_create()' followed by 'wdb_dbopen()' and then add in the binary file using the 'rt_mk_binunif()' function. However, if I want to open an existing file using 'db_open()' followed by 'wdb_dbopen()' and then 'rt_mk_binunif()' I get an error from 'rt_mk_binunif()'. The error message is, "Error while adding new binary object (object_name) to the database." The only differences I can see in the db_i structure, which 'db_create()' and 'db_open()' return, are the dbi_eof and dbi_nrec values. When I create the file the dbi_eof seems to have a valid value and dbi_nrec is 1. But when I open a file, dbi_eof is -1 and dbi_nrec is 0. Is there a function call I am missing when I'm using the db_open, or should I be using completely different functions to open a ".g" file and add a binary data object? Thanks for any help, Alex Vlasse Troy 7, Inc ale...@tr... <mailto:Ale...@tr...> |