Closed zjuzhh closed 1 year ago
TColStd_HPackedMapOfInteger
holds a collection of indices pointing to points in AIS_PointCloud
.
Handle(AIS_PointCloud) aCloud = ...;
Handle(AIS_PointCloudOwner) anOwner = ...;
Handle(Graphic3d_ArrayOfPoints) aPoints = aCloud->GetPoints();
Handle(TColStd_HPackedMapOfInteger)& aSelPoints = anOwner->SelectedPoints();
for (TColStd_PackedMapOfInteger::Iterator aPntIter (aSelPoints->Map(); aPntIter.More(); aPntIter.Next())
{
int aPntIndex = aPntIter.Key();
gp_Pnt aPnt = aPoints->Vertice (aPntIndex + 1);
...
}
Hello @gkv311 , I ues your example to display some cad model(ais_shape) and pointcloud model(ais_pointcloud)succesfully, but when i want to select some points from an ais_pointcloud,it's not the same as selecting TopAbs_Face from the AIS_Slection. The schematic diagram is as follows: The code I select TopAbs_Face from an ais_shape object is as follows: