[Gmsh] Question: OCCVertex.h File

Chaman Singh Verma csv610 at gmail.com
Mon Jun 8 18:52:03 CEST 2009


Hello,

I checked the source code of OCCVertex.h and wondering what the second while
loop doing and
what is special about Seam edges in this code ?

Thanks.
csv

SPoint2 OCCVertex::reparamOnFace(const GFace *gf, int dir) const
{

std::list<GEdge*>::const_iterator it = l_edges.begin();
  while(it != l_edges.end()){
    std::list<GEdge*> l = gf->edges();
    if(std::find(l.begin(), l.end(), *it) != l.end()){
      if((*it)->isSeam(gf)){
        const TopoDS_Face *s = (TopoDS_Face*)gf->getNativePtr();
        const TopoDS_Edge *c = (TopoDS_Edge*)(*it)->getNativePtr();
        double s1,s0;
        Handle(Geom2d_Curve) curve2d = BRep_Tool::CurveOnSurface(*c, *s, s0,
s1);
        if((*it)->getBeginVertex() == this)
          return (*it)->reparamOnFace(gf, s0, dir);
        else if((*it)->getEndVertex() == this)
          return (*it)->reparamOnFace(gf, s1, dir);
      }
    }
    ++it;
  }

  it = l_edges.begin();
  while(it != l_edges.end()){
    std::list<GEdge*> l = gf->edges();
    if(std::find(l.begin(), l.end(), *it) != l.end()){
      const TopoDS_Face *s = (TopoDS_Face*)gf->getNativePtr();
      const TopoDS_Edge *c = (TopoDS_Edge*)(*it)->getNativePtr();
      double s1,s0;
      Handle(Geom2d_Curve) curve2d = BRep_Tool::CurveOnSurface(*c, *s, s0,
s1);
      if((*it)->getBeginVertex() == this)
        return (*it)->reparamOnFace(gf, s0, dir);
      else if((*it)->getEndVertex() == this)
        return (*it)->reparamOnFace(gf, s1, dir);
    }
    ++it;
  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090608/bbea338b/attachment.html>