How to improve interactive performance for large STL meshes in OCCT 7.5?

I am currently using Open CASCADE Technology (OCCT) 7.5 to load a large STL model of approximately 1.9 GB.
After reading the file and displaying it using AIS_Shape, I experience severe performance issues during basic interactions such as model rotation, translation, and bounding box updates.

The viewer often freezes for several seconds even for simple transformations.

I would like to ask whether there are recommended best practices or optimization techniques in OCCT for handling very large STL meshes. In particular:

*Are there performance considerations when using AIS_Shape for large triangulated models?

*Are there preferred approaches such as MeshVS, AIS_Triangulation, or other visualization methods for large STL data?

*Are there recommended ways to manage Bnd_Box updates and transformations efficiently?

Any guidance on improving interactive performance with large mesh-based models would be greatly appreciated.

gkv311 n's picture

What is your current approach to read and display STL file?

STL file doesn't define B-Rep information, so the usual way is to display it as a mesh object in a CAD viewer:

// read STL
Handle(Poly_Triangulation) aTriangles = RWStl::ReadFile("myfile.stl");

// wrap it into a triangulation-only face for visualization
TopoDS_Face aFace;
BRep_Builder().MakeFace(aFace, aTriangles);

// display in the viewer
Handle(AIS_Shape) aPrs = new AIS_Shape(aFace);
theCtx->Display (aPrs, AIS_Shaded, 0, false);
...