Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: [cgal-discuss] Re: merging 3d meshes

Subject: CGAL users discussion list

List archive

Re: Re: [cgal-discuss] Re: merging 3d meshes


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: Re: [cgal-discuss] Re: merging 3d meshes
  • Date: Wed, 08 Feb 2012 18:34:48 +0100
  • Organization: GeometryFactory

Le mercredi 08 février 2012 18:30:46 Laurent Rineau a écrit :
> Le mercredi 08 février 2012 09:05:40 Arnaud A. a écrit :
> > Please find attached four files: two polyhedral files (conteneur.off,
> > copeau.off) and two 3D mesh files (conteneur.mesh,copeau.mesh). I would
> > like to make a cut (boolean operation) between conteneur.mesh and
> > copeau.mesh, and remesh these two domains in order to have a compatible
> > mesh at the interface.
> >
> > Is it possible ?
>
> You said the boundaries of your two polyhedra intersect, but they do not. In
> that case that is more simple.
>
>
> I attach a file "Multi_domain_*.h", that defines a new class, a variation of
> CGAL::Polyhedral_mesh_domain. It is a prototype class, that is not yet in
> CGAL, and will not be either in the next release of CGAL.

You will need the attached file too: it extends the function
CGAL::angle(...).
place that file in the same directory as the other.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
// Copyright (c) 2011  GeometryFactory Sarl (France)
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the License.
// See the file LICENSE.LGPL distributed with CGAL.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL: https://geometryfactory.svn.codebasehq.com/hutchinson/code/mesh_generation/angle_3_extension.h $
// $Id: angle_3_extension.h 18 2011-10-05 07:35:10Z lrineau $
// 
//
// Author(s)     : Laurent Rineau

#ifndef CGAL_ANGLE_3_EXTENSION_H
#define CGAL_ANGLE_3_EXTENSION_H

#include <CGAL/number_utils.h>

namespace CGAL {

// for Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h

template < class FT >
inline
typename Same_uncertainty_nt<Angle, FT>::type
angleC3(const FT &px, const FT &py, const FT &pz,
        const FT &qx, const FT &qy, const FT &qz,
        const FT &ux, const FT &uy, const FT &uz, bool)
{
  return enum_cast<Angle>(CGAL_NTS sign((qx-px)*ux+
	                                (qy-py)*uy+
				        (qz-pz)*uz));
}



// for Cartesian_kernel/include/CGAL/Cartesian/function_objects.h

  template <typename K>
  class Angle_3_ext
  {
    typedef typename K::Point_3 Point_3;
    typedef typename K::Vector_3 Vector_3;
  public:
    typedef typename K::Angle   result_type;

    result_type
    operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
    {
      return angleC3(p.x(), p.y(), p.z(),
		     q.x(), q.y(), q.z(),
		     r.x(), r.y(), r.z());
    }

    result_type
    operator()(const Point_3& p, const Point_3& q, const Vector_3& u) const
    {
      return angleC3(p.x(), p.y(), p.z(),
		     q.x(), q.y(), q.z(),
		     u.x(), u.y(), u.z(), true); // vector
    }
  };



template <typename FK>
class Filtered_angle_3_ext 
  : public Filtered_predicate< Angle_3_ext<typename FK::Exact_kernel>,
                               Angle_3_ext<typename FK::Approximate_kernel>,
                               typename FK::C2E,
                               typename FK::C2F >
{};

} // end namespace CGAL

#endif // CGAL_ANGLE_3_EXTENSION_H



Archive powered by MHonArc 2.6.16.

Top of Page