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

Color faces of STL file

Thanh Hai Tuan Tran's picture


I have a problem:

I have a STL file of part. For example, I want to color all the triangular faces made up a cylindrical faces. If I use these lines of code after for loop to find out a triangle to color it, it is ok if there is just a cylindrical faces. But if there are about 50 cylindrical faces in part, the processing time will really long.

So, my idea is getting all the indexes of triangles in cylindrical faces, put them into a variable (or sth like that) and after the loop to search triangles, I will show this variable once.

Anyone can me help me for the solution? Or any other suggestions will be appreciated.

Thanks in advance.


Handle(AIS_Shape) anAIS1 = new AIS_Shape(faceCurrent);



getContext()->Display(anAIS1, true);