Adding rotating calipers algorithm for minimum are bounding box rotation.

Cleanup, fix build on windows and add test for rotcalipers.

Try to fix compilation on windows

With updates from libnest2d
Another build fix.


Clean up and add comments.


adding rotcalipers test  and some cleanup


Trying to fix on OSX


Fix rotcalipers array indexing


Get rid of boost convex hull.


Adding helper function 'remove_collinear_points'


Importing new libnest2d upgrades.


Disable using __int128 in NFP on OSX
This commit is contained in:
tamasmeszaros 2019-06-06 14:27:07 +02:00
parent 6136fe7d92
commit d4fe7b5a96
25 changed files with 1272 additions and 856 deletions

View file

@ -48,6 +48,9 @@ set(LIBNEST2D_SRCFILES
${SRC_DIR}/libnest2d/optimizer.hpp
${SRC_DIR}/libnest2d/utils/metaloop.hpp
${SRC_DIR}/libnest2d/utils/rotfinder.hpp
${SRC_DIR}/libnest2d/utils/rotcalipers.hpp
${SRC_DIR}/libnest2d/utils/bigint.hpp
${SRC_DIR}/libnest2d/utils/rational.hpp
${SRC_DIR}/libnest2d/placers/placer_boilerplate.hpp
${SRC_DIR}/libnest2d/placers/bottomleftplacer.hpp
${SRC_DIR}/libnest2d/placers/nfpplacer.hpp
@ -70,12 +73,10 @@ if(TBB_FOUND)
# The Intel TBB library will use the std::exception_ptr feature of C++11.
target_compile_definitions(libnest2d INTERFACE -DTBB_USE_CAPTURED_EXCEPTION=0)
target_link_libraries(libnest2d INTERFACE tbb)
# The following breaks compilation on Visual Studio in Debug mode.
#find_package(Threads REQUIRED)
#target_link_libraries(libnest2d INTERFACE ${TBB_LIBRARIES} ${CMAKE_DL_LIBS}
# Threads::Threads
# )
find_package(Threads REQUIRED)
target_link_libraries(libnest2d INTERFACE ${TBB_LIBRARIES} ${CMAKE_DL_LIBS}
Threads::Threads
)
else()
find_package(OpenMP QUIET)
@ -92,10 +93,11 @@ endif()
add_subdirectory(${SRC_DIR}/libnest2d/backends/${LIBNEST2D_GEOMETRIES})
target_link_libraries(libnest2d INTERFACE ${LIBNEST2D_GEOMETRIES}Backend)
add_subdirectory(${SRC_DIR}/libnest2d/optimizers/${LIBNEST2D_OPTIMIZER})
target_link_libraries(libnest2d INTERFACE ${LIBNEST2D_OPTIMIZER}Optimizer)
#target_sources(libnest2d INTERFACE ${LIBNEST2D_SRCFILES})
# target_sources(libnest2d INTERFACE ${LIBNEST2D_SRCFILES})
target_include_directories(libnest2d INTERFACE ${SRC_DIR})
if(NOT LIBNEST2D_HEADER_ONLY)