|
@@ -32,8 +32,8 @@ IGL_INLINE void igl::mesh_boolean(
|
|
|
const Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
|
|
|
const Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
|
|
|
- Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
- Eigen::Matrix<typename DerivedJ::Scalar, Eigen::Dynamic,1>&)>
|
|
|
+ Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
+ Eigen::Matrix<typename DerivedJ::Scalar, Eigen::Dynamic,1>&)>
|
|
|
empty_fun;
|
|
|
return mesh_boolean(VA,FA,VB,FB,type,empty_fun,VC,FC,J);
|
|
|
}
|
|
@@ -59,8 +59,8 @@ IGL_INLINE void igl::mesh_boolean(
|
|
|
const Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
|
|
|
const Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
|
|
|
- Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
- Eigen::Matrix<typename DerivedFC::Index, Eigen::Dynamic,1>&)>
|
|
|
+ Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
+ Eigen::Matrix<typename DerivedFC::Index, Eigen::Dynamic,1>&)>
|
|
|
empty_fun;
|
|
|
return mesh_boolean(VA,FA,VB,FB,type,empty_fun,VC,FC,J);
|
|
|
}
|
|
@@ -84,7 +84,7 @@ IGL_INLINE void igl::mesh_boolean(
|
|
|
const Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3>&,
|
|
|
Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
|
|
|
- Eigen::Matrix<typename DerivedJ::Scalar, Eigen::Dynamic,1>&)>
|
|
|
+ Eigen::Matrix<typename DerivedJ::Scalar, Eigen::Dynamic,1>&)>
|
|
|
& resolve_fun,
|
|
|
Eigen::PlainObjectBase<DerivedVC > & VC,
|
|
|
Eigen::PlainObjectBase<DerivedFC > & FC,
|
|
@@ -122,7 +122,7 @@ IGL_INLINE void igl::mesh_boolean(
|
|
|
F.block(0,0,FA.rows(),FA.cols()) = FA.rowwise().reverse();
|
|
|
F.block(FA.rows(),0,FB.rows(),FB.cols()) = FB.array()+VA.rows();
|
|
|
//F.block(0,0,FA.rows(),3) = FA;
|
|
|
- //F.block(FA.rows(),0,FB.rows(),3) =
|
|
|
+ //F.block(FA.rows(),0,FB.rows(),3) =
|
|
|
// FB.rowwise().reverse().array()+VA.rows();
|
|
|
eff_type = MESH_BOOLEAN_TYPE_INTERSECT;
|
|
|
break;
|
|
@@ -261,7 +261,7 @@ IGL_INLINE void igl::mesh_boolean(
|
|
|
assert(ug < uG2G.size());
|
|
|
uG2G[ug].push_back(g);
|
|
|
// is uG(g,:) just a rotated version of G(g,:) ?
|
|
|
- const bool consistent =
|
|
|
+ const bool consistent =
|
|
|
(G(g,0) == uG(ug,0) && G(g,1) == uG(ug,1) && G(g,2) == uG(ug,2)) ||
|
|
|
(G(g,0) == uG(ug,1) && G(g,1) == uG(ug,2) && G(g,2) == uG(ug,0)) ||
|
|
|
(G(g,0) == uG(ug,2) && G(g,1) == uG(ug,0) && G(g,2) == uG(ug,1));
|
|
@@ -304,6 +304,18 @@ IGL_INLINE void igl::mesh_boolean(
|
|
|
}
|
|
|
|
|
|
#ifdef IGL_STATIC_LIBRARY
|
|
|
+
|
|
|
+// This is a hack to discuss
|
|
|
+#include <igl/remove_unreferenced.cpp>
|
|
|
+
|
|
|
+template void igl::remove_unreferenced<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
|
|
|
+
|
|
|
+#include <igl/cgal/peel_outer_hull_layers.cpp>
|
|
|
+template unsigned long igl::peel_outer_hull_layers<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<bool, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
|
|
|
+
|
|
|
+#include <igl/cgal/outer_hull.cpp>
|
|
|
+template void igl::outer_hull<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
|
|
|
+
|
|
|
// Explicit template specialization
|
|
|
template void igl::mesh_boolean<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
|
|
|
template void igl::mesh_boolean<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
|