Open CASCADE Technology 7.1.0
https://www.opencascade.com/doc/occt-7.1.0/overview/html/occt_user_guides__iges.html
一、
a root entity is the highest level entity of any given type, e.g. type 144 for surfaces and type 186 for solids. Roots are not referenced by other entities.
TopTools_ListOfShape shapes ; TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.,0.,0.), gp_Pnt(50.,0.,0.)); TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(gp_Pnt(50.,0.,0.), gp_Pnt(50.,50.,0.)); TopoDS_Edge E3 = BRepBuilderAPI_MakeEdge(gp_Pnt(50.,50.,0.), gp_Pnt(0.,0.,0.)); TopoDS_Wire W = BRepBuilderAPI_MakeWire(E1,E2,E3); TopoDS_Face F; F=BRepBuilderAPI_MakeFace(W); shapes.Append(F); SaveIges("wireToFace.iges", shapes);we get:(144)
二、
TopTools_ListOfShape shapes ; for(int i=9;i<20;i++) { TopoDS_Edge theCircle=BRepBuilderAPI_MakeEdge(gp_Circ(gp::XOY(), i*10+0.5)); shapes.Append(theCircle); } SaveIges("many_ciecles.iges", shapes);we get:
三、good sample