Tool for interpreting geometric topology sets in MOAB database Tool for interpreting geometric topology sets in MOAB database; see MOAB metadata_info document for information on how geometric topology sets are read and represented. More...
#include <GeomTopoTool.hpp>
Public Member Functions | |
GeomTopoTool (Interface *impl, bool find_geoments=false, EntityHandle modelRootSet=0, bool p_rootSets_vector=true, bool restore_rootSets=true) | |
Constructor (creates a GTT object) \ Construct a GeomTopoTool object and search for geometric EntitySets if they exist in the provided moab instance. More... | |
~GeomTopoTool () | |
ErrorCode | restore_topology_from_adjacency () |
Restore parent/child links between GEOM_TOPO mesh sets. More... | |
ErrorCode | set_sense (EntityHandle entity, EntityHandle wrt_entity, int sense) |
Store sense of entity relative to wrt_entity. More... | |
ErrorCode | get_sense (EntityHandle entity, EntityHandle wrt_entity, int &sense) |
Get the sense of entity with respect to wrt_entity Returns MB_ENTITY_NOT_FOUND if no relationship found. More... | |
ErrorCode | get_surface_senses (EntityHandle volume, int num_surfs, const EntityHandle *surfs, int *senses_out) |
Get the sense of the surface(s) with respect to the volume. More... | |
ErrorCode | get_surface_senses (EntityHandle surface_ent, EntityHandle &forward_vol, EntityHandle &reverse_vol) |
Get the senses of a surface with respect to its volumes. More... | |
ErrorCode | set_surface_senses (EntityHandle surface_ent, EntityHandle forward_vol, EntityHandle reverse_vol) |
Set the senses of a surface with respect to its volumes. More... | |
ErrorCode | get_senses (EntityHandle entity, std::vector< EntityHandle > &wrt_entities, std::vector< int > &senses) |
Get the senses of the lower dimension entity handle wrt the higher dimension entities. More... | |
ErrorCode | set_senses (EntityHandle entity, std::vector< EntityHandle > &wrt_entities, std::vector< int > &senses) |
Set the senses of the entity wrt multiple higher dimension entities. More... | |
ErrorCode | next_vol (EntityHandle surface, EntityHandle old_volume, EntityHandle &new_volume) |
Get the volume on the other side of a surface. More... | |
ErrorCode | get_gsets_by_dimension (int dim, Range &gset) |
Retrieve geometry sets of desired dimension from model set. More... | |
ErrorCode | construct_obb_tree (EntityHandle eh) |
Build obb tree for the entity set given; entity can be surface or volume. More... | |
ErrorCode | get_bounding_coords (EntityHandle volume, double minPt[3], double maxPt[3]) |
Get the bouding points from a bounding box. More... | |
ErrorCode | get_obb (EntityHandle volume, double center[3], double axis1[3], double axis2[3], double axis3[3]) |
Get the center point and three vectors for the OBB of a given volume. More... | |
ErrorCode | other_entity (EntityHandle bounded, EntityHandle not_this, EntityHandle across, EntityHandle &other) |
Get the other (d-1)-dimensional entity bounding a set across a (d-2)-dimensional entity. More... | |
int | dimension (EntityHandle this_set) |
Return the dimension of the set, or -1 if it's not a geom_dimension set. More... | |
int | global_id (EntityHandle this_set) |
Return the global ID of a given entity set. More... | |
EntityHandle | entity_by_id (int dimension, int id) |
Map from dimension & global ID to EntityHandle. More... | |
ErrorCode | find_geomsets (Range *ranges=NULL) |
ErrorCode | restore_obb_index () |
Restore the internal cross-referencing of geometry sets and OBB roots. More... | |
ErrorCode | construct_obb_trees (bool make_one_vol=false) |
Build obb trees for all surfaces and volumes in model set. More... | |
ErrorCode | delete_obb_tree (EntityHandle gset, bool vol_only=false) |
Delete the OBB tree of a volume or surface. More... | |
ErrorCode | delete_all_obb_trees () |
ErrorCode | remove_root (EntityHandle vol_or_surf) |
Delete the root of the obb tree from the set of all roots. More... | |
ErrorCode | get_root (EntityHandle vol_or_surf, EntityHandle &root) |
Get the root of the obbtree for a given entity. More... | |
EntityHandle | get_one_vol_root () |
If constructing one volume obb tree by joining all surface trees,. More... | |
OrientedBoxTreeTool * | obb_tree () |
Pointer to Oriented Box Tree Tool class. More... | |
ErrorCode | add_geo_set (EntityHandle set, int dimension, int global_id=0) |
Adds a geometry set to the range of all geometry sets, the model set, and root set. More... | |
ErrorCode | geometrize_surface_set (EntityHandle surface, EntityHandle &output) |
Will assume no geo sets are defined for this surface. More... | |
ErrorCode | is_owned_set (EntityHandle eh) |
Checks to see if the entity is part of the model set. More... | |
ErrorCode | duplicate_model (GeomTopoTool *&duplicate, std::vector< EntityHandle > *pvGEnts=NULL) |
This would be a deep copy, into a new geom topo tool. More... | |
EntityHandle | get_root_model_set () |
Return the model set handle (this is the full geometry) More... | |
bool | check_model () |
Checks that all geometric entities were created properly. More... | |
const Range * | geoRanges () |
Should be used instead of keeping multiple ranges, for example in FBEngine. More... | |
Interface * | get_moab_instance () |
Return pointer to moab instance. More... | |
Tag | get_sense_tag () |
Returns the sense tag (sense2Tag) from check_face_sense_tag. More... | |
Tag | get_gid_tag () |
Returns the global ID tag (gidTag) from check_gid_tag. More... | |
Tag | get_geom_tag () |
Returns the geometry dimension tag (geomTag) from check_geom_tag. More... | |
bool | have_obb_tree () |
Returns true if obb trees have been added to the rootset. More... | |
int | num_ents_of_dim (int dim) |
returns the number of entities in the modelSet with specified geometric dimension More... | |
ErrorCode | setup_implicit_complement () |
sets the implicit complement handle for this tool More... | |
ErrorCode | get_implicit_complement (EntityHandle &implicit_complement) |
Get (or optionally, create) the implicit complement handle. More... | |
bool | is_implicit_complement (EntityHandle volume) |
detection method for the implicit complement More... | |
ErrorCode | restore_topology_from_geometric_inclusion (const Range &flat_volumes) |
Discover and store the topological relationships among a set of volumes This method may be used to discover the hierarchy that exists in a range of volumes, that have no previous sense of hierarchy, and store it according to the conventions of GeomTopoTool. The following requirements about the range of flat_volumes must be met: More... | |
Private Member Functions | |
ErrorCode | generate_implicit_complement (EntityHandle &implicit_complement_set) |
Creates a volume for undefined space in the model. More... | |
ErrorCode | construct_vertex_ranges (const Range &geom_sets, const Tag verts_tag) |
Compute vertices inclusive and put on tag on sets in geom_sets. More... | |
ErrorCode | separate_by_dimension (const Range &geom_sets) |
Given a range of geom topology sets, separate by dimension. More... | |
ErrorCode | check_gid_tag (bool create=false) |
Verify global id tag. More... | |
ErrorCode | check_geom_tag (bool create=false) |
Verify geometry tag. More... | |
ErrorCode | check_face_sense_tag (bool create=false) |
Verify sense face tag. More... | |
ErrorCode | check_edge_sense_tags (bool create=false) |
Verify sense edge tags. More... | |
ErrorCode | resize_rootSets () |
ErrorCode | set_root_set (EntityHandle vol_or_surf, EntityHandle root) |
Range | get_ct_children_by_dimension (const EntityHandle parent, const int desired_dimension) |
Return a range of children of a desired geometric dimension. More... | |
bool | A_is_in_B (const EntityHandle volume_A, const EntityHandle volume_B, GeomQueryTool *GQT) |
Test if volume A is enclosed by volume B. More... | |
ErrorCode | insert_in_tree (const EntityHandle ct_root, const EntityHandle volume, GeomQueryTool *GQT) |
Used by restore_topology_from_geometric_inclusion to generate the. More... | |
Private Attributes | |
Interface * | mdbImpl |
Tag | sense2Tag |
Tag | senseNEntsTag |
Tag | senseNSensesTag |
Tag | geomTag |
Tag | gidTag |
Tag | nameTag |
Tag | obbRootTag |
Tag | obbGsetTag |
EntityHandle | modelSet |
EntityHandle | impl_compl_handle |
Range | geomRanges [5] |
int | maxGlobalId [5] |
bool | updated |
OrientedBoxTreeTool * | obbTree |
EntityHandle | setOffset |
std::vector< EntityHandle > | rootSets |
bool | m_rootSets_vector |
std::map< EntityHandle, EntityHandle > | mapRootSets |
EntityHandle | oneVolRootSet |
Tool for interpreting geometric topology sets in MOAB database Tool for interpreting geometric topology sets in MOAB database; see MOAB metadata_info document for information on how geometric topology sets are read and represented.
Definition at line 37 of file GeomTopoTool.hpp.
moab::GeomTopoTool::GeomTopoTool | ( | Interface * | impl, |
bool | find_geoments = false , |
||
EntityHandle | modelRootSet = 0 , |
||
bool | p_rootSets_vector = true , |
||
bool | restore_rootSets = true |
||
) |
Constructor (creates a GTT object) \ Construct a GeomTopoTool object and search for geometric EntitySets if they exist in the provided moab instance.
impl | MOAB instance the GeomTopoTool will operate on. |
find_geoments | if specified as True, geometric objects in the provided MOAB instance will be searched for and added to the GTT. |
modelRootSet | the GTT will operate only on geometric EntitySets contained by this EntitySet. If unprovided, the default value for the modelRootSet is the MOAB instance's root set, which contains everything in the instance. |
p_rootSets_vector | determines the storage datastructure used to relate geometric EntitySets to their OrientedBoundingBox (OBB) Tree roots. If set to true (default) a vector will be used to store the root sets along with an EntityHandle offset for fast lookup of the root sets. If set to false, then a map will be used to link geometric EntitySets (keys) to the OBB Tree root sets (values). |
restore_rootSets | determines whether or not to restore the internal index that links geomSets to their corresponding OBB Root. Only relevant if find_geoments is true. (default = true) |
Definition at line 46 of file GeomTopoTool.cpp.
References construct_obb_trees(), delete_all_obb_trees(), ErrorCode, find_geomsets(), GEOM_DIMENSION_TAG_NAME, geomTag, gidTag, moab::Interface::globalId_tag(), impl_compl_handle, maxGlobalId, MB_CHK_SET_ERR_CONT, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mdbImpl, NAME_TAG_NAME, NAME_TAG_SIZE, nameTag, moab::OBB_GSET_TAG_NAME, moab::OBB_ROOT_TAG_NAME, obbGsetTag, obbRootTag, obbTree, restore_obb_index(), and moab::Interface::tag_get_handle().
Referenced by duplicate_model().
moab::GeomTopoTool::~GeomTopoTool | ( | ) |
|
private |
Test if volume A is enclosed by volume B.
Definition at line 1950 of file GeomTopoTool.cpp.
References moab::Range::begin(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), get_ct_children_by_dimension(), moab::Interface::get_entities_by_type(), MB_CHK_ERR, MB_CHK_SET_ERR, MBTRI, mdbImpl, and moab::GeomQueryTool::point_in_volume().
Referenced by insert_in_tree().
ErrorCode moab::GeomTopoTool::add_geo_set | ( | EntityHandle | set, |
int | dimension, | ||
int | global_id = 0 |
||
) |
Adds a geometry set to the range of all geometry sets, the model set, and root set.
Definition at line 1180 of file GeomTopoTool.cpp.
References moab::Interface::add_entities(), dim, ErrorCode, GEOM_DIMENSION_TAG_NAME, geomRanges, geomTag, gidTag, moab::Interface::globalId_tag(), moab::Range::insert(), maxGlobalId, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TYPE_INTEGER, mdbImpl, modelSet, moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and updated.
Referenced by moab::FBEngine::create_new_gedge(), moab::FBEngine::create_volume_with_direction(), geometrize_surface_set(), setup_implicit_complement(), moab::FBEngine::split_bedge_at_new_mesh_node(), moab::FBEngine::split_edge_at_mesh_node(), moab::FBEngine::split_surface(), and moab::FBEngine::weave_lateral_face_from_edges().
|
private |
Verify sense edge tags.
Definition at line 1167 of file GeomTopoTool.cpp.
References ErrorCode, moab::GEOM_SENSE_N_ENTS_TAG_NAME, moab::GEOM_SENSE_N_SENSES_TAG_NAME, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TAG_VARLEN, MB_TYPE_HANDLE, MB_TYPE_INTEGER, mdbImpl, senseNEntsTag, senseNSensesTag, and moab::Interface::tag_get_handle().
Referenced by duplicate_model(), get_sense(), get_senses(), and set_sense().
|
private |
Verify sense face tag.
Definition at line 1154 of file GeomTopoTool.cpp.
References ErrorCode, moab::GEOM_SENSE_2_TAG_NAME, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_ANY, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, mdbImpl, sense2Tag, and moab::Interface::tag_get_handle().
Referenced by duplicate_model(), generate_implicit_complement(), get_sense(), get_sense_tag(), get_senses(), and set_sense().
|
private |
Verify geometry tag.
Definition at line 1128 of file GeomTopoTool.cpp.
References ErrorCode, GEOM_DIMENSION_TAG_NAME, geomTag, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, mdbImpl, and moab::Interface::tag_get_handle().
Referenced by get_geom_tag(), and separate_by_dimension().
|
private |
Verify global id tag.
Definition at line 1140 of file GeomTopoTool.cpp.
References ErrorCode, gidTag, GLOBAL_ID_TAG_NAME, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, mdbImpl, and moab::Interface::tag_get_handle().
Referenced by get_gid_tag().
bool moab::GeomTopoTool::check_model | ( | ) |
Checks that all geometric entities were created properly.
Definition at line 1733 of file GeomTopoTool.cpp.
References moab::Range::begin(), moab::Interface::contains_entities(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Skinner::find_skin(), geomRanges, moab::Interface::get_adjacencies(), moab::Interface::get_child_meshsets(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_handle(), moab::Interface::get_entities_by_type(), moab::Interface::get_parent_meshsets(), get_sense(), moab::Interface::list_entity(), MB_SUCCESS, MBEDGE, MBVERTEX, mdbImpl, RETFALSE, moab::Interface::side_number(), moab::Range::size(), moab::subtract(), and moab::Interface::type_from_handle().
ErrorCode moab::GeomTopoTool::construct_obb_tree | ( | EntityHandle | eh | ) |
Build obb tree for the entity set given; entity can be surface or volume.
eh | EntityHandle of the volume or surface to construct the OBB tree around |
Definition at line 413 of file GeomTopoTool.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::OrientedBoxTreeTool::build(), dim, moab::Range::empty(), moab::Range::end(), ErrorCode, geomTag, moab::Interface::get_child_meshsets(), moab::Interface::get_entities_by_dimension(), get_root(), global_id(), moab::Range::insert(), is_owned_set(), moab::OrientedBoxTreeTool::join_trees(), m_rootSets_vector, MB_CHK_SET_ERR, MB_INDEX_OUT_OF_RANGE, MB_SET_ERR, MB_SUCCESS, MBENTITYSET, mdbImpl, obbTree, resize_rootSets(), rootSets, set_root_set(), setOffset, moab::Interface::tag_get_data(), and moab::Interface::type_from_handle().
Referenced by construct_obb_trees().
ErrorCode moab::GeomTopoTool::construct_obb_trees | ( | bool | make_one_vol = false | ) |
Build obb trees for all surfaces and volumes in model set.
Definition at line 566 of file GeomTopoTool.cpp.
References moab::Range::begin(), construct_obb_tree(), moab::Range::end(), ErrorCode, get_gsets_by_dimension(), get_root(), moab::Range::insert(), moab::OrientedBoxTreeTool::join_trees(), MB_CHK_SET_ERR, obbTree, and oneVolRootSet.
Referenced by GeomTopoTool(), moab::FBEngine::Init(), moab::GeomQueryTool::initialize(), and main().
|
private |
Compute vertices inclusive and put on tag on sets in geom_sets.
Definition at line 764 of file GeomTopoTool.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_handle(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mdbImpl, moab::Interface::tag_set_data(), and moab::Interface::UNION.
ErrorCode moab::GeomTopoTool::delete_all_obb_trees | ( | ) |
Definition at line 395 of file GeomTopoTool.cpp.
References delete_obb_tree(), moab::Range::end(), ErrorCode, geomRanges, MB_CHK_SET_ERR, MB_SUCCESS, mdbImpl, obbRootTag, and moab::Interface::tag_get_data().
Referenced by GeomTopoTool().
ErrorCode moab::GeomTopoTool::delete_obb_tree | ( | EntityHandle | gset, |
bool | vol_only = false |
||
) |
Delete the OBB tree of a volume or surface.
Definition at line 318 of file GeomTopoTool.cpp.
References moab::Range::begin(), child, moab::Interface::delete_entities(), dim, moab::Range::end(), moab::Range::erase(), ErrorCode, geomTag, moab::Interface::get_child_meshsets(), get_root(), moab::Range::insert(), moab::Range::insert_list(), is_owned_set(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, mdbImpl, obbGsetTag, remove_root(), moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by delete_all_obb_trees().
int moab::GeomTopoTool::dimension | ( | EntityHandle | this_set | ) |
Return the dimension of the set, or -1 if it's not a geom_dimension set.
Definition at line 96 of file GeomTopoTool.cpp.
References moab::Interface::contains_entities(), dim, ErrorCode, GEOM_DIMENSION_TAG_NAME, geomTag, MB_CHK_SET_ERR, MB_SUCCESS, MB_TYPE_INTEGER, mdbImpl, modelSet, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by get_sense(), get_senses(), get_surface_senses(), moab::FBEngine::redistribute_boundary_edges_to_faces(), set_sense(), set_surface_senses(), moab::FBEngine::split_bedge_at_new_mesh_node(), moab::FBEngine::split_edge_at_mesh_node(), and moab::FBEngine::split_edge_at_point().
ErrorCode moab::GeomTopoTool::duplicate_model | ( | GeomTopoTool *& | duplicate, |
std::vector< EntityHandle > * | pvGEnts = NULL |
||
) |
This would be a deep copy, into a new geom topo tool.
Definition at line 1460 of file GeomTopoTool.cpp.
References moab::Interface::add_entities(), moab::Interface::add_parent_child(), check_edge_sense_tags(), check_face_sense_tag(), children, moab::Interface::create_meshset(), dim, moab::Range::end(), ErrorCode, moab::Range::find(), GEOM_DIMENSION_TAG_NAME, geomRanges, geomTag, GeomTopoTool(), moab::Interface::get_child_meshsets(), moab::Interface::get_entities_by_handle(), get_senses(), gidTag, moab::Interface::globalId_tag(), moab::Range::insert(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TYPE_INTEGER, mdbImpl, MESHSET_SET, modelSet, set_senses(), moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by moab::FBEngine::split_quads().
EntityHandle moab::GeomTopoTool::entity_by_id | ( | int | dimension, |
int | id | ||
) |
Map from dimension & global ID to EntityHandle.
Definition at line 149 of file GeomTopoTool.cpp.
References ErrorCode, moab::Range::front(), geomTag, moab::Interface::get_entities_by_type_and_tag(), gidTag, MB_CHK_SET_ERR_CONT, MB_SUCCESS, MBENTITYSET, and mdbImpl.
Referenced by obbstat_write(), and obbvis_create().
Definition at line 230 of file GeomTopoTool.cpp.
References ErrorCode, GEOM_DIMENSION_TAG_NAME, geomRanges, geomTag, moab::Interface::get_entities_by_type_and_tag(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TYPE_INTEGER, MBENTITYSET, mdbImpl, modelSet, separate_by_dimension(), and moab::Interface::tag_get_handle().
Referenced by moab::FBEngine::chain_edges(), GeomTopoTool(), moab::FBEngine::Init(), moab::GeomQueryTool::initialize(), main(), moab::FBEngine::set_default_neumann_tags(), and moab::FBEngine::split_quads().
|
private |
Creates a volume for undefined space in the model.
Definition at line 1673 of file GeomTopoTool.cpp.
References moab::Interface::add_parent_child(), moab::Range::begin(), check_face_sense_tag(), moab::Interface::create_meshset(), moab::Range::end(), ErrorCode, get_gsets_by_dimension(), moab::Interface::get_parent_meshsets(), get_surface_senses(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mdbImpl, MESHSET_SET, sense2Tag, and set_surface_senses().
Referenced by setup_implicit_complement().
ErrorCode moab::GeomTopoTool::geometrize_surface_set | ( | EntityHandle | surface, |
EntityHandle & | output | ||
) |
Will assume no geo sets are defined for this surface.
Definition at line 1226 of file GeomTopoTool.cpp.
References moab::Interface::add_entities(), add_geo_set(), moab::Interface::add_parent_child(), moab::Range::begin(), moab::Interface::create_meshset(), moab::Range::empty(), moab::Range::end(), moab::Range::erase(), ErrorCode, moab::Range::find(), moab::Skinner::find_skin(), moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_dimension(), moab::Interface::id_from_handle(), moab::Range::insert(), moab::Interface::list_entity(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mdbImpl, MESHSET_SET, output, moab::Interface::set_connectivity(), set_sense(), moab::Interface::side_number(), moab::Range::size(), and moab::Interface::type_from_handle().
|
inline |
Should be used instead of keeping multiple ranges, for example in FBEngine.
Definition at line 224 of file GeomTopoTool.hpp.
References geomRanges.
Referenced by moab::FBEngine::getAdjacentEntities(), moab::FBEngine::getEntities(), moab::FBEngine::getEntType(), and moab::FBEngine::getNumOfType().
ErrorCode moab::GeomTopoTool::get_bounding_coords | ( | EntityHandle | volume, |
double | minPt[3], | ||
double | maxPt[3] | ||
) |
Get the bouding points from a bounding box.
volume | The volume for which the bounding coordinates are requested |
minPt | Location of the min xyz corner of the volume's axis-aligned bounding box |
maxPt | Location of the max xyz corner of the volume's axis-aligned bounding box |
Definition at line 1898 of file GeomTopoTool.cpp.
References center(), ErrorCode, get_obb(), MB_CHK_SET_ERR, MB_SUCCESS, and moab::sum().
Referenced by moab::GeomQueryTool::point_in_box().
|
private |
Return a range of children of a desired geometric dimension.
Definition at line 1929 of file GeomTopoTool.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), geomTag, moab::Interface::get_child_meshsets(), moab::Range::insert(), mdbImpl, and moab::Interface::tag_get_data().
Referenced by A_is_in_B(), insert_in_tree(), and restore_topology_from_geometric_inclusion().
|
inline |
Returns the geometry dimension tag (geomTag) from check_geom_tag.
Definition at line 388 of file GeomTopoTool.hpp.
References check_geom_tag(), and geomTag.
|
inline |
Returns the global ID tag (gidTag) from check_gid_tag.
Definition at line 382 of file GeomTopoTool.hpp.
References check_gid_tag(), and gidTag.
Retrieve geometry sets of desired dimension from model set.
Definition at line 256 of file GeomTopoTool.cpp.
References dim, ErrorCode, geomTag, moab::Interface::get_entities_by_type_and_tag(), MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, mdbImpl, and modelSet.
Referenced by construct_obb_trees(), moab::GeomQueryTool::find_volume_slow(), generate_implicit_complement(), and resize_rootSets().
ErrorCode moab::GeomTopoTool::get_implicit_complement | ( | EntityHandle & | implicit_complement | ) |
Get (or optionally, create) the implicit complement handle.
Definition at line 1606 of file GeomTopoTool.cpp.
References impl_compl_handle, MB_ENTITY_NOT_FOUND, and MB_SUCCESS.
Referenced by moab::GeomQueryTool::find_volume().
|
inline |
Return pointer to moab instance.
Definition at line 230 of file GeomTopoTool.hpp.
References mdbImpl.
Referenced by chkerr(), moab::GeomQueryTool::GeomQueryTool(), obbstat_write(), and obbvis_create().
ErrorCode moab::GeomTopoTool::get_obb | ( | EntityHandle | volume, |
double | center[3], | ||
double | axis1[3], | ||
double | axis2[3], | ||
double | axis3[3] | ||
) |
Get the center point and three vectors for the OBB of a given volume.
volume | The volume for which the OBB axes will be returned |
center | coordinates of the oriented bounding box's center point |
axis1 | scaled axis one of the oriented bounding box |
axis2 | scaled axis two of the oriented bounding box |
axis3 | scaled axis three of the oriented bounding box |
Definition at line 1915 of file GeomTopoTool.cpp.
References moab::OrientedBoxTreeTool::box(), center(), ErrorCode, get_root(), MB_CHK_SET_ERR, and obbTree.
Referenced by get_bounding_coords(), and obbvis_create().
|
inline |
If constructing one volume obb tree by joining all surface trees,.
Definition at line 371 of file GeomTopoTool.hpp.
References oneVolRootSet.
Referenced by moab::GeomQueryTool::find_volume().
|
inline |
Get the root of the obbtree for a given entity.
Definition at line 359 of file GeomTopoTool.hpp.
References m_rootSets_vector, mapRootSets, MB_INDEX_OUT_OF_RANGE, MB_SUCCESS, rootSets, and setOffset.
Referenced by moab::GeomQueryTool::closest_to_location(), construct_obb_tree(), construct_obb_trees(), delete_obb_tree(), moab::GeomQueryTool::get_normal(), get_obb(), moab::FBEngine::getEntBoundBox(), moab::FBEngine::getEntClosestPt(), moab::FBEngine::getEntNrmlXYZ(), moab::FBEngine::getPntRayIntsct(), obbstat_write(), obbvis_create(), moab::GeomQueryTool::point_in_volume(), moab::GeomQueryTool::ray_fire(), moab::SmoothFace::SmoothFace(), moab::FBEngine::split_surface_with_direction(), and moab::GeomQueryTool::test_volume_boundary().
|
inline |
Return the model set handle (this is the full geometry)
Definition at line 215 of file GeomTopoTool.hpp.
References modelSet.
Referenced by moab::FBEngine::getRootSet().
ErrorCode moab::GeomTopoTool::get_sense | ( | EntityHandle | entity, |
EntityHandle | wrt_entity, | ||
int & | sense | ||
) |
Get the sense of entity with respect to wrt_entity Returns MB_ENTITY_NOT_FOUND if no relationship found.
Definition at line 905 of file GeomTopoTool.cpp.
References check_edge_sense_tags(), check_face_sense_tag(), dimension(), ErrorCode, get_senses(), MB_CHK_SET_ERR, MB_ENTITY_NOT_FOUND, MB_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, mdbImpl, sense2Tag, and moab::Interface::tag_get_data().
Referenced by moab::GeomQueryTool::boundary_case(), check_model(), get_surface_senses(), main(), moab::FBEngine::split_bedge_at_new_mesh_node(), and moab::FBEngine::split_edge_at_mesh_node().
|
inline |
Returns the sense tag (sense2Tag) from check_face_sense_tag.
Definition at line 376 of file GeomTopoTool.hpp.
References check_face_sense_tag(), and sense2Tag.
Referenced by moab::GeomQueryTool::GeomQueryTool().
ErrorCode moab::GeomTopoTool::get_senses | ( | EntityHandle | entity, |
std::vector< EntityHandle > & | wrt_entities, | ||
std::vector< int > & | senses | ||
) |
Get the senses of the lower dimension entity handle wrt the higher dimension entities.
Definition at line 1017 of file GeomTopoTool.cpp.
References check_edge_sense_tags(), check_face_sense_tag(), moab::Interface::contains_entities(), dimension(), ErrorCode, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mdbImpl, modelSet, sense2Tag, senseNEntsTag, senseNSensesTag, moab::Interface::tag_get_by_ptr(), and moab::Interface::tag_get_data().
Referenced by moab::SmoothCurve::compute_control_points_on_boundary_edges(), duplicate_model(), get_sense(), moab::FBEngine::getEgFcSense(), main(), and set_sense().
ErrorCode moab::GeomTopoTool::get_surface_senses | ( | EntityHandle | surface_ent, |
EntityHandle & | forward_vol, | ||
EntityHandle & | reverse_vol | ||
) |
Get the senses of a surface with respect to its volumes.
Definition at line 950 of file GeomTopoTool.cpp.
References dimension(), ErrorCode, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mdbImpl, sense2Tag, and moab::Interface::tag_get_data().
ErrorCode moab::GeomTopoTool::get_surface_senses | ( | EntityHandle | volume, |
int | num_surfs, | ||
const EntityHandle * | surfs, | ||
int * | senses_out | ||
) |
Get the sense of the surface(s) with respect to the volume.
Definition at line 997 of file GeomTopoTool.cpp.
References get_sense(), and MB_SUCCESS.
Referenced by moab::GeomQueryTool::find_volume(), generate_implicit_complement(), moab::GeomQueryTool::measure_volume(), and moab::GeomQueryTool::point_in_volume_slow().
int moab::GeomTopoTool::global_id | ( | EntityHandle | this_set | ) |
Return the global ID of a given entity set.
this_set | EntitySet for which the global ID will be returned |
Definition at line 122 of file GeomTopoTool.cpp.
References moab::Interface::contains_entities(), ErrorCode, gidTag, moab::Interface::globalId_tag(), MB_SUCCESS, mdbImpl, modelSet, and moab::Interface::tag_get_data().
Referenced by construct_obb_tree(), moab::FBEngine::create_new_gedge(), obbstat_write(), moab::FBEngine::split_bedge_at_new_mesh_node(), and moab::FBEngine::split_edge_at_mesh_node().
bool moab::GeomTopoTool::have_obb_tree | ( | ) |
Returns true if obb trees have been added to the rootset.
Definition at line 1890 of file GeomTopoTool.cpp.
References mapRootSets, and rootSets.
|
private |
Used by restore_topology_from_geometric_inclusion to generate the.
Definition at line 1975 of file GeomTopoTool.cpp.
References A_is_in_B(), moab::Interface::add_parent_child(), ErrorCode, get_ct_children_by_dimension(), MB_CHK_SET_ERR, MB_SUCCESS, mdbImpl, moab::Range::pop_front(), moab::Interface::remove_parent_child(), and moab::Range::size().
Referenced by restore_topology_from_geometric_inclusion().
|
inline |
detection method for the implicit complement
Definition at line 394 of file GeomTopoTool.hpp.
References impl_compl_handle.
Referenced by moab::GeomQueryTool::measure_volume(), obbstat_write(), and moab::GeomQueryTool::point_in_volume().
ErrorCode moab::GeomTopoTool::is_owned_set | ( | EntityHandle | eh | ) |
Checks to see if the entity is part of the model set.
Definition at line 306 of file GeomTopoTool.cpp.
References moab::Range::end(), ErrorCode, moab::Range::find(), moab::Interface::get_entities_by_handle(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mdbImpl, and modelSet.
Referenced by construct_obb_tree(), and delete_obb_tree().
ErrorCode moab::GeomTopoTool::next_vol | ( | EntityHandle | surface, |
EntityHandle | old_volume, | ||
EntityHandle & | new_volume | ||
) |
Get the volume on the other side of a surface.
A | surface to query |
old_volume | A volume on one side of surface |
new_volume | Output parameter for volume on the other side of surface |
Definition at line 1108 of file GeomTopoTool.cpp.
References ErrorCode, moab::Interface::get_parent_meshsets(), MB_SUCCESS, and mdbImpl.
|
inline |
returns the number of entities in the modelSet with specified geometric dimension
Definition at line 352 of file GeomTopoTool.hpp.
References dim, geomRanges, and moab::Range::size().
|
inline |
Pointer to Oriented Box Tree Tool class.
Definition at line 189 of file GeomTopoTool.hpp.
References obbTree.
Referenced by moab::GeomQueryTool::closest_to_location(), moab::GeomQueryTool::find_volume(), moab::GeomQueryTool::GeomQueryTool(), moab::GeomQueryTool::get_normal(), moab::FBEngine::getEntBoundBox(), moab::FBEngine::getEntClosestPt(), moab::FBEngine::getEntNrmlXYZ(), moab::FBEngine::getPntRayIntsct(), obbstat_write(), obbvis_create(), moab::GeomQueryTool::point_in_volume(), moab::SmoothFace::project_to_facets_main(), moab::GeomQueryTool::ray_fire(), moab::SmoothFace::SmoothFace(), moab::FBEngine::split_surface_with_direction(), and moab::GeomQueryTool::test_volume_boundary().
ErrorCode moab::GeomTopoTool::other_entity | ( | EntityHandle | bounded, |
EntityHandle | not_this, | ||
EntityHandle | across, | ||
EntityHandle & | other | ||
) |
Get the other (d-1)-dimensional entity bounding a set across a (d-2)-dimensional entity.
Given a d-dimensional entity and one (d-1)-dimensional entity, return the (d-1) dimensional entity across a specified (d-2)-dimensional entity. For example, given a surface, edge, and vertex, returns the other edge bounding the surface sharing the vertex. In the case of degenerate results, e.g. two loops bounding a surface and sharing a vertex, tries to step in positively-oriented direction. This won't always work; in those cases, will return MB_MULTIPLE_ENTITIES_FOUND.
In the special case where bounded is a curve, then not_this can be a vertex and across zero. This function returns the other vertex on the curve.
Definition at line 168 of file GeomTopoTool.cpp.
References moab::Range::begin(), ErrorCode, moab::Interface::get_child_meshsets(), moab::Interface::get_parent_meshsets(), moab::intersect(), MB_CHK_SET_ERR, MB_SUCCESS, mdbImpl, moab::Range::rbegin(), and moab::Range::size().
ErrorCode moab::GeomTopoTool::remove_root | ( | EntityHandle | vol_or_surf | ) |
Delete the root of the obb tree from the set of all roots.
Definition at line 523 of file GeomTopoTool.cpp.
References dim, ErrorCode, geomTag, m_rootSets_vector, mapRootSets, MB_CHK_SET_ERR, MB_INDEX_OUT_OF_RANGE, MB_SUCCESS, mdbImpl, obbGsetTag, obbRootTag, obbTree, moab::OrientedBoxTreeTool::remove_root(), rootSets, setOffset, moab::Interface::tag_delete_data(), and moab::Interface::tag_get_data().
Referenced by delete_obb_tree().
|
private |
Definition at line 267 of file GeomTopoTool.cpp.
References moab::Range::back(), ErrorCode, moab::Range::front(), get_gsets_by_dimension(), MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::merge(), rootSets, and setOffset.
Referenced by construct_obb_tree(), and restore_obb_index().
ErrorCode moab::GeomTopoTool::restore_obb_index | ( | ) |
Restore the internal cross-referencing of geometry sets and OBB roots.
Definition at line 206 of file GeomTopoTool.cpp.
References dim, moab::Range::end(), ErrorCode, geomRanges, m_rootSets_vector, MB_SUCCESS, MB_TAG_NOT_FOUND, mdbImpl, obbRootTag, resize_rootSets(), set_root_set(), and moab::Interface::tag_get_data().
Referenced by GeomTopoTool().
ErrorCode moab::GeomTopoTool::restore_topology_from_adjacency | ( | ) |
Restore parent/child links between GEOM_TOPO mesh sets.
Definition at line 605 of file GeomTopoTool.cpp.
References moab::Interface::add_parent_child(), moab::Range::begin(), moab::Range::clear(), dim, moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Range::front(), geomRanges, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_dimension(), MB_CHK_SET_ERR, MB_MULTIPLE_ENTITIES_FOUND, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_NOT_FOUND, MB_TYPE_HANDLE, mdbImpl, set_sense(), moab::CN::SideNumber(), moab::Range::size(), moab::Interface::tag_delete(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and moab::TYPE_FROM_HANDLE().
Referenced by moab::Tqdcfr::load_file().
ErrorCode moab::GeomTopoTool::restore_topology_from_geometric_inclusion | ( | const Range & | flat_volumes | ) |
Discover and store the topological relationships among a set of volumes This method may be used to discover the hierarchy that exists in a range of volumes, that have no previous sense of hierarchy, and store it according to the conventions of GeomTopoTool. The following requirements about the range of flat_volumes must be met:
After the hierarchy is established, the topological relationships between surfaces and the volumes that enclose them are set. This involves:
Definition at line 2030 of file GeomTopoTool.cpp.
References moab::Interface::add_parent_child(), moab::Range::begin(), moab::Interface::create_meshset(), moab::Range::end(), ErrorCode, get_ct_children_by_dimension(), insert_in_tree(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mdbImpl, MESHSET_SET, nameTag, moab::Interface::remove_parent_child(), SENSE_REVERSE, set_sense(), moab::Range::size(), and moab::Interface::tag_set_data().
Given a range of geom topology sets, separate by dimension.
Definition at line 712 of file GeomTopoTool.cpp.
References moab::Range::begin(), check_geom_tag(), moab::Range::end(), ErrorCode, geomRanges, geomTag, gidTag, moab::Interface::globalId_tag(), moab::Range::insert(), maxGlobalId, MB_CHK_SET_ERR, MB_SUCCESS, mdbImpl, moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by find_geomsets().
|
private |
Definition at line 504 of file GeomTopoTool.cpp.
References ErrorCode, m_rootSets_vector, mapRootSets, MB_CHK_SET_ERR, MB_SUCCESS, mdbImpl, obbGsetTag, obbRootTag, rootSets, setOffset, and moab::Interface::tag_set_data().
Referenced by construct_obb_tree(), and restore_obb_index().
ErrorCode moab::GeomTopoTool::set_sense | ( | EntityHandle | entity, |
EntityHandle | wrt_entity, | ||
int | sense | ||
) |
Store sense of entity relative to wrt_entity.
Definition at line 810 of file GeomTopoTool.cpp.
References check_edge_sense_tags(), check_face_sense_tag(), dimension(), ErrorCode, get_senses(), MB_CHK_SET_ERR, MB_MULTIPLE_ENTITIES_FOUND, MB_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, mdbImpl, sense2Tag, SENSE_BOTH, senseNEntsTag, senseNSensesTag, moab::Interface::tag_get_data(), moab::Interface::tag_set_by_ptr(), and moab::Interface::tag_set_data().
Referenced by moab::ReadOBJ::create_new_object(), moab::FBEngine::create_volume_with_direction(), geometrize_surface_set(), moab::FBEngine::redistribute_boundary_edges_to_faces(), restore_topology_from_adjacency(), restore_topology_from_geometric_inclusion(), set_senses(), moab::ReadRTT::set_surface_senses(), moab::FBEngine::split_bedge_at_new_mesh_node(), moab::FBEngine::split_edge_at_mesh_node(), moab::FBEngine::split_surface(), and moab::FBEngine::weave_lateral_face_from_edges().
ErrorCode moab::GeomTopoTool::set_senses | ( | EntityHandle | entity, |
std::vector< EntityHandle > & | wrt_entities, | ||
std::vector< int > & | senses | ||
) |
Set the senses of the entity wrt multiple higher dimension entities.
Definition at line 1095 of file GeomTopoTool.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, and set_sense().
Referenced by duplicate_model().
ErrorCode moab::GeomTopoTool::set_surface_senses | ( | EntityHandle | surface_ent, |
EntityHandle | forward_vol, | ||
EntityHandle | reverse_vol | ||
) |
Set the senses of a surface with respect to its volumes.
Definition at line 975 of file GeomTopoTool.cpp.
References dimension(), ErrorCode, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mdbImpl, sense2Tag, and moab::Interface::tag_set_data().
Referenced by generate_implicit_complement().
ErrorCode moab::GeomTopoTool::setup_implicit_complement | ( | ) |
sets the implicit complement handle for this tool
Definition at line 1619 of file GeomTopoTool.cpp.
References add_geo_set(), CATEGORY_TAG_NAME, CATEGORY_TAG_SIZE, entities, ErrorCode, generate_implicit_complement(), moab::Interface::get_entities_by_type_and_tag(), impl_compl_handle, moab::IMPLICIT_COMPLEMENT_NAME, MB_CHK_SET_ERR, MB_MULTIPLE_ENTITIES_FOUND, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_OPAQUE, MBENTITYSET, mdbImpl, modelSet, nameTag, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by moab::GeomQueryTool::initialize().
|
private |
Definition at line 297 of file GeomTopoTool.hpp.
Referenced by add_geo_set(), check_model(), delete_all_obb_trees(), duplicate_model(), find_geomsets(), geoRanges(), num_ents_of_dim(), restore_obb_index(), restore_topology_from_adjacency(), and separate_by_dimension().
|
private |
Definition at line 287 of file GeomTopoTool.hpp.
Referenced by add_geo_set(), check_geom_tag(), construct_obb_tree(), delete_obb_tree(), dimension(), duplicate_model(), entity_by_id(), find_geomsets(), GeomTopoTool(), get_ct_children_by_dimension(), get_geom_tag(), get_gsets_by_dimension(), remove_root(), and separate_by_dimension().
|
private |
Definition at line 288 of file GeomTopoTool.hpp.
Referenced by add_geo_set(), check_gid_tag(), duplicate_model(), entity_by_id(), GeomTopoTool(), get_gid_tag(), global_id(), and separate_by_dimension().
|
private |
Definition at line 295 of file GeomTopoTool.hpp.
Referenced by GeomTopoTool(), get_implicit_complement(), is_implicit_complement(), and setup_implicit_complement().
|
private |
Definition at line 306 of file GeomTopoTool.hpp.
Referenced by construct_obb_tree(), get_root(), remove_root(), restore_obb_index(), and set_root_set().
|
private |
Definition at line 307 of file GeomTopoTool.hpp.
Referenced by get_root(), have_obb_tree(), remove_root(), and set_root_set().
|
private |
Definition at line 299 of file GeomTopoTool.hpp.
Referenced by add_geo_set(), GeomTopoTool(), and separate_by_dimension().
|
private |
Definition at line 284 of file GeomTopoTool.hpp.
Referenced by A_is_in_B(), add_geo_set(), check_edge_sense_tags(), check_face_sense_tag(), check_geom_tag(), check_gid_tag(), check_model(), construct_obb_tree(), construct_vertex_ranges(), delete_all_obb_trees(), delete_obb_tree(), dimension(), duplicate_model(), entity_by_id(), find_geomsets(), generate_implicit_complement(), geometrize_surface_set(), GeomTopoTool(), get_ct_children_by_dimension(), get_gsets_by_dimension(), get_moab_instance(), get_sense(), get_senses(), get_surface_senses(), global_id(), insert_in_tree(), is_owned_set(), next_vol(), other_entity(), remove_root(), restore_obb_index(), restore_topology_from_adjacency(), restore_topology_from_geometric_inclusion(), separate_by_dimension(), set_root_set(), set_sense(), set_surface_senses(), and setup_implicit_complement().
|
private |
Definition at line 293 of file GeomTopoTool.hpp.
Referenced by add_geo_set(), dimension(), duplicate_model(), find_geomsets(), get_gsets_by_dimension(), get_root_model_set(), get_senses(), global_id(), is_owned_set(), and setup_implicit_complement().
|
private |
Definition at line 289 of file GeomTopoTool.hpp.
Referenced by GeomTopoTool(), restore_topology_from_geometric_inclusion(), and setup_implicit_complement().
|
private |
Definition at line 291 of file GeomTopoTool.hpp.
Referenced by delete_obb_tree(), GeomTopoTool(), remove_root(), and set_root_set().
|
private |
Definition at line 290 of file GeomTopoTool.hpp.
Referenced by delete_all_obb_trees(), GeomTopoTool(), remove_root(), restore_obb_index(), and set_root_set().
|
private |
Definition at line 302 of file GeomTopoTool.hpp.
Referenced by construct_obb_tree(), construct_obb_trees(), GeomTopoTool(), get_obb(), obb_tree(), remove_root(), and ~GeomTopoTool().
|
private |
Definition at line 308 of file GeomTopoTool.hpp.
Referenced by construct_obb_trees(), and get_one_vol_root().
|
private |
Definition at line 304 of file GeomTopoTool.hpp.
Referenced by construct_obb_tree(), get_root(), have_obb_tree(), remove_root(), resize_rootSets(), and set_root_set().
|
private |
Definition at line 285 of file GeomTopoTool.hpp.
Referenced by check_face_sense_tag(), generate_implicit_complement(), get_sense(), get_sense_tag(), get_senses(), get_surface_senses(), set_sense(), and set_surface_senses().
|
private |
Definition at line 286 of file GeomTopoTool.hpp.
Referenced by check_edge_sense_tags(), get_senses(), and set_sense().
|
private |
Definition at line 286 of file GeomTopoTool.hpp.
Referenced by check_edge_sense_tags(), get_senses(), and set_sense().
|
private |
Definition at line 303 of file GeomTopoTool.hpp.
Referenced by construct_obb_tree(), get_root(), remove_root(), resize_rootSets(), and set_root_set().
|
private |
Definition at line 300 of file GeomTopoTool.hpp.
Referenced by add_geo_set().