File: surfreorient.m

package info (click to toggle)
octave-iso2mesh 1.9.8%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,128 kB
  • sloc: cpp: 11,982; ansic: 10,158; sh: 365; makefile: 59
file content (22 lines) | stat: -rw-r--r-- 675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function [newnode, newface] = surfreorient(node, face)
%
% [newnode,newface]=surfreorient(node,elem)
%
% reorder nodes in a single closed surface to ensure the norms of all
% triangles are pointing outward
%
% author: Qianqian Fang, <q.fang at neu.edu>
% date: 2012/07/06
%
% input:
%    node: list of nodes
%    face: list of surface triangles (each row are indices of nodes of each triangle)
%
% output:
%    newnode: the output node list, in most cases it equals node
%    newface: the face list with consistent ordering
%
% -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
%

[newnode, newface] = meshcheckrepair(node(:, 1:3), face(:, 1:3), 'deep');