### Run Geomview with example Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/index.htm Command to start Geomview with the example file. ```bash ./geomview eg.01.cube ``` -------------------------------- ### Configure with custom installation prefix Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/EXPAT/expat/README.md Sets the installation directory for libexpat, expat.h, and xmlwf. Default installs to /usr/local/lib, /usr/local/include, and /usr/local/bin. ```console ./configure --prefix=/home/me/mystuff ``` -------------------------------- ### Start X terminal server with xinit or startx Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/index.htm Commands to start the X terminal server if needed, using 'xinit' or 'startx' in /usr/X11R6/bin. ```bash xinit -- -multiwindow -clipboard ``` ```bash startx ``` -------------------------------- ### qvoronoi synopsis and examples Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qvoronoi.htm Command-line synopsis for qvoronoi with options and example pipelines using rbox. The examples show typical invocations for computing Voronoi diagrams, including furthest-site, output formats, and specific vertex queries. ```text qvoronoi- compute the Voronoi diagram. input (stdin): dimension, number of points, point coordinates comments start with a non-numeric character options (qh-voron.htm): Qu - compute furthest-site Voronoi diagram Tv - verify result: structure, convexity, and in-circle test . - concise list of all options - - one-line description of all options output options (subset): s - summary of results (default) p - Voronoi vertices o - OFF file format (dim, Voronoi vertices, and Voronoi regions) FN - count and Voronoi vertices for each Voronoi region Fv - Voronoi diagram as Voronoi vertices between adjacent input sites Fi - separating hyperplanes for bounded regions, 'Fo' for unbounded G - Geomview output (2-d only) QVn - Voronoi vertices for input point n, -n if not TO file- output results to file, may be enclosed in single quotes examples: rbox c P0 D2 | qvoronoi s o rbox c P0 D2 | qvoronoi Fi rbox c P0 D2 | qvoronoi Fo rbox c P0 D2 | qvoronoi Fv rbox c P0 D2 | qvoronoi s Qu Fv rbox c P0 D2 | qvoronoi Qu Fo rbox c G1 d D2 | qvoronoi s p rbox c P0 D2 | qvoronoi s Fv QV0 ``` -------------------------------- ### Install build tools on Debian/Ubuntu/Mint Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install required build tools for GLEW on Debian/Ubuntu/Mint using apt-get. ```bash $ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev ``` -------------------------------- ### qhull synopsis and examples Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qhull.htm Overview of qhull usage, options, and example commands. The synopsis lists input format, common options, and output options. Examples show typical command pipelines using rbox and qhull. ```text qhull- compute convex hulls and related structures. input (stdin): dimension, n, point coordinates comments start with a non-numeric character halfspace: use dim+1 and put offsets after coefficients options (qh-quick.htm): d - Delaunay triangulation by lifting points to a paraboloid d Qu - furthest-site Delaunay triangulation (upper convex hull) v - Voronoi diagram as the dual of the Delaunay triangulation v Qu - furthest-site Voronoi diagram H1,1 - Halfspace intersection about [1,1,0,...] via polar duality Qt - triangulated output QJ - joggle input instead of merging facets Tv - verify result: structure, convexity, and point inclusion . - concise list of all options - - one-line description of all options Output options (subset): s - summary of results (default) i - vertices incident to each facet n - normals with offsets p - vertex coordinates (if 'Qc', includes coplanar points) if 'v', Voronoi vertices Fp - halfspace intersections Fx - extreme points (convex hull vertices) FA - compute total area and volume o - OFF format (if 'v', outputs Voronoi regions) G - Geomview output (2-d, 3-d and 4-d) m - Mathematica output (2-d and 3-d) QVn - print facets that include point n, -n if not TO file- output results to file, may be enclosed in single quotes examples: rbox c d D2 | qhull Qc s f Fx | more rbox 1000 s | qhull Tv s FA rbox 10 D2 | qhull d QJ s i TO result rbox 10 D2 | qhull v Qbb Qt p rbox 10 D2 | qhull d Qu QJ m rbox 10 D2 | qhull v Qu QJ o rbox c | qhull n rbox c | qhull FV n | qhull H Fp rbox d D12 | qhull QR0 FA rbox c D7 | qhull FA TF1000 rbox y 1000 W0 | qhull rbox 10 | qhull v QJ o Fv ``` -------------------------------- ### Install Qhull programs and man pages Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/README.txt Installs the compiled programs and their man pages. Requires defining MANDIR and BINDIR before running. ```bash make install ``` -------------------------------- ### Sample 3-d input for Qhull Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/index.htm Example input format for Qhull: first line is dimension, second line is number of points, remaining lines are coordinates. Comments start with a non-numeric character and continue to end of line. ```text 3 #sample 3-d input 5 0.4 -0.5 1.0 1000 -1e-5 -100 0.3 0.2 0.1 1.0 1.0 1.0 0 0 0 ``` -------------------------------- ### Install build tools on FreeBSD Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install required build tools for GLEW on FreeBSD using pkg. ```bash # pkg install xorg lang/gcc git cmake gmake bash python perl5 ``` -------------------------------- ### qhalf synopsis and usage examples Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qhalf.htm Overview of qhalf command-line options and three example pipelines for computing halfspace intersections. The examples use rbox to generate input, qconvex to produce halfspaces, and qhalf to compute the intersection. ```text qhalf- halfspace intersection about a point. input (stdin): [dim, 1, interior point] dim+1, n halfspace coefficients + offset comments start with a non-numeric character options (qhalf.htm): Hn,n - specify coordinates of interior point Qt - triangulated output QJ - joggle input instead of merging facets Tv - verify result: structure, convexity, and redundancy . - concise list of all options - - one-line description of all options output options (subset): s - summary of results (default) Fp - intersection coordinates Fv - non-redundant halfspaces incident to each intersection Fx - non-redundant halfspaces o - OFF file format (dual convex hull) G - Geomview output (dual convex hull) m - Mathematica output (dual convex hull) QVn - print intersections for halfspace n, -n if not TO file - output results to file, may be enclosed in single quotes examples: rbox d | qconvex n | qhalf s H0,0,0 Fp rbox c | qconvex FV n | qhalf s i rbox c | qconvex FV n | qhalf s o ``` -------------------------------- ### Install Catch2 Headers Source: https://github.com/hmitchr/cadenceslicer/blob/main/tests/catch2/src/CMakeLists.txt Installs Catch2 headers from the source and generated directories to the CMake install include directory, matching only .hpp files. ```cmake # Install the headers install( DIRECTORY "${SOURCES_DIR}" "${PROJECT_BINARY_DIR}/generated-includes/catch2" # Also install the generated header DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" FILES_MATCHING PATTERN "*.hpp" ) ``` -------------------------------- ### qdelaunay synopsis and examples Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qdelaun.htm Lists the qdelaunay options and example command pipelines for computing Delaunay triangulations. The examples show typical usage with rbox-generated point sets and various output options. ```text qdelaunay- compute the Delaunay triangulation. input (stdin): dimension, number of points, point coordinates comments start with a non-numeric character options (qdelaun.htm): Qt - triangulated output QJ - joggle input instead of merging facets Qu - furthest-site Delaunay triangulation Tv - verify result: structure, convexity, and in-circle test . - concise list of all options - - one-line description of all options output options (subset): s - summary of results (default) i - vertices incident to each Delaunay region Fx - extreme points (vertices of the convex hull) o - OFF format (shows the points lifted to a paraboloid) G - Geomview output (2-d and 3-d points lifted to a paraboloid) m - Mathematica output (2-d inputs lifted to a paraboloid) QVn - print Delaunay regions that include point n, -n if not TO file- output results to file, may be enclosed in single quotes examples: rbox c P0 D2 | qdelaunay s o rbox c P0 D2 | qdelaunay i rbox c P0 D3 | qdelaunay Fv Qt rbox c P0 D2 | qdelaunay s Qu Fv rbox c G1 d D2 | qdelaunay s i rbox c G1 d D2 | qdelaunay s i Qt rbox M3,4 z 100 D2 | qdelaunay s rbox M3,4 z 100 D2 | qdelaunay s Qt ``` -------------------------------- ### Install ImGuizmo via vcpkg Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/imguizmo/README.md Use vcpkg to install the ImGuizmo library for use with CMake. Requires vcpkg to be set up on the system. ```bash vcpkg install imguizmo ``` -------------------------------- ### Qhull command examples for learning Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qh-faq.htm These commands demonstrate basic usage of Qhull programs for generating and processing point sets. They cover convex hulls, Delaunay triangulations, and Voronoi diagrams with various options. ```bash rbox c ``` ```bash rbox c | qconvex ``` ```bash rbox c | qconvex o ``` ```bash rbox c | qconvex Qt o ``` ```bash rbox c | qconvex QJ o ``` ```bash rbox c D2 | qconvex ``` ```bash rbox c D4 | qconvex ``` ```bash rbox 6 s D2 | qconvex p Fx ``` ```bash rbox c D2 c G2 | qdelaunay ``` ```bash rbox c D2 c G2 | qdelaunay Qt ``` ```bash rbox c D2 c G2 | qvoronoi o ``` ```bash rbox c D2 c G2 | qvoronio Fv ``` -------------------------------- ### Build GLEW with MSYS2/Mingw-w64 Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install dependencies and build GLEW using make on MSYS2/Mingw-w64. ```bash $ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc ``` ```bash $ make ``` ```bash $ make install ``` ```bash $ make install.all ``` -------------------------------- ### Install cmake build tools on RedHat/CentOS/Fedora Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install build tools including cmake and git for GLEW on RedHat/CentOS/Fedora. ```bash $ sudo yum install libXmu-devel libXi-devel libGL-devel cmake git ``` -------------------------------- ### glewinfo sample output Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Example output from the glewinfo command-line tool, showing GLEW version, OpenGL version, and extension support. Include glewinfo.txt with bug reports. ```text --------------------------- GLEW Extension Info --------------------------- GLEW version 2.0.0 Reporting capabilities of pixelformat 3 Running on a Intel(R) HD Graphics 3000 from Intel OpenGL version 3.1.0 - Build 9.17.10.4229 is supported GL_VERSION_1_1: OK --------------- GL_VERSION_1_2: OK --------------- glCopyTexSubImage3D: OK glDrawRangeElements: OK glTexImage3D: OK glTexSubImage3D: OK ... ``` -------------------------------- ### Run Qhull and print facets (user_eg3 eg-100) Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qh-code.htm Initializes RboxPoints with 100 random points, runs Qhull, and prints the resulting facet list. This example is from user_eg3 eg-100 and demonstrates the C++ interface. ```cpp RboxPoints rbox; rbox.appendRandomPoints("100"); Qhull qhull; qhull.runQhull("", rbox); QhullFacetList facets(qhull); cout<< facets; ``` -------------------------------- ### Install ssr-window via npm Source: https://github.com/hmitchr/cadenceslicer/blob/main/resources/web/guide/swiper/node_modules/ssr-window/README.md Install the ssr-window library from NPM. ```bash npm i ssr-window ``` -------------------------------- ### Install build tools on RedHat/CentOS/Fedora Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install required build tools for GLEW on RedHat/CentOS/Fedora using yum. ```bash $ sudo yum install libXmu-devel libXi-devel libGL-devel ``` -------------------------------- ### Install qhull targets, headers, docs, and man pages Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/origCMakeLists.txt Installs the qhull targets to the configured binary, library, and archive directories. Also installs headers and documentation for libqhull, libqhull_r, and libqhullcpp, plus man pages for qhull and rbox, and the HTML documentation directory. ```cmake install(TARGETS ${qhull_TARGETS_INSTALL} RUNTIME DESTINATION ${BIN_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) install(FILES ${libqhull_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) install(FILES ${libqhullr_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) install(FILES ${libqhullr_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) install(FILES ${libqhullcpp_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhullcpp) install(FILES html/qhull.man DESTINATION ${MAN_INSTALL_DIR} RENAME qhull.1) install(FILES html/rbox.man DESTINATION ${MAN_INSTALL_DIR} RENAME rbox.1) install(FILES ${doc_FILES} DESTINATION ${DOC_INSTALL_DIR}) install(DIRECTORY html/ DESTINATION ${DOC_INSTALL_DIR}) ``` -------------------------------- ### Install cmake build tools on Debian/Ubuntu/Mint Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install build tools including cmake and git for GLEW on Debian/Ubuntu/Mint. ```bash $ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev cmake git ``` -------------------------------- ### Build GLEW with MSYS/Mingw Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Build and install GLEW using mingw32-make on MSYS/Mingw. ```bash $ mingw32-make ``` ```bash $ mingw32-make install ``` ```bash $ mingw32-make install.all ``` -------------------------------- ### Qhull Delaunay command with Qbb and Qc options Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/src/Changes.txt Example for qh_findbest/qh_findbestnew search improvement. Uses RBOX with 's W1e-13 P0' and a seed, piped to QHULL with 'd Qbb Qc Tv'. ```bash RBOX 1000 s W1e-13 P0 t996547055 | QHULL d Qbb Qc Tv ``` -------------------------------- ### Generate pkg-config files with CMake install script Source: https://github.com/hmitchr/cadenceslicer/blob/main/tests/catch2/CMakeLists.txt Creates a CMake install script that generates pkg-config files for Catch2 and Catch2WithMain. The script uses a two-step process: configuration-time variables are expanded before the [[ ]] block, while install-time variables are expanded inside it. The script sets DESTDIR_PREFIX from the DESTDIR environment variable and configures the .pc files from templates. ```cmake string( JOIN "\n" install_script "set(install_pkgconfdir \"${PKGCONFIG_INSTALL_DIR}\")" "set(impl_pc_file \"${CMAKE_CURRENT_SOURCE_DIR}/CMake/catch2.pc.in\")" "set(main_pc_file \"${CMAKE_CURRENT_SOURCE_DIR}/CMake/catch2-with-main.pc.in\")" "set(Catch2_VERSION ${Catch2_VERSION})" "set(include_dir \"${CMAKE_INSTALL_INCLUDEDIR}\")" "set(lib_dir \"${CMAKE_INSTALL_LIBDIR}\")" [[ message(STATUS "DESTDIR: $ENV{DESTDIR}") set(DESTDIR_PREFIX "") if (DEFINED ENV{DESTDIR}) set(DESTDIR_PREFIX "$ENV{DESTDIR}") endif () message(STATUS "PREFIX: ${DESTDIR_PREFIX}") set(lib_name "$") configure_file( "${impl_pc_file}" "${DESTDIR_PREFIX}${CMAKE_INSTALL_PREFIX}/${install_pkgconfdir}/catch2.pc" @ONLY ) set(lib_name "$") configure_file( "${main_pc_file}" "${DESTDIR_PREFIX}${CMAKE_INSTALL_PREFIX}/${install_pkgconfdir}/catch2-with-main.pc" @ONLY ) ]] ) install(CODE "${install_script}") ``` -------------------------------- ### Print qhull build information Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/origCMakeLists.txt Prints build configuration details including version, install directories, and build type. Also shows how to override options with -D and how to build, install, and smoketest. ```cmake message(STATUS) message(STATUS "========== qhull Build Information ==========") message(STATUS "Build Version: ${qhull_VERSION}") message(STATUS "Install Prefix (CMAKE_INSTALL_PREFIX): ${CMAKE_INSTALL_PREFIX}") message(STATUS "Binary Directory (BIN_INSTALL_DIR): ${BIN_INSTALL_DIR}") message(STATUS "Library Directory (LIB_INSTALL_DIR): ${LIB_INSTALL_DIR}") message(STATUS "Include Directory (INCLUDE_INSTALL_DIR): ${INCLUDE_INSTALL_DIR}") message(STATUS "Documentation Directory (DOC_INSTALL_DIR): ${DOC_INSTALL_DIR}") message(STATUS "Man Pages Directory (MAN_INSTALL_DIR): ${MAN_INSTALL_DIR}") message(STATUS "Build Type (CMAKE_BUILD_TYPE): ${CMAKE_BUILD_TYPE}") message(STATUS "To override these options, add -D{OPTION_NAME}=... to the cmake command") message(STATUS " Build the debug targets -DCMAKE_BUILD_TYPE=Debug") message(STATUS) message(STATUS "To build and install qhull, enter \"make\" and \"make install\"") message(STATUS "To smoketest qhull, enter \"ctest\"") message(STATUS) ``` -------------------------------- ### Complete example integration in CMakeLists.txt Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/README_CMAKE_INTERFACES.md Complete example of creating a static library that links semver publicly and stb_dxt privately, with proper include directories. ```cmake # In src/mycomponent/CMakeLists.txt add_library(mycomponent STATIC mycomponent.cpp mycomponent.h ) target_link_libraries(mycomponent PUBLIC semver::semver # Version handling is part of public API PRIVATE stb_dxt::stb_dxt # Used internally for texture compression ) target_include_directories(mycomponent PUBLIC $ $ ) ``` -------------------------------- ### Build GLEW with GNU Make Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Build, install, and clean GLEW using GNU make. May need to run make in the auto folder first. ```bash $ make ``` ```bash $ sudo make install ``` ```bash $ make clean ``` -------------------------------- ### qhull output options examples Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qhull.htm Examples of qhull commands for different output types: convex hull, Delaunay triangulation, Voronoi diagram, and halfspace intersection. Each command is shown with its purpose. ```text qhull ``` ```text qhull d Qbb ``` ```text qhull v Qbb ``` ```text qhull H ``` -------------------------------- ### Set install directories with defaults Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/origCMakeLists.txt Sets INCLUDE_INSTALL_DIR, LIB_INSTALL_DIR, BIN_INSTALL_DIR, MAN_INSTALL_DIR, and DOC_INSTALL_DIR to defaults if not already defined. MAN and DOC directories differ for WIN32. ```cmake if(INCLUDE_INSTALL_DIR) else() set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include) endif() if(LIB_INSTALL_DIR) else() set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) endif() if(BIN_INSTALL_DIR) else() set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) endif() if(MAN_INSTALL_DIR) else() if(WIN32) set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/man/man1) else() set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/man/man1) endif() endif() if(DOC_INSTALL_DIR) else() if(WIN32) set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/doc) else() set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull) endif() endif() ``` -------------------------------- ### Build GLEW for Linux mingw-w64 Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install mingw-w64 and build GLEW for 32-bit and 64-bit Windows targets. ```bash $ sudo apt install mingw-w64 ``` ```bash $ make SYSTEM=linux-mingw32 ``` ```bash $ make SYSTEM=linux-mingw64 ``` -------------------------------- ### Run qhull with rbox and options Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qhull.txt Example command that generates 1000 random points with rbox and computes the convex hull with qhull, verifying the result and printing a summary with total area and volume. ```bash rbox 1000 s | qhull Tv s FA ``` -------------------------------- ### Generate a 3-d box with qconvex (rbox 1000 D3 | qconvex G >eg.07.box) Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qh-eg.htm Same distribution as the 2-d merge example but in 3-d, with Qhull handling machine roundoff errors. Note the large number of facets. ```shell rbox 1000 D3 | qconvex G >eg.07.box ``` -------------------------------- ### Install Catch2 targets and export set Source: https://github.com/hmitchr/cadenceslicer/blob/main/tests/catch2/src/CMakeLists.txt Installs the Catch2 and Catch2WithMain libraries to standard directories and exports the Catch2Targets export set with the Catch2:: namespace. Only runs when NOT_SUBPROJECT is true. ```CMake if(NOT_SUBPROJECT) # create and install an export set for catch target as Catch2::Catch install( TARGETS Catch2 Catch2WithMain EXPORT Catch2Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install( EXPORT Catch2Targets NAMESPACE Catch2:: DESTINATION ${CATCH_CMAKE_CONFIG_DESTINATION} ) endif() ``` -------------------------------- ### CMakeLists.txt for OpenCSG example executable Source: https://github.com/hmitchr/cadenceslicer/blob/main/sandboxes/opencsg/CMakeLists.txt Configures the OpenCSG example project, requiring CMake 3.0, wxWidgets 3.1, OpenGL, GLEW, and OpenCSG. Builds an executable named 'opencsg_example' that links against libslic3r and the required libraries, with a commented-out X11 linker flag for Linux. ```cmake cmake_minimum_required(VERSION 3.0) project(OpenCSG-example) add_executable(opencsg_example WIN32 main.cpp Engine.hpp Engine.cpp ShaderCSGDisplay.hpp ShaderCSGDisplay.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/Jobs/Job.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/ProgressStatusBar.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/I18N.hpp ${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/I18N.cpp) find_package(wxWidgets 3.1 REQUIRED COMPONENTS core base gl html) find_package(OpenGL REQUIRED) find_package(GLEW REQUIRED) find_package(OpenCSG REQUIRED) include(${wxWidgets_USE_FILE}) target_link_libraries(opencsg_example libslic3r) target_include_directories(opencsg_example PRIVATE ${wxWidgets_INCLUDE_DIRS}) target_compile_definitions(opencsg_example PRIVATE ${wxWidgets_DEFINITIONS}) slic3r_remap_configs(OpenCSG::opencsg RelWithDebInfo Release) target_link_libraries(opencsg_example ${wxWidgets_LIBRARIES} OpenCSG::opencsg GLEW::GLEW OpenGL::GL #-lXrandr -lXext -lX11 ) ``` -------------------------------- ### Build GLEW for Linux EGL Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/GLEW/glew/README.md Install EGL development package and build GLEW with SYSTEM=linux-egl. ```bash $ sudo apt install libegl1-mesa-dev ``` ```bash $ make SYSTEM=linux-egl ``` -------------------------------- ### rbox examples: common point distributions Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/rbox.htm A collection of rbox command examples showing how to generate random points in a cube, on a circle, on a cube surface, on a 4-d sphere, a hypercube, a diamond, a simplex, a spiral, a lens, a rotated lattice, and multiple copies of the origin. Each command is independent and demonstrates a different distribution option. ```text rbox 10 10 random points in the unit cube centered at the origin. rbox 10 s D2 10 random points on a 2-d circle. rbox 100 W0 100 random points on the surface of a cube. rbox 1000 s D4 1000 random points on a 4-d sphere. rbox c D5 O0.5 a 5-d hypercube with one corner at the origin. rbox d D10 a 10-d diamond. rbox x 1000 r W0 100 random points on the surface of a fixed simplex rbox y D12 a 12-d simplex. rbox l 10 10 random points along a spiral rbox l 10 r 10 regular points along a spiral plus two end points rbox 1000 L10000 D4 s 1000 random points on the surface of a narrow lens. rbox 1000 L100000 s G1e-6 1000 random points near the edge of a narrow lens rbox c G2 d G3 a cube with coordinates +2/-2 and a diamond with coordinates +3/-3. rbox 64 M3,4 z a rotated, {0,1,2,3} x {0,1,2,3} x {0,1,2,3} lat- tice (Mesh) of integer points. rbox P0 P0 P0 P0 P0 5 copies of the origin in 3-d. Try 'rbox P0 P0 P0 P0 P0 | qhull QJ'. r 100 s Z1 G0.1 two cospherical 100-gons plus another cospherical point. 100 s Z1 a cone of points. 100 s Z1e-7 a narrow cone of points with many precision errors. ``` -------------------------------- ### Test Qhull installation with rbox D4 | qhull Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/README.txt Command to verify the Qhull installation on Windows by generating a 4D hypercube with rbox and computing its convex hull with qhull. ```shell rbox D4 | qhull ``` -------------------------------- ### qhull command with rbox for coplanar point check Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/src/Changes.txt Example command that may rarely report an incorrect facet->minoutside when using 'C-0 Tv' without 'Qc'. The 'Qc' option is recommended when merging to ensure all facet->maxoutside values are correct. ```text rbox 1000 W8e-6 t | qhull C-0 Tv ``` -------------------------------- ### qconvex synopsis Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qconvex.htm Overview of qconvex options and examples for computing convex hulls. ```text qconvex- compute the convex hull. input (stdin): dimension, number of points, point coordinates comments start with a non-numeric character options (qconvex.htm): Qt - triangulated output QJ - joggle input instead of merging facets Tv - verify result: structure, convexity, and point inclusion . - concise list of all options - - one-line description of all options output options (subset): s - summary of results (default) i - vertices incident to each facet n - normals with offsets p - vertex coordinates (includes coplanar points if 'Qc') Fx - extreme points (convex hull vertices) FA - compute total area and volume o - OFF format (dim, n, points, facets) G - Geomview output (2-d, 3-d, and 4-d) m - Mathematica output (2-d and 3-d) QVn - print facets that include point n, -n if not TO file- output results to file, may be enclosed in single quotes examples: rbox c D2 | qconvex s n rbox c D2 | qconvex i rbox c D2 | qconvex o rbox 1000 s | qconvex s Tv FA rbox c d D2 | qconvex s Qc Fx rbox y 1000 W0 | qconvex s n rbox y 1000 W0 | qconvex s QJ rbox d G1 D12 | qconvex QR0 FA Pp rbox c D7 | qconvex FA TF1000 ``` -------------------------------- ### Set CPACK WIX upgrade GUID Source: https://github.com/hmitchr/cadenceslicer/blob/main/CMakeLists.txt Sets a custom upgrade GUID for the Windows installer, ensuring a Cadence install never claims or replaces an OrcaSlicer one. ```cmake set(CPACK_WIX_UPGRADE_GUID "7b2f1d94-3c86-4e51-9a0d-5f8c2e61b7a3") ``` -------------------------------- ### Install with DESTDIR override Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/EXPAT/expat/README.md Overrides the in-makefile DESTDIR variable. Variable-setting priority is commandline, in-makefile, environment. ```console make install DESTDIR=/path/to/image ``` -------------------------------- ### Construct 3-d Delaunay triangulation with simplicial output (qdelaunay Qt i) Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qh-faq.htm For simplicial output from cospherical input sites, use options 'Qt i' or 'QJ i'. The example shows the resulting triangulation of a cube inside a tetrahedron. ```text rbox r y c G0.1 | qdelaunay Qt i 31 2 11 1 0 11 10 1 0 9 11 2 0 11 7 2 1 8 10 0 3 9 8 0 3 10 6 1 3 6 7 1 3 5 9 2 3 7 5 2 3 9 8 10 11 8 10 11 0 9 8 11 0 6 8 10 4 8 6 10 3 6 8 4 3 6 7 10 11 10 6 11 1 6 7 11 1 8 5 4 3 5 8 9 3 5 6 4 3 6 5 7 3 5 9 10 11 8 5 9 10 7 5 10 11 5 6 7 10 8 5 10 4 5 6 10 4 5 9 11 2 7 5 11 2 ``` -------------------------------- ### Sample data file contents Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qdelaun.htm Shows the generated data file: dimension, number of points, point coordinates, and the four square corners. This is the input for the qdelaunay example. ```text 2 RBOX s 4 W0 c D2 8 -0.4941988586954018 -0.07594397977563715 -0.06448037284989526 0.4958248496365813 0.4911154367094632 0.09383830681375946 -0.348353580869097 -0.3586778257652367 -1 -1 -1 1 1 -1 1 1 ``` -------------------------------- ### Construct 3-d Delaunay triangulation with non-simplicial output (qdelaunay Fv) Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qh-faq.htm For 3-d Delaunay triangulations with cospherical input sites, use triangulated output ('Qt') or joggled input ('QJ') to get simplicial facets; otherwise option 'i' will triangulate non-simplicial facets by adding a point. To get non-simplicial output for cospherical sites, use option 'Fv' or 'o'. For option 'o', ignore the last coordinate (the lifted coordinate for the corresponding convex hull in 4-d). The example shows a cube inside a tetrahedron; the 8-vertex facet is the cube. ```text C:\qhull>rbox r y c G0.1 | qdelaunay Fv 4 12 20 44 0.5 0 0 0.3055555555555555 0 0.5 0 0.3055555555555555 0 0 0.5 0.3055555555555555 -0.5 -0.5 -0.5 0.9999999999999999 -0.1 -0.1 -0.1 -6.938893903907228e-018 -0.1 -0.1 0.1 -6.938893903907228e-018 -0.1 0.1 -0.1 -6.938893903907228e-018 -0.1 0.1 0.1 -6.938893903907228e-018 0.1 -0.1 -0.1 -6.938893903907228e-018 0.1 -0.1 0.1 -6.938893903907228e-018 0.1 0.1 -0.1 -6.938893903907228e-018 0.1 0.1 0.1 -6.938893903907228e-018 4 2 11 1 0 4 10 1 0 3 4 11 10 1 0 4 2 9 0 3 4 9 11 2 0 4 7 2 1 3 4 11 7 2 1 4 8 10 0 3 4 9 8 0 3 5 8 9 10 11 0 4 10 6 1 3 4 6 7 1 3 5 6 8 10 4 3 5 6 7 10 11 1 4 5 9 2 3 4 7 5 2 3 5 5 8 9 4 3 5 5 6 7 4 3 8 5 6 8 7 9 10 11 4 5 5 7 9 11 2 ``` -------------------------------- ### Install dom7 with npm Source: https://github.com/hmitchr/cadenceslicer/blob/main/resources/web/include/swiper/node_modules/dom7/README.md Install the Dom7 library as a dependency in your project using npm. ```bash npm install dom7 --save ``` -------------------------------- ### Input data for unit cube Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qconvex.htm Example input file for computing the convex hull of the unit cube, generated by rbox. ```text 3 RBOX c 8 -0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 0.5 ``` -------------------------------- ### Build Commands for macOS, Linux, and Windows Source: https://github.com/hmitchr/cadenceslicer/blob/main/AGENTS.md CMake build commands for each platform. Use RelWithDebInfo on macOS and Linux; on Windows replace %build_type% with Debug, Release, or RelWithDebInfo. ```bash # macOS cmake --build build/arm64 --config RelWithDebInfo --target all -- ``` ```bash # Linux cmake --build build --config RelWithDebInfo --target all -- ``` ```bash # Windows (replace %build_type% with Debug/Release/RelWithDebInfo) cmake --build . --config %build_type% --target ALL_BUILD -- -m ``` -------------------------------- ### Install resources and configure FHS on UNIX Source: https://github.com/hmitchr/cadenceslicer/blob/main/CMakeLists.txt Defines the install target for resources, handling Windows, FHS-compliant UNIX, macOS bundle, and generic UNIX cases. On Windows, it installs resources and optionally the bundled UV executable, skips system runtime libraries, and installs them. For FHS, it installs resources to the data root, excludes udev patterns, installs a desktop file, and icons. For macOS bundles, it installs the UV executable into the app bundle. For other UNIX, it installs the desktop file, resources, and UV executable. ```cmake # Resources install target, configure fhs.hpp on UNIX if (WIN32) install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "./resources") if(ORCA_BUNDLED_UV_EXECUTABLE) install(PROGRAMS "${ORCA_BUNDLED_UV_EXECUTABLE}" DESTINATION "./resources/tools/uv" RENAME "${ORCA_BUNDLED_UV_FILENAME}") endif() set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) include(InstallRequiredSystemLibraries) install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ".") elseif (SLIC3R_FHS) # CMAKE_INSTALL_FULL_DATAROOTDIR: read-only architecture-independent data root (share) set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/OrcaSlicer") install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES} PATTERN "*/udev" EXCLUDE ) if(ORCA_BUNDLED_UV_EXECUTABLE) install(PROGRAMS "${ORCA_BUNDLED_UV_EXECUTABLE}" DESTINATION "${SLIC3R_FHS_RESOURCES}/tools/uv" RENAME "${ORCA_BUNDLED_UV_FILENAME}") endif() install(FILES src/dev-utils/platform/unix/com.orcaslicer.OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) foreach(SIZE 32 128 192) install(FILES ${SLIC3R_RESOURCES_DIR}/images/CadenceSlicer_${SIZE}px.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME CadenceSlicer.png ) endforeach() elseif (CMAKE_MACOSX_BUNDLE) # install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/${SLIC3R_APP_KEY}.app/Contents/resources") if(ORCA_BUNDLED_UV_EXECUTABLE) install(PROGRAMS "${ORCA_BUNDLED_UV_EXECUTABLE}" DESTINATION "${CMAKE_INSTALL_PREFIX}/${SLIC3R_APP_KEY}.app/Contents/Resources/tools/uv" RENAME "${ORCA_BUNDLED_UV_FILENAME}") endif() else () install(FILES src/dev-utils/platform/unix/com.orcaslicer.OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications) install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources") if(ORCA_BUNDLED_UV_EXECUTABLE) install(PROGRAMS "${ORCA_BUNDLED_UV_EXECUTABLE}" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources/tools/uv" RENAME "${ORCA_BUNDLED_UV_FILENAME}") endif() endif () ``` -------------------------------- ### Manual compilation with CMake Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/earcut/README.md Clone the repository recursively, create a build directory, configure with CMake, and build. Optionally run the tests, benchmark, and visualization programs. ```bash git clone --recursive https://github.com/mapbox/earcut.hpp.git cd earcut.hpp mkdir build cd build cmake .. make # ./tests # ./bench # ./viz ``` -------------------------------- ### Qhull command for sharp edge distribution Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/src/Changes.txt Example distribution with a sharp edge that required redesign of qh_findbestnew. Uses RBOX with 's Z1 G1e-13' piped to qhull with 'Tv'. ```bash rbox 1000 s Z1 G1e-13 | qhull Tv ``` -------------------------------- ### rbox command for coplanar facets with no merging Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/src/Changes.txt Example command mentioned in the manual update for 'Qg' with coplanar facets and no merging. 'Qg Pg' and 'Pg' produce different results due to precision problems. ```text rbox c D7 ``` -------------------------------- ### Run qdelaunay with strong convexity constraint C-1e-3 Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qh-impre.htm Example command that may cause all facets to be flipped or upper Delaunay when heavy merging occurs for Delaunay triangulations. Use with rbox to generate a point set and pipe into qdelaunay with the C-1e-3 option. ```shell rbox 1000 s t993602376 | qdelaunay C-1e-3 ``` -------------------------------- ### Run qhalf on cube data Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps_src/qhull/html/qhalf.htm Command to compute the halfspace intersection from the data file created by the previous example. The 's' option prints a summary and 'Fp' prints the intersection coordinates. ```text qhalf s Fp < data ``` -------------------------------- ### Run configure script Source: https://github.com/hmitchr/cadenceslicer/blob/main/deps/EXPAT/expat/README.md Initial configuration step for building Expat from a source distribution using GNU Autotools. ```console ./configure ```