splitFV - split a mesh

버전 1.7.0.0 (2.84 KB) 작성자: Sven
Splits a 2D or 3D mesh defined by faces and vertices into separately connected mesh pieces.
다운로드 수: 1.7K
업데이트 날짜: 2014/6/24

라이선스 보기

FVOUT = SPLITFV(F,V) separates disconnected pieces inside a patch defined by faces (F) and
vertices (V). FVOUT is a structure array with fields "faces" and "vertices". Each element of
this array indicates a separately connected patch.
FVOUT = SPLITFV(FV) takes in FV as a structure with fields "faces" and "vertices"

For 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];
figure, subplot(2,1,1), patch(fullpatch,'facecolor','r'), title('Unsplit mesh');
splitpatch = splitFV(fullpatch);
colours = lines(length(splitpatch));
subplot(2,1,2), hold on, title('Split mesh');
for i=1:length(splitpatch)
patch(splitpatch(i),'facecolor',colours(i,:));
end

Note: faces and vertices should be defined such that faces sharing a coincident vertex reference
the same vertex number, rather than having a separate vertice defined for each face (yet at the
same vertex location). In other words, running the following command: size(unique(v,'rows') ==
size(v) should return TRUE. An explicit test for this has not been included in this function so
as to allow for the deliberate splitting of a mesh at a given location by simply duplicating
those vertices.

See also PATCH

인용 양식

Sven (2024). splitFV - split a mesh (https://www.mathworks.com/matlabcentral/fileexchange/27667-splitfv-split-a-mesh), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Polygons에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
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