本文整理汇总了C++中DLIList::append方法的典型用法代码示例。如果您正苦于以下问题:C++ DLIList::append方法的具体用法?C++ DLIList::append怎么用?C++ DLIList::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DLIList
的用法示例。
在下文中一共展示了DLIList::append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: common_vertices
CubitBoolean RefEdge::common_vertices( RefEdge *other_edge,
DLIList<RefVertex*> &common_verts)
{
CubitBoolean result = CUBIT_FALSE;
RefVertex *this_start = start_vertex();
RefVertex *this_end = end_vertex();
RefVertex *other_start = other_edge->start_vertex();
RefVertex *other_end = other_edge->end_vertex();
if ( this_start == other_start || this_start == other_end )
{
common_verts.append(this_start);
result = CUBIT_TRUE;
}
if ( this_end == other_start || this_end == other_end )
{
common_verts.append(this_end);
result = CUBIT_TRUE;
}
return result;
}
示例2: get_neighborhood_points_sorted
void PointGridSearch::get_neighborhood_points_sorted(
DLIList<CubitPoint*> &point_list,
const CubitVector& center, double cut_off)
{
point_list.clean_out();
DLIList<CubitPoint*> temp_point_list;
int i;
for (int k = boundingCellMinimumZ; k <= boundingCellMaximumZ; k++)
{
int kn = numberGridCellsY * k;
for (int j = boundingCellMinimumY; j <= boundingCellMaximumY; j++)
{
int jn = numberGridCellsX * (kn + j);
for ( i = boundingCellMinimumX; i <= boundingCellMaximumX; i++)
{
int in = jn + i;
if (neighborhoodList[in])
{
temp_point_list += *(neighborhoodList[in]);
}
}
}
}
// evaluate point distance to center ... remove those larger than cut_off
SDLByDouble sorted_index_list;
IndexedDouble *ID;
CubitVector vec;
cut_off *= cut_off;
temp_point_list.reset();
for ( i = 0; i < temp_point_list.size(); i++)
{
vec = center - temp_point_list.get_and_step()->coordinates();
double distance = vec.length_squared();
if (distance < cut_off)
{
ID = new IndexedDouble( i, distance );
sorted_index_list.append( ID );
}
}
sorted_index_list.sort();
temp_point_list.reset();
for ( i = 0; i < sorted_index_list.size(); i++ )
{
ID = sorted_index_list.get_and_step();
point_list.append( temp_point_list.next( ID->index() ) );
delete ID;
}
}
示例3: get_parents_virt
void CompositePoint::get_parents_virt( DLIList<TopologyBridge*>& list )
{
DLIList<TopologyBridge*> point_parents;
realPoint->get_parents_virt( point_parents );
for( int i = point_parents.size(); i--; )
{
TopologyBridge* tb = point_parents.get_and_step();
if( CompositeCurve* curve = dynamic_cast<CompositeCurve*>(tb->owner()) )
{
if( ! dynamic_cast<HiddenEntitySet*>(curve->owner()) )
list.append_unique( curve );
}
else if( ! dynamic_cast<HiddenEntitySet*>(tb->owner()) )
list.append( tb );
}
// get point-curves also
CompositeCurve* curve = 0;
while ((curve = next_curve(curve)))
if (curve->num_curves() == 0)
list.append(curve);
if (stitchNext)
{
point_parents.clean_out();
stitchNext->get_parents_virt( point_parents );
point_parents.reset();
for (int j = point_parents.size(); j--; )
{
TopologyBridge* bridge = point_parents.get_and_step();
CompositeCurve* curv = dynamic_cast<CompositeCurve*>(bridge);
if (curv)
list.append_unique( curv->primary_stitched_curve() );
else
list.append_unique( bridge );
}
}
}
示例4: get_refentity_name
int RefEntityName::get_refentity_name(const RefEntity *entity,
DLIList<CubitString> &names)
{
// NOTE: There may be multiple names for one RefEntity. Make sure to
// access all of them.
RefEntityNameMapList temp_list;
int found_match = get_refentity_name(entity, temp_list);
for (int i=temp_list.size(); i > 0; i--)
names.append(temp_list.get_and_step()->key());
return found_match;
}
示例5: get_simple_attribute
CubitStatus OCCBody::get_simple_attribute( const CubitString& name,
DLIList<CubitSimpleAttrib>& csas )
{
if (myTopoDSShape != NULL)
return OCCAttribSet::get_attributes( name, *myTopoDSShape, csa_list );
for(int i = 0 ; i < csa_list.size(); i ++)
{
const CubitSimpleAttrib& csa = csa_list.get_and_step();
if(csa.string_data_list().size() > 0)
if (csa.string_data_list()[0] == name)
csas.append(csa);
}
return CUBIT_SUCCESS;
}
示例6: get_co_edges
//-------------------------------------------------------------------------
// Purpose : Get parent CoEdges
//
// Special Notes :
//
// Creator : Jason Kraftcheck
//
// Creation Date : 07/29/03
//-------------------------------------------------------------------------
CubitStatus RefEdge::get_co_edges( DLIList<CoEdge*>& co_edges_found_list,
RefFace *input_ref_face_ptr )
{
for (SenseEntity* coedge_ptr = get_first_sense_entity_ptr();
coedge_ptr;
coedge_ptr = coedge_ptr->next_on_bte())
{
if (!input_ref_face_ptr ||
coedge_ptr->get_parent_basic_topology_entity_ptr() == input_ref_face_ptr)
{
co_edges_found_list.append (dynamic_cast<CoEdge*>(coedge_ptr));
}
}
return CUBIT_SUCCESS;
}
示例7:
template <class Z> MY_INLINE void RStarTree<Z>::to_list(DLIList <RStarTreeNode<Z>*> &member_list,
RStarTreeNode<Z> *top)
{
//Get the children of the top into the list.
int ii;
RStarTreeNode <Z> *curr_node;
for ( ii = 0; ii < top->num_children(); ii++ )
{
curr_node = top->get_child(ii);
member_list.append(curr_node);
//don't go below the bottom level...
if ( curr_node->get_leaf_level() == 0 )
continue;
to_list(member_list, curr_node);
}
return;
}
示例8: add_preexisting_feature_edges
//=============================================================================
//Function: add_preexisting_feature_edges (PRIVATE)
//Description: edges that were marked previously in function ChollaEngine::mark_features
// are added to the feature edge list
//Author: sjowen
//Date: 01/08
//=============================================================================
CubitStatus ChollaSurface::add_preexisting_feature_edges(
DLIList<CubitFacetEdge *> &feature_edge_list)
{
DLIList<CubitFacetEdge *> edge_list;
DLIList<CubitFacet *> facet_list;
CAST_LIST( surfaceElemList, facet_list, CubitFacet );
FacetDataUtil::get_edges( facet_list, edge_list );
int iedge;
CubitFacetEdge *edge;
for (iedge=0; iedge < edge_list.size(); iedge++)
{
edge = edge_list.get_and_step();
if (edge->is_feature())
feature_edge_list.append(edge);
}
return CUBIT_SUCCESS;
}
示例9: common_ref_faces
int RefEdge::common_ref_faces ( RefEdge* input_edge, DLIList<RefFace*> &common_face_list )
{
int nedges = 0;
DLIList<RefFace*> ref_faces, ref_faces_for_other_edge;
this->ref_faces(ref_faces);
input_edge->ref_faces(ref_faces_for_other_edge);
int i, j;
for (i = 0; i < ref_faces.size(); i++)
{
RefFace * ref_face = ref_faces.get_and_step();
for (j = 0; j < ref_faces_for_other_edge.size(); j++)
if (ref_face == ref_faces_for_other_edge.get_and_step())
{
common_face_list.append(ref_face);
nedges++;
}
}
return nedges;
}
示例10: assert
template <class Z> MY_INLINE CubitStatus RStarTree<Z>::recursive_find(RStarTreeNode<Z> *rect_tree,
const CubitBox &range_box,
DLIList <Z> &range_members )
{
CubitBox rect_box = rect_tree->bounding_box();
if ( !range_box.overlap(myTolerance, rect_box ) )
return CUBIT_SUCCESS;
//Now see if this is a data member. If it is, append the data to the
//list.
if (rect_tree->is_data() )
{
range_members.append(rect_tree->get_data());
return CUBIT_SUCCESS;
}
//Now if this is anything else we need to keep iterating...
int loop_size = rect_tree->num_children();
//We are doing a depth-first search of the tree. Not
//all branches will need to be followed since they won't
//all overlap...
int ii;
RStarTreeNode<Z> *curr_node;
CubitStatus stat;
for ( ii = 0; ii < loop_size; ii++ )
{
curr_node = rect_tree->get_child(ii);
if ( curr_node == NULL )
{
PRINT_ERROR("Problems finding boxes in range.\n");
assert(curr_node != NULL);
return CUBIT_FAILURE;
}
stat = recursive_find(curr_node, range_box, range_members);
if ( stat != CUBIT_SUCCESS )
return stat;
}
return CUBIT_SUCCESS;
}
示例11: non_manifold_edges
//=============================================================================
//Function: non_manifold_edges (PRIVATE)
//Description: mark all edges that are non-manifold (have more than 2 adj
// facets)
//Author: sjowen
//Date: 5/01
//=============================================================================
CubitStatus ChollaSurface::non_manifold_edges(
DLIList<CubitFacetEdge *> &feature_edge_list)
{
//CubitStatus stat = CUBIT_SUCCESS;
int ii, jj;
DLIList<CubitFacetEdge*> edge_list;
FacetEntity *face_ptr;
TDGeomFacet *td_gm_face;
for (ii=0; ii<surfaceElemList.size(); ii++)
{
face_ptr = surfaceElemList.get_and_step();
td_gm_face = TDGeomFacet::get_geom_facet(face_ptr);
edge_list.clean_out();
face_ptr->edges( edge_list );
for (jj=0; jj<edge_list.size(); jj++)
{
CubitFacetEdge *edge_ptr = edge_list.get_and_step();
TDGeomFacet *td_gm_edge = TDGeomFacet::get_geom_facet(edge_ptr);
if (!td_gm_edge)
{
DLIList<FacetEntity*> adj_face_list;
edge_ptr->get_parents( adj_face_list );
// non-manifold edges (edges with more than 2 adj facets)
// must be features
if (adj_face_list.size() > 2 || edge_ptr->is_feature())
{
TDGeomFacet::add_geom_facet(edge_ptr, -1);
td_gm_edge = TDGeomFacet::get_geom_facet(edge_ptr);
edge_ptr->set_as_feature();
feature_edge_list.append( edge_ptr );
}
}
}
}
return CUBIT_SUCCESS;
}
示例12: get_neighborhood_facets
void PointGridSearch::get_neighborhood_facets( DLIList<CubitFacet*> &facet_list )
{
// retrieve points over the current bounding box range
facet_list.clean_out();
DLIList<CubitPoint*> point_list;
get_neighborhood_points( point_list );
// retrieve all faces attached to the points in point_list
for (int i = 0; i < point_list.size(); i++)
{
CubitPoint* point = point_list.get_and_step();
DLIList<CubitFacet*> temp_facet_list;
point->facets(temp_facet_list);
for (int j = 0; j < temp_facet_list.size(); j++)
{
CubitFacet* facet = temp_facet_list.get_and_step();
if (!facet->marked())
{
facet->marked(CUBIT_TRUE);
facet_list.append(facet);
}
}
}
// unmark the found faces and return face_list
for (int m = 0; m < facet_list.size(); m++)
{
facet_list.get_and_step()->marked(CUBIT_FALSE);
}
}
示例13: ordered_ref_edges
//-------------------------------------------------------------------------
// Purpose : gets the ref edges in order with respect to this Loop.
//
// Special Notes : appends the edges to the list, with respect to coedges.
//
// Creator : David White
//
// Creation Date : 03/25/97
//-------------------------------------------------------------------------
CubitStatus Loop::ordered_ref_edges(DLIList<RefEdge*>& ordered_edge_list )
{
CubitStatus status = CUBIT_SUCCESS;
DLIList<SenseEntity*> sense_entity_list;
status = this->get_sense_entity_list(sense_entity_list);
if ( status == CUBIT_FAILURE )
{
PRINT_ERROR("In Loop::ordered_ref_edges\n");
PRINT_ERROR(" Problem getting the CoEdges of this Loop.\n");
return CUBIT_FAILURE;
}
//Get the ref_edges associated with each co_edge.
for ( int ii = sense_entity_list.size(); ii > 0; ii-- )
{
SenseEntity* se_ptr = sense_entity_list.get_and_step();
BasicTopologyEntity* bte_ptr = se_ptr->get_basic_topology_entity_ptr();
ordered_edge_list.append( dynamic_cast<RefEdge*>(bte_ptr) );
}
return CUBIT_SUCCESS;
}
示例14: get_adj_facets
//=============================================================================
//Function: get_adj_facets (PRIVATE)
//Description: non recursive function that creates a list of all facets connected
// to the passed in facet
//Author: sjowen
//Date: 12/22/00
//=============================================================================
CubitStatus ChollaSurface::get_adj_facets(
FacetEntity *start_face_ptr,
DLIList<FacetEntity*> &face_list,
int mydebug,
bool bound_check,
bool feature_edge_check)
{
//int found = 0;
int ii;
CubitStatus stat = CUBIT_SUCCESS;
DLIList<FacetEntity*> temp_list;
FacetEntity *face_ptr = NULL;
FacetEntity *adj_face_ptr = NULL;
DLIList<CubitFacetEdge *>edge_list;
CubitFacetEdge *edge_ptr = NULL;
DLIList<FacetEntity *>adj_face_list;
if (mydebug)
{
for(ii=0; ii<surfaceElemList.size(); ii++)
{
face_ptr = surfaceElemList.get_and_step();
TDGeomFacet *td_gm_face = TDGeomFacet::get_geom_facet(face_ptr);
PRINT_INFO("%d ", td_gm_face->get_hit_flag());
if (ii%10 == 0)
{
PRINT_INFO("\n");
}
}
}
// add this face to the list
temp_list.append( start_face_ptr );
TDGeomFacet *td_gm_face = TDGeomFacet::get_geom_facet(start_face_ptr);
td_gm_face->set_hit_flag( 0 );
while (temp_list.size())
{
face_ptr = temp_list.pop();
td_gm_face = TDGeomFacet::get_geom_facet(face_ptr);
if (td_gm_face->get_hit_flag() == 0)
{
face_list.append( face_ptr );
if (mydebug)
{
face_ptr->debug_draw( CUBIT_RED );
GfxDebug::flush();
}
edge_list.clean_out();
face_ptr->edges( edge_list );
for (ii=0; ii<edge_list.size(); ii++)
{
edge_ptr = edge_list.get_and_step();
// edges that already have a tool data defined are the result
// of a feature angle. Don't traverse past a feature angle edge
TDGeomFacet *td_gm_edge = TDGeomFacet::get_geom_facet(edge_ptr);
if (td_gm_edge == NULL || !feature_edge_check )
{
adj_face_list.clean_out();
edge_ptr->get_parents( adj_face_list );
// keep traversing only if there are two adjacent faces to this edge,
// otherwise, this is a boundary
if (adj_face_list.size() != 2)
{
continue;
}
if( bound_check )
{
TDFacetBoundaryEdge *td_facet_bnd_edge = TDFacetBoundaryEdge::get_facet_boundary_edge( edge_ptr );
if( td_facet_bnd_edge )
continue;
}
adj_face_ptr = adj_face_list.get_and_step();
if (adj_face_ptr == face_ptr)
adj_face_ptr = adj_face_list.get();
// go to its neighbor if it is part of the surface
td_gm_face = TDGeomFacet::get_geom_facet(adj_face_ptr);
if (td_gm_face->get_hit_flag() == id)
{
temp_list.append( adj_face_ptr );
td_gm_face->set_hit_flag( 0 );
}
}
//.........这里部分代码省略.........
示例15: feature_angle
//.........这里部分代码省略.........
DLIList<CubitFacetEdge*> edge_list;
face_ptr->edges( edge_list );
for (jj=0; jj<edge_list.size(); jj++)
{
CubitFacetEdge *edge_ptr = edge_list.get_and_step();
TDGeomFacet *td_gm_edge = TDGeomFacet::get_geom_facet(edge_ptr);
if (!td_gm_edge)
{
DLIList<FacetEntity*> adj_face_list;
edge_ptr->get_parents( adj_face_list );
// it has to be an internal edge - ignore boundaries
if (adj_face_list.size() == 2)
{
adj_face_ptr = adj_face_list.get_and_step();
if (adj_face_ptr == face_ptr)
adj_face_ptr = adj_face_list.get();
td_gm_face = TDGeomFacet::get_geom_facet(adj_face_ptr);
// make sure the adj face is on the same surface
if (td_gm_face->get_hit_flag() == id)
{
// test the dot product between normals
adj_face_normal = td_gm_face->get_normal();
temp_facet = CAST_TO(adj_face_ptr, CubitFacet);
double adj_area=temp_facet->area();
//mbrewer:: ensure no NULL
dot = adj_face_normal % face_normal;
bool add_an_edge = true;
if(mydebug){
PRINT_INFO("This area %f, other %f\n",curr_area,adj_area);
}
if(curr_area<(1.e-10*adj_area)){
DLIList<CubitFacetEdge*> edge_list_tmp;
CubitFacetEdge* edge_ptr_tmp=NULL;
curr_facet->edges(edge_list_tmp);
double edge_length = edge_ptr->length();
int k = 0;
if(edge_list_tmp.size()>0)
add_an_edge=false;
for(k=edge_list_tmp.size();k>0;k--){
edge_ptr_tmp=edge_list_tmp.get_and_step();
if(edge_ptr_tmp != edge_ptr &&
edge_ptr_tmp->length() > edge_length){
add_an_edge=true;
}
}
}
if(adj_area<(1.e-10*curr_area))
{
DLIList<CubitFacetEdge*> edge_list_tmp;
CubitFacetEdge* edge_ptr_tmp=NULL;
temp_facet->edges(edge_list_tmp);
double edge_length = edge_ptr->length();
int k = 0;
if(edge_list_tmp.size()>0)
add_an_edge=false;
for(k=edge_list_tmp.size();k>0;k--){
edge_ptr_tmp=edge_list_tmp.get_and_step();
if(edge_ptr_tmp != edge_ptr &&
edge_ptr_tmp->length() > edge_length){
add_an_edge=true;
}
}
}
if (dot <= min_dot && add_an_edge )
{
if(mydebug){
edge_ptr->debug_draw(CUBIT_MAGENTA);
}
TDGeomFacet::add_geom_facet(edge_ptr, -1);
td_gm_edge = TDGeomFacet::get_geom_facet(edge_ptr);
edge_ptr->set_as_feature();
feature_edge_list.append( edge_ptr );
}
}
}
// non-manifold edges (edges with more than 2 adj facets)
// must be features
else if (adj_face_list.size() > 2)
{
TDGeomFacet::add_geom_facet(edge_ptr, -1);
td_gm_edge = TDGeomFacet::get_geom_facet(edge_ptr);
edge_ptr->set_as_feature();
feature_edge_list.append( edge_ptr );
}
}
}
}
if(mydebug){
GfxDebug::mouse_xforms();
}
return CUBIT_SUCCESS;
}