| 307 | } |
| 308 | |
| 309 | void Mesh::attachEdgeLoopPart( EdgeId first, EdgeId last, const std::vector<Vector3f>& contourPoints ) |
| 310 | { |
| 311 | if ( topology.left( first ) || topology.left( last ) ) |
| 312 | { |
| 313 | assert( false ); |
| 314 | return; |
| 315 | } |
| 316 | if ( contourPoints.empty() ) |
| 317 | return; |
| 318 | |
| 319 | auto newEdges = sMakeEdgePath( *this, contourPoints ); |
| 320 | |
| 321 | // connect with mesh |
| 322 | auto firstConnectorEdge = topology.makeEdge(); |
| 323 | topology.splice( topology.prev( first.sym() ), firstConnectorEdge ); |
| 324 | topology.splice( newEdges.front(), firstConnectorEdge.sym() ); |
| 325 | |
| 326 | topology.splice( last, newEdges.back().sym() ); |
| 327 | |
| 328 | invalidateCaches(); |
| 329 | } |
| 330 | |
| 331 | EdgeId Mesh::splitEdge( EdgeId e, const Vector3f & newVertPos, FaceBitSet * region, FaceHashMap * new2Old ) |
| 332 | { |