[Smtk-developers] Bridges and descriptive phrases

David Thompson david.thompson at kitware.com
Fri Nov 7 21:30:07 EST 2014


Hi Yumin,

I've merged in some code that goes a little further than what we talked about as far as displaying bridge sessions in the Qt tree view. Instead of just adding a new subclass of DescriptivePhrase, I made bridges entities just like ModelEntity, Face, Edge, etc.

There is a new class, smtk::model::BridgeSession, that is a Cursor subclass. You can get an array of all the bridge sesssion in a Manager with

    smtk::model::Manager::Ptr mgr;
    BridgeSessions sessions = mgr->allSessions();

and it will list models assigned to it:

    ModelEntities models = sessions[0].models();

This is used to present models as children of bridge sessions in DescriptivePhrase hierarchies. The BridgeSession class also provides some convenience methods for accessing bridge information. See smtk/bridge/cgm/testing/python for some examples.

Please let me know if you have any problems using this to present bridges in the Qt tree view in ModelBuilder.

	David


More information about the Smtk-developers mailing list