For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

combining face

Tamer Yildirgan's picture

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 {
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);