Implement CAMAL geometry callbacks using smooth iMesh. More...
#include <SmoothFace.hpp>
Public Member Functions | |
SmoothFace (Interface *mb, EntityHandle surface_set, GeomTopoTool *gTool) | |
virtual | ~SmoothFace () |
virtual double | area () |
virtual void | bounding_box (double box_min[3], double box_max[3]) |
virtual void | move_to_surface (double &x, double &y, double &z) |
virtual bool | normal_at (double x, double y, double z, double &nx, double &ny, double &nz) |
int | init_gradient () |
ErrorCode | evaluate_smooth_edge (EntityHandle eh, double &t, CartVect &outv) |
ErrorCode | eval_bezier_patch (EntityHandle tri, CartVect &areacoord, CartVect &pt) |
void | project_to_facet_plane (EntityHandle tri, CartVect &pt, CartVect &point_on_plane, double &dist_to_plane) |
void | facet_area_coordinate (EntityHandle facet, CartVect &pt_on_plane, CartVect &areacoord) |
ErrorCode | project_to_facets_main (CartVect &this_point, bool trim, bool &outside, CartVect *closest_point_ptr=NULL, CartVect *normal_ptr=NULL) |
ErrorCode | project_to_facets (std::vector< EntityHandle > &facet_list, EntityHandle &lastFacet, int interpOrder, double compareTol, CartVect &this_point, bool trim, bool &outside, CartVect *closest_point_ptr, CartVect *normal_ptr) |
ErrorCode | project_to_facet (EntityHandle facet, CartVect &pt, CartVect &areacoord, CartVect &close_point, bool &outside_facet, double compare_tol) |
bool | is_at_vertex (EntityHandle facet, CartVect &pt, CartVect &ac, double compare_tol, CartVect &eval_pt, CartVect *eval_norm_ptr) |
ErrorCode | project_to_patch (EntityHandle facet, CartVect &ac, CartVect &pt, CartVect &eval_pt, CartVect *eval_norm, bool &outside, double compare_tol, int edge_id) |
ErrorCode | eval_bezier_patch_normal (EntityHandle facet, CartVect &areacoord, CartVect &normal) |
ErrorCode | compute_tangents_for_each_edge () |
ErrorCode | get_normals_for_vertices (const EntityHandle *conn2, CartVect N[2]) |
ErrorCode | init_edge_control_points (CartVect &P0, CartVect &P3, CartVect &N0, CartVect &N3, CartVect &T0, CartVect &T3, CartVect *Pi) |
ErrorCode | compute_control_points_on_edges (double min_dot, Tag edgeCtrlTag, Tag markTag) |
ErrorCode | compute_internal_control_points_on_facets (double min_dot, Tag facetCtrlTag, Tag facetEdgeCtrlTag) |
void | DumpModelControlPoints () |
int | eval_counter () |
ErrorCode | ray_intersection_correct (EntityHandle facet, CartVect &pt, CartVect &ray, CartVect &eval_pt, double &distance, bool &outside) |
void | append_smooth_tags (std::vector< Tag > &smoothTags) |
Private Member Functions | |
bool | move_ac_inside (CartVect &ac, double tol) |
void | ac_at_edge (CartVect &fac, CartVect &eac, int edge_id) |
ErrorCode | init_bezier_edge (EntityHandle edge, double min_dot) |
ErrorCode | find_edges_orientations (EntityHandle edges[3], const EntityHandle *conn3, int orient[3]) |
ErrorCode | init_facet_control_points (CartVect N[6], CartVect P[3][5], CartVect G[6]) |
void | adjust_bounding_box (CartVect &vect) |
Implement CAMAL geometry callbacks using smooth iMesh.
Definition at line 29 of file SmoothFace.hpp.
moab::SmoothFace::SmoothFace | ( | Interface * | mb, |
EntityHandle | surface_set, | ||
GeomTopoTool * | gTool | ||
) |
Definition at line 41 of file SmoothFace.cpp.
References _my_geomTopoTool, _obb_root, _set, moab::GeomTopoTool::get_root(), moab::GeomTopoTool::obb_tree(), and moab::OrientedBoxTreeTool::stats().
|
virtual |
Definition at line 56 of file SmoothFace.cpp.
|
private |
Definition at line 565 of file SmoothFace.cpp.
References _maxim, and _minim.
Referenced by compute_internal_control_points_on_facets().
void moab::SmoothFace::append_smooth_tags | ( | std::vector< Tag > & | smoothTags | ) |
Definition at line 87 of file SmoothFace.cpp.
References _gradientTag, and _planeTag.
Referenced by moab::FBEngine::delete_smooth_tags().
|
virtual |
Definition at line 58 of file SmoothFace.cpp.
References _mb, _triangles, moab::Range::begin(), moab::Range::end(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), and moab::CartVect::length().
|
virtual |
ErrorCode moab::SmoothFace::compute_control_points_on_edges | ( | double | min_dot, |
Tag | edgeCtrlTag, | ||
Tag | markTag | ||
) |
Definition at line 147 of file SmoothFace.cpp.
References _edgeCtrlTag, _edges, _markTag, _mb, moab::Range::begin(), moab::Range::end(), init_bezier_edge(), MB_SUCCESS, moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by moab::FBEngine::initializeSmoothing().
ErrorCode moab::SmoothFace::compute_internal_control_points_on_facets | ( | double | min_dot, |
Tag | facetCtrlTag, | ||
Tag | facetEdgeCtrlTag | ||
) |
Definition at line 470 of file SmoothFace.cpp.
References _edgeCtrlTag, _facetCtrlTag, _facetEdgeCtrlTag, _gradientTag, _mb, _triangles, adjust_bounding_box(), moab::Range::begin(), moab::Range::end(), ErrorCode, find_edges_orientations(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), init_facet_control_points(), MB_SUCCESS, moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by moab::FBEngine::initializeSmoothing().
ErrorCode moab::SmoothFace::compute_tangents_for_each_edge | ( | ) |
Definition at line 362 of file SmoothFace.cpp.
References _edges, _mb, _tangentsTag, moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, moab::CartVect::normalize(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by moab::FBEngine::initializeSmoothing().
void moab::SmoothFace::DumpModelControlPoints | ( | ) |
Definition at line 622 of file SmoothFace.cpp.
References _edgeCtrlTag, _edges, _facetCtrlTag, _mb, _set, _triangles, moab::Range::begin(), moab::Range::end(), eval_bezier_patch(), moab::Interface::id_from_handle(), and moab::Interface::tag_get_data().
ErrorCode moab::SmoothFace::eval_bezier_patch | ( | EntityHandle | tri, |
CartVect & | areacoord, | ||
CartVect & | pt | ||
) |
Definition at line 748 of file SmoothFace.cpp.
References _facetCtrlTag, _facetEdgeCtrlTag, _mb, ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), MB_SUCCESS, mbcube, mbquart, mbsqr, and moab::Interface::tag_get_data().
Referenced by DumpModelControlPoints(), and project_to_patch().
ErrorCode moab::SmoothFace::eval_bezier_patch_normal | ( | EntityHandle | facet, |
CartVect & | areacoord, | ||
CartVect & | normal | ||
) |
Definition at line 1710 of file SmoothFace.cpp.
References _facetCtrlTag, _facetEdgeCtrlTag, _gradientTag, _mb, ErrorCode, moab::Interface::get_connectivity(), MB_SUCCESS, mbcube, mbsqr, moab::CartVect::normalize(), and moab::Interface::tag_get_data().
Referenced by project_to_facets().
|
inline |
Definition at line 125 of file SmoothFace.hpp.
References _evaluationsCounter.
ErrorCode moab::SmoothFace::evaluate_smooth_edge | ( | EntityHandle | eh, |
double & | t, | ||
CartVect & | outv | ||
) |
Definition at line 708 of file SmoothFace.cpp.
References _edgeCtrlTag, _mb, ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), MB_SUCCESS, and moab::Interface::tag_get_data().
void moab::SmoothFace::facet_area_coordinate | ( | EntityHandle | facet, |
CartVect & | pt_on_plane, | ||
CartVect & | areacoord | ||
) |
Definition at line 929 of file SmoothFace.cpp.
References _mb, _planeTag, determ3, ErrorCode, GEOMETRY_RESABS, moab::Interface::get_connectivity(), moab::Interface::get_coords(), length_squared(), MB_SUCCESS, moab::Interface::tag_get_data(), and moab::within_tolerance().
Referenced by project_to_facets().
|
private |
Definition at line 436 of file SmoothFace.cpp.
References _mb, ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::INTERSECT, and MB_SUCCESS.
Referenced by compute_internal_control_points_on_facets().
ErrorCode moab::SmoothFace::get_normals_for_vertices | ( | const EntityHandle * | conn2, |
CartVect | N[2] | ||
) |
Definition at line 1900 of file SmoothFace.cpp.
References _gradientTag, _mb, ErrorCode, and moab::Interface::tag_get_data().
|
private |
Definition at line 305 of file SmoothFace.cpp.
References _edgeCtrlTag, _gradientTag, _mb, _tangentsTag, moab::debug_surf_eval1, ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::id_from_handle(), init_edge_control_points(), MB_SUCCESS, moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by compute_control_points_on_edges().
ErrorCode moab::SmoothFace::init_edge_control_points | ( | CartVect & | P0, |
CartVect & | P3, | ||
CartVect & | N0, | ||
CartVect & | N3, | ||
CartVect & | T0, | ||
CartVect & | T3, | ||
CartVect * | Pi | ||
) |
Definition at line 399 of file SmoothFace.cpp.
References moab::CartVect::length(), and MB_SUCCESS.
Referenced by init_bezier_edge().
|
private |
Definition at line 580 of file SmoothFace.cpp.
References ErrorCode, moab::CartVect::length(), length(), and MB_SUCCESS.
Referenced by compute_internal_control_points_on_facets().
int moab::SmoothFace::init_gradient | ( | ) |
Definition at line 170 of file SmoothFace.cpp.
References _edges, _gradientTag, _maxim, _mb, _minim, _nodes, _planeTag, _set, _triangles, moab::angle(), moab::CartVect::array(), moab::Range::begin(), moab::Range::clear(), moab::debug_surf_eval1, moab::Range::end(), ErrorCode, moab::CartVect::get(), moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_type(), moab::Interface::id_from_handle(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MBTRI, moab::CartVect::normalize(), moab::Range::size(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and moab::Interface::UNION.
Referenced by moab::FBEngine::initializeSmoothing().
bool moab::SmoothFace::is_at_vertex | ( | EntityHandle | facet, |
CartVect & | pt, | ||
CartVect & | ac, | ||
double | compare_tol, | ||
CartVect & | eval_pt, | ||
CartVect * | eval_norm_ptr | ||
) |
Definition at line 1576 of file SmoothFace.cpp.
References _gradientTag, _mb, moab::Interface::get_connectivity(), moab::Interface::get_coords(), length(), and moab::Interface::tag_get_data().
Referenced by project_to_patch().
|
private |
|
virtual |
Definition at line 104 of file SmoothFace.cpp.
References ErrorCode, MB_SUCCESS, and project_to_facets_main().
Referenced by moab::FBEngine::getEntClosestPt(), and moab::FBEngine::smooth_new_intx_points().
|
virtual |
Definition at line 127 of file SmoothFace.cpp.
References ErrorCode, MB_SUCCESS, and project_to_facets_main().
Referenced by moab::FBEngine::getEntNrmlXYZ().
ErrorCode moab::SmoothFace::project_to_facet | ( | EntityHandle | facet, |
CartVect & | pt, | ||
CartVect & | areacoord, | ||
CartVect & | close_point, | ||
bool & | outside_facet, | ||
double | compare_tol | ||
) |
Definition at line 1545 of file SmoothFace.cpp.
References _mb, ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), and project_to_patch().
Referenced by project_to_facets().
void moab::SmoothFace::project_to_facet_plane | ( | EntityHandle | tri, |
CartVect & | pt, | ||
CartVect & | point_on_plane, | ||
double & | dist_to_plane | ||
) |
Definition at line 902 of file SmoothFace.cpp.
References _mb, _planeTag, ErrorCode, MB_SUCCESS, and moab::Interface::tag_get_data().
Referenced by project_to_facets().
ErrorCode moab::SmoothFace::project_to_facets | ( | std::vector< EntityHandle > & | facet_list, |
EntityHandle & | lastFacet, | ||
int | interpOrder, | ||
double | compareTol, | ||
CartVect & | this_point, | ||
bool | trim, | ||
bool & | outside, | ||
CartVect * | closest_point_ptr, | ||
CartVect * | normal_ptr | ||
) |
best_facet
Definition at line 1101 of file SmoothFace.cpp.
References eval_bezier_patch_normal(), facet_area_coordinate(), length(), MB_SUCCESS, project_to_facet(), and project_to_facet_plane().
Referenced by project_to_facets_main().
ErrorCode moab::SmoothFace::project_to_facets_main | ( | CartVect & | this_point, |
bool | trim, | ||
bool & | outside, | ||
CartVect * | closest_point_ptr = NULL , |
||
CartVect * | normal_ptr = NULL |
||
) |
Definition at line 1075 of file SmoothFace.cpp.
References _evaluationsCounter, _my_geomTopoTool, _obb_root, moab::OrientedBoxTreeTool::closest_to_location(), ErrorCode, MB_SUCCESS, moab::GeomTopoTool::obb_tree(), project_to_facets(), and moab::tolerance.
Referenced by move_to_surface(), normal_at(), and ray_intersection_correct().
ErrorCode moab::SmoothFace::project_to_patch | ( | EntityHandle | facet, |
CartVect & | ac, | ||
CartVect & | pt, | ||
CartVect & | eval_pt, | ||
CartVect * | eval_norm, | ||
bool & | outside, | ||
double | compare_tol, | ||
int | edge_id | ||
) |
Definition at line 1199 of file SmoothFace.cpp.
References ac_at_edge(), ErrorCode, eval_bezier_patch(), INCR, is_at_vertex(), moab::CartVect::length(), length(), MB_SUCCESS, and move_ac_inside().
Referenced by project_to_facet().
ErrorCode moab::SmoothFace::ray_intersection_correct | ( | EntityHandle | facet, |
CartVect & | pt, | ||
CartVect & | ray, | ||
CartVect & | eval_pt, | ||
double & | distance, | ||
bool & | outside | ||
) |
Definition at line 1910 of file SmoothFace.cpp.
References moab::dot(), ErrorCode, moab::CartVect::length(), MB_SUCCESS, and project_to_facets_main().
Referenced by moab::FBEngine::getPntRayIntsct().
|
private |
Definition at line 211 of file SmoothFace.hpp.
Referenced by compute_control_points_on_edges(), compute_internal_control_points_on_facets(), DumpModelControlPoints(), evaluate_smooth_edge(), and init_bezier_edge().
|
private |
Definition at line 180 of file SmoothFace.hpp.
Referenced by compute_control_points_on_edges(), compute_tangents_for_each_edge(), DumpModelControlPoints(), and init_gradient().
|
private |
Definition at line 237 of file SmoothFace.hpp.
Referenced by eval_counter(), and project_to_facets_main().
|
private |
Definition at line 217 of file SmoothFace.hpp.
Referenced by compute_internal_control_points_on_facets(), DumpModelControlPoints(), eval_bezier_patch(), and eval_bezier_patch_normal().
|
private |
Definition at line 225 of file SmoothFace.hpp.
Referenced by compute_internal_control_points_on_facets(), eval_bezier_patch(), and eval_bezier_patch_normal().
|
private |
Definition at line 199 of file SmoothFace.hpp.
Referenced by append_smooth_tags(), compute_internal_control_points_on_facets(), eval_bezier_patch_normal(), get_normals_for_vertices(), init_bezier_edge(), init_gradient(), and is_at_vertex().
|
private |
Definition at line 194 of file SmoothFace.hpp.
Referenced by compute_control_points_on_edges().
|
private |
Definition at line 177 of file SmoothFace.hpp.
Referenced by adjust_bounding_box(), bounding_box(), and init_gradient().
|
private |
Definition at line 232 of file SmoothFace.hpp.
Referenced by area(), compute_control_points_on_edges(), compute_internal_control_points_on_facets(), compute_tangents_for_each_edge(), DumpModelControlPoints(), eval_bezier_patch(), eval_bezier_patch_normal(), evaluate_smooth_edge(), facet_area_coordinate(), find_edges_orientations(), get_normals_for_vertices(), init_bezier_edge(), init_gradient(), is_at_vertex(), project_to_facet(), and project_to_facet_plane().
|
private |
Definition at line 176 of file SmoothFace.hpp.
Referenced by adjust_bounding_box(), bounding_box(), and init_gradient().
|
private |
Definition at line 234 of file SmoothFace.hpp.
Referenced by project_to_facets_main(), and SmoothFace().
|
private |
Definition at line 181 of file SmoothFace.hpp.
Referenced by init_gradient().
|
private |
Definition at line 235 of file SmoothFace.hpp.
Referenced by project_to_facets_main(), and SmoothFace().
|
private |
Definition at line 230 of file SmoothFace.hpp.
Referenced by append_smooth_tags(), facet_area_coordinate(), init_gradient(), and project_to_facet_plane().
|
private |
Definition at line 233 of file SmoothFace.hpp.
Referenced by DumpModelControlPoints(), init_gradient(), and SmoothFace().
|
private |
Definition at line 204 of file SmoothFace.hpp.
Referenced by compute_tangents_for_each_edge(), and init_bezier_edge().
|
private |
Definition at line 179 of file SmoothFace.hpp.
Referenced by area(), compute_internal_control_points_on_facets(), DumpModelControlPoints(), and init_gradient().