OCC TopExp_Explorer 用法
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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;
}
本文由作者按照 CC BY 4.0 进行授权