Home > vbmeg > external > iso2mesh > extrudesurf.m

extrudesurf

PURPOSE ^

SYNOPSIS ^

function [node,face]=extrudesurf(no,fc,vec)

DESCRIPTION ^

 [node,face]=extrudesurf(no,fc,vec)
 
 create a enclosed surface mesh by extruding an open surface

 author: Qianqian Fang, <q.fang at neu.edu>

 input:

 output:
      node: 3D node coordinates for the generated surface mesh
      face: triangular face patches of the generated surface mesh, each
           row represents a triangle denoted by the indices of the 3 nodes

 -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [node,face]=extrudesurf(no,fc,vec)
0002 %
0003 % [node,face]=extrudesurf(no,fc,vec)
0004 %
0005 % create a enclosed surface mesh by extruding an open surface
0006 %
0007 % author: Qianqian Fang, <q.fang at neu.edu>
0008 %
0009 % input:
0010 %
0011 % output:
0012 %      node: 3D node coordinates for the generated surface mesh
0013 %      face: triangular face patches of the generated surface mesh, each
0014 %           row represents a triangle denoted by the indices of the 3 nodes
0015 %
0016 % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
0017 %
0018 
0019 nlen=size(no,1);
0020 if(length(vec)>1)
0021    node=[no; no+repmat(vec(:)', nlen,1)];
0022 else
0023    node=[no; no+vec*nodesurfnorm(no, fc)];
0024 end
0025 
0026 face=[fc; fc+nlen];
0027 
0028 edge=surfedge(fc);
0029 sideface=[edge edge(:,1)+nlen; edge+nlen edge(:,2)];
0030 face=[face; sideface];
0031 
0032

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005