<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
(I may have led Patrick astray here in face-to-face conversation...)<br>
<br>
Now that I see your reply, Iulian, I think this makes sense. In
Patrick's example, there is no reason to actually expect only 3
responses for all triangles adjacent to another triangle since the
triangles that share a node are also considered adjacent.<br>
<br>
Paul <br>
<br>
<div class="moz-cite-prefix">On 01/27/2014 05:13 PM, Grindeanu,
Iulian R. wrote:<br>
</div>
<blockquote
cite="mid:BB009D978283884B95AED82EEAE7D9641449CB46@HALAS.anl.gov"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">So I think the discussion is about
"bridge" entities, for adjacencies; if the bridge entities are
nodes, you will get different result compared when bridge
entities are edges, so this is why we should keep the current
code. (and go through bridge entities, then it is clear what
kind of adjacency you want)<br>
<br>
Iulian<br>
<div style="font-family: Times New Roman; color: #000000;
font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF208752"><font
face="Tahoma" size="2" color="#000000"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:moab-dev-bounces@mcs.anl.gov">moab-dev-bounces@mcs.anl.gov</a>
[<a class="moz-txt-link-abbreviated" href="mailto:moab-dev-bounces@mcs.anl.gov">moab-dev-bounces@mcs.anl.gov</a>] on behalf of Grindeanu,
Iulian R. [<a class="moz-txt-link-abbreviated" href="mailto:iulian@mcs.anl.gov">iulian@mcs.anl.gov</a>]<br>
<b>Sent:</b> Monday, January 27, 2014 5:10 PM<br>
<b>To:</b> Patrick Shriwise<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:moab-dev@mcs.anl.gov">moab-dev@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [MOAB-dev] get_adjacencies of same dim<br>
</font><br>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma;
color:#000000; font-size:10pt">I think you found
something;
<br>
In the code, when the target dimension is the same as
source dimension, we return just the entity.<br>
AEntityFactory.cpp:<br>
...<br>
599 else if (source_dimension == target_dimension) {<br>
600 target_entities.push_back( source_entity );<br>
601 result = MB_SUCCESS;<br>
602 }<br>
603 else {<br>
<br>
As a workaround, you probably want to go through
edges/vertices, and from edges/vertices get the adjacent
triangles.<br>
<br>
Tim, should we change the behavior and return all adjacent
triangles? I know that there is a discussion in iMesh too
about that.
<br>
<br>
Iulian<br>
<div style="font-family:Times New Roman; color:#000000;
font-size:16px">
<hr tabindex="-1">
<div id="divRpF147496" style="direction:ltr"><font
face="Tahoma" size="2" color="#000000"><b>From:</b>
Patrick Shriwise [<a class="moz-txt-link-abbreviated" href="mailto:shriwise@wisc.edu">shriwise@wisc.edu</a>]<br>
<b>Sent:</b> Monday, January 27, 2014 4:33 PM<br>
<b>To:</b> Grindeanu, Iulian R.<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:moab-dev@mcs.anl.gov">moab-dev@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [MOAB-dev] get_adjacencies of
same dim<br>
</font><br>
</div>
<div>
<div class="moz-cite-prefix">On 01/27/2014 04:24 PM,
Grindeanu, Iulian R. wrote:<br>
</div>
<blockquote type="cite">
<pre>hello,
are you using the last parameter / flag to the get_adjacency? By default it is intersect.
maybe you want "union" of the input ?
virtual ErrorCode get_adjacencies(const Range &from_entities,
const int to_dimension,
const bool create_if_missing,
Range &adj_entities,
const int operation_type = Interface::INTERSECT);
What are you getting and you do not expect it?
Iulian
________________________________________
From: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a> [<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a>] on behalf of Patrick Shriwise [<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:shriwise@wisc.edu" target="_blank">shriwise@wisc.edu</a>]
Sent: Monday, January 27, 2014 4:08 PM
To: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:moab-dev@mcs.anl.gov" target="_blank">moab-dev@mcs.anl.gov</a>
Subject: [MOAB-dev] get_adjacencies of same dim
Hey all,
Quick question. Working on a couple tests for ReadCGM and calling for
the adjacencies of an entity which are the same dimension of the entity
itself but I'm not getting the result I'm expecting. Any this special to
know in this case?
Cheers,
--
Patrick C. Shriwise
Research Assistant
University of Wisconsin - Madison
Engineering Research Building - Rm. 428
1500 Engineering Drive
Madison, WI 53706
(608) 446-8173
</pre>
</blockquote>
I'm calling for the adjacencies of a triangle which I
would expect to return a vector of entity handles of
size 3, but it seems to be returning a vector of size
1.<br>
<br>
To be specific I'm using:<br>
<br>
<br>
<pre>virtual ErrorCode get_adjacencies(const Range &from_entities,
const int to_dimension,
const bool create_if_missing,
std::vector<EntityHandle> &adj_entities,
const int operation_type = Interface::INTERSECT);
and here's my call: get_adjacencies( tri, 1, 2, false, adj_tris);
</pre>
<pre class="moz-signature" cols="72">--
Patrick C. Shriwise
Research Assistant
University of Wisconsin - Madison
Engineering Research Building - Rm. 428
1500 Engineering Drive
Madison, WI 53706
(608) 446-8173
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
Paul Wilson ~ UW-Madison ~ 608-263-0807 ~ cal: <a class="moz-txt-link-freetext" href="http://bit.ly/pphw-cal">http://bit.ly/pphw-cal</a>
Professor, Engineering Physics. ~ <a class="moz-txt-link-freetext" href="http://cnerg.engr.wisc.edu">http://cnerg.engr.wisc.edu</a>
Faculty Director, Advanced Computing Infrastructure</pre>
</body>
</html>