[Smtk-developers] Bridges and descriptive phrases

David Thompson david.thompson at kitware.com
Wed Nov 12 09:10:47 EST 2014


Hi Yumin,

You're right, without any debug information like a line number, the stack trace doesn't tell me anything. I'll try building CMBv4 again today but if you get a debug build of CGM going, that would be great, too.

    David

Sent from my iPad

> On Nov 11, 2014, at 19:20, Yumin Yuan <yumin.yuan at kitware.com> wrote:
> 
> Dave,
> 
> I have something working, and also have something "crashing" inside cgm.
> 
> Things work for:
> * one bridge session with multiple read operators: each model from "read" will show as children of  the same "bridge session". This works for both cgm and discrete bridges.
> * For cgm bridge, after "read", the "create prism/sphere" will work ONLY if I start a new bridge-session, which means the "prism/sphere" model will show as children of the New session.
> 
> The following will crash inside cgm:
> * For cgm bridge, after "read", the "create prism/sphere" will crash inside cgm if I use the same bridge-session of "read", and I verified that GeometryModifyTool::instance() was NOT null. Here is the trace of crash ... (It doesn't seem to help)
> 
> Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
> Exception Codes: EXC_I386_GPFLT
> 
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0   libcgm.0.dylib                	0x000000011ec78754 GeometryModifyTool::prism(double, int, double, double) + 214
> 1   libcgmSMTK.dylib              	0x000000011e992972 smtk::bridge::cgm::CreatePrismOperator::operateInternal() + 1730 (CreatePrismOperator.cxx:81)
> 2   libSMTKCore.dylib             	0x00000001074b9229 smtk::model::Operator::operate() + 137 (Operator.cxx:74)
> 3   libModelBridge_Plugin.dylib   	0x0000000107b6677a vtkModelManagerWrapper::ProcessJSONRequest() + 6522 
> 
> Thanks,
> Yumin
> 
>> On Fri, Nov 7, 2014 at 9:30 PM, David Thompson <david.thompson at kitware.com> wrote:
>> 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
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20141112/5a2303be/attachment.html>


More information about the Smtk-developers mailing list