selfintersect.cpp 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include "selfintersect.h"
  2. #include "SelfIntersectMesh.h"
  3. #include <igl/C_STR.h>
  4. #include <list>
  5. IGL_INLINE void igl::selfintersect(
  6. const Eigen::MatrixXd & V,
  7. const Eigen::MatrixXi & F,
  8. const SelfintersectParam & params,
  9. Eigen::MatrixXd & VV,
  10. Eigen::MatrixXi & FF,
  11. Eigen::MatrixXi & IF)
  12. {
  13. using namespace std;
  14. if(params.detect_only)
  15. {
  16. // This is probably a terrible idea, but CGAL is throwing floating point
  17. // exceptions.
  18. //#ifdef __APPLE__
  19. //#define IGL_THROW_FPE 11
  20. // const auto & throw_fpe = [](int e)
  21. // {
  22. // throw "IGL_THROW_FPE";
  23. // };
  24. // signal(SIGFPE,throw_fpe);
  25. //#endif
  26. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
  27. SelfIntersectMesh<Kernel> SIM = SelfIntersectMesh<Kernel>(V,F,params,VV,FF,IF);
  28. //#ifdef __APPLE__
  29. // signal(SIGFPE,SIG_DFL);
  30. //#endif
  31. }else
  32. {
  33. typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
  34. SelfIntersectMesh<Kernel> SIM = SelfIntersectMesh<Kernel>(V,F,params,VV,FF,IF);
  35. }
  36. }