splitFV - Partition a mesh into its connected components.

버전 2.0.0.0 (2.91 KB) 작성자: Sven
Splits a 2D or 3D mesh defined by faces and vertices into separately connected mesh pieces. [2025 update for vastly faster performance]
다운로드 수: 1.8K
업데이트 날짜: 2026/1/8

라이선스 보기

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 릴리스 호환 정보
개발 환경: R2025b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Polygons에 대해 자세히 알아보기
버전 게시됨 릴리스 정보
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