| 206 | } |
| 207 | |
| 208 | FaceBitSet getLargeByVolumeComponents( const MeshPart& mp, float minVolume ) |
| 209 | { |
| 210 | if ( !mp.mesh.topology.isClosed( mp.region ) ) |
| 211 | { |
| 212 | assert( !"getLargeByVolumeComponents: require closed mesh part" ); |
| 213 | return {}; |
| 214 | } |
| 215 | auto mapAndNum = MeshComponents::getAllComponentsMap( mp ); |
| 216 | Vector<double, RegionId> volumes( mapAndNum.second, 0.0 ); |
| 217 | auto region = mp.mesh.topology.getFaceIds( mp.region ); |
| 218 | for ( auto f : region ) |
| 219 | { |
| 220 | auto fp = mp.mesh.getTriPoints( f ); |
| 221 | volumes[mapAndNum.first[f]] += mixed( Vector3d( fp[0] ), Vector3d( fp[1] ), Vector3d( fp[2] ) ); |
| 222 | } |
| 223 | BitSetParallelFor( region, [&] ( FaceId f ) |
| 224 | { |
| 225 | if ( std::abs( volumes[mapAndNum.first[f]] ) < minVolume ) |
| 226 | region.reset( f ); |
| 227 | } ); |
| 228 | return region; |
| 229 | } |
| 230 | |
| 231 | Expected<FaceBitSet> expandToComponents( const MeshPart& mp, const FaceBitSet& seeds, const ExpandToComponentsParams& params /*= {} */ ) |
| 232 | { |
nothing calls this directly
no test coverage detected