How to fast display >5000 3D solid(Box) ?

I need display 5000 or 8000 3D solid,The solid can be a 3D Box.But When i try it,the program is crash.When i make 2000~3000 3D box,Them can be display,But it is very very slow.
So,I want find a way to fast display >5000 3D solid.And every solid is separate,every solid have different color.How to do it ?

Hugues Delorme's picture

How do you display your 3D solids ? Each solid is in an AIS_Shape object ?

ttssy's picture

Yes,each solid is in an AIS_Shape object.Because,I need every 3d solid have different color and can be select.

Denis Teissandier's picture

A suggestion :

BRep_Builder aBuilderAnnotation;
TopoDS_Compound anAnnotation;
aBuilderAnnotation.MakeCompound(anAnnotation);
aBuilderAnnotation.Add(anAnnotation, aShapeToDisplayed);

AIS_Shape aGlobalShapeToDisplayed= new AIS_Shape(anAnnotation);
Then, you can display aGlobalShapeToDisplayed.

Denis

Hugues Delorme's picture

This would effectively speed up the display, but how do you set a different color for each 3D box ?

Sharjith Naramparambath's picture

Generally such large assemblies require heavy graphics and cpu.
Probably this should solve your problem.

Regards
N. Sharjith