MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "FBiGeom.h"
#include <iostream>
#include <set>
#include <algorithm>
#include <vector>
#include <iterator>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <cmath>
Go to the source code of this file.
Classes | |
class | SimpleArray< T > |
Macros | |
#define | CHECK(STR) if( err != iBase_SUCCESS ) return print_error( STR, err, geom, __FILE__, __LINE__ ) |
#define | STRINGIFY(S) XSTRINGIFY( S ) |
#define | XSTRINGIFY(S) #S |
#define | ARRAY_INOUT(A) A.ptr(), &( A ).capacity(), &( A ).size() |
#define | ARRAY_IN(A) &( A )[0], ( A ).size() |
Typedefs | |
typedef iBase_TagHandle | TagHandle |
typedef iBase_EntityHandle | GentityHandle |
typedef iBase_EntitySetHandle | GentitysetHandle |
Functions | |
static bool | print_error (const char *desc, int err, FBiGeom_Instance geom, const char *file, int line) |
bool | gLoad_test (const std::string &filename, FBiGeom_Instance) |
bool | tags_test (FBiGeom_Instance geom) |
bool | tag_get_set_test (FBiGeom_Instance geom) |
bool | tag_info_test (FBiGeom_Instance geom) |
bool | gentityset_test (FBiGeom_Instance geom, bool, bool) |
bool | topology_adjacencies_test (FBiGeom_Instance geom) |
bool | geometry_evaluation_test (FBiGeom_Instance geom) |
bool | construct_test (FBiGeom_Instance geom) |
bool | primitives_test (FBiGeom_Instance geom) |
bool | transforms_test (FBiGeom_Instance geom) |
bool | booleans_test (FBiGeom_Instance geom) |
bool | shutdown_test (FBiGeom_Instance geom, std::string &engine_opt) |
bool | save_entset_test (FBiGeom_Instance geom) |
bool | mesh_size_test (FBiGeom_Instance geom) |
void | handle_error_code (const bool result, int &number_failed, int &, int &number_successful) |
int | main (int argc, char *argv[]) |
static bool | compare_box (const double *expected_min, const double *expected_max, const double *actual_min, const double *actual_max) |
static int | get_entities (FBiGeom_Instance geom, int entity_type, std::vector< iBase_EntityHandle > &entities_out, iBase_TagHandle id_tag=0, std::vector< int > *ids_out=0) |
static int | check_firmness (FBiGeom_Instance geom, const std::vector< iBase_EntityHandle > &entities, const std::vector< int > &ids, iBase_TagHandle firmness_tag, const char *expected_value, const char *ent_type_str) |
static int | count_num_with_tag (FBiGeom_Instance geom, const std::vector< iBase_EntityHandle > &ents, iBase_TagHandle tag) |
#define ARRAY_IN | ( | A | ) | &( A )[0], ( A ).size() |
Definition at line 125 of file testgeom.cpp.
#define ARRAY_INOUT | ( | A | ) | A.ptr(), &( A ).capacity(), &( A ).size() |
Definition at line 124 of file testgeom.cpp.
#define CHECK | ( | STR | ) | if( err != iBase_SUCCESS ) return print_error( STR, err, geom, __FILE__, __LINE__ ) |
Definition at line 25 of file testgeom.cpp.
#define STRINGIFY | ( | S | ) | XSTRINGIFY( S ) |
Definition at line 28 of file testgeom.cpp.
#define XSTRINGIFY | ( | S | ) | #S |
Definition at line 29 of file testgeom.cpp.
typedef iBase_EntityHandle GentityHandle |
Definition at line 46 of file testgeom.cpp.
Definition at line 47 of file testgeom.cpp.
typedef iBase_TagHandle TagHandle |
Definition at line 45 of file testgeom.cpp.
bool booleans_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 1230 of file testgeom.cpp.
References CHECK, FBiGeom_createBrick, FBiGeom_createCylinder, FBiGeom_deleteEnt, FBiGeom_sectionEnt, FBiGeom_subtractEnts, FBiGeom_uniteEnts, and geom.
|
static |
Definition at line 1296 of file testgeom.cpp.
References entities, FBiGeom_getArrData, geom, iBase_FAILURE, and iBase_SUCCESS.
Referenced by mesh_size_test().
|
static |
bool construct_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 1028 of file testgeom.cpp.
References ARRAY_IN, ARRAY_INOUT, CHECK, FBiGeom_createCylinder, FBiGeom_deleteEnt, FBiGeom_getArrBoundBox, FBiGeom_getEntAdj, FBiGeom_moveEnt, FBiGeom_sweepEntAboutAxis, geom, iBase_FACE, iBase_INTERLEAVED, and SimpleArray< T >::size().
|
static |
Definition at line 1328 of file testgeom.cpp.
References FBiGeom_getData, FBiGeom_getTagSizeBytes, geom, iBase_SUCCESS, and iBase_TAG_NOT_FOUND.
Referenced by mesh_size_test().
bool gentityset_test | ( | FBiGeom_Instance | geom, |
bool | , | ||
bool | |||
) |
Definition at line 509 of file testgeom.cpp.
References ARRAY_IN, ARRAY_INOUT, CHECK, children, FBiGeom_addEntArrToSet, FBiGeom_addEntSet, FBiGeom_addPrntChld, FBiGeom_createEntSet, FBiGeom_getChldn, FBiGeom_getEntities, FBiGeom_getEntSets, FBiGeom_getNumChld, FBiGeom_getNumEntSets, FBiGeom_getNumOfType, FBiGeom_getNumPrnt, FBiGeom_getPrnts, FBiGeom_getRootSet, FBiGeom_intersect, FBiGeom_isChildOf, FBiGeom_rmvEntArrFromSet, FBiGeom_rmvPrntChld, FBiGeom_subtract, FBiGeom_unite, geom, iBase_EDGE, iBase_FACE, iBase_REGION, iBase_VERTEX, root_set, and SimpleArray< T >::size().
bool geometry_evaluation_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 975 of file testgeom.cpp.
References ARRAY_INOUT, SimpleArray< T >::begin(), CHECK, SimpleArray< T >::end(), FBiGeom_getEntBoundBox, FBiGeom_getEntClosestPt, FBiGeom_getEntities, FBiGeom_getRootSet, geom, iBase_ALL_TYPES, iBase_EDGE, iBase_REGION, iBase_VERTEX, root_set, and SimpleArray< T >::size().
Referenced by main().
|
static |
Definition at line 1264 of file testgeom.cpp.
References FBiGeom_getEntities, FBiGeom_getIntArrData, FBiGeom_getNumOfType, FBiGeom_getRootSet, geom, iBase_SUCCESS, and id_tag.
Referenced by mesh_size_test().
bool gLoad_test | ( | const std::string & | filename, |
FBiGeom_Instance | geom | ||
) |
Definition at line 305 of file testgeom.cpp.
References CHECK, FBiGeom_getNumOfType, FBiGeom_getRootSet, FBiGeom_load, filename, geom, and root_set.
Referenced by main().
void handle_error_code | ( | const bool | result, |
int & | number_failed, | ||
int & | , | ||
int & | number_successful | ||
) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 157 of file testgeom.cpp.
References FBiGeom_newGeom, filename, geom, geometry_evaluation_test(), gLoad_test(), handle_error_code(), number_tests, number_tests_failed, number_tests_successful, shutdown_test(), STRINGIFY, tags_test(), and topology_adjacencies_test().
bool mesh_size_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 1351 of file testgeom.cpp.
References CHECK, check_firmness(), count_num_with_tag(), FBiGeom_deleteAll, FBiGeom_getDblArrData, FBiGeom_getIntArrData, FBiGeom_getTagHandle, FBiGeom_load, filename, geom, get_entities(), iBase_EDGE, iBase_FACE, iBase_FAILURE, iBase_REGION, iBase_SUCCESS, iBase_VERTEX, size, sizes, and STRINGIFY.
bool primitives_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 1102 of file testgeom.cpp.
References ARRAY_IN, ARRAY_INOUT, CHECK, compare_box(), FBiGeom_createBrick, FBiGeom_createCylinder, FBiGeom_createTorus, FBiGeom_deleteEnt, FBiGeom_getArrBoundBox, geom, and iBase_INTERLEAVED.
|
static |
Definition at line 31 of file testgeom.cpp.
References buffer, FBiGeom_getDescription, and geom.
Referenced by save_entset_test().
bool save_entset_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 1469 of file testgeom.cpp.
References CHECK, FBiGeom_addEntToSet, FBiGeom_createCylinder, FBiGeom_createEntSet, FBiGeom_deleteEnt, FBiGeom_destroyEntSet, FBiGeom_getNumEntSets, FBiGeom_getNumOfType, FBiGeom_getRootSet, FBiGeom_load, FBiGeom_save, filename, geom, iBase_FAILURE, iBase_REGION, and print_error().
bool shutdown_test | ( | FBiGeom_Instance | geom, |
std::string & | engine_opt | ||
) |
Definition at line 1452 of file testgeom.cpp.
References CHECK, FBiGeom_dtor, FBiGeom_newGeom, and geom.
Referenced by main().
bool tag_get_set_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 440 of file testgeom.cpp.
References ARRAY_IN, ARRAY_INOUT, SimpleArray< T >::capacity(), CHECK, dim, FBiGeom_createTag, FBiGeom_destroyTag, FBiGeom_getArrData, FBiGeom_getEntities, FBiGeom_getRootSet, FBiGeom_setArrData, geom, iBase_BYTES, SimpleArray< T >::ptr(), root_set, SimpleArray< T >::size(), and moab::sum().
Referenced by tags_test().
bool tag_info_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 345 of file testgeom.cpp.
References ARRAY_INOUT, SimpleArray< T >::begin(), CHECK, SimpleArray< T >::end(), entities, FBiGeom_createTag, FBiGeom_destroyTag, FBiGeom_getAllTags, FBiGeom_getEntities, FBiGeom_getRootSet, FBiGeom_getTagHandle, FBiGeom_getTagName, FBiGeom_getTagSizeBytes, FBiGeom_getTagSizeValues, FBiGeom_getTagType, moab::GeomUtil::first(), geom, iBase_ALL_TYPES, iBase_BYTES, and root_set.
Referenced by tags_test().
bool tags_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 334 of file testgeom.cpp.
References geom, tag_get_set_test(), and tag_info_test().
Referenced by main().
bool topology_adjacencies_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 890 of file testgeom.cpp.
References ARRAY_INOUT, SimpleArray< T >::begin(), CHECK, SimpleArray< T >::end(), FBiGeom_getEntAdj, FBiGeom_getEntities, FBiGeom_getNumOfType, FBiGeom_getRootSet, geom, iBase_ALL_TYPES, iBase_REGION, iBase_VERTEX, root_set, SimpleArray< T >::size(), and size.
Referenced by main().
bool transforms_test | ( | FBiGeom_Instance | geom | ) |
Definition at line 1168 of file testgeom.cpp.
References CHECK, FBiGeom_createBrick, FBiGeom_deleteEnt, FBiGeom_getEntBoundBox, FBiGeom_moveEnt, FBiGeom_reflectEnt, FBiGeom_rotateEnt, and geom.