mesh_boolean.cpp 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <alecjacobson@gmail.com>
  4. // Qingnan Zhou <qnzhou@gmail.com>
  5. //
  6. // This Source Code Form is subject to the terms of the Mozilla Public License
  7. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  8. // obtain one at http://mozilla.org/MPL/2.0/.
  9. //
  10. #include "mesh_boolean.h"
  11. #include "assign.h"
  12. #include "extract_cells.h"
  13. #include "mesh_boolean_type_to_funcs.h"
  14. #include "propagate_winding_numbers.h"
  15. #include "relabel_small_immersed_cells.h"
  16. #include "remesh_self_intersections.h"
  17. #include "string_to_mesh_boolean_type.h"
  18. #include "../../cumsum.h"
  19. #include "../../extract_manifold_patches.h"
  20. #include "../../get_seconds.h"
  21. #include "../../remove_unreferenced.h"
  22. #include "../../resolve_duplicated_faces.h"
  23. #include "../../slice.h"
  24. #include "../../unique_edge_map.h"
  25. #include "../../unique_simplices.h"
  26. #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
  27. #include <algorithm>
  28. //#define MESH_BOOLEAN_TIMING
  29. //#define DOUBLE_CHECK_EXACT_OUTPUT
  30. //#define SMALL_CELL_REMOVAL
  31. template <
  32. typename DerivedVA,
  33. typename DerivedFA,
  34. typename DerivedVB,
  35. typename DerivedFB,
  36. typename DerivedVC,
  37. typename DerivedFC,
  38. typename DerivedJ>
  39. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  40. const Eigen::MatrixBase<DerivedVA > & VA,
  41. const Eigen::MatrixBase<DerivedFA > & FA,
  42. const Eigen::MatrixBase<DerivedVB > & VB,
  43. const Eigen::MatrixBase<DerivedFB > & FB,
  44. const MeshBooleanType & type,
  45. Eigen::PlainObjectBase<DerivedVC > & VC,
  46. Eigen::PlainObjectBase<DerivedFC > & FC,
  47. Eigen::PlainObjectBase<DerivedJ > & J)
  48. {
  49. std::function<int(const int, const int)> keep;
  50. std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) > wind_num_op;
  51. mesh_boolean_type_to_funcs(type,wind_num_op,keep);
  52. return mesh_boolean(VA,FA,VB,FB,wind_num_op,keep,VC,FC,J);
  53. }
  54. template <
  55. typename DerivedVA,
  56. typename DerivedFA,
  57. typename DerivedVB,
  58. typename DerivedFB,
  59. typename DerivedVC,
  60. typename DerivedFC,
  61. typename DerivedJ>
  62. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  63. const Eigen::MatrixBase<DerivedVA > & VA,
  64. const Eigen::MatrixBase<DerivedFA > & FA,
  65. const Eigen::MatrixBase<DerivedVB > & VB,
  66. const Eigen::MatrixBase<DerivedFB > & FB,
  67. const std::string & type_str,
  68. Eigen::PlainObjectBase<DerivedVC > & VC,
  69. Eigen::PlainObjectBase<DerivedFC > & FC,
  70. Eigen::PlainObjectBase<DerivedJ > & J)
  71. {
  72. return mesh_boolean(
  73. VA,FA,VB,FB,string_to_mesh_boolean_type(type_str),VC,FC,J);
  74. }
  75. template <
  76. typename DerivedVA,
  77. typename DerivedFA,
  78. typename DerivedVB,
  79. typename DerivedFB,
  80. typename DerivedVC,
  81. typename DerivedFC,
  82. typename DerivedJ>
  83. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  84. const Eigen::MatrixBase<DerivedVA> & VA,
  85. const Eigen::MatrixBase<DerivedFA> & FA,
  86. const Eigen::MatrixBase<DerivedVB> & VB,
  87. const Eigen::MatrixBase<DerivedFB> & FB,
  88. const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
  89. const std::function<int(const int, const int)> & keep,
  90. Eigen::PlainObjectBase<DerivedVC > & VC,
  91. Eigen::PlainObjectBase<DerivedFC > & FC,
  92. Eigen::PlainObjectBase<DerivedJ > & J)
  93. {
  94. // Generate combined mesh (VA,FA,VB,FB) -> (V,F)
  95. Eigen::Matrix<size_t,2,1> sizes(FA.rows(),FB.rows());
  96. // TODO: This is a precision template **bug** that results in failure to
  97. // compile. If DerivedVA::Scalar is double and DerivedVB::Scalar is
  98. // CGAL::Epeck::FT then the following assignment will not compile. This
  99. // implies that VA must have the trumping precision (and a valid assignment
  100. // operator from VB's type).
  101. Eigen::Matrix<typename DerivedVA::Scalar,Eigen::Dynamic,3> VV(VA.rows() + VB.rows(), 3);
  102. DerivedFC FF(FA.rows() + FB.rows(), 3);
  103. // Can't use comma initializer
  104. for(int a = 0;a<VA.rows();a++)
  105. {
  106. for(int d = 0;d<3;d++) VV(a,d) = VA(a,d);
  107. }
  108. for(int b = 0;b<VB.rows();b++)
  109. {
  110. for(int d = 0;d<3;d++) VV(VA.rows()+b,d) = VB(b,d);
  111. }
  112. FF.block(0, 0, FA.rows(), 3) = FA;
  113. // Eigen struggles to assign nothing to nothing and will assert if FB is empty
  114. if(FB.rows() > 0)
  115. {
  116. FF.block(FA.rows(), 0, FB.rows(), 3) = FB.array() + VA.rows();
  117. }
  118. return mesh_boolean(VV,FF,sizes,wind_num_op,keep,VC,FC,J);
  119. }
  120. template <
  121. typename DerivedV,
  122. typename DerivedF,
  123. typename DerivedVC,
  124. typename DerivedFC,
  125. typename DerivedJ>
  126. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  127. const std::vector<DerivedV > & Vlist,
  128. const std::vector<DerivedF > & Flist,
  129. const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
  130. const std::function<int(const int, const int)> & keep,
  131. Eigen::PlainObjectBase<DerivedVC > & VC,
  132. Eigen::PlainObjectBase<DerivedFC > & FC,
  133. Eigen::PlainObjectBase<DerivedJ > & J)
  134. {
  135. assert(Flist.size() == Vlist.size() && "#Vlist and #Flist should match");
  136. const size_t num_inputs = Vlist.size();
  137. // Gather sizes
  138. Eigen::Matrix<size_t,Eigen::Dynamic,1> sizes(num_inputs);
  139. int numf = 0;
  140. int numv = 0;
  141. for(int i = 0;i<num_inputs;i++)
  142. {
  143. sizes(i) = Flist[i].rows();
  144. numf += Flist[i].rows();
  145. numv += Vlist[i].rows();
  146. }
  147. // Combined mesh
  148. DerivedV VV(numv,3);
  149. DerivedF FF(numf,3);
  150. {
  151. int fk = 0;
  152. int vk = 0;
  153. for(int i = 0;i<num_inputs;i++)
  154. {
  155. FF.block(fk,0,Flist[i].rows(),3) = Flist[i].array() + vk;
  156. fk += Flist[i].rows();
  157. VV.block(vk,0,Vlist[i].rows(),3) = Vlist[i];
  158. vk += Vlist[i].rows();
  159. }
  160. }
  161. return mesh_boolean(VV,FF,sizes,wind_num_op,keep,VC,FC,J);
  162. }
  163. template <
  164. typename DerivedVV,
  165. typename DerivedFF,
  166. typename Derivedsizes,
  167. typename DerivedVC,
  168. typename DerivedFC,
  169. typename DerivedJ>
  170. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  171. const Eigen::MatrixBase<DerivedVV > & VV,
  172. const Eigen::MatrixBase<DerivedFF > & FF,
  173. const Eigen::MatrixBase<Derivedsizes> & sizes,
  174. const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
  175. const std::function<int(const int, const int)> & keep,
  176. Eigen::PlainObjectBase<DerivedVC > & VC,
  177. Eigen::PlainObjectBase<DerivedFC > & FC,
  178. Eigen::PlainObjectBase<DerivedJ > & J)
  179. {
  180. #ifdef MESH_BOOLEAN_TIMING
  181. const auto & tictoc = []() -> double
  182. {
  183. static double t_start = igl::get_seconds();
  184. double diff = igl::get_seconds()-t_start;
  185. t_start += diff;
  186. return diff;
  187. };
  188. const auto log_time = [&](const std::string& label) -> void {
  189. std::cout << "mesh_boolean." << label << ": "
  190. << tictoc() << std::endl;
  191. };
  192. tictoc();
  193. #endif
  194. typedef typename DerivedVC::Scalar Scalar;
  195. typedef CGAL::Epeck Kernel;
  196. typedef Kernel::FT ExactScalar;
  197. typedef Eigen::Matrix<Scalar,Eigen::Dynamic,3> MatrixX3S;
  198. typedef Eigen::Matrix<typename DerivedJ::Scalar,Eigen::Dynamic,1> VectorXJ;
  199. typedef Eigen::Matrix<
  200. ExactScalar,
  201. Eigen::Dynamic,
  202. Eigen::Dynamic,
  203. DerivedVC::IsRowMajor> MatrixXES;
  204. MatrixXES V;
  205. DerivedFC F;
  206. VectorXJ CJ;
  207. {
  208. Eigen::VectorXi I;
  209. igl::copyleft::cgal::RemeshSelfIntersectionsParam params;
  210. params.stitch_all = true;
  211. MatrixXES Vr;
  212. DerivedFC Fr;
  213. Eigen::MatrixXi IF;
  214. igl::copyleft::cgal::remesh_self_intersections(
  215. VV, FF, params, Vr, Fr, IF, CJ, I);
  216. assert(I.size() == Vr.rows());
  217. // Merge coinciding vertices into non-manifold vertices.
  218. std::for_each(Fr.data(), Fr.data()+Fr.size(),
  219. [&I](typename DerivedFC::Scalar& a) { a=I[a]; });
  220. // Remove unreferenced vertices.
  221. Eigen::VectorXi UIM;
  222. igl::remove_unreferenced(Vr, Fr, V, F, UIM);
  223. }
  224. #ifdef MESH_BOOLEAN_TIMING
  225. log_time("resolve_self_intersection");
  226. #endif
  227. // Compute edges of (F) --> (E,uE,EMAP,uE2E)
  228. Eigen::MatrixXi E, uE;
  229. Eigen::VectorXi EMAP;
  230. std::vector<std::vector<size_t> > uE2E;
  231. igl::unique_edge_map(F, E, uE, EMAP, uE2E);
  232. // Compute patches (F,EMAP,uE2E) --> (P)
  233. Eigen::VectorXi P;
  234. const size_t num_patches = igl::extract_manifold_patches(F, EMAP, uE2E, P);
  235. #ifdef MESH_BOOLEAN_TIMING
  236. log_time("patch_extraction");
  237. #endif
  238. // Compute cells (V,F,P,E,uE,EMAP) -> (per_patch_cells)
  239. Eigen::MatrixXi per_patch_cells;
  240. const size_t num_cells =
  241. igl::copyleft::cgal::extract_cells(
  242. V, F, P, E, uE, uE2E, EMAP, per_patch_cells);
  243. #ifdef MESH_BOOLEAN_TIMING
  244. log_time("cell_extraction");
  245. #endif
  246. // Compute winding numbers on each side of each facet.
  247. const size_t num_faces = F.rows();
  248. // W(f,:) --> [w1out,w1in,w2out,w2in, ... wnout,wnint] winding numbers above
  249. // and below each face w.r.t. each input mesh, so that W(f,2*i) is the
  250. // winding number above face f w.r.t. input i, and W(f,2*i+1) is the winding
  251. // number below face f w.r.t. input i.
  252. Eigen::MatrixXi W;
  253. // labels(f) = i means that face f comes from mesh i
  254. Eigen::VectorXi labels(num_faces);
  255. // cumulative sizes
  256. Derivedsizes cumsizes;
  257. igl::cumsum(sizes,1,cumsizes);
  258. const size_t num_inputs = sizes.size();
  259. std::transform(
  260. CJ.data(),
  261. CJ.data()+CJ.size(),
  262. labels.data(),
  263. // Determine which input mesh birth face i comes from
  264. [&num_inputs,&cumsizes](int i)->int
  265. {
  266. for(int k = 0;k<num_inputs;k++)
  267. {
  268. if(i<cumsizes(k)) return k;
  269. }
  270. assert(false && "Birth parent index out of range");
  271. return -1;
  272. });
  273. bool valid = true;
  274. if (num_faces > 0)
  275. {
  276. valid = valid &
  277. igl::copyleft::cgal::propagate_winding_numbers(
  278. V, F, uE, uE2E, num_patches, P, num_cells, per_patch_cells, labels, W);
  279. } else
  280. {
  281. W.resize(0, 2*num_inputs);
  282. }
  283. assert((size_t)W.rows() == num_faces);
  284. // If W doesn't have enough columns, pad with zeros
  285. if (W.cols() <= 2*num_inputs)
  286. {
  287. const int old_ncols = W.cols();
  288. W.conservativeResize(num_faces,2*num_inputs);
  289. W.rightCols(2*num_inputs-old_ncols).setConstant(0);
  290. }
  291. assert((size_t)W.cols() == 2*num_inputs);
  292. #ifdef MESH_BOOLEAN_TIMING
  293. log_time("propagate_input_winding_number");
  294. #endif
  295. // Compute resulting winding number.
  296. Eigen::MatrixXi Wr(num_faces, 2);
  297. for (size_t i=0; i<num_faces; i++)
  298. {
  299. // Winding number vectors above and below
  300. Eigen::RowVectorXi w_out(1,num_inputs), w_in(1,num_inputs);
  301. for(size_t k =0;k<num_inputs;k++)
  302. {
  303. w_out(k) = W(i,2*k+0);
  304. w_in(k) = W(i,2*k+1);
  305. }
  306. Wr(i,0) = wind_num_op(w_out);
  307. Wr(i,1) = wind_num_op(w_in);
  308. }
  309. #ifdef MESH_BOOLEAN_TIMING
  310. log_time("compute_output_winding_number");
  311. #endif
  312. #ifdef SMALL_CELL_REMOVAL
  313. igl::copyleft::cgal::relabel_small_immersed_cells(
  314. V, F, num_patches, P, num_cells, per_patch_cells, 1e-3, Wr);
  315. #endif
  316. // Extract boundary separating inside from outside.
  317. auto index_to_signed_index = [&](size_t i, bool ori) -> int
  318. {
  319. return (i+1)*(ori?1:-1);
  320. };
  321. //auto signed_index_to_index = [&](int i) -> size_t {
  322. // return abs(i) - 1;
  323. //};
  324. std::vector<int> selected;
  325. for(size_t i=0; i<num_faces; i++)
  326. {
  327. auto should_keep = keep(Wr(i,0), Wr(i,1));
  328. if (should_keep > 0)
  329. {
  330. selected.push_back(index_to_signed_index(i, true));
  331. } else if (should_keep < 0)
  332. {
  333. selected.push_back(index_to_signed_index(i, false));
  334. }
  335. }
  336. const size_t num_selected = selected.size();
  337. DerivedFC kept_faces(num_selected, 3);
  338. DerivedJ kept_face_indices(num_selected, 1);
  339. for (size_t i=0; i<num_selected; i++)
  340. {
  341. size_t idx = abs(selected[i]) - 1;
  342. if (selected[i] > 0)
  343. {
  344. kept_faces.row(i) = F.row(idx);
  345. } else
  346. {
  347. kept_faces.row(i) = F.row(idx).reverse();
  348. }
  349. kept_face_indices(i, 0) = CJ[idx];
  350. }
  351. #ifdef MESH_BOOLEAN_TIMING
  352. log_time("extract_output");
  353. #endif
  354. // Finally, remove duplicated faces and unreferenced vertices.
  355. {
  356. DerivedFC G;
  357. DerivedJ JJ;
  358. igl::resolve_duplicated_faces(kept_faces, G, JJ);
  359. igl::slice(kept_face_indices, JJ, 1, J);
  360. #ifdef DOUBLE_CHECK_EXACT_OUTPUT
  361. {
  362. // Sanity check on exact output.
  363. igl::copyleft::cgal::RemeshSelfIntersectionsParam params;
  364. params.detect_only = true;
  365. params.first_only = true;
  366. MatrixXES dummy_VV;
  367. DerivedFC dummy_FF, dummy_IF;
  368. Eigen::VectorXi dummy_J, dummy_IM;
  369. igl::copyleft::cgal::SelfIntersectMesh<
  370. Kernel,
  371. MatrixXES, DerivedFC,
  372. MatrixXES, DerivedFC,
  373. DerivedFC,
  374. Eigen::VectorXi,
  375. Eigen::VectorXi
  376. > checker(V, G, params,
  377. dummy_VV, dummy_FF, dummy_IF, dummy_J, dummy_IM);
  378. if (checker.count != 0)
  379. {
  380. throw "Self-intersection not fully resolved.";
  381. }
  382. }
  383. #endif
  384. MatrixX3S Vs;
  385. assign(V,Vs);
  386. Eigen::VectorXi newIM;
  387. igl::remove_unreferenced(Vs,G,VC,FC,newIM);
  388. }
  389. #ifdef MESH_BOOLEAN_TIMING
  390. log_time("clean_up");
  391. #endif
  392. return valid;
  393. }
  394. template <
  395. typename DerivedVA,
  396. typename DerivedFA,
  397. typename DerivedVB,
  398. typename DerivedFB,
  399. typename DerivedVC,
  400. typename DerivedFC>
  401. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  402. const Eigen::MatrixBase<DerivedVA > & VA,
  403. const Eigen::MatrixBase<DerivedFA > & FA,
  404. const Eigen::MatrixBase<DerivedVB > & VB,
  405. const Eigen::MatrixBase<DerivedFB > & FB,
  406. const MeshBooleanType & type,
  407. Eigen::PlainObjectBase<DerivedVC > & VC,
  408. Eigen::PlainObjectBase<DerivedFC > & FC)
  409. {
  410. Eigen::Matrix<typename DerivedFC::Index, Eigen::Dynamic,1> J;
  411. return igl::copyleft::cgal::mesh_boolean(VA,FA,VB,FB,type,VC,FC,J);
  412. }
  413. #ifdef IGL_STATIC_LIBRARY
  414. // Explicit template instantiation
  415. // generated by autoexplicit.sh
  416. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<int, -1, 3, 1, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  417. // generated by autoexplicit.sh
  418. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  419. // generated by autoexplicit.sh
  420. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  421. // generated by autoexplicit.sh
  422. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3>, Eigen::Matrix<int, 12, 3, 0, 12, 3>, Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<int, -1, 3, 1, -1, 3>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, 12, 3, 0, 12, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  423. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  424. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3>, Eigen::Matrix<int, 12, 3, 0, 12, 3>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, 12, 3, 0, 12, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  425. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3>, Eigen::Matrix<int, 12, 3, 0, 12, 3>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 4, 0, -1, 4>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 4, 0, -1, 4>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, 12, 3, 0, 12, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 4, 0, -1, 4> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 4, 0, -1, 4> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  426. template bool igl::copyleft::cgal::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::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<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> >&);
  427. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<long, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&);
  428. template bool igl::copyleft::cgal::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::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<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> >&);
  429. template bool igl::copyleft::cgal::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::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > 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> >&);
  430. template bool igl::copyleft::cgal::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::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > 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> >&);
  431. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, 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<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  432. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  433. template bool igl::copyleft::cgal::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3>, Eigen::Matrix<int, 12, 3, 0, 12, 3>, 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::MatrixBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, 8, 3, 0, 8, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, 12, 3, 0, 12, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<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> >&);
  434. template bool igl::copyleft::cgal::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::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<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> >&);
  435. template bool igl::copyleft::cgal::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<int, -1, 1, 0, -1, 1> >(std::vector<Eigen::Matrix<double, -1, -1, 0, -1, -1>, std::allocator<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > const&, std::vector<Eigen::Matrix<int, -1, -1, 0, -1, -1>, std::allocator<Eigen::Matrix<int, -1, -1, 0, -1, -1> > > const&, std::function<int (Eigen::Matrix<int, 1, -1, 1, 1, -1>)> const&, std::function<int (int, int)> 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> >&);
  436. #endif