Scilab Function
Last update : November 2005

cgal_mesh2_delete - Delete a pointer that represent cgal_mesh2.

Calling Sequence

cgal_mesh2_delete(ptr,"ptr")
cgal_mesh2_delete()

Parameters

Description

Given a pointer ptr of cgal_mesh2, cgal_mesh2_delete(ptr,"ptr") frees the memory holded by the pointer ptr and clears ptr in Scialb interpreter. if no parameters are given to cgal_mesh2_delete(), then all pointers of differents mesh2 will be deleted.

Examples


C=[1 1 5 1; 5 1 7 3; 7 3 4 4; 4 4 3 6; 3 6 1 5; 1 5 1 1;...
5 2 5 3; 5 3 3 4; 3 4 2 2; 2 2 5 2];
[coord,tri,ptr]= cgal_mesh_2(C);
cgal_mesh2_set_seeds(ptr,3.5,2.5);
tri = cgal_mesh2_get_connectivity(ptr);
coord = cgal_mesh2_get_coord(ptr);
clf();
[nbtri,nb] = size(tri);
tri = [tri tri(:,1)];
x=coord(:,1)';
y=coord(:,2)';
for k = 1:nbtri
plot2d(x(tri(k,:)),y(tri(k,:)),style = 2);
end
cgal_mesh2_delete(ptr,"ptr"); // ptr is deleted here and cleared from scilab interpreter.
ptr
!--error     4
undefined variable : ptr
//example 2:
[[coord,tri,ptr1]= cgal_mesh_2(C);
clear ptr1; // ptr is not yet defined in scilab interpreter, but the memory is not freed.
cgal_mesh2_delete(); // all pointers of mesh2 will be deleted.

See Also

cgal_mesh_2 ,   cgal_mesh2_set_seeds ,   cgal_mesh2_get_connectivity ,   cgal_mesh2_refine ,   cgal_mesh2_get_coord ,  

This function uses the Mesh_2 package of CGAL, which is under QPL license. See License Terms

Authors

Naceur MESKINI.