splitFV - Partition a mesh into its connected components.

Splits a 2D or 3D mesh defined by faces and vertices into separately connected mesh pieces. [2025 update for vastly faster performance]

이 제출물을 팔로우합니다

SPLITFV Partition a mesh into its connected components.
FVARRAY = SPLITFV(FV) - FV is a struct with .faces and .vertices
FVARRAY = SPLITFV(F, V) - F is faces matrix, V is vertices matrix
FVARRAY = SPLITFV(TR) - TR is a MATLAB triangulation object
DESCRIPTION:
Connectivity is determined by mapping vertices to "nodes" in a graph.
By default, connectivity is strict (index-based), but can be adjusted
to weld vertices that are spatially coincident but indexed separately.
NAME-VALUE OPTIONS:
Tolerance - Determines how vertices are "connected" into a graph:
NaN (Default): Strict index connectivity. Only faces
sharing the exact same vertex index are connected.
0: Exact spatial connectivity. Vertices at identical
[x,y,z] coordinates are treated as shared nodes.
>0: Fuzzy spatial connectivity. Vertices within this
Euclidean distance are treated as shared nodes.
Note: Original node counts will not change - Tolerance
values only affects how meshes are split
EXAMPLE:
fullpatch.vertices = [2 4; 2 8; 8 4; 8 0; 0 4; 2 6; 2 2; 4 2; 4 0; 5 2; 5 0];
fullpatch.faces = [1 2 3; 1 3 4; 5 6 1; 7 8 9; 11 10 4];
tiledlayout(2,1);
nexttile;
patch('Faces',fullpatch.faces,'Vertices',fullpatch.vertices,'FaceColor','r');
title('Unsplit Mesh'); axis tight equal; grid on;
splitpatch = splitFV(fullpatch);
nexttile; hold on;
colours = lines(length(splitpatch));
for i=1:length(splitpatch)
patch(splitpatch(i),'FaceColor',colours(i,:));
end
title('Split Mesh'); view(2); axis tight equal; grid on;

인용 양식

Sven (2026). splitFV - Partition a mesh into its connected components. (https://kr.mathworks.com/matlabcentral/fileexchange/27667-splitfv-partition-a-mesh-into-its-connected-components), MATLAB Central File Exchange. 검색 날짜: .

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
2.0.0.0

Major overhaul to improve performance (graph logic instead of iterative loops), allow a tolerance to handle splitting while keeping adjacent meshes together, and including triangulation objects

1.7.0.0

Implemented Christopher's amendment to fix bug in following connectivity matrix.

1.6.0.0

Updated icon (thanks Tom Clark!)

1.0.0.0