<div dir="ltr"><br><div class="gmail_extra">Good Morning TJ,</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 19, 2017 at 10:49 PM, TJ Corona <span dir="ltr"><<a href="mailto:tj.corona@kitware.com" target="_blank">tj.corona@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><span class="gmail-"><div><blockquote type="cite"><div dir="auto"><blockquote type="cite"><div><div>I’m not sure if having the model be implicitly being created is a good idea since the conversion may result in a loss of information</div></div></blockquote></div></blockquote><br></div></span><div>That’s true: I guess only some sessions would be able to convert back and forth without loss. Any implicit operations that resulted in an assumption of information or a loss of information would definitely be a bad thing.</div><span class="gmail-"><div><br></div><div><blockquote type="cite"><div dir="auto"><div>I agree with Bob that implicit conversion could be a problem, especially when a similar operation exists in multiple sessions.</div></div></blockquote></div></span><div><div dir="auto"><div><br></div><div>Also true. This gets to the heart of one of the design patterns in SMTK that I don’t quite understand, though: how do we better exploit the common interface of the default session to construct operators that span multiple derived sessions? </div></div></div></div></blockquote><div>I believe the current logic is that first we create operators for the default session and store them in the class variable defaultSession->m_operatorSys(<b>smtk::attribute::system</b> type). Next let's say we want to create a discrete session, we would then initialize discrete session operators and append dafault session's operators to discreteSession->m_operatorSys. Here we only copy definitions that do not already exist so we can realize "overriding operator". You can take a look at <a href="https://gitlab.kitware.com/cmb/smtk/blob/master/smtk/model/Session.cxx#L1048">/smtk/model/Session.cxx#L1048</a> for detail.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><div dir="auto"><div>The option of extending operators across sessions via implicit conversions is probably the wrong path, but I think that the problem it addresses is worth considering. Encompassing meta-operators that manually call their derived counterparts could work, but it seems like there is opportunity here for a more elegant solution. </div></div></div><span class="gmail-"><div><br></div></span></div></blockquote><div> There is no implicit conversions here for extending operators across sessions actually. For now I think the only operator which has inheritance is the EntityGroupOperator. Discrete session has its own derived version. Another special case are the Add image and Add auxiliary geometry operator. Add image operator has its own sbt file and internally it's using Add auxiliary geometry operator to load an image.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><span class="gmail-"><div></div><div><blockquote type="cite"><div dir="auto"><div>But I think it is nice to have a way to perform the conversion. </div></div></blockquote><br></div></span><div>Me too! I’ve been thinking about the conversion between the mesh session and VTK in a similar context. We discussed wrapping SMTK mesh objects as zero-copy VTK objects, and I’d like to give that a try when I get a chance. Perhaps a similar paradigm could exist between some of the sessions.</div></div></blockquote><div>+1. I agree that mesh session would be a nice bridge :) </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><span class="gmail-"><div><br></div><div>
<div style="word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thomas J. Corona, Ph.D.<br>Kitware, Inc.<br>Senior R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:(518)%20881-4443" value="+15188814443" target="_blank">518-881-4443</a></div></div>
</div>
<br></span><div><div class="gmail-h5"><div><blockquote type="cite"><div>On Jun 19, 2017, at 9:21 PM, David Thompson <<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>> wrote:</div><br class="gmail-m_-3620146827394373387Apple-interchange-newline"><div><div dir="auto"><div></div><div>Hi TJ,</div><div><br></div><div>I agree with Bob that implicit conversion could be a problem, especially when a similar operation exists in multiple sessions.</div><div><br></div><div>But I think it is nice to have a way to perform the conversion. In fact, the ERDC CS session has an operator for converting any non-parametric model into a model in that session. If we come up with a convention, we should make sure that operator is brought along for the ride.</div><div><br></div><div> David</div><div><br>On Jun 19, 2017, at 22:08, Bob Obara <<a href="mailto:bob.obara@kitware.com" target="_blank">bob.obara@kitware.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div>Wouldn’t the conversion to/from pair just be in a separate plugin (since it would need to be built against a pair of sessions)? In this case the conversion operators would be added to the corresponding sessions when the plugin is loaded. I’m not sure if having the model be implicitly being created is a good idea since the conversion may result in a loss of information) - explicit conversion at least would inform the user of the conversion limitations - now a workflow that requires such a conversion (for example going from a polygonal planar model to a 3d non-planar discrete model after applying an elevation field) would be able to apply it implicitly when going from one task in the workflow to another since the workflow designer would have factored in the conversion issues when designing the workflow.</div><div><br></div><div>Does that make sense or am I missing something?</div><div><br></div><div>Bob</div><div><br></div><div><br class="gmail-m_-3620146827394373387webkit-block-placeholder"></div><div><div style="font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>Robert M. O'Bara, MEng.<br>Assistant Director of Scientific Computing<br><br>Kitware Inc.<br>28 Corporate Drive<br>Suite 101<br>Clifton Park, NY 12065<br><br>Phone: <a href="tel:(518)%20881-4931" value="+15188814931" target="_blank">(518) 881- 4931</a></div><div><br></div></div><br class="gmail-m_-3620146827394373387Apple-interchange-newline"><br class="gmail-m_-3620146827394373387Apple-interchange-newline">
</div>
<br><div><blockquote type="cite"><div>On Jun 19, 2017, at 6:45 PMEDT, TJ Corona <<a href="mailto:tj.corona@kitware.com" target="_blank">tj.corona@kitware.com</a>> wrote:</div><br class="gmail-m_-3620146827394373387Apple-interchange-newline"><div><div style="word-wrap:break-word"><div>Hi all,</div><div><br></div><div>I have an idea, and I’d like to know what everyone thinks. We currently have multiple sessions with different backings, and each of these sessions have a different set of operators that it can perform. To my understanding, if a user wants to cross from session to session, they currently have to do so manually (i.e. create a working model in one session, open the model in a new session and perform the operation). What if we created “bridges” between sessions that facilitated to/from operations for each session pair, and then made these conversions implicit during model manipulation in ModelBuilder? For example, we create a bridge between the polygon and mesh sessions that describe how to convert a model of one type to the other (going from polygon to mesh would imply an implicit meshing operation, and going from mesh to model would imply an extraction of vertices, edges and faces in the mesh session to construct a polygon model). This way, a user could create a polygon model and then perform any of the meshing operations on it without having to know what session currently backs their model. Is this crazy?</div><div><br></div><div>Sincerely,</div><div>T.J.</div><br><div>
<div style="word-wrap:break-word"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thomas J. Corona, Ph.D.<br>Kitware, Inc.<br>Senior R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:(518)%20881-4443" value="+15188814443" target="_blank">518-881-4443</a></div></div>
</div>
<br></div>______________________________<wbr>_________________<br>Smtk-developers mailing list<br><a href="mailto:Smtk-developers@smtk.org" target="_blank">Smtk-developers@smtk.org</a><br><a href="http://public.kitware.com/mailman/listinfo/smtk-developers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/smtk-<wbr>developers</a><br></div></blockquote></div><br></div></blockquote><blockquote type="cite"><div><span>______________________________<wbr>_________________</span><br><span>Smtk-developers mailing list</span><br><span><a href="mailto:Smtk-developers@smtk.org" target="_blank">Smtk-developers@smtk.org</a></span><br><span><a href="http://public.kitware.com/mailman/listinfo/smtk-developers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/smtk-<wbr>developers</a></span><br></div></blockquote></div></div></blockquote></div><br></div></div></div><br>______________________________<wbr>_________________<br>
Smtk-developers mailing list<br>
<a href="mailto:Smtk-developers@smtk.org">Smtk-developers@smtk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/smtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/smtk-<wbr>developers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Best regards<div>Haocheng</div><div><br></div><div>Haocheng LIU</div><div><span style="color:rgb(0,0,0);font-size:12.8px">Kitware, Inc.</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">R&D Engineer</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">21 Corporate Drive</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">Clifton Park, NY 12065-8662</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">Phone: </span><a href="tel:(518)%20881-4421" value="+15188814443" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">518-881-4421</a><br></div></div></div></div></div>
</div></div>