<div dir="ltr">Hi Bob,<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 25, 2017 at 10:26 AM, Bob Obara <span dir="ltr"><<a href="mailto:bob.obara@kitware.com" target="_blank">bob.obara@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi All,<div><br></div><div>I’ve added the ability for an attribute definition to inherit the association rule from its base definition.  This should streamline the creation of templates.</div><div><br></div><div>For example you can create a definition called “Surface Boundary Condition” and assign an association rule to indicate that it can be associated with faces.  By default and definition based on “Surface Boundary Condition” will inherit this association rule and therefore be associated with model faces.</div><div>You can still override the inherited rule (note that in this implementation it will replace the entire rule).</div><div><br></div><div>To support this functionality there were some changes made to the attribute::Definition API:</div><div><br></div><div>associationRule() - returns the association rule that the definition uses - note that this can be a rule inherited from its Base Definition.  As a result this method now returns a shared pointer to a const model entity item definition</div><div>localAssociationRule() - returns the local association rule overriding the rule the definition would inherit from its base definition (Note that this can be nullptr)</div><div>createLocalAssociationRule() - creates a local association rule for the definition (by default its associated with nothing)</div><div>clearLocalAssociationRule() - removes the local association rule- the definition will now use the one inherited by its base definition </div><div>setAssociationRule(...) -> setLocalAssociationRule(…) - sets the definition’s local association rule that overrides the one inherited by its base definition</div><div>associationMask() -> returns the association mask that the definition uses - note that this can be the mask inherited from its Base Definition. </div><div>setAssociationMask-><wbr>setLocalAssociationMask - sets the mask of the local association rule (and creates one if necessary)</div><div><br></div><div>What needs to be done in the future is to determine what constraints (if any) are imposed on the local association rule by the association rule inherited by the base definition?  Does the rule need to be a subset or a superset of the inherited rule. </div><div><br></div><div>For Example assume a base definition foo can be applied to edges and faces</div><div>A definition bar is derived from foo and is going to have a local association rule</div><div><br></div><div>Which of the following are allowed?</div><div><br></div><div>1. bar can be associated with just faces (its rule is a subset of foo’s rule)</div><div>2. bar can be associated with edges, faces, and volumes (its rule is a superset)</div><div>3. bar can be associated with volumes (its rule is independent)</div><div><br></div><div>The question boils down to if bar can be treated as a foo then should it be associated to at least all  things foo? - then the we do superset</div><div>or is it a specialization of foo - in that case its a subset</div><div><br></div><div>I think case 3 (independent) is probably not allowed?</div></div></blockquote><div>Just my 2 cents opinion, I think both case 2 and case 3 should not be allowed. Since bar is derived from foo, it should not go beyond foo.</div><div><br></div><div>If case 2 happens, then the user should rethink about the definition of foo. Either he or her should expand foo to incude volumes or transform it into case 3 in which </div><div>bar just happens to share the same Boundary condition with foo but they are independent of each other.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>Note that the functionality is currently being tested and should be committed soon.</div><div><br></div><div><br></div><div>Comments?</div><div><br></div><div>Bob</div><div><br></div><div><br></div><div><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant: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="m_-8652928052060890624Apple-interchange-newline"><br class="m_-8652928052060890624Apple-interchange-newline">
</div>

<br></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" data-smartmail="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>