当前位置: 首页>>代码示例>>C++>>正文


C++ DLIList::uniquify_unordered方法代码示例

本文整理汇总了C++中DLIList::uniquify_unordered方法的典型用法代码示例。如果您正苦于以下问题:C++ DLIList::uniquify_unordered方法的具体用法?C++ DLIList::uniquify_unordered怎么用?C++ DLIList::uniquify_unordered使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DLIList的用法示例。


在下文中一共展示了DLIList::uniquify_unordered方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: simplify_volumes

CubitStatus SimplifyTool::simplify_volumes(DLIList<RefVolume*> ref_volume_list,
                                           double surf_angle_in,
                                           DLIList<RefFace*> respect_face_list,
                                           DLIList<RefEdge*> respect_edge_list,
                                           CubitBoolean respect_rounds,
                                           CubitBoolean respect_imprints,
                                           CubitBoolean local_normals,
                                           CubitBoolean preview)
{
    ref_volume_list.uniquify_unordered();
    for(int i = ref_volume_list.size();i--;)
        simplify_volume(
        ref_volume_list.get_and_step(),
        surf_angle_in,
        respect_face_list,
        respect_edge_list,
        respect_rounds,
        respect_imprints,
        local_normals,
        preview);

    if(preview)
        GfxDebug::flush();

    return CUBIT_SUCCESS;
}
开发者ID:chrismullins,项目名称:cgma,代码行数:26,代码来源:SimplifyTool.cpp

示例2: get_vertices

//=============================================================================
//Function:  get_vertices (PUBLIC)
//Description: get the list of ChollaPoints on this surface
//Author: sjowen
//Date: 09/11/09
//=============================================================================
void ChollaSurface::get_vertices( DLIList<ChollaPoint *> &chpt_list )
{
  chpt_list.clean_out();
  ChollaCurve *chcurv_ptr;
  for (int ii=0; ii<curveList.size(); ii++)
  {
    chcurv_ptr = curveList.get_and_step();
    DLIList<ChollaPoint *> chc_pts = chcurv_ptr->get_points(); 
    chpt_list += chc_pts;
  }
  chpt_list.uniquify_unordered();
}
开发者ID:chrismullins,项目名称:cgma,代码行数:18,代码来源:ChollaSurface.cpp

示例3: process_rounds

void SimplifyTool::process_rounds(RefVolume* ref_volume,
                                  double min_radius, 
                                  double max_radius)
{
    DLIList<RefEdge*> edges;
    ref_volume->ref_edges(edges);

    DLIList<RefFace*> rounds;

    // a edge must have curvature within the tolerance
    for(int j = edges.size();j--;)
    {
        RefEdge* edge = edges.get_and_step();
        CubitVector loc,tan,curv;
        edge->closest_point(edge->curve_center(),loc,&tan,&curv);

        double curv_mag = curv.length();

        if(curv_mag > GEOMETRY_RESABS &&
            1.0/curv_mag >= min_radius &&
            1.0/curv_mag <= max_radius)
        {
            DLIList<RefFace*> new_rounds;
            edge->ref_faces(new_rounds);
            rounds+=new_rounds;
        }

    }

    rounds.uniquify_unordered();
    for(int i = rounds.size();i--;)
    {
        // cull any flat surfaces
        RefFace* curr_face = rounds.get_and_step();

        double curve_0,curve_1;
        curr_face->get_principal_curvatures(curr_face->center_point(),curve_0,curve_1);
        curve_0 = fabs(curve_0);
        curve_1 = fabs(curve_1);

        if((curve_0 > GEOMETRY_RESABS &&
            1.0/curve_0 >= min_radius &&
            1.0/curve_0 <= max_radius) ||
            (curve_1 > GEOMETRY_RESABS &&
            1.0/curve_1 >= min_radius &&
            1.0/curve_1 <= max_radius))     
        {
            GfxDebug::highlight_ref_face(curr_face);
        }
    }
}
开发者ID:chrismullins,项目名称:cgma,代码行数:51,代码来源:SimplifyTool.cpp

示例4: simplify_surfaces

CubitStatus SimplifyTool::simplify_surfaces(DLIList<RefFace*> ref_face_list, 
                                            double angle_in,
                                            DLIList<RefFace*> respect_face_list,
                                            DLIList<RefEdge*> respect_edge_list,
                                            CubitBoolean respect_rounds,
                                            CubitBoolean respect_imprints,
                                            CubitBoolean local_normals,
                                            CubitBoolean preview)
{
    CubitStatus status = CUBIT_FAILURE;
    ref_face_list.uniquify_unordered();
    while(ref_face_list.size())
    {
        DLIList<RefFace*> ref_faces_in_volume;
        ref_face_list.reset();
        RefFace* cur_face = ref_face_list.get_and_step();
        RefVolume* cur_vol = cur_face->ref_volume();
        ref_faces_in_volume.append(cur_face);
        for(int i =1;i<ref_face_list.size();i++)
        {
            RefFace* face = ref_face_list.get_and_step();
            if(face->ref_volume() == cur_vol)
                ref_faces_in_volume.append(face);
        }

        if(ref_faces_in_volume.size()>1)
        {
            status = simplify_surfaces_in_volume(
                ref_faces_in_volume,
                angle_in,
                respect_face_list,
                respect_edge_list,
                respect_rounds,
                respect_imprints,
                local_normals,
                preview);
        }
        ref_face_list -= ref_faces_in_volume;
    }

    if(preview)
        GfxDebug::flush();

    return CUBIT_SUCCESS;
}
开发者ID:chrismullins,项目名称:cgma,代码行数:45,代码来源:SimplifyTool.cpp

示例5: simplify_curves_in_volume


//.........这里部分代码省略.........
                if(respect_vertex_list.is_in_list(ref_vertex_ptr))
                    continue;

                DLIList<RefEdge*> attached_ref_edges;
                ref_vertex_ptr->ref_edges( attached_ref_edges );

                attached_ref_edges.remove(seed_ref_edge);
                ref_edge_ptr = attached_ref_edges.size()!=0?attached_ref_edges.get():0;

                // keep the face if we want it respected
                if(attached_ref_edges.size() == 1 &&
                    respect_edge_list.is_in_list(attached_ref_edges.get()))
                    continue;

                // Don't consider ref_faces that are already in the list
                if( attached_ref_edges.size() == 1 &&
                    !ref_edge_ptr->marked())
                {
                    DLIList<RefVolume*> ref_volumes;
                    ref_edge_ptr->ref_volumes( ref_volumes );
                    if( !ref_volumes.size() || ref_volumes.size()==1 )
                    {
                        // Only add the ref_face if it meets the feature angle criteria
                        if(composite_curves(seed_ref_edge,ref_edge_ptr,angle_in))
                        {
                          ref_edge_ptr->marked( CUBIT_TRUE );
                          seed_edges.append(ref_edge_ptr);
                          composite_edges.append(ref_edge_ptr);
                        }
                    }
                }
            }
        }
        composite_edges.uniquify_unordered();
        ref_edge_list -= composite_edges;

        if(!preview &&
            composite_edges.size()>1)
        {
            DLIList<RefVertex*> result_vertices;
            DLIList<RefEdge*> result_edges;
            CompositeTool::instance()->composite(
                composite_edges,
                result_edges,
                &result_vertices);

            combined_edge_count +=composite_edges.size();
            for(int m = result_edges.size();m--;)
                result_edges.get_and_step()->marked(CUBIT_TRUE);

            new_edge_count+=result_edges.size();
        }
        else if(preview)
        {
            int edge_count = composite_edges.size();
            for(int i =0;i<edge_count;i++)
            {
                RefEdge* cur_comp_edge = composite_edges[i];
                DLIList<RefVertex*> refvertices; 
                for(int j =0;j<edge_count;j++)
                {
                    if(i==j) continue;
                    composite_edges[j]->ref_vertices(refvertices);
                }

                refvertices.uniquify_unordered();
开发者ID:chrismullins,项目名称:cgma,代码行数:67,代码来源:SimplifyTool.cpp


注:本文中的DLIList::uniquify_unordered方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。