|
cgma
|
#include <FacetSurface.hpp>
Definition at line 46 of file FacetSurface.hpp.
| FacetSurface::FacetSurface | ( | FacetEvalTool * | facet_eval_tool_ptr, |
| DLIList< ShellSM * > & | shellsms, | ||
| DLIList< LoopSM * > & | loopsms | ||
| ) |
Definition at line 59 of file FacetSurface.cpp.
{
// Calculate a bounding box if there isn't one already
facetEvalTool = facet_tool;
//sense_ = CUBIT_FORWARD;
myShells += shellsms;
myLoops += loopsms;
myShellSense = CUBIT_UNKNOWN;
myEvaluator = NULL;
}
| FacetSurface::FacetSurface | ( | FacetEvalTool * | facet_eval_tool_ptr, |
| CubitSense | sense, | ||
| CubitSense | shell_sense0, | ||
| CubitBoolean | use_facets, | ||
| DLIList< LoopSM * > & | loopsms | ||
| ) |
Definition at line 117 of file FacetSurface.cpp.
{
// Calculate a bounding box if there isn't one already
facetEvalTool = facet_tool;
//sense_ = CUBIT_FORWARD;
myLoops += loopsms;
myShellSense = shell_sense0;
myEvaluator = NULL;
}
| FacetSurface::FacetSurface | ( | const CylinderEvaluatorData * | cylinder_data, |
| FacetEvalTool * | facet_tool, | ||
| DLIList< ShellSM * > & | shellsms, | ||
| DLIList< LoopSM * > & | loopsms | ||
| ) |
Definition at line 97 of file FacetSurface.cpp.
{
facetEvalTool = facet_tool;
//sense_ = CUBIT_FORWARD;
myShells += shellsms;
myLoops += loopsms;
myShellSense = CUBIT_UNKNOWN;
myEvaluator = new CylinderEvaluator( cylinder_data );
}
| FacetSurface::FacetSurface | ( | const SphereEvaluatorData * | eval_data, |
| FacetEvalTool * | facet_eval_tool_ptr, | ||
| DLIList< ShellSM * > & | shellsms, | ||
| DLIList< LoopSM * > & | loopsms | ||
| ) |
Definition at line 78 of file FacetSurface.cpp.
{
facetEvalTool = facet_tool;
//sense_ = CUBIT_FORWARD;
myShells += shellsms;
myLoops += loopsms;
myShellSense = CUBIT_UNKNOWN;
myEvaluator = new SphereEvaluator( sphere_data );
}
| FacetSurface::~FacetSurface | ( | ) | [virtual] |
Definition at line 136 of file FacetSurface.cpp.
{
if ( facetEvalTool )
{
delete facetEvalTool;
}
if ( myEvaluator )
{
delete myEvaluator;
}
}
| void FacetSurface::add_shell | ( | ShellSM * | shell_ptr | ) | [inline] |
Definition at line 115 of file FacetSurface.hpp.
| void FacetSurface::add_transformation | ( | CubitTransformMatrix & | tfmat | ) |
Definition at line 1117 of file FacetSurface.cpp.
{
if ( myEvaluator )
myEvaluator->add_transformation( tfmat );
}
| void FacetSurface::append_simple_attribute_virt | ( | const CubitSimpleAttrib & | csa | ) | [virtual] |
Implements TopologyBridge.
Definition at line 184 of file FacetSurface.cpp.
{ attribSet.append_attribute(csa); }
| CubitBox FacetSurface::bounding_box | ( | void | ) | const [virtual] |
Implements GeometryEntity.
Definition at line 250 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->bounding_box();
else
return facetEvalTool->bounding_box();
}
| CubitStatus FacetSurface::closest_point | ( | CubitVector const & | location, |
| CubitVector * | closest_location = NULL, |
||
| CubitVector * | unit_normal_ptr = NULL, |
||
| CubitVector * | curvature1_ptr = NULL, |
||
| CubitVector * | curvature2_ptr = NULL |
||
| ) | [virtual] |
Implements Surface.
Definition at line 283 of file FacetSurface.cpp.
{
CubitStatus rv = CUBIT_SUCCESS;
if ( myEvaluator )
return myEvaluator->closest_point( location,
closest_location,
unit_normal_ptr,
curvature1_ptr,
curvature2_ptr );
// Only need to compute the closest location
if (unit_normal_ptr == NULL &&
curvature1_ptr == NULL &&
curvature2_ptr == NULL)
{
CubitVector temp = location;
rv=facetEvalTool->closest_point( temp,
closest_location, NULL );
if(!rv){
return rv;
}
}
// Need to compute the closest location and the normal, but not the
// curvatures
else if ( (unit_normal_ptr != NULL) &&
(curvature1_ptr == NULL && curvature2_ptr == NULL) )
{
CubitVector temp = location;
rv =facetEvalTool->closest_point( temp, closest_location, unit_normal_ptr);
if(!rv){
return rv;
}
// if ( get_relative_surface_sense() == CUBIT_REVERSED )
// {
// *unit_normal_ptr = -1.0*(*unit_normal_ptr);
// }
}
else
{
PRINT_ERROR("Faceted geometry currently doesn't support curvature requests.\n");
return CUBIT_FAILURE;
}
return CUBIT_SUCCESS;
}
| CubitStatus FacetSurface::closest_point_along_vector | ( | CubitVector & | from_point, |
| CubitVector & | along_vector, | ||
| CubitVector & | point_on_surface | ||
| ) | [virtual] |
Implements Surface.
Definition at line 336 of file FacetSurface.cpp.
{
CubitVector other_point = from_point+along_vector;
DLIList<CubitVector*> intersection_list;
facetEvalTool->get_intersections( from_point, other_point, intersection_list );
if( intersection_list.size() == 0 )
return CUBIT_FAILURE;
if( intersection_list.size() == 1 )
{
point_on_surface = *intersection_list.get();
delete intersection_list.get();
return CUBIT_SUCCESS;
}
//get the closest intersection
double closest_dist_sq = CUBIT_DBL_MAX;
for( int k=intersection_list.size(); k--; )
{
CubitVector *int_pt = intersection_list.get_and_step();
double tmp_dist_sq = from_point.distance_between_squared( *int_pt );
if( tmp_dist_sq < closest_dist_sq )
{
point_on_surface = *int_pt;
closest_dist_sq = tmp_dist_sq;
}
delete int_pt;
}
return CUBIT_SUCCESS;
}
| void FacetSurface::closest_point_trimmed | ( | CubitVector | from_point, |
| CubitVector & | point_on_surface | ||
| ) | [virtual] |
Implements Surface.
Definition at line 382 of file FacetSurface.cpp.
{
CubitBoolean on_surf;
facetEvalTool->closest_point_trimmed( from_point, &point_on_surface,
on_surf);
return;
}
| CubitStatus FacetSurface::closest_point_uv_guess | ( | CubitVector const & | location, |
| double & | u, | ||
| double & | v, | ||
| CubitVector * | closest_location = NULL, |
||
| CubitVector * | unit_normal = NULL |
||
| ) | [virtual] |
Implements Surface.
Definition at line 265 of file FacetSurface.cpp.
{
// don't use u and v guesses
return closest_point(location, closest_location, unit_normal);
}
| CubitStatus FacetSurface::copy_facets | ( | DLIList< CubitFacet * > & | copy_facet_list, |
| DLIList< CubitPoint * > & | copy_point_list, | ||
| std::map< CubitPoint *, CubitPoint * > & | old_to_new_cubit_pts | ||
| ) |
Definition at line 934 of file FacetSurface.cpp.
{
if (!facetEvalTool)
{
PRINT_ERROR("Couldn't copy facets.");
return CUBIT_FAILURE;
}
int ii;
DLIList<CubitFacet*>facet_list;
DLIList<CubitPoint*>point_list;
facetEvalTool->get_facets( facet_list );
facetEvalTool->get_points( point_list );
CubitPoint **point_array = new CubitPoint* [point_list.size()];
//- copy the points
std::map<CubitPoint*, CubitPoint*>::iterator iter;
point_list.reset();
CubitPoint *new_point, *the_point;
for(ii=0; ii<point_list.size(); ii++)
{
the_point = point_list.get_and_step();
iter = old_to_new_cubit_pts.find( the_point );
if( old_to_new_cubit_pts.end() == iter )
{
new_point = new CubitPointData( the_point->coordinates() );
copy_point_list.append( new_point );
point_array[ii] = new_point;
old_to_new_cubit_pts.insert( std::make_pair( the_point, new_point) );
}
else
{
point_array[ii] = iter->second;
copy_point_list.append( iter->second );
}
the_point->marked( ii );
}
//- copy the facets
int jj, idx;
CubitFacet *new_facet, *the_facet;
CubitPoint *points[3];
for (ii=0; ii<facet_list.size(); ii++)
{
the_facet = facet_list.get_and_step();
for (jj=0; jj<3; jj++)
{
idx = the_facet->point(jj)->marked();
points[jj] = point_array[idx];
}
new_facet = new CubitFacetData( points[0], points[1], points[2] );
copy_facet_list.append( new_facet );
}
delete [] point_array;
return CUBIT_SUCCESS;
}
| void FacetSurface::disconnect_all_loops | ( | ) |
Definition at line 1101 of file FacetSurface.cpp.
{
myLoops.reset();
for (int i = myLoops.size(); i--; )
{
LoopSM* sm_ptr = myLoops.get_and_step();
FacetLoop* loop = dynamic_cast<FacetLoop*>(sm_ptr);
if (loop)
{
assert(loop->get_surface() == this);
loop->remove_surface();
}
}
myLoops.clean_out();
}
| CubitStatus FacetSurface::evaluate | ( | double | u, |
| double | v, | ||
| CubitVector * | position, | ||
| CubitVector * | normal, | ||
| CubitVector * | curvature1, | ||
| CubitVector * | curvature2 | ||
| ) | [virtual] |
| const CubitEvaluatorData * FacetSurface::evaluator_data | ( | void | ) |
Definition at line 711 of file FacetSurface.cpp.
{
if ( myEvaluator )
{
return myEvaluator->evaluator_data();
}
return NULL;
}
| GeometryType FacetSurface::geometry_type | ( | ) | [virtual] |
Reimplemented from Surface.
Definition at line 638 of file FacetSurface.cpp.
{
if ( is_flat() )
{
return PLANE_SURFACE_TYPE;
}
else if ( is_spherical() )
{
return SPHERE_SURFACE_TYPE;
}
else if ( is_conical() )
{
return CONE_SURFACE_TYPE;
}
else
{
return FACET_SURFACE_TYPE;
}
}
| void FacetSurface::get_bodies | ( | DLIList< FacetBody * > & | bodies | ) |
Definition at line 997 of file FacetSurface.cpp.
{
DLIList<FacetLump*> lump_list;
get_lumps( lump_list );
lump_list.reset();
for ( int i = lump_list.size(); i--; )
{
FacetLump* lump = lump_list.get_and_step();
FacetBody* body = dynamic_cast<FacetBody*>(lump->get_body());
if (body)
result_list.append_unique(body);
}
}
| void FacetSurface::get_children_virt | ( | DLIList< TopologyBridge * > & | children | ) | [virtual] |
Implements TopologyBridge.
Definition at line 835 of file FacetSurface.cpp.
{ CAST_LIST_TO_PARENT( myLoops, children ); }
| void FacetSurface::get_coedges | ( | DLIList< FacetCoEdge * > & | coedges | ) |
Definition at line 1043 of file FacetSurface.cpp.
{
DLIList<FacetLoop*> loop_list;
get_loops( loop_list );
loop_list.reset();
for ( int i = 0; i < loop_list.size(); i++ )
loop_list.next(i)->get_coedges( result_list );
}
| CubitStatus FacetSurface::get_cone_params | ( | CubitVector & | center, |
| CubitVector & | normal, | ||
| CubitVector & | major_axis, | ||
| double & | radius_ratio, | ||
| double & | sine_angle, | ||
| double & | cos_angle | ||
| ) | const [virtual] |
Implements Surface.
Definition at line 1175 of file FacetSurface.cpp.
{
PRINT_ERROR("Currently, Cubit is unable to determine cone parameters for FacetSurfaces.\n");
return CUBIT_FAILURE;
}
| void FacetSurface::get_curves | ( | DLIList< FacetCurve * > & | curves | ) |
Definition at line 1052 of file FacetSurface.cpp.
{
DLIList<FacetCoEdge*> coedge_list;
get_coedges( coedge_list );
coedge_list.reset();
for ( int i = coedge_list.size(); i--; )
{
FacetCoEdge* coedge = coedge_list.get_and_step();
FacetCurve* curve = dynamic_cast<FacetCurve*>(coedge->curve());
if (curve)
result_list.append_unique(curve);
}
}
| FacetEvalTool* FacetSurface::get_eval_tool | ( | ) | [inline] |
Definition at line 490 of file FacetSurface.hpp.
{ return facetEvalTool; }
| const FacetEvalTool* FacetSurface::get_eval_tool | ( | ) | const [inline] |
Definition at line 492 of file FacetSurface.hpp.
{ return facetEvalTool; }
| GeometryQueryEngine * FacetSurface::get_geometry_query_engine | ( | ) | const [virtual] |
Implements TopologyBridge.
Definition at line 239 of file FacetSurface.cpp.
{
return FacetQueryEngine::instance();
}
| CubitSense FacetSurface::get_geometry_sense | ( | ) | [virtual] |
Implements Surface.
Definition at line 751 of file FacetSurface.cpp.
{
//not sure if this is right for the facet surface...
CubitSense sense = CUBIT_FORWARD;//get_relative_surface_sense();
return sense;
}
| void FacetSurface::get_loops | ( | DLIList< FacetLoop * > & | loops | ) |
| void FacetSurface::get_lumps | ( | DLIList< FacetLump * > & | lumps | ) |
Definition at line 1011 of file FacetSurface.cpp.
{
DLIList<FacetShell*> shell_list;
get_shells( shell_list );
shell_list.reset();
for ( int i = shell_list.size(); i--; )
{
FacetShell* shell = shell_list.get_and_step();
shell->get_lumps( result_list );
FacetLump* lump = dynamic_cast<FacetLump*>(shell->get_lump());
if (lump)
result_list.append_unique(lump);
}
}
| void FacetSurface::get_my_facetedges | ( | DLIList< CubitFacetEdge * > & | edge_list | ) |
Definition at line 858 of file FacetSurface.cpp.
{
facetEvalTool->get_edges(edge_list);
}
| CubitStatus FacetSurface::get_my_facets | ( | DLIList< CubitFacet * > & | facet_list, |
| DLIList< CubitPoint * > & | point_list | ||
| ) |
Definition at line 840 of file FacetSurface.cpp.
{
facetEvalTool->get_facets(facet_list);
facetEvalTool->get_points(point_list);
return CUBIT_SUCCESS;
}
| void FacetSurface::get_my_points | ( | DLIList< CubitPoint * > & | point_list | ) |
Definition at line 853 of file FacetSurface.cpp.
{
facetEvalTool->get_points(point_list);
}
| CubitStatus FacetSurface::get_nurb_params | ( | bool & | rational, |
| int & | degree_u, | ||
| int & | degree_v, | ||
| int & | num_cntrl_pts_u, | ||
| int & | num_cntrl_pts_v, | ||
| DLIList< CubitVector > & | cntrl_pts, | ||
| DLIList< double > & | weights, | ||
| DLIList< double > & | u_knots, | ||
| DLIList< double > & | v_knots | ||
| ) | const [virtual] |
Implements Surface.
Definition at line 1202 of file FacetSurface.cpp.
{
PRINT_ERROR("Currently, Cubit is unable to determine nurbs parameters for FacetSurface.\n");
return CUBIT_FAILURE;
}
| CubitBoolean FacetSurface::get_param_range_U | ( | double & | lower_bound, |
| double & | upper_bound | ||
| ) | [virtual] |
Implements Surface.
Definition at line 603 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->get_param_range_U( lower_bound, upper_bound );
lower_bound = 0.0;
upper_bound = 1.0;
//PRINT_ERROR("FacetSurface::get_param_range_U not implemented\n");
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::get_param_range_V | ( | double & | lower_bound, |
| double & | upper_bound | ||
| ) | [virtual] |
Implements Surface.
Definition at line 622 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->get_param_range_V( lower_bound, upper_bound );
lower_bound = 0.0;
upper_bound = 1.0;
//PRINT_ERROR("FacetSurface::get_param_range_V not implemented\n");
return CUBIT_FALSE;
}
| void FacetSurface::get_parents_virt | ( | DLIList< TopologyBridge * > & | parents | ) | [virtual] |
Implements TopologyBridge.
Definition at line 833 of file FacetSurface.cpp.
{ CAST_LIST_TO_PARENT( myShells, parents ); }
| CubitStatus FacetSurface::get_point_normal | ( | CubitVector & | location, |
| CubitVector & | normal | ||
| ) | [virtual] |
Implements Surface.
Definition at line 259 of file FacetSurface.cpp.
{
return closest_point( location, NULL, &normal );
}
| CubitStatus FacetSurface::get_projected_distance_on_surface | ( | CubitVector * | pos1, |
| CubitVector * | pos2, | ||
| double & | distance | ||
| ) | [virtual] |
| CubitSense FacetSurface::get_shell_sense | ( | ShellSM * | facet_shell | ) | const [virtual] |
Implements Surface.
Definition at line 870 of file FacetSurface.cpp.
{
// work around non-constness of DLIList functions
FacetSurface* nonconst = const_cast<FacetSurface*>(this);
int idx = nonconst->myShells.get_index();
if(idx > 0){
PRINT_ERROR("Muliple shells attached to surface.\n");
return CUBIT_UNKNOWN;
}
ShellSM *ashell = myShells.get();
if (ashell == shell_ptr)
{
return myShellSense;
}
// else
// {
// nonconst->myShells.step();
// idx = nonconst->myShells.get_index();
// ashell = myShells.get();
// if (ashell == shell_ptr)
// {
// return myShellSense[idx];
// }
// }
return CUBIT_UNKNOWN;
}
| void FacetSurface::get_shell_sense | ( | CubitSense & | sense0 | ) |
Definition at line 863 of file FacetSurface.cpp.
{
sense0 = myShellSense;
}
| void FacetSurface::get_shells | ( | DLIList< FacetShell * > & | shells | ) |
Definition at line 1026 of file FacetSurface.cpp.
| CubitStatus FacetSurface::get_simple_attribute | ( | DLIList< CubitSimpleAttrib > & | csa_list | ) | [virtual] |
Implements TopologyBridge.
Definition at line 218 of file FacetSurface.cpp.
{ return attribSet.get_attributes(csa_list); }
| CubitStatus FacetSurface::get_simple_attribute | ( | const CubitString & | name, |
| DLIList< CubitSimpleAttrib > & | csa_list | ||
| ) | [virtual] |
Implements TopologyBridge.
Definition at line 221 of file FacetSurface.cpp.
{ return attribSet.get_attributes( name, csa_list ); }
| CubitStatus FacetSurface::get_sphere_params | ( | CubitVector & | center, |
| double & | radius | ||
| ) | const [virtual] |
Implements Surface.
Definition at line 1165 of file FacetSurface.cpp.
{
PRINT_ERROR("Currently, Cubit is unable to determine sphere parameters for FacetSurfaces.\n");
return CUBIT_FAILURE;
}
| CubitStatus FacetSurface::get_torus_params | ( | CubitVector & | center, |
| CubitVector & | normal, | ||
| double & | major_radius, | ||
| double & | minor_radius | ||
| ) | const [virtual] |
Implements Surface.
Definition at line 1189 of file FacetSurface.cpp.
{
PRINT_ERROR("Currently, Cubit is unable to determine torus parameters for FacetSurfaces.\n");
return CUBIT_FAILURE;
}
| bool FacetSurface::has_parent_shell | ( | ) | [inline] |
Definition at line 122 of file FacetSurface.hpp.
| int FacetSurface::interp_order | ( | ) |
Definition at line 155 of file FacetSurface.cpp.
{
assert(facetEvalTool != NULL);
return facetEvalTool->interp_order();
}
| CubitBoolean FacetSurface::is_closed_in_U | ( | ) | [virtual] |
Reimplemented from Surface.
Definition at line 543 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->is_closed_in_U();
//PRINT_ERROR("FacetSurface::is_closed_in_U not implemented yet\n");
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_closed_in_V | ( | ) | [virtual] |
Reimplemented from Surface.
Definition at line 555 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->is_closed_in_V();
//PRINT_ERROR("FacetSurface::is_closed_in_V not implemented yet\n");
return CUBIT_FALSE;
}
Definition at line 702 of file FacetSurface.cpp.
{
if ( myEvaluator && myEvaluator->ask_type() == CONE_SURFACE_TYPE )
{
return CUBIT_TRUE;
}
return CUBIT_FALSE;
}
Definition at line 680 of file FacetSurface.cpp.
{
return (facetEvalTool->is_flat() == 1) ? CUBIT_TRUE : CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_parametric | ( | ) | [virtual] |
Implements Surface.
Definition at line 582 of file FacetSurface.cpp.
{
if ( myEvaluator )
{
return myEvaluator->is_parametric();
}
//PRINT_ERROR("FacetSurface::is_parametric not implemented\n");
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_periodic | ( | ) | [virtual] |
Implements Surface.
Definition at line 472 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->is_periodic();
//I'm sure we can do something later to calculate this. But for now...
//PRINT_ERROR("FacetSurface::is_periodic not implemented yet\n");
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_periodic_in_U | ( | double & | period | ) | [virtual] |
Implements Surface.
Definition at line 488 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->is_periodic_in_U( period );
//PRINT_ERROR("FacetSurface::is_periodic_in_U not implemented yet\n");
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_periodic_in_V | ( | double & | period | ) | [virtual] |
Implements Surface.
Definition at line 503 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->is_periodic_in_V( period );
//PRINT_ERROR("FacetSurface::is_periodic_in_V not implemented yet\n");
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_position_on | ( | CubitVector & | test_position | ) | [virtual] |
Implements Surface.
Definition at line 725 of file FacetSurface.cpp.
{
CubitVector new_point;
CubitStatus stat = closest_point(test_position, &new_point, NULL,NULL,NULL);
if ( !stat )
return CUBIT_FALSE;
CubitVector result_vec = test_position - new_point;
if ( result_vec.length_squared() < GEOMETRY_RESABS )
return CUBIT_TRUE;
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_singular_in_U | ( | double | u_param | ) | [virtual] |
Implements Surface.
Definition at line 517 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->is_singular_in_U();
//PRINT_ERROR("FacetSurface::is_singular_in_U not implemented yet\n");
return CUBIT_FALSE;
}
| CubitBoolean FacetSurface::is_singular_in_V | ( | double | v_param | ) | [virtual] |
Implements Surface.
Definition at line 530 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->is_singular_in_V();
//PRINT_ERROR("FacetSurface::is_singular_in_V not implemented yet\n");
return CUBIT_FALSE;
}
Definition at line 689 of file FacetSurface.cpp.
{
if ( myEvaluator && myEvaluator->ask_type() == SPHERE_SURFACE_TYPE )
{
return CUBIT_TRUE;
}
return CUBIT_FALSE;
}
| double FacetSurface::measure | ( | ) | [virtual] |
Implements GeometryEntity.
Definition at line 662 of file FacetSurface.cpp.
{
return facetEvalTool->area();
}
| double FacetSurface::min_dot | ( | ) |
Definition at line 168 of file FacetSurface.cpp.
{
assert(facetEvalTool != NULL);
return facetEvalTool->get_min_dot();
}
| CubitPointContainment FacetSurface::point_containment | ( | const CubitVector & | point | ) | [virtual] |
| CubitPointContainment FacetSurface::point_containment | ( | double | u, |
| double | v | ||
| ) | [virtual] |
| CubitVector FacetSurface::position_from_u_v | ( | double | u, |
| double | v | ||
| ) | [virtual] |
Implements Surface.
Definition at line 437 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->position_from_u_v( u, v );
PRINT_ERROR("Faceted geometry currently does not support u-v parameterization.\n");
return CubitVector (0,0,0);
}
| CubitStatus FacetSurface::principal_curvatures | ( | CubitVector const & | location, |
| double & | curvature_1, | ||
| double & | curvature_2, | ||
| CubitVector * | closest_location = NULL |
||
| ) | [virtual] |
Implements Surface.
Definition at line 401 of file FacetSurface.cpp.
{
if ( myEvaluator )
{
return myEvaluator->principal_curvatures( location,
curvature_1,
curvature_2,
closest_location );
}
PRINT_ERROR("Faceted geometry currently does not support curvature requests.\n");
return CUBIT_FAILURE;
}
| void FacetSurface::remove_all_simple_attribute_virt | ( | ) | [virtual] |
Implements TopologyBridge.
Definition at line 207 of file FacetSurface.cpp.
{ attribSet.remove_all_attributes(); }
| CubitStatus FacetSurface::remove_shell | ( | FacetShell * | shell_ptr | ) |
Definition at line 1076 of file FacetSurface.cpp.
{
// Something strange here -- A DLIList of Shells and a
// two-element array for senses? Try to keep the senses
// intact anyway...
myShells.reset();
if (myShells.get() == shell)
myShellSense = CUBIT_UNKNOWN;
if (!myShells.move_to(shell))
return CUBIT_FAILURE;
myShells.remove();
return CUBIT_SUCCESS;
}
| void FacetSurface::remove_simple_attribute_virt | ( | const CubitSimpleAttrib & | csa | ) | [virtual] |
Implements TopologyBridge.
Definition at line 195 of file FacetSurface.cpp.
{ attribSet.remove_attribute( csa ); }
| CubitStatus FacetSurface::restore_attribs | ( | FILE * | file_ptr, |
| unsigned int | endian | ||
| ) |
Definition at line 228 of file FacetSurface.cpp.
{ return attribSet.restore_attributes( file_ptr, endian ); }
| void FacetSurface::reverse_sense | ( | ) | [virtual] |
Definition at line 1129 of file FacetSurface.cpp.
{
facetEvalTool->reverse_facets();
myLoops.reset();
int i,j;
FacetLoop* this_loop;
LoopSM* this_loop_sm;
DLIList<FacetCoEdge *> this_coedge_list;
for(i=0;i<myLoops.size();i++){
this_loop_sm= myLoops.get_and_step();
this_loop = dynamic_cast<FacetLoop*>(this_loop_sm);
if(!this_loop){
PRINT_ERROR("Unexpected null pointer for loop.\n");
return;
}
this_loop->reverse();
this_coedge_list.clean_out();
this_loop->get_coedges(this_coedge_list);
for(j=0; j<this_coedge_list.size(); j++){
this_coedge_list.get_and_step()->reverse_sense();
}
}
//sense_ = CubitUtil::opposite_sense( sense_ );
myShellSense = CubitUtil::opposite_sense( myShellSense );
//myShellSense[1] = CubitUtil::opposite_sense( myShellSense[1] );
}
| CubitStatus FacetSurface::save_attribs | ( | FILE * | file_ptr | ) |
Definition at line 225 of file FacetSurface.cpp.
{ return attribSet.save_attributes(file_ptr); }
| void FacetSurface::set_shell_sense | ( | FacetShell * | facet_shell, |
| CubitSense | thesense | ||
| ) |
Definition at line 899 of file FacetSurface.cpp.
{
// if(thesense == CUBIT_REVERSED){
// PRINT_INFO("should not do this.");
// }
int idx = myShells.get_index();
if(idx > 0){
PRINT_ERROR("Multiple shells attached to a single surface.\n");
return;
}
ShellSM *shell_ptr = (ShellSM *)facet_shell;
ShellSM *ashell = myShells.get();
if (ashell == shell_ptr)
{
myShellSense = thesense;
}
// else
// {
// myShells.step();
// idx = myShells.get_index();
// ashell = myShells.get();
// if (ashell == shell_ptr)
// {
// myShellSense[idx] = thesense;
// }
// }
}
| void FacetSurface::tris | ( | DLIList< CubitFacet * > & | facet_list | ) |
Definition at line 848 of file FacetSurface.cpp.
{
facetEvalTool->get_facets(facet_list);
}
| CubitStatus FacetSurface::u_v_from_position | ( | CubitVector const & | location, |
| double & | u, | ||
| double & | v, | ||
| CubitVector * | closest_location = NULL |
||
| ) | [virtual] |
Implements Surface.
Definition at line 454 of file FacetSurface.cpp.
{
if ( myEvaluator )
return myEvaluator->u_v_from_position( location, u, v, closest_location );
PRINT_ERROR("Faceted geometry currently does not support u-v parameterization.\n");
return CUBIT_FAILURE;
}
| void FacetSurface::update_measurement | ( | ) |
Definition at line 671 of file FacetSurface.cpp.
{
facetEvalTool->calculate_area();
}
| CubitStatus FacetSurface::uv_derivitives | ( | double | u_param, |
| double | v_param, | ||
| CubitVector & | du, | ||
| CubitVector & | dv | ||
| ) | [virtual] |
Implements Surface.
Definition at line 568 of file FacetSurface.cpp.
{
PRINT_ERROR("Derivitives on a surface not supported on faceted geometry yet.\n");
return CUBIT_FAILURE;
}
FacetAttribSet FacetSurface::attribSet [private] |
Definition at line 68 of file FacetSurface.hpp.
FacetEvalTool* FacetSurface::facetEvalTool [private] |
Definition at line 62 of file FacetSurface.hpp.
CubitEvaluator* FacetSurface::myEvaluator [private] |
Definition at line 74 of file FacetSurface.hpp.
DLIList<LoopSM*> FacetSurface::myLoops [private] |
Definition at line 65 of file FacetSurface.hpp.
DLIList<ShellSM*> FacetSurface::myShells [private] |
Definition at line 66 of file FacetSurface.hpp.
CubitSense FacetSurface::myShellSense [private] |
Definition at line 72 of file FacetSurface.hpp.