//  created with md2edp examples/3d/extract-boundary3d.md
load "medit"
int n= 10;
int nvb = (n+1)^3 - (n-1)^3;// Nb boundary vertices
int ntb = n*n*12; // Nb of Boundary triangle 
mesh3 Th=cube(n,n,n); // lalels are from 1 to 6
int[int] ll=[1,3];//for example
meshS ThS=extract(Th,label=ll);// extract boundary of 3d Mesh with given label
plot(ThS);
