@starseeker can you provide an example how to get at ged_exec(gqa..) plot data using libbv (or otherwise)?
The -Ap option appears to fill in some data structures but I'm not seeing how that's supposed to get back to the caller or if there's a way to register a callback so I can do something else with the vlist data.
In the main gqa command, the logic flow for getting the data into the scene is _ged_cvt_vlblock_to_solids on gqa.cpp:2725
_ged_cvt_vlblock_to_solids in turn calls invent_solid
The actual vlist data ends up in gedp->ged_gdp->gd_headDisplay
I think in the current setup you'd have to iterate through gd_headDisplay's dl_head_scene_obj list to find it
There should be a bv_scene_obj with the data in question
Unfortunately I don't think the current drawing code path stores the name in the scene object - invent_solid uses a phony db_diradd to handle the name
I don't think they need the name, or at least I think that can probably be managed by re-shooting with just the overlapping pair.
Do you think you could whip up a main() for them showing how to access it?
https://github.com/BRL-CAD/brlcad/commit/9fa7d464d5e5a0d7802cb652de2b0c54c18771b9
Is that what you had in mind?
(btw, to run it after a build to generate the plot file, it's src/libged/tests/ged_test_gqa ../src/libged/tests/ged_tests.g)
starseeker said:
Is that what you had in mind?
Indeed! I'll see if this does the trick.
On a related note -- how feasible would it be to use bu_process to invoke "mged -c gqa" (for example), and then call bu_terminate to stop it mid-processing? Would that work? I'm not looking to do that but was curious if it should work. Would be an interesting use case.
Hmm. Good question - in principle that might be possible. It'd essentially be a variation on what we'll probably end up doing eventually for GED plugins we can stop.
Last updated: Jan 09 2025 at 00:46 UTC