forked from cutdigital/mcut
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
948 additions
and
856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,38 @@ | ||
/** | ||
* Copyright (c) 2021-2022 Floyd M. Chitalu. | ||
* All rights reserved. | ||
/*************************************************************************** | ||
* This file is part of the MCUT project, which is comprised of a library | ||
* for surface mesh cutting, example programs and test programs. | ||
* | ||
* Copyright (C) 2024 CutDigital Enterprise Ltd | ||
* | ||
* MCUT is dual-licensed software that is available under an Open Source | ||
* license as well as a commercial license. The Open Source license is the | ||
* GNU Lesser General Public License v3+ (LGPL). The commercial license | ||
* option is for users that wish to use MCUT in their products for commercial | ||
* purposes but do not wish to release their software under the LGPL. | ||
* Email <[email protected]> for further information. | ||
* | ||
* NOTE: This file is licensed under GPL-3.0-or-later (default). | ||
* A commercial license can be purchased from Floyd M. Chitalu. | ||
* You may not use this file except in compliance with the License. A copy of | ||
* the Open Source license can be obtained from | ||
* | ||
* License details: | ||
* https://www.gnu.org/licenses/lgpl-3.0.en.html. | ||
* | ||
* (A) GNU General Public License ("GPL"); a copy of which you should have | ||
* recieved with this file. | ||
* - see also: <http://www.gnu.org/licenses/> | ||
* (B) Commercial license. | ||
* - email: [email protected] | ||
* For your convenience, a copy of this License has been included in this | ||
* repository. | ||
* | ||
* The commercial license options is for users that wish to use MCUT in | ||
* their products for comercial purposes but do not wish to release their | ||
* software products under the GPL license. | ||
* MCUT is distributed in the hope that it will be useful, but THE SOFTWARE IS | ||
* PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR | ||
* A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF | ||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* Author(s) : Floyd M. Chitalu | ||
*/ | ||
* Author(s): | ||
* | ||
* Floyd M. Chitalu CutDigital Enterprise Ltd. | ||
* | ||
**************************************************************************/ | ||
|
||
#include <algorithm> | ||
#include <functional> | ||
#include <iterator> | ||
|
@@ -36,11 +50,7 @@ | |
#include "mcut/internal/timer.h" | ||
#include "mcut/internal/utils.h" | ||
|
||
#ifndef LICENSE_PURCHASED | ||
#define lmsg() printf("NOTE: MCUT is copyrighted and may not be sold or included in commercial products without a license.\n") | ||
#else | ||
#define lmsg() | ||
#endif // #ifndef LICENSE_PURCHASED | ||
|
||
|
||
namespace std { | ||
// need to declare partial and explicit specializations in every translation unit | ||
|
@@ -1527,7 +1537,29 @@ std::vector<vd_t> linear_projection_sort(const std::vector<std::pair<vd_t, vec3> | |
// | ||
void dispatch(output_t& output, const input_t& input) | ||
{ | ||
lmsg(); | ||
|
||
#ifndef LICENSE_NOTICE_ACKNOWLEDGED | ||
const char* notice_str = R"delimiter( | ||
*************************************************************************** | ||
* * | ||
* The program you are running is dependent on the MCUT library. * | ||
* * | ||
* Copyright (C) 2024 CutDigital Enterprise Ltd * | ||
* * | ||
* MCUT is dual-licensed software that is available under an Open Source * | ||
* license as well as a Commercial license. The Open Source license is * | ||
* the GNU Lesser General Public License v3+ (LGPL). The Commercial * | ||
* license is for users that wish to use MCUT in their products for * | ||
* commercial purposes but do not wish to release their software under * | ||
* LGPL. * | ||
* * | ||
* Email <[email protected]> for further information. * | ||
* * | ||
*************************************************************************** | ||
)delimiter"; | ||
|
||
printf("%s", notice_str); | ||
#endif // #ifndef LICENSE_NOTICE_ACKNOWLEDGED | ||
|
||
TIMESTACK_PUSH(__FUNCTION__); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,3 @@ | ||
# | ||
# Copyright (c) 2021-2022 Floyd M. Chitalu. | ||
# All rights reserved. | ||
# | ||
# NOTE: This file is licensed under GPL-3.0-or-later (default). | ||
# A commercial license can be purchased from Floyd M. Chitalu. | ||
# | ||
# License details: | ||
# | ||
# (A) GNU General Public License ("GPL"); a copy of which you should have | ||
# recieved with this file. | ||
# - see also: <http://www.gnu.org/licenses/> | ||
# (B) Commercial license. | ||
# - email: [email protected] | ||
# | ||
# The commercial license options is for users that wish to use MCUT in | ||
# their products for comercial purposes but do not wish to release their | ||
# software products under the GPL license. | ||
# | ||
# Author(s) : Floyd M. Chitalu | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(mcut_tests VERSION 1.0) | ||
|
||
find_package(Threads REQUIRED) # multi-context tests | ||
|
@@ -38,16 +14,11 @@ enable_testing() | |
# | ||
# Download and unpack utest at configure time | ||
# | ||
#download_project(PROJ utest | ||
# GIT_REPOSITORY https://github.com/sheredom/utest.h.git | ||
# GIT_TAG master | ||
# ${UPDATE_DISCONNECTED_IF_AVAILABLE} | ||
#) | ||
FetchContent_Populate( | ||
utest | ||
GIT_REPOSITORY https://github.com/sheredom/utest.h.git | ||
GIT_TAG master | ||
GIT_PROGRESS TRUE | ||
GIT_PROGRESS FALSE | ||
) | ||
|
||
set(utest_include_dir ${utest_SOURCE_DIR}) | ||
|
@@ -67,21 +38,16 @@ add_executable( | |
${CMAKE_CURRENT_SOURCE_DIR}/source/getDataMaps.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/polygonWithHoles.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/triangulation.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/off.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/getEventInfo.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/concurrentSynchronizedContexts.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/userEvents.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/perturbationState.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/source/intersectionType.cpp) | ||
|
||
target_include_directories(mcut_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ${MCUT_INCLUDE_DIR} ${utest_include_dir} ${libigl_include_dir} ${eigen_include_dir}) | ||
target_link_libraries(mcut_tests PRIVATE mcut Threads::Threads) | ||
target_include_directories(mcut_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ${MCUT_INCLUDE_DIR} ${utest_include_dir} ${mio_include_dir}) | ||
target_link_libraries(mcut_tests PRIVATE mcut mio Threads::Threads) | ||
target_compile_definitions(mcut_tests PRIVATE -DMESHES_DIR="${CMAKE_CURRENT_SOURCE_DIR}/meshes" ) | ||
target_compile_options(mcut_tests PRIVATE ${compilation_flags}) | ||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
target_compile_options(mcut_tests PRIVATE -Wno-class-memaccess) # utest: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type | ||
endif() | ||
|
||
if(MCUT_BUILD_AS_SHARED_LIB) | ||
target_compile_definitions(mcut_tests PRIVATE -DMCUT_WITH_ARBITRARY_PRECISION_NUMBERS=1 ) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.