2020#include < chrono>
2121#endif
2222
23- #include " manifold/linalg.h"
23+ #include " linalg.h"
24+ #include " optional_assert.h"
2425
2526namespace manifold {
2627/* * @addtogroup Math
@@ -548,7 +549,7 @@ class Quality {
548549 int nSegL = 2.0 * radius * kPi / circularEdgeLength_;
549550 int nSeg = fmin (nSegA, nSegL) + 3 ;
550551 nSeg -= nSeg % 4 ;
551- return std::max (nSeg, 3 );
552+ return std::max (nSeg, 4 );
552553 }
553554
554555 /* *
@@ -577,21 +578,62 @@ struct ExecutionParams {
577578 // / Perform extra sanity checks and assertions on the intermediate data
578579 // / structures.
579580 bool intermediateChecks = false ;
580- // / Verbose output primarily of the Boolean, including timing info and vector
581- // / sizes .
582- bool verbose = false ;
581+ // / Perform 3D mesh self-intersection test on intermediate boolean results to
582+ // / test for ϵ-validity. For debug purposes only .
583+ bool selfIntersectionChecks = false ;
583584 // / If processOverlaps is false, a geometric check will be performed to assert
584585 // / all triangles are CCW.
585586 bool processOverlaps = true ;
586587 // / Suppresses printed errors regarding CW triangles. Has no effect if
587588 // / processOverlaps is true.
588589 bool suppressErrors = false ;
589- // / Perform optional but recommended triangle cleanups in SimplifyTopology()
590+ // / Deprecated! This value no longer has any effect, as cleanup now only
591+ // / occurs on intersected triangles.
590592 bool cleanupTriangles = true ;
593+ // / Verbose level:
594+ // / - 0 for no verbose output
595+ // / - 1 for verbose output for the Boolean, including timing info and vector
596+ // / sizes.
597+ // / - 2 for verbose output with triangulator action as well.
598+ int verbose = 0 ;
591599};
592600/* * @} */
593601
594602#ifdef MANIFOLD_DEBUG
603+ template <class T >
604+ std::ostream& operator <<(std::ostream& out, const la::vec<T, 1 >& v) {
605+ return out << ' {' << v[0 ] << ' }' ;
606+ }
607+ template <class T >
608+ std::ostream& operator <<(std::ostream& out, const la::vec<T, 2 >& v) {
609+ return out << ' {' << v[0 ] << ' ,' << v[1 ] << ' }' ;
610+ }
611+ template <class T >
612+ std::ostream& operator <<(std::ostream& out, const la::vec<T, 3 >& v) {
613+ return out << ' {' << v[0 ] << ' ,' << v[1 ] << ' ,' << v[2 ] << ' }' ;
614+ }
615+ template <class T >
616+ std::ostream& operator <<(std::ostream& out, const la::vec<T, 4 >& v) {
617+ return out << ' {' << v[0 ] << ' ,' << v[1 ] << ' ,' << v[2 ] << ' ,' << v[3 ] << ' }' ;
618+ }
619+
620+ template <class T , int M>
621+ std::ostream& operator <<(std::ostream& out, const la::mat<T, M, 1 >& m) {
622+ return out << ' {' << m[0 ] << ' }' ;
623+ }
624+ template <class T , int M>
625+ std::ostream& operator <<(std::ostream& out, const la::mat<T, M, 2 >& m) {
626+ return out << ' {' << m[0 ] << ' ,' << m[1 ] << ' }' ;
627+ }
628+ template <class T , int M>
629+ std::ostream& operator <<(std::ostream& out, const la::mat<T, M, 3 >& m) {
630+ return out << ' {' << m[0 ] << ' ,' << m[1 ] << ' ,' << m[2 ] << ' }' ;
631+ }
632+ template <class T , int M>
633+ std::ostream& operator <<(std::ostream& out, const la::mat<T, M, 4 >& m) {
634+ return out << ' {' << m[0 ] << ' ,' << m[1 ] << ' ,' << m[2 ] << ' ,' << m[3 ] << ' }' ;
635+ }
636+
595637inline std::ostream& operator <<(std::ostream& stream, const Box& box) {
596638 return stream << " min: " << box.min << " , "
597639 << " max: " << box.max ;
@@ -602,6 +644,11 @@ inline std::ostream& operator<<(std::ostream& stream, const Rect& box) {
602644 << " max: " << box.max ;
603645}
604646
647+ inline std::ostream& operator <<(std::ostream& stream, const Smoothness& s) {
648+ return stream << " halfedge: " << s.halfedge << " , "
649+ << " smoothness: " << s.smoothness ;
650+ }
651+
605652/* *
606653 * Print the contents of this vector to standard output. Only exists if compiled
607654 * with MANIFOLD_DEBUG flag.
0 commit comments