[MOAB-dev] r1413 - MOAB/trunk
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Mon Nov 19 16:59:01 CST 2007
Author: tautges
Date: 2007-11-19 16:59:01 -0600 (Mon, 19 Nov 2007)
New Revision: 1413
Modified:
MOAB/trunk/DualTool.cpp
MOAB/trunk/MBCore.cpp
Log:
MBCore: fixing side_element when asking for vertices (sides of dimension 0)
DualTool: fixed paste-o in foc_get_stars
Modified: MOAB/trunk/DualTool.cpp
===================================================================
--- MOAB/trunk/DualTool.cpp 2007-11-19 20:54:52 UTC (rev 1412)
+++ MOAB/trunk/DualTool.cpp 2007-11-19 22:59:01 UTC (rev 1413)
@@ -1739,13 +1739,14 @@
other_nodes[0]); RR;
result = mtu.opposite_entity(split_edges[1], split_node,
other_nodes[1]); RR;
+ // over split quads:
for (int i = 0; i < 2; i++) {
- // 1st other edge is opposite second split edge on split quad
+ // 1st other edge is opposite second split edge
result = mtu.opposite_entity(split_quads[i],
- split_edges[1-i], other_edges[i]); RR;
- // 2nd other edge is opposite first split edge on split quad
+ split_edges[1], other_edges[i]); RR;
+ // 2nd other edge is opposite first split edge
result = mtu.opposite_entity(split_quads[i],
- split_edges[i], other_edges[2+i]); RR;
+ split_edges[0], other_edges[2+i]); RR;
// last other node is opposite split node on split quad
result = mtu.opposite_entity(split_quads[i], split_node,
other_nodes[i]); RR;
Modified: MOAB/trunk/MBCore.cpp
===================================================================
--- MOAB/trunk/MBCore.cpp 2007-11-19 20:54:52 UTC (rev 1412)
+++ MOAB/trunk/MBCore.cpp 2007-11-19 22:59:01 UTC (rev 1413)
@@ -2121,12 +2121,23 @@
int num_verts;
MBErrorCode result = get_connectivity(source_entity, verts, num_verts);
if (MB_SUCCESS != result) return result;
+
+ // special case for vertices
+ if (dim == 0) {
+ if (side_number < num_verts) {
+ target_entity = verts[side_number];
+ return MB_SUCCESS;
+ }
+
+ else return MB_INDEX_OUT_OF_RANGE;
+ }
// get the vertices comprising the target entity
MBRange side_verts, target_ents;
const MBEntityType source_type = TYPE_FROM_HANDLE(source_entity);
// first get the indices
std::vector<int> vertex_indices;
+
int temp_result =
MBCN::AdjacentSubEntities(source_type, &side_number, 1, dim, 0, vertex_indices);
if (0 != temp_result) return MB_FAILURE;
More information about the moab-dev
mailing list