Subject: CGAL users discussion list
List archive
- From: Nico Kruithof <>
- To:
- Subject: Re: [cgal-discuss] Problem using incremental_builder_3.
- Date: Sat, 21 Nov 2009 09:49:45 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RxSrpRFx1K0xGdnMZx98gYUnyBcwo/amgMsrY4nUfI06Jp2IYT6x+hZCV+uhYYrbtu pb9+M47D6VnkdgXRcaRl1fc0J4/Q6vqKugsCLbf2Hs2IjRbJzimRJwJskwbfw4CyP486 QVHgvwZCDlzosBQD7aVChf+6rN470x5BJc7hA=
Hi Gilles,
The surface should be orientable. The first triangle and the quadrilangle have inconsistent orientation (both have the edge from 0 to 1). The following order for the facets will probably work (not tested):
0 1 2
5 4 3
1 0 3 4
2 1 4 5
0 2 5 3
If you apply the right hand rule, all normals will point outward.
Bests,
Nico
On Sat, Nov 21, 2009 at 9:24 AM, Gilles <> wrote:
Hello CGALer,
(Sorry) I'm still a newbee in CGAL and I have this following problem :
Trying to build a simple prism (with a triangle base) and I get this error when
I try to build a facet sharing points with another one :
lookup_halfedge(): input error: facet 2 shares a halfedge from vertex 0 to
vertex 1 with facet 0.
My code is :
...
B.begin_surface(6,3,0);
//upper vertices
B.add_vertex( Point_3(-1,0,0));
B.add_vertex( Point_3(1,0,0));
B.add_vertex( Point_3(0,1,0));
//lower vertices
B.add_vertex( Point_3(-1,0,-1));
B.add_vertex( Point_3(1,0,-1));
B.add_vertex( Point_3(0,1,-1));
//upper-facet
B.begin_facet();
B.add_vertex_to_facet(0);
B.add_vertex_to_facet(1);
B.add_vertex_to_facet(2);
B.end_facet();
//bottom-facet
B.begin_facet();
B.add_vertex_to_facet(3);
B.add_vertex_to_facet(4);
B.add_vertex_to_facet(5);
B.end_facet();
// side-facet 1 of 3 (doing this make problem)
B.begin_facet();
B.add_vertex_to_facet(0);
B.add_vertex_to_facet(1);
B.add_vertex_to_facet(4);
B.add_vertex_to_facet(3);
B.end_facet();
B.end_surface();
...
What's wrong ?
Gilles
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [cgal-discuss] Problem using incremental_builder_3., Gilles, 11/21/2009
- Re: [cgal-discuss] Problem using incremental_builder_3., Nico Kruithof, 11/21/2009
- Re: [cgal-discuss] Problem using incremental_builder_3., Gilles Kneuss, 11/21/2009
- Re: [cgal-discuss] Problem using incremental_builder_3., Nico Kruithof, 11/21/2009
Archive powered by MHonArc 2.6.16.