So I used GEO_HedgeInterface to achieve it, but the performance is very low.
this code same as GU_Detail::buildRingZeroPoints():
std::vector<GA_Offset> neighbours(GU_Detail* gdp, GEO_HedgeInterface& halfEdgeIfer, const GA_Offset &ptnum) { // build a list std::vector <GA_Offset> nbs; // GEO_Hedge iterEdge = halfEdgeIfer.firstIncidentEdge(ptnum); GEO_Hedge endEdge = iterEdge; while(1){ auto srcptoff = halfEdgeIfer.srcPoint(iterEdge); auto endptoff = halfEdgeIfer.dstPoint(iterEdge); std::vector<GA_Offset>::iterator srcpt_find = std::find(nbs.begin(), nbs.end(), srcptoff); std::vector<GA_Offset>::iterator endpt_find = std::find(nbs.begin(), nbs.end(), endptoff); if (srcptoff != ptnum && (srcpt_find == nbs.end())) { nbs.emplace_back(srcptoff); } if (endptoff != ptnum && (endpt_find == nbs.end())) { nbs.emplace_back(endptoff); } iterEdge = halfEdgeIfer.nextIncidentEdge(iterEdge, ptnum); if (iterEdge == endEdge) break; } return std::move(nbs); }
How to achieve higher performance in this way? In other words, there are other methods that have the same performance as GU_Detail::buildRingZeroPoints()
thanks