AIS_PointCloud doesnt show any points

Hello Guys,
I decided to use AIS_PointCloud to draw set of points.
My code is below:
BRepMesh_IncrementalMesh(shape, 0.1);
std::vector<gp_Pnt> vecPoints;
GA_COMMON::CollectPoints(shape, vecPoints);
Handle(Graphic3d_ArrayOfPoints) thePoints = new Graphic3d_ArrayOfPoints(vecPoints.size(), true, false);
for (const auto& p : vecPoints)
thePoints->AddVertex(p, color);

Handle(AIS_PointCloud) hAisShape = new AIS_PointCloud();
m_hContext->Display(hAisShape, Standard_True);

But I do not see any point on my screen.
Could you help me ?
With respects, Eugene.

Eugene Zaliznyak's picture

It shows in mode DM_BndBox, but nothing in mode DM_Points.

Kirill Gavrilov's picture

thePoints->AddVertex(p, color);

Which "color" do you set here / on which background for you show cloud?

Eugene Zaliznyak's picture

Hello Kirill,
It is dark green on blue.
But I think I solved the issue. I tested it on a simple models where is not so a lot of points in triangulation.
Mostly flat faces.

With respects, Eugene.