Subject: CGAL users discussion list
List archive
- From: Sean McDuffee <>
- To:
- Subject: [cgal-discuss] meshing a disk implicitly with circle_3
- Date: Tue, 24 Mar 2009 02:21:46 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=XBJJfVWLzOiRLDa3IJZeLE8rLuDaonlcThVMmPlVtSt+OoXu5GOmWPYR3BlTh92QCM fA6XH/oarCvWsA/l3BRUKaNZ43FrjexiV1w9brICydxtrnS8QTxnkvzqYm+i/G2pPPee abMnLSKTnjraF4obafukCq4pto3G136D+3PT8=
Hi,
I'm trying to generate a meshed disk using the following code but end up with a cylinder.
typedef CGAL::Surface_mesh_default_triangulation_3 Tr;
typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;
typedef Tr::Geom_traits GT;
typedef Tr::Vertex_handle Vertex_handle;
typedef GT::Sphere_3 Sphere_3;
typedef GT::Circle_3 Circle_3;
typedef GT::Vector_3 Vector_3;
typedef GT::Point_3 Point_3;
typedef GT::FT FT;
typedef FT (*Function)(Point_3);
typedef CGAL::Implicit_surface_3<GT, Function> Surface_3;
FT circle_function (Point_3 p) {
const FT x2=p.x()*p.x(), y2=p.y()*p.y();
return x2+y2-1;
}
int main(int argc, char* argv[]) {
Tr tr;
C2t3 c2t3 (tr);
Surface_3 circle_surface(circle_function,
Circle_3(CGAL::ORIGIN, 4., Vector_3(0.,0.,1.)));
CGAL::Surface_mesh_default_criteria_3<Tr> criteria(30.,
0.1,
0.1);
CGAL::make_surface_mesh(c2t3, circle_surface, criteria, CGAL::Non_manifold_tag());
}
Anybody spot what I'm doing wrong? thanks
Sean
- [cgal-discuss] meshing a disk implicitly with circle_3, Sean McDuffee, 03/24/2009
- Re: [cgal-discuss] meshing a disk implicitly with circle_3, Sean McDuffee, 03/24/2009
Archive powered by MHonArc 2.6.16.