Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D meshing - Subdomain index of a cell and it's mirror

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D meshing - Subdomain index of a cell and it's mirror


Chronological Thread 
  • From: Ramin H <>
  • To:
  • Subject: Re: [cgal-discuss] 3D meshing - Subdomain index of a cell and it's mirror
  • Date: Tue, 4 May 2010 09:11:05 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=CObFdlLIunTSri0yM2J3UsckaMWma802YOslGPqTchlPFwQ3v3sSEjPt/5CiQ+MzJ6 OqWikuXokwQq743BQLv8h5hhrR/io4x2csBQwMvHxf7eTUXUz88ns2sES+Bt40sifNO1 b/EBazw9G9IPO0N8+ssT2LRvXnhEmHE5nAAro=

I wanted to add that I have extended the Mesher_3 by adding one member function:

template<class C3T3, class MC, class MD>
void
Mesher_3<C3T3,MC,MD>::refine_mesh_one_step()
{
  if ( ! cells_mesher_.is_algorithm_done() )
  {
    cells_mesher_.one_step(cells_visitor_);
  }
}

And call this function at each step to track the mesh refinement and visualize each step. I hope this does not have anything to do with this problem.

-Ramin

On Tue, May 4, 2010 at 8:37 AM, Ramin H <> wrote:
Here are the typedef's

   typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
    typedef CGAL::Mesh_3::Robust_intersection_traits_3<K> Geom_traits;
    typedef CGAL::Polyhedron_3<Geom_traits> Polyhedron;
    typedef CGAL::Polyhedral_mesh_domain_3<Polyhedron, Geom_traits> Mesh_domain;
    // Triangulation
    typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
    typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;

I read the Polyhedron from an .off file. This polyhedron was created by performing Boolean operation on a few other polyhedrons. If the input in consistent, then the problem is in the code.


On Tue, May 4, 2010 at 7:57 AM, Laurent Rineau (GeometryFactory) <> wrote:
On Monday 03 May 2010 18:43:42 Ramin H wrote:
> Hi,
> I still don't know everything about C3T3 even though I have read the
> documentation. In a 3D triangulation, let's say the cell representing a
> facet does not belong to domain (subdomain=0). If we find the mirror cell
> of this facet, should it belong to the domain (subdomain > 0) ?
>
> To test this idea, I wrote the following code:
>
>   for(Facet_iterator facet_it = c3t3_.facets_begin() ;
>       facet_it != c3t3_.facets_end() ;
>       ++facet_it)
>   {
>     Facet facet = *facet_it;
>     const Facet f = c3t3_.triangulation().mirror_facet(facet);
>     if( (int)(facet.first->subdomain_index()) ==
> (int)(f.first->subdomain_index()) )
>     {
>       std::cerr << "Cell and it's mirror have equal subindex: " <<
> (int)(f.first->subdomain_index()) << std::endl;
>     }
>   }
>
> Here is some sample output:
> Cell and it's mirror have equal subindex: 1
> Cell and it's mirror have equal subindex: 1
> Cell and it's mirror have equal subindex: 0
> Cell and it's mirror have equal subindex: 1
> Cell and it's mirror have equal subindex: 1
> Cell and it's mirror have equal subindex: 1
> Cell and it's mirror have equal subindex: 0
> Cell and it's mirror have equal subindex: 1
>
> Is this correct behavior? If Facet_iterator is iterating over the facets on
> the surface, why a cell representing that facet and it's mirror both can
> have subdomain index equal to 1 or 0?

No it is not a correct behavior. There is an inconsistency between the answers
provided by the mesh domain oracle to the two following questions :
 - does a given segment/ray intersects the boundary of the domain,
 - is a given center of cell in the domain or not.

Does your domain class (CGAL::Polyhedral_mesh_domain_3 or something like that)
use a filtered (exact) kernel or an inexact one?

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss






Archive powered by MHonArc 2.6.16.

Top of Page