Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Adding triangles to a polyhedron

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Adding triangles to a polyhedron


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Subject: Re: [cgal-discuss] Adding triangles to a polyhedron
  • Date: Mon, 30 Apr 2012 01:28:17 +0200
  • Organization: GeometryFactory

sgdimitris
<>
writes:

> Hello to all users!
> I have a very simple question for most of you!
> I have a Polyhedron_3, let's say the name of the polyhedron is tmpPoly, and
> a vector of triangles.
>
> //
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
> typedef CGAL::Polyhedron_3<K>
> Polyhedron_3;
> typedef K::Triangle_3
> Triangle_3;
>
> Polyhedron_3 tmpPoly;
> std::vector<Triangle_3> IntersectPolyVect
> //
>
> I want to add these triangles to the polyhedron, or to say it different to
> create the polyhedron from these triangles. How can I do it?

Polyhedron does not manipulation of low-level functions directly. To get
that functionality you need to use the interface provided by
Polyhedron::delegate [1]. It feels a little awkward at first, but
Incremental_builder should give a good usage example [2]. Technically,
incremental builder should already able to do what you want with
RELATIVE_INDEXING.


Footnotes:
[1]
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polyhedron_ref/Class_Polyhedron_3.html#Cross_link_anchor_1110
[2]
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polyhedron_ref/Class_Polyhedron_incremental_builder_3.html

--
Philipp Moeller
GeometryFactory



Archive powered by MHonArc 2.6.16.

Top of Page