| 388 | } |
| 389 | |
| 390 | Mesh Mesh::cloneRegion( const FaceBitSet & region, bool flipOrientation, const PartMapping & map ) const |
| 391 | { |
| 392 | MR_TIMER; |
| 393 | |
| 394 | Mesh res; |
| 395 | const auto fcount = region.count(); |
| 396 | res.topology.faceReserve( fcount ); |
| 397 | const auto vcount = getIncidentVerts( topology, region ).count(); |
| 398 | res.topology.vertReserve( vcount ); |
| 399 | const auto ecount = 2 * getIncidentEdges( topology, region ).count(); |
| 400 | res.topology.edgeReserve( ecount ); |
| 401 | |
| 402 | res.addMeshPart( { *this, ®ion }, flipOrientation, {}, {}, map ); |
| 403 | |
| 404 | assert( res.topology.faceSize() == fcount ); |
| 405 | assert( res.topology.faceCapacity() == fcount ); |
| 406 | assert( res.topology.vertSize() == vcount ); |
| 407 | assert( res.topology.vertCapacity() == vcount ); |
| 408 | assert( res.topology.edgeSize() == ecount ); |
| 409 | assert( res.topology.edgeCapacity() == ecount ); |
| 410 | return res; |
| 411 | } |
| 412 | |
| 413 | void Mesh::pack( FaceMap * outFmap, VertMap * outVmap, WholeEdgeMap * outEmap, bool rearrangeTriangles ) |
| 414 | { |
no test coverage detected