Hello! I was looking to the next issue in the BUGS file: ged_gqa() directly calls rt_new_rti() instead of using rt_dirbuild() to create a rt_i structure, which causes the LIBRT_BOT_MINTIE environment variable to be ignored.
I thought of some possible solutions to fix this, but none of them looks elegant to me. A trivial fix would be to copy the two lines from rt_dirbuild() where the rt_bot_mintie global variable is set into ged_gqa(). This is sufficient as everything else is unnecessary: lines 53 and 54 from librt/dir.c are equivalent to lines 80 and 81 from librt/wdb.c, that are executed when main() in gtools/gqa.c calls ged_open(), which then calls wdb_dbopen(). Then, a database instance is created, nearly the same way as gedp->ged_wdbp->dbip is created using _ged_open_dbip() (the latter is also initialized in wdb_init(), called from wdb_dbopen()). Since this is not in the spirit of code reuse and the comment above the rt_i declaration says that such a structure must be created using rt_dirbuild(), I think that another way would be to call rt_dirbuild() using the database name from gedp->ged_wdbp->dbip->dbi_filename, then forcibly associating the returned rtip with gedp->ged_wdbp->dbip. Note that argv in ged_gqa() does not include the filename as it was removed from the list in gtools/gqa.c and trying to change this behaviour would lead to a huge code reorganization, because the ged_gqa() function is also used in libtclcad/tclcad_obj.c and mged/setup.c to create Tcl and MGED commands, which do not receive the database name as a parameter. What would be the best approach? Thanks, Stefan ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://p.sf.net/sfu/Zoho _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel