Exemplo n.º 1
0
void PartitionShell::get_children_virt( DLIList<TopologyBridge*>& children )
{
  PartitionCoSurf* cos = 0;
  while( (cos = next_co_surface( cos )) )
    if( cos->get_surface() )
      children.append_unique( cos->get_surface() );
}
Exemplo n.º 2
0
void FacetShell::get_surfaces( DLIList<FacetSurface*>& result_list )
{
  mySurfs.reset();
  for ( int i = 0; i < mySurfs.size(); i++ )
    if ( FacetSurface* surf = dynamic_cast<FacetSurface*>(mySurfs.next(i)) )
      result_list.append_unique(surf);
}
Exemplo n.º 3
0
void FacetLump::get_children_virt(DLIList<TopologyBridge*> &shellsms)
{
  int ii;
  for ( ii = myShells.size(); ii > 0; ii-- )
  {
    shellsms.append_unique(myShells.get_and_step());
  }
}
Exemplo n.º 4
0
int OCCSurface::get_loops( DLIList<OCCLoop*>& result_list )
{
  TopTools_IndexedMapOfShape M;
  TopExp::MapShapes(*myTopoDSFace, TopAbs_WIRE, M);
  int ii;
  for (ii=1; ii<=M.Extent(); ii++) {
     TopologyBridge *loop = OCCQueryEngine::instance()->occ_to_cgm(M(ii));
     result_list.append_unique(dynamic_cast<OCCLoop*>(loop));
  }
  return result_list.size();
}
Exemplo n.º 5
0
void OCCSurface::get_children_virt( DLIList<TopologyBridge*>& children )
{
  TopTools_IndexedMapOfShape M;
  TopExp::MapShapes(*myTopoDSFace, TopAbs_WIRE, M);
  int ii;
  for (ii=1; ii<=M.Extent(); ii++) {
     TopologyBridge *loop = OCCQueryEngine::instance()->occ_to_cgm(M(ii));
     if(loop)
       children.append_unique(loop);
  }
}
Exemplo n.º 6
0
void FacetPoint::get_loops( DLIList<FacetLoop*>& result_list )
{
  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();
    FacetLoop* loop = dynamic_cast<FacetLoop*>(coedge->get_loop());
    if (loop)
      result_list.append_unique(loop);
  }
}
Exemplo n.º 7
0
void FacetPoint::get_surfaces( DLIList<FacetSurface*>& result_list )
{
  DLIList<FacetLoop*> loop_list;
  get_loops( loop_list );
  loop_list.reset();
  for ( int i = loop_list.size(); i--; )
  {
    FacetLoop* loop = loop_list.get_and_step();
    FacetSurface* surface = dynamic_cast<FacetSurface*>(loop->get_surface());
    if (surface)
      result_list.append_unique(surface);
  }
}
Exemplo n.º 8
0
void FacetSurface::get_bodies( DLIList<FacetBody*>& result_list )
{
  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);
  }
}
Exemplo n.º 9
0
void FacetLump::get_curves( DLIList<FacetCurve*>& result_list )
{
  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);
  }
}
Exemplo n.º 10
0
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 );
    }
  }
}
Exemplo n.º 11
0
void FacetCoEdge::get_lumps( DLIList<FacetLump*>& result_list )
{
  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);
  }
}
Exemplo n.º 12
0
int OCCSurface::get_curves( DLIList<OCCCurve*>& result_list )
{
  DLIList<OCCCoEdge*> coedge_list;
  get_coedges( coedge_list );
  coedge_list.reset();
  for ( int i = coedge_list.size(); i--; )
  {
    OCCCoEdge* coedge = coedge_list.get_and_step();
    OCCCurve* curve = dynamic_cast<OCCCurve*>(coedge->curve());
    if (curve)
      result_list.append_unique(curve);
  }
  return result_list.size();
}
Exemplo n.º 13
0
void OCCBody::get_all_curves(DLIList<OCCCurve*> &curves)
{
  TopoDS_Shape *shape;
  get_TopoDS_Shape(shape);

  TopTools_IndexedMapOfShape M;
  TopExp::MapShapes(*shape, TopAbs_EDGE, M);
  int ii;
  for (ii=1; ii<=M.Extent(); ii++) {
       TopologyBridge *curve = OCCQueryEngine::instance()->occ_to_cgm(M(ii));
       OCCCurve* occ_curve = CAST_TO(curve, OCCCurve);
       if (occ_curve)
         curves.append_unique(occ_curve);
  }
}
Exemplo n.º 14
0
//===============================================================================
//Function:  get_surfaces (PUBLIC) 
//===============================================================================
void ChollaPoint::get_surfaces(DLIList<ChollaSurface *> &surf_list)
{
  int ii, jj;
  ChollaCurve *curv_ptr;
  DLIList<ChollaSurface*> *surf_list_ptr;
  ChollaSurface *surf_ptr;

  curveList.reset();
  for(ii=0; ii<curveList.size(); ii++)
  {
    curv_ptr = curveList.get_and_step();
    surf_list_ptr = curv_ptr->get_surface_list_ptr();
    for(jj=0; jj<surf_list_ptr->size(); jj++)
    {
      surf_ptr = surf_list_ptr->get_and_step();
      surf_list.append_unique( surf_ptr );
    }
  }
}
Exemplo n.º 15
0
CubitStatus OCCSurface::get_bodies(DLIList<OCCBody*>& bodies)
{
   TopoDS_Face* topo_face = this->get_TopoDS_Face();
   OCCQueryEngine* oqe = OCCQueryEngine::instance();
   DLIList <OCCBody* > *all_bodies = oqe->BodyList;
   TopTools_IndexedDataMapOfShapeListOfShape M;
   OCCBody * body = NULL;
   for(int j = 0; j <  all_bodies->size(); j++)
   {
     body = all_bodies->get_and_step();
     TopExp_Explorer Ex;
     TopoDS_Face the_face;
     TopoDS_Shape ashape = *(body->get_TopoDS_Shape());
     M.Clear();
     TopExp::MapShapesAndAncestors(ashape, TopAbs_FACE, TopAbs_COMPSOLID, M);
     if(!M.Contains(*topo_face))
       continue;
     bodies.append_unique(body);
  }
  return CUBIT_SUCCESS;
}
Exemplo n.º 16
0
void OCCBody::get_all_points(DLIList<OCCPoint*> &points)
{
  TopoDS_Shape *shape;
  get_TopoDS_Shape(shape);

  TopTools_IndexedMapOfShape M;
  TopExp::MapShapes(*shape, TopAbs_VERTEX, M);
  int ii;
  for (ii=1; ii<=M.Extent(); ii++) {
       TopologyBridge *vertex = OCCQueryEngine::instance()->occ_to_cgm(M(ii));
       OCCPoint* occ_point = CAST_TO(vertex, OCCPoint);
       if (occ_point)
         points.append_unique(occ_point);
  }

  DLIList<OCCSurface*> surfaces;
  this->get_all_surfaces(surfaces);
  for(int i = 0; i < surfaces.size(); i++)
  {
    OCCSurface* occ_surf = surfaces.get_and_step();
    points += occ_surf->get_hardpoints();
  }
}
Exemplo n.º 17
0
void FacetLump::get_parents_virt(DLIList<TopologyBridge*> &bodies) 
{
  if (myBodyPtr != NULL )
    bodies.append_unique(myBodyPtr);
}