[MOAB-dev] r4009 - in MOAB/trunk: examples src src/io src/moab
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Thu Jun 17 17:19:47 CDT 2010
Author: tautges
Date: 2010-06-17 17:19:47 -0500 (Thu, 17 Jun 2010)
New Revision: 4009
Modified:
MOAB/trunk/examples/GeomSetHierarchy.cpp
MOAB/trunk/examples/README
MOAB/trunk/src/GeomTopoTool.cpp
MOAB/trunk/src/io/ReadCGM.cpp
MOAB/trunk/src/moab/GeomTopoTool.hpp
Log:
Adding edge-face sense to cgm reader. Will update documentation when it's ready,
not quite there yet.
Modified: MOAB/trunk/examples/GeomSetHierarchy.cpp
===================================================================
--- MOAB/trunk/examples/GeomSetHierarchy.cpp 2010-06-17 21:39:41 UTC (rev 4008)
+++ MOAB/trunk/examples/GeomSetHierarchy.cpp 2010-06-17 22:19:47 UTC (rev 4009)
@@ -1,8 +1,12 @@
-#include "MBCore.hpp"
-#include "MBRange.hpp"
+#include "moab/Core.hpp"
+#include "moab/Range.hpp"
#include "MBCN.hpp"
+#include "MBTagConventions.hpp"
+#include "moab/GeomTopoTool.hpp"
#include <iostream>
+const char *ent_names[] = {"Vertex", "Edge", "Face", "Region"};
+
int main(int argc, char **argv) {
if (1 == argc) {
std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
@@ -10,34 +14,67 @@
}
// instantiate & load a file
- MBInterface *mb = new MBCore();
- MBErrorCode rval = mb->load_file(argv[1]);
+ moab::Interface *mb = new moab::Core();
+ moab::ErrorCode rval = mb->load_file(argv[1]);
// get the geometric topology tag handle
- MBTag geom_tag;
- rval = mb->tag_get_handle("GEOM_DIMENSION", geom_tag);
+ moab::Tag geom_tag, gid_tag;
+ rval = mb->tag_get_handle(GEOM_DIMENSION_TAG_NAME, geom_tag);
+ rval = mb->tag_get_handle(GLOBAL_ID_TAG_NAME, gid_tag);
// traverse the model, from dimension 3 downward
- MBRange psets, chsets;
- int dim;
+ moab::Range psets, chsets;
+ std::vector<moab::EntityHandle> sense_ents;
+ std::vector<int> senses, pgids;
+ int dim, pgid, chgid;
void *dim_ptr = &dim;
+ bool sense;
+
+ moab::GeomTopoTool gt(mb, true);
+
for (dim = 3; dim >= 0; dim--) {
// get parents at this dimension
- psets.clear();
+ chsets.clear();
More information about the moab-dev
mailing list