Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

combining face

combining face
Tamer Yildirgan 2012/12/17 19:46
I have a file that contains triangles but it is not stl file. I create surface from trianlges but display is not good. it is not smooth. I want to show like a one shape. I use below code but it is useless. How can i combine hundred of faces and show them like a one face.
          for(int k1 = curIndex ; k1 < nextBreak*3 -3; k1+=3 )
               gp_Pnt p2(vertexLst[k1],vertexLst[k1+1],vertexLst[k1+2]);
               gp_Pnt p3(vertexLst[k1+3],vertexLst[k1+4],vertexLst[k1+5]);

               TopoDS_Edge Edge1 = BRepBuilderAPI_MakeEdge(p1,p2);     
               TopoDS_Edge Edge2 = BRepBuilderAPI_MakeEdge(p1,p3);     
               TopoDS_Edge Edge3 = BRepBuilderAPI_MakeEdge(p2,p3);
               TopoDS_Wire YellowWire;     

               BRepBuilderAPI_MakeWire MW1(Edge1,Edge2,Edge3);     
               if (MW1.IsDone()) {     
                    YellowWire = MW1;     
               TopoDS_Face BrownFace = BRepBuilderAPI_MakeFace(YellowWire,TRUE); aBuilder.Add(aCompound,BrownFace);
Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map