OCC TopExp_Explorer 用法

#include <iostream>
#include <TopoDS_Shape.hxx>
#include <TopExp_Explorer.hxx>

using namespace std;

int main()
{
  // Create a TopoDS_Shape object.
  TopoDS_Shape shape;

  // Create a TopExp_Explorer object and explore the shape.
  TopExp_Explorer exp(shape, TopAbs_FACE);

  // While there are more faces, print the face's name.
  while (exp.More())
  {
    cout << exp.Current().Name() << endl;
    exp.Next();
  }

  return 0;
}



    Enjoy Reading This Article?

    Here are some more articles you might like to read next:

  • NVIDIA GPU 架构:SP、SM 与 LSU 工作原理详解
  • al-folio 模板定制修改总结
  • al-folio 本地部署记录(Ubuntu 24.04)
  • C++ Traits
  • 道格拉斯-普克算法(Douglas–Peucker algorithm)