Subject: CGAL users discussion list
List archive
- From: Query Cgal <>
- To:
- Subject: Re: [cgal-discuss] incident_facets function of a Delaunay triangulation
- Date: Sun, 22 Mar 2009 21:17:00 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=uv2LrJmIytZifaVCPxrbEME56Gqjk4QcFfM3kx6/7qHOa6tHwF1SohYvV2kcfmWPT0+km0ZqZQDUx1DRLWhEDqr7iiXyFaOqpGhJSnXQ98uzX0YLBKnsIYVndJ1EFNm1whtiM5p/gkLanb03r5hTQyG54a/wPHiQCIWPylOglgQ=;
Hi. Thank you for your reply. Finally, I have tried with the following code to use the incident_facets function. int main(array<System::String ^> ^args) { Delaunay_triangulation Dt; Dt.insert(Point(0,0,0)); Dt.insert(Point(10,0,0)); Dt.insert(Point(5,10,0)); Dt.insert(Point(8,8,0)); Dt.insert(Point(-3, -20, 0)); Dt.insert(Point(-5,10,0)); Finite_vertices_iterator start = Dt.finite_vertices_begin(); vector<Delaunay_triangulation::Facet> f; Dt.incident_facets(start, back_inserter(f)); } However, when it has "System.NullReferenceException' May I ask is it due to the nature of the points that I have inserted into the triangulation? I am using CGAL-3.3.1 and Visual C++ 2005 And I am using the triangulation with the following declaration. Thank you very much for your help. typedef CGAL::Cartesian<double> Rep_class; typedef CGAL::Vector_3<Rep_class> Vector; typedef CGAL::Point_3<Rep_class> Point_3; typedef CGAL::Object CGAL_object; template < class GT, class Vb = CGAL::Triangulation_vertex_base_3<GT> > class Vertex_base_for_ssr : public Vb { public: typedef typename Vb::Vertex_handle Vertex_handle; typedef typename Vb::Cell_handle Cell_handle; typedef typename Vb::Point Point; template < class TDS2 > struct Rebind_TDS { typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2; typedef Vertex_base_for_ssr<GT, Vb2> Other; }; Vector surface_normal; vector<Vertex_base_for_ssr<GT, Vb> *> neighbor_vertex_handle; double fifth_nearest_dist; int surface_label; bool is_safe; Vertex_base_for_ssr() : Vb() { surface_label = -1; is_safe = false; } Vertex_base_for_ssr(const Point& p) : Vb(p) { coordinate[0] = p.x(); coordinate[1] = p.y(); coordinate[2] = p.z(); surface_label = -1; is_safe = false; } Vertex_base_for_ssr(const Point& p, Cell_handle c) : Vb(p, c) { surface_label = -1; is_safe = false; } void set_surface_normal(double x_i, double y_i, double z_i) { surface_normal = Vector(x_i, y_i, z_i); } Vector get_surface_normal() { return surface_normal; } Point get_point() { return Vb::point(); } double coordinate[3]; void set_coordiante() { coordinate[0] = point().x(); coordinate[1] = point().y(); coordinate[2] = point().z(); } }; typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Triangulation_data_structure_3<Vertex_base_for_ssr<K> > Tds; typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay_triangulation; --- 2009年3月21日 星期六,naresh <> 寫道﹕ 寄件人: naresh <> 主題: Re: [cgal-discuss] incident_facets function of a Delaunay triangulation 收件人: 日期: 2009 3 21 星期六 下午 1:47 Hi >>In fact, I am dealing with a 3D triangulation (sorry that I forgot to mention that it is 3D in the >>previous post.) >>and therefore, I cannot use Facet since Facet is not represented in 3D triangulation. >>So, what should I do to use incident_facets() of a 3D triangulation. I donot know which triangulation are you using. for simple triangulation here there you can define Facet easily . here is code. try to modifiy with ur code typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Triangulation_3<K> Triangulation; typedef Triangulation::Facet Facet; If there is still confusion post some code . But i will not able reply today because saturday now and i am off. :) I can reply on monday. Hope this helps Alex ----- Original Message ----- From: Query Cgal To: Sent: Saturday, March 21, 2009 6:46 PM Subject: Re: [cgal-discuss] incident_facets function of a Delaunay triangulation THank you for your reply. In fact, I am dealing with a 3D triangulation (sorry that I forgot to mention that it is 3D in the previous post.) and therefore, I cannot use Facet since Facet is not represented in 3D triangulation. So, what should I do to use incident_facets() of a 3D triangulation. Thank you --- 2009年3月21日 星期六,naresh <> 寫道﹕ 寄件人: naresh <> 主題: Re: [cgal-discuss] incident_facets function of a Delaunay triangulation 收件人: 日期: 2009 3 21 星期六 下午 1:07 Hi I think you should try like this typedef Trianluation_2::Facet Facet; // something here that you had used in ur programme may different i had showed only example vector<Facet> f; Dt.incident_facets(start, back_inserter(f)); ----- Original Message ----- From: Query Cgal To: Sent: Saturday, March 21, 2009 5:45 PM Subject: [cgal-discuss] incident_facets function of a Delaunay triangulation Hi, I have tried to use the function below template <class OutputIterator> OutputIterator t.incident_facets ( Vertex_handle v, OutputIterator facets) Copies all Facets incident to v to the output iterator facets. Returns the resulting output iterator. Precondition: t..dimension() >1 , v Vertex_handle(), t.is_vertex(v).. When I tried to used it in the following way but it didn't work, vector<Finite_facets_iterator> f; Dt.incident_facets(start, back_inserter(f)); May I ask in what other way should I use the Output iterator then ? Thank you Yahoo!香港提供網上安全攻略,教你如何防範黑客!了解更多 Yahoo!香港提供網上安全攻略,教你如何防範黑客!了解更多 |
Yahoo!香港提供網上安全攻略,教你如何防範黑客!了解更多
- [cgal-discuss] incident_facets function of a Delaunay triangulation, Query Cgal, 03/21/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, naresh, 03/21/2009
- <Possible follow-up(s)>
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, Query Cgal, 03/21/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, naresh, 03/21/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, Query Cgal, 03/23/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, naresh, 03/23/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, Query Cgal, 03/23/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, Query Cgal, 03/23/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, Query Cgal, 03/23/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, naresh, 03/23/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, Andreas Fabri, 03/23/2009
- [cgal-discuss] Delaunay triangulation Question, naresh, 03/28/2009
- Re: [cgal-discuss] Delaunay triangulation Question, Monique Teillaud, 03/30/2009
- Re: [cgal-discuss] Delaunay triangulation Question, naresh, 03/30/2009
- Re: [cgal-discuss] Delaunay triangulation Question, Mariette Yvinec, 03/30/2009
- Re: [cgal-discuss] Delaunay triangulation Question, Monique Teillaud, 03/30/2009
- [cgal-discuss] Delaunay triangulation Question, naresh, 03/28/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, Andreas Fabri, 03/23/2009
- Re: [cgal-discuss] incident_facets function of a Delaunay triangulation, naresh, 03/23/2009
Archive powered by MHonArc 2.6.16.