mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 20:36:27 +00:00
Include cgal patch for nary union
This commit is contained in:
@@ -447,6 +447,7 @@ IF NOT %ERRORLEVEL%==0 GOTO :Error
|
||||
cd "%DEPENDENCY_DIR%"
|
||||
git reset --hard
|
||||
git apply "%~dp0patches\cgal_no_zlib.patch"
|
||||
git apply "%~dp0patches\cgal_4768.patch"
|
||||
call :RunCMake -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%\cgal" ^
|
||||
-DBOOST_ROOT="%DEPS_DIR%\boost_%BOOST_VER%" ^
|
||||
-DGMP_INCLUDE_DIR="%INSTALL_DIR%\mpir" ^
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From a86712d1aae9a1a6d2004db3fc8fcdac6ef6b782 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Krijnen <t.krijnen@gmail.com>
|
||||
Date: Sun, 7 Jun 2020 15:25:18 +0200
|
||||
Subject: [PATCH] Don't segfault on empty Nef_nary_x
|
||||
|
||||
---
|
||||
Nef_3/include/CGAL/Nef_nary_intersection_3.h | 3 ++-
|
||||
Nef_3/include/CGAL/Nef_nary_union_3.h | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Nef_3/include/CGAL/Nef_nary_intersection_3.h b/Nef_3/include/CGAL/Nef_nary_intersection_3.h
|
||||
index 70fc5791fae..5178705dc2f 100644
|
||||
--- a/Nef_3/include/CGAL/Nef_nary_intersection_3.h
|
||||
+++ b/Nef_3/include/CGAL/Nef_nary_intersection_3.h
|
||||
@@ -52,7 +52,8 @@ class Nef_nary_intersection_3 {
|
||||
}
|
||||
|
||||
Polyhedron get_intersection() {
|
||||
-
|
||||
+ if (queue.empty())
|
||||
+ return empty;
|
||||
while(queue.size() > 1)
|
||||
intersect();
|
||||
inserted = 0;
|
||||
diff --git a/Nef_3/include/CGAL/Nef_nary_union_3.h b/Nef_3/include/CGAL/Nef_nary_union_3.h
|
||||
index ecbbae2db59..c8663bb911b 100644
|
||||
--- a/Nef_3/include/CGAL/Nef_nary_union_3.h
|
||||
+++ b/Nef_3/include/CGAL/Nef_nary_union_3.h
|
||||
@@ -52,7 +52,8 @@ class Nef_nary_union_3 {
|
||||
}
|
||||
|
||||
Polyhedron get_union() {
|
||||
-
|
||||
+ if (queue.empty())
|
||||
+ return empty;
|
||||
while(queue.size() > 1)
|
||||
unite();
|
||||
inserted = 0;
|
||||
Reference in New Issue
Block a user