| 819 | } |
| 820 | |
| 821 | BaseUnionFind<FaceId> getUnionFindStructureFaces( const MeshTopology& topology, const FaceBitSet* region0, FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd ) |
| 822 | { |
| 823 | if ( incidence == FaceIncidence::PerEdge ) |
| 824 | return getUnionFindStructureFacesPerEdge( topology, region0, isCompBd ); |
| 825 | |
| 826 | MR_TIMER; |
| 827 | assert( !isCompBd ); |
| 828 | assert ( incidence == FaceIncidence::PerVertex ); |
| 829 | const FaceBitSet& region = topology.getFaceIds( region0 ); |
| 830 | UnionFind<FaceId> res( region.find_last() + 1 ); |
| 831 | VertBitSet store; |
| 832 | for ( auto v : getIncidentVerts( topology, region0, store ) ) |
| 833 | { |
| 834 | FaceId f0; |
| 835 | for ( auto edge : orgRing( topology, v ) ) |
| 836 | { |
| 837 | FaceId f1 = topology.left( edge ); |
| 838 | if ( !contains( region0, f1 ) ) |
| 839 | continue; |
| 840 | if ( !f0 ) |
| 841 | { |
| 842 | f0 = f1; |
| 843 | continue; |
| 844 | } |
| 845 | res.unite( f0, f1 ); |
| 846 | } |
| 847 | } |
| 848 | return res; |
| 849 | } |
| 850 | |
| 851 | BaseUnionFind<FaceId> getUnionFindStructureFaces( const MeshPart& meshPart, FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd ) |
| 852 | { |
no test coverage detected