Skip to content

Commit

Permalink
Merge branch 'master' into bridge_infill_threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuh authored Dec 9, 2020
2 parents 8b60613 + fe4f1b1 commit 33215bb
Show file tree
Hide file tree
Showing 344 changed files with 87,520 additions and 45,267 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ if(WIN32)
add_definitions(-D_USE_MATH_DEFINES -D_WIN32 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
if(MSVC)
# BOOST_ALL_NO_LIB: Avoid the automatic linking of Boost libraries on Windows. Rather rely on explicit linking.
add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_USE_WINAPI_VERSION=0x601 )
add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_USE_WINAPI_VERSION=0x601 -DBOOST_SYSTEM_USE_UTF8 )
endif(MSVC)
endif(WIN32)

Expand Down Expand Up @@ -393,6 +393,7 @@ endif ()

find_package(PNG REQUIRED)

set(OpenGL_GL_PREFERENCE "LEGACY")
find_package(OpenGL REQUIRED)

# Find glew or use bundled version
Expand Down Expand Up @@ -513,8 +514,10 @@ elseif (SLIC3R_FHS)
set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/PrusaSlicer")
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${SLIC3R_FHS_RESOURCES}")
install(FILES src/platform/unix/PrusaSlicer.desktop DESTINATION ${SLIC3R_FHS_RESOURCES}/applications)
install(FILES src/platform/unix/PrusaGcodeviewer.desktop DESTINATION ${SLIC3R_FHS_RESOURCES}/applications)
else ()
install(FILES src/platform/unix/PrusaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
install(FILES src/platform/unix/PrusaGcodeviewer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
endif ()

Expand Down
Binary file added PrusaSlicer.mo
Binary file not shown.
11 changes: 11 additions & 0 deletions deps/CGAL/CGAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ include(GNUInstallDirs)
# If this file is not present, it will not consider the stored absolute path
ExternalProject_Add_Step(dep_CGAL dep_CGAL_relocation_fix
DEPENDEES install

COMMAND ${CMAKE_COMMAND} -E remove CGALConfig-installation-dirs.cmake
WORKING_DIRECTORY "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL"
)

# Again, for whatever reason, CGAL thinks that its version is not relevant if
# configured as a header only library. Fixing it by placing a cmake version file
# besides the installed config file.
ExternalProject_Add_Step(dep_CGAL dep_CGAL_version_fix
DEPENDEES install

COMMAND ${CMAKE_COMMAND} -E copy cgal/CGALConfigVersion.cmake "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL/CGALConfigVersion.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
)
25 changes: 25 additions & 0 deletions deps/CGAL/cgal/CGALConfigVersion.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().

set(PACKAGE_VERSION "5.0.0")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()


# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()
13 changes: 8 additions & 5 deletions deps/GMP/GMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,26 @@ if (MSVC)
else ()
set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
set(_gmp_build_tgt armv7)
endif()

if (APPLE)
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
set(_gmp_build_tgt aarch64)
endif()
set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}")
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
set(_gmp_build_tgt armv7)
endif()
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu")
else ()
set(_gmp_build_tgt "") # let it guess
endif()

ExternalProject_Add(dep_GMP
# URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
URL https://gmplib.org/download/gmp/gmp-6.2.1.tar.bz2
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
BUILD_COMMAND make -j
Expand Down
14 changes: 9 additions & 5 deletions deps/PNG/PNG.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
set(_prefix_line "")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_prefix_line "-DPNG_PREFIX=prusaslicer_")
endif()
if (APPLE)
# Only disable NEON extension for Apple ARM builds, leave it enabled for Raspberry PI.
set(_disable_neon_extension "-DPNG_ARM_NEON=off")
else ()
set(_disable_neon_extension "")
endif ()

prusaslicer_add_cmake_project(PNG
GIT_REPOSITORY https://github.com/glennrp/libpng.git
Expand All @@ -10,8 +12,10 @@ prusaslicer_add_cmake_project(PNG
CMAKE_ARGS
-DPNG_SHARED=OFF
-DPNG_STATIC=ON
${_prefix_line}
-DPNG_PREFIX=prusaslicer_
-DPNG_TESTS=OFF
-DDISABLE_DEPENDENCY_TRACKING=OFF
${_disable_neon_extension}
)

if (MSVC)
Expand Down
1 change: 0 additions & 1 deletion deps/deps-linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ ExternalProject_Add(dep_libcurl
--disable-smb
--disable-smtp
--disable-gopher
--disable-crypto-auth
--without-gssapi
--without-libpsl
--without-libidn2
Expand Down
1 change: 0 additions & 1 deletion deps/deps-macos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ ExternalProject_Add(dep_libcurl
--disable-smb
--disable-smtp
--disable-gopher
--disable-crypto-auth
--without-gssapi
--without-libpsl
--without-libidn2
Expand Down
9 changes: 8 additions & 1 deletion deps/wxWidgets/wxWidgets.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
set(_wx_git_tag v3.1.3-patched)
if (APPLE AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
# The new OSX 11 (Big Sur) is not compatible with wxWidgets 3.1.3.
# Let's use patched wxWidgets 3.1.4, even though it is not quite tested.
set(_wx_git_tag v3.1.4-patched)
else ()
# Use the tested patched wxWidgets 3.1.3 everywhere else.
set(_wx_git_tag v3.1.3-patched)
endif ()

# set(_patch_command "")
set(_wx_toolkit "")
Expand Down
58 changes: 23 additions & 35 deletions doc/How to build - Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,45 +124,33 @@ intermediate files, which are not handled correctly by either `b2.exe` or possib

# Noob guide (step by step)

Install Visual Studio Community 2019 from
[visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/)
Select all workload options for C++
- Install Visual Studio Community 2019 from [visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/)
- Select all workload options for C++
- Install git for Windows from [gitforwindows.org](https://gitforwindows.org/)
- download and run the exe accepting all defaults
- Download `PrusaSlicer-master.zip` from github
- This example will use the directory c:\PrusaSlicer and unzipped to `c:\PrusaSlicer\PrusaSlicer-master\` so this will be the prefix for all the steps. Substitute your as required prefix.
- Go to the Windows Start Menu and Click on "Visual Studio 2019" folder, then select the ->"x64 Native Tools Command Prompt" to open a command window

Install git for Windows from
[gitforwindows.org](https://gitforwindows.org/)
download and run the exe accepting all defaults
cd c:\PrusaSlicer\PrusaSlicer-master\deps
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -DDESTDIR="c:\PrusaSlicer\PrusaSlicer-master"
msbuild /m ALL_BUILD.vcxproj // This took 13.5 minutes on the following machine: core I7-7700K @ 4.2Ghz with 32GB main memory and 20min on an average laptop
cd c:\PrusaSlicer\PrusaSlicer-master\
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH="c:\PrusaSlicer\PrusaSlicer-master\usr\local"

download PrusaSlicer-master.zip from github
I downloaded this to c:\PrusaSlicer and unzipped to c:\PrusaSlicer\PrusaSlicer-master\ so this will be my prefix for all my steps. Substitute your prefix.
- Open Visual Studio for c++ development (VS asks this the first time you start it)

Go to the Windows Start Menu and Click on "Visual Studio 2019" folder, then select the ->"x64 Native Tools Command Prompt" to open a command window
`Open->Project/Solution` or `File->Open->Project/Solution` (depending on which dialog comes up first)

cd c:\PrusaSlicer\PrusaSlicer-master\deps
- Click on `c:\PrusaSlicer\PrusaSlicer-master\build\PrusaSlicer.sln`

mkdir build
`Debug->Start Debugging` or `Debug->Start Without debugging`

cd build
- PrusaSlicer should start.
- You're up and running!

cmake .. -G "Visual Studio 16 2019" -DDESTDIR="c:\PrusaSlicer\PrusaSlicer-master"

msbuild /m ALL_BUILD.vcxproj // This took 13.5 minutes on my machine: core I7-7700K @ 4.2Ghz with 32GB main memory and 20min on a average laptop

cd c:\PrusaSlicer\PrusaSlicer-master\

mkdir build

cd build

cmake .. -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH="c:\PrusaSlicer\PrusaSlicer-master\usr\local"

open Visual Studio for c++ development (VS asks this the first time you start it)

Open->Project/Solution or File->Open->Project/Solution (depending on which dialog comes up first)

click on c:\PrusaSlicer\PrusaSlicer-master\build\PrusaSlicer.sln

Debug->Start Debugging or Debug->Start Without debugging
PrusaSlicer should start. You're up and running!


note: Thanks to @douggorgen for the original guide, as an answer for a issue
Note: Thanks to @douggorgen for the original guide, as an answer for a issue
12 changes: 12 additions & 0 deletions resources/data/flatpak/com.prusa3d.PrusaSlicer.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
Name=PrusaSlicer
GenericName=3D Printing Software
Icon=com.prusa3d.PrusaSlicer
Exec=prusa-slicer %F
Terminal=false
Type=Application
MimeType=model/stl;model/x-wavefront-obj;model/3mf;model/x-geomview-off;application/x-amf;
Categories=Graphics;3DGraphics;Engineering;
Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
StartupNotify=false
StartupWMClass=prusa-slicer
62 changes: 62 additions & 0 deletions resources/data/flatpak/com.prusa3d.PrusaSlicer.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.prusa3d.PrusaSlicer</id>
<launchable type="desktop-id">com.prusa3d.PrusaSlicer.desktop</launchable>
<provides>
<id>prusa-slicer.desktop</id>
</provides>
<name>PrusaSlicer</name>
<summary>Powerful 3D printing slicer optimized for Prusa printers</summary>
<metadata_license>0BSD</metadata_license>
<project_license>AGPL-3.0-only</project_license>
<description>
<p>
PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into G-code
instructions for FFF printers or PNG layers for mSLA 3D printers. It's
compatible with any modern printer based on the RepRap toolchain, including all
those based on the Marlin, Prusa, Sprinter and Repetier firmware. It also works
with Mach3, LinuxCNC and Machinekit controllers.
</p>
<p>
PrusaSlicer is based on Slic3r by Alessandro Ranelucci and the RepRap community.
</p>
<p>
What are some of PrusaSlicer's main features?
</p>
<ul>
<li>multi-platform (Linux/Mac/Win) and packaged as standalone-app with no dependencies required</li>
<li>complete command-line interface to use it with no GUI</li>
<li>multi-material (multiple extruders) object printing</li>
<li>multiple G-code flavors supported (RepRap, Makerbot, Mach3, Machinekit etc.)</li>
<li>ability to plate multiple objects having distinct print settings</li>
<li>multithread processing</li>
<li>STL auto-repair (tolerance for broken models)</li>
<li>wide automated unit testing</li>
</ul>
</description>
<url type="homepage">https://www.prusa3d.com/prusaslicer/</url>
<url type="help">https://help.prusa3d.com</url>
<url type="bugtracker">https://github.com/prusa3d/PrusaSlicer/issues</url>
<screenshots>
<screenshot type="default">
<image>https://user-images.githubusercontent.com/590307/78981854-24d07580-7b21-11ea-9441-77923534a659.png</image>
</screenshot>
<screenshot>
<image>https://user-images.githubusercontent.com/590307/78981860-2863fc80-7b21-11ea-8c2d-8ff79ced2578.png</image>
</screenshot>
<screenshot>
<image>https://user-images.githubusercontent.com/590307/78981862-28fc9300-7b21-11ea-9b0d-d03e16b709d3.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1" />
<releases>
<release version="2.2.0" date="2020-03-21">
<description>
<p>This is final release of PrusaSlicer 2.2.0 introducing SLA hollowing and hole drilling, support for 3rd party printer vendors, 3Dconnexion support,
automatic variable layer height, macOS dark mode support, greatly improved ColorPrint feature and much, much more.
Several bugs found in the previous release candidate are fixed in this final release. See the respective change logs of the previous releases for all the
new features, improvements and bugfixes in the 2.2.0 series.</p>
</description>
</release>
</releases>
</component>
Binary file modified resources/icons/PrusaSlicer-gcodeviewer.ico
Binary file not shown.
Binary file modified resources/icons/PrusaSlicer-gcodeviewer_128px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icons/PrusaSlicer-gcodeviewer_192px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icons/PrusaSlicer-gcodeviewer_32px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions resources/icons/fdm_supports.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 33215bb

Please sign in to comment.