CGAL 6.3-I-126 - Boolean Operations on Meshes
Loading...
Searching...
No Matches
Boolean Operations on Triangle Soups

Functions to compute Boolean operations on possibly non-manifold inputs, and/or whose output is possibly non-manifold.

Functions

template<class PointRange, class TriangleRange, class NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::compute_union_of_triangle_soups (const PointRange &points_1, const TriangleRange &triangles_1, const PointRange &points_2, const TriangleRange &triangles_2, PointRange &out_points, TriangleRange &out_triangles, const NamedParameters &np=parameters::default_values())
 computes the union of two volumes, each bounded by a triangle soup.
template<class PointRange, class TriangleRange, class NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::compute_intersection_of_triangle_soups (const PointRange &points_1, const TriangleRange &triangles_1, const PointRange &points_2, const TriangleRange &triangles_2, PointRange &out_points, TriangleRange &out_triangles, const NamedParameters &np=parameters::default_values())
 computes the intersection of two volumes, each bounded by a triangle soup.
template<class PointRange, class TriangleRange, class NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::compute_difference_of_triangle_soups (const PointRange &points_1, const TriangleRange &triangles_1, const PointRange &points_2, const TriangleRange &triangles_2, PointRange &out_points, TriangleRange &out_triangles, const NamedParameters &np=parameters::default_values())
 computes the difference of two volumes, each bounded by a triangle soup.

Function Documentation

◆ compute_difference_of_triangle_soups()

template<class PointRange, class TriangleRange, class NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::compute_difference_of_triangle_soups ( const PointRange & points_1,
const TriangleRange & triangles_1,
const PointRange & points_2,
const TriangleRange & triangles_2,
PointRange & out_points,
TriangleRange & out_triangles,
const NamedParameters & np = parameters::default_values() )

#include <CGAL/Polygon_mesh_processing/triangle_soup_boolean_operations_3.h>

computes the difference of two volumes, each bounded by a triangle soup.

The definition given of triangle mesh bounding a volume can be extended to a triangle soup, allowing non-manifold edges and vertices. As for a triangle mesh, the orientation of the soup triangles must be coherent and consistent with the volume bounded.

Precondition
!CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points_1, triangles_1)
!CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points_2, triangles_2)
Template Parameters
PointRangea model of the concepts RandomAccessContainer whose value type is GeomTraits::Point_3 as value type, GeomTraits being the type of the named parameter geom_traits. Additionally, it must also be a model of BackInsertionSequence and Swappable.
TriangleRangea model of the concept RandomAccessContainer whose value_type, say Triangle, is a model of the concept RandomAccessContainer whose value_type is std::size_t. Additionally, both TriangleRange and Triangle must also be models of BackInsertionSequence and Swappable.
Parameters
points_1points of the first triangle soup.
triangles_1triangles of the first triangle soup, each element in the vector describes a triangle using the indices of the points in points_1.
points_2points of the second triangle soup.
triangles_2triangles of the second triangle soup, each element in the vector describes a triangle using the indices of the points in points_2.
out_pointspoints of the output triangle soup bounding the volume result of the Boolean operation.
out_trianglestriangles of the output triangle soup, each element in the vector describes a triangle using the indices of the points in out_points.
npoptional sequence of named parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the value type of PointRange, using CGAL::Kernel_traits
  • Extra: The nested Point_3 type of the geometric traits class must be compatible with the value type of PointRange.

◆ compute_intersection_of_triangle_soups()

template<class PointRange, class TriangleRange, class NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::compute_intersection_of_triangle_soups ( const PointRange & points_1,
const TriangleRange & triangles_1,
const PointRange & points_2,
const TriangleRange & triangles_2,
PointRange & out_points,
TriangleRange & out_triangles,
const NamedParameters & np = parameters::default_values() )

#include <CGAL/Polygon_mesh_processing/triangle_soup_boolean_operations_3.h>

computes the intersection of two volumes, each bounded by a triangle soup.

The definition given of triangle mesh bounding a volume can be extended to a triangle soup, allowing non-manifold edges and vertices. As for a triangle mesh, the orientation of the soup triangles must be coherent and consistent with the volume bounded.

Precondition
!CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points_1, triangles_1)
!CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points_2, triangles_2)
Template Parameters
PointRangea model of the concepts RandomAccessContainer whose value type is GeomTraits::Point_3 as value type, GeomTraits being the type of the named parameter geom_traits. Additionally, it must also be a model of BackInsertionSequence and Swappable.
TriangleRangea model of the concept RandomAccessContainer whose value_type, say Triangle, is a model of the concept RandomAccessContainer whose value_type is std::size_t. Additionally, both TriangleRange and Triangle must also be models of BackInsertionSequence and Swappable.
Parameters
points_1points of the first triangle soup.
triangles_1triangles of the first triangle soup, each element in the vector describes a triangle using the indices of the points in points_1.
points_2points of the second triangle soup.
triangles_2triangles of the second triangle soup, each element in the vector describes a triangle using the indices of the points in points_2.
out_pointspoints of the output triangle soup bounding the volume result of the Boolean operation.
out_trianglestriangles of the output triangle soup, each element in the vector describes a triangle using the indices of the points in out_points.
npoptional sequence of named parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the value type of PointRange, using CGAL::Kernel_traits
  • Extra: The nested Point_3 type of the geometric traits class must be compatible with the value type of PointRange.

◆ compute_union_of_triangle_soups()

template<class PointRange, class TriangleRange, class NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::compute_union_of_triangle_soups ( const PointRange & points_1,
const TriangleRange & triangles_1,
const PointRange & points_2,
const TriangleRange & triangles_2,
PointRange & out_points,
TriangleRange & out_triangles,
const NamedParameters & np = parameters::default_values() )

#include <CGAL/Polygon_mesh_processing/triangle_soup_boolean_operations_3.h>

computes the union of two volumes, each bounded by a triangle soup.

The definition given of triangle mesh bounding a volume can be extended to a triangle soup, allowing non-manifold edges and vertices. As for a triangle mesh, the orientation of the soup triangles must be coherent and consistent with the volume bounded.

Precondition
!CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points_1, triangles_1)
!CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect(points_2, triangles_2)
Template Parameters
PointRangea model of the concepts RandomAccessContainer whose value type is GeomTraits::Point_3 as value type, GeomTraits being the type of the named parameter geom_traits. Additionally, it must also be a model of BackInsertionSequence and Swappable.
TriangleRangea model of the concept RandomAccessContainer whose value_type, say Triangle, is a model of the concept RandomAccessContainer whose value_type is std::size_t. Additionally, both TriangleRange and Triangle must also be models of BackInsertionSequence and Swappable.
Parameters
points_1points of the first triangle soup.
triangles_1triangles of the first triangle soup, each element in the vector describes a triangle using the indices of the points in points_1.
points_2points of the second triangle soup.
triangles_2triangles of the second triangle soup, each element in the vector describes a triangle using the indices of the points in points_2.
out_pointspoints of the output triangle soup bounding the volume result of the Boolean operation.
out_trianglestriangles of the output triangle soup, each element in the vector describes a triangle using the indices of the points in out_points.
npoptional sequence of named parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the value type of PointRange, using CGAL::Kernel_traits
  • Extra: The nested Point_3 type of the geometric traits class must be compatible with the value type of PointRange.