Stream: brlcad

Topic: libged/libtclcad and multiple databases


view this post on Zulip starseeker (Jul 16 2020 at 14:01):

@Sean Question. Is the intent of libtclcad to be able to manage multiple simultaneous open databases? If so, how does (say) an Archer command prompt denote what database is the "current" database for a ged command? Most of our commands have an implicit assumption of a "current" gedp/dbip, but looking at tclcad_obj and ged_obj in libtclcad the intent seems to be to allow iteration over multiple databases?

view this post on Zulip Daniel Rossberg (Jul 16 2020 at 15:00):

@Sadeep Darshana's new GUI can open multiple simultaneously.

view this post on Zulip Sadeep Darshana (Jul 16 2020 at 15:08):

@starseeker said there might be global variables in librt. However I didn't face trouble yet. I did not raytrace. Displaying wireframes works fine (there might be issues, not that I have noticed any).

view this post on Zulip Daniel Rossberg (Jul 16 2020 at 15:11):

RTG.rtg_vlfree might be an issue(?)

view this post on Zulip starseeker (Jul 16 2020 at 16:52):

How are you managing libged's ged pointer? (struct ged)

view this post on Zulip starseeker (Jul 16 2020 at 16:52):

One per database?

view this post on Zulip starseeker (Jul 16 2020 at 16:55):

Also, once a command prompt is available, do operations on that command prompt operate only on one database or on all open databases? It should probably be the former in my opinion (I don't think the latter is practical, certainly at the moment...)

view this post on Zulip starseeker (Jul 16 2020 at 16:59):

In libtclcad there is a list of views, which in turn have ged pointers. Structurally this requires unwrapping the Tcl interp's data container to get the gedp pointer before calling any libged commands, which is unfortunate - there's a lot of verbose infrastructure in libtclcad that does this job at the moment.

I'm trying to think through if and how the gedp itself might contain the set of views active for the given database, so we can (at least for the libged commands) minimize the amount of wrapping logic needed.


Last updated: Oct 09 2024 at 00:44 UTC