Skip to content

Commit b6b8c32

Browse files
committed
Merge pull request #106465 from Chubercik/manifold-3.1.0
manifold: Update to 3.1.1
2 parents 3c43899 + f3da620 commit b6b8c32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3225
-2726
lines changed

COPYRIGHT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ License: BSD-3-clause
391391

392392
Files: thirdparty/manifold/*
393393
Comment: Manifold
394-
Copyright: 2020-2024, The Manifold Authors
394+
Copyright: 2020-2025, The Manifold Authors
395395
License: Apache-2.0
396396

397397
Files: thirdparty/mbedtls/*

modules/csg/SCsub

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ thirdparty_sources = [
2525
"src/polygon.cpp",
2626
"src/properties.cpp",
2727
"src/quickhull.cpp",
28+
"src/sdf.cpp",
2829
"src/smoothing.cpp",
2930
"src/sort.cpp",
3031
"src/subdivision.cpp",
32+
"src/tree2d.cpp",
3133
]
3234

3335
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]

thirdparty/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,12 +624,12 @@ See `linuxbsd_headers/README.md`.
624624
## manifold
625625

626626
- Upstream: https://github.com/elalish/manifold
627-
- Version: 3.0.1 (98b8142519d35c13e0e25cfa9fd6e3a271403be6, 2024)
627+
- Version: 3.1.1 (2f4741e0b1de44d6d461b869e481351335340b44, 2025)
628628
- License: Apache 2.0
629629

630630
File extracted from upstream source:
631631

632-
- `src/` and `include/`, except from `CMakeLists.txt`, `cross_section.cpp` and `meshIO.{cpp,h}`
632+
- `src/` and `include/`, except from `CMakeLists.txt`, `cross_section.h` and `meshIO.{cpp,h}`
633633
- `AUTHORS`, `LICENSE`
634634

635635

thirdparty/manifold/include/manifold/common.h

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
#include <chrono>
2121
#endif
2222

23-
#include "manifold/linalg.h"
23+
#include "linalg.h"
24+
#include "optional_assert.h"
2425

2526
namespace 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+
595637
inline 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

Comments
 (0)