mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 00:45:57 +08:00
Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_splitted_vbuffer
This commit is contained in:
commit
59cabc9712
6
deps/deps-linux.cmake
vendored
6
deps/deps-linux.cmake
vendored
@ -13,11 +13,11 @@ include("deps-unix-common.cmake")
|
|||||||
|
|
||||||
ExternalProject_Add(dep_boost
|
ExternalProject_Add(dep_boost
|
||||||
EXCLUDE_FROM_ALL 1
|
EXCLUDE_FROM_ALL 1
|
||||||
URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
|
URL "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz"
|
||||||
URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
|
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND ./bootstrap.sh
|
CONFIGURE_COMMAND ./bootstrap.sh
|
||||||
--with-libraries=system,iostreams,filesystem,thread,log,locale,regex
|
--with-libraries=system,iostreams,filesystem,thread,log,locale,regex,date_time
|
||||||
"--prefix=${DESTDIR}/usr/local"
|
"--prefix=${DESTDIR}/usr/local"
|
||||||
BUILD_COMMAND ./b2
|
BUILD_COMMAND ./b2
|
||||||
-j ${NPROC}
|
-j ${NPROC}
|
||||||
|
6
deps/deps-macos.cmake
vendored
6
deps/deps-macos.cmake
vendored
@ -18,12 +18,12 @@ include("deps-unix-common.cmake")
|
|||||||
|
|
||||||
ExternalProject_Add(dep_boost
|
ExternalProject_Add(dep_boost
|
||||||
EXCLUDE_FROM_ALL 1
|
EXCLUDE_FROM_ALL 1
|
||||||
URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
|
URL "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz"
|
||||||
URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
|
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND ./bootstrap.sh
|
CONFIGURE_COMMAND ./bootstrap.sh
|
||||||
--with-toolset=clang
|
--with-toolset=clang
|
||||||
--with-libraries=system,iostreams,filesystem,thread,log,locale,regex
|
--with-libraries=system,iostreams,filesystem,thread,log,locale,regex,date_time
|
||||||
"--prefix=${DESTDIR}/usr/local"
|
"--prefix=${DESTDIR}/usr/local"
|
||||||
BUILD_COMMAND ./b2
|
BUILD_COMMAND ./b2
|
||||||
-j ${NPROC}
|
-j ${NPROC}
|
||||||
|
5
deps/deps-mingw.cmake
vendored
5
deps/deps-mingw.cmake
vendored
@ -9,8 +9,8 @@ include("deps-unix-common.cmake")
|
|||||||
|
|
||||||
ExternalProject_Add(dep_boost
|
ExternalProject_Add(dep_boost
|
||||||
EXCLUDE_FROM_ALL 1
|
EXCLUDE_FROM_ALL 1
|
||||||
URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
|
URL "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz"
|
||||||
URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
|
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND bootstrap.bat
|
CONFIGURE_COMMAND bootstrap.bat
|
||||||
BUILD_COMMAND b2.exe
|
BUILD_COMMAND b2.exe
|
||||||
@ -21,6 +21,7 @@ ExternalProject_Add(dep_boost
|
|||||||
--with-log
|
--with-log
|
||||||
--with-locale
|
--with-locale
|
||||||
--with-regex
|
--with-regex
|
||||||
|
--with-date_time
|
||||||
"--prefix=${DESTDIR}/usr/local"
|
"--prefix=${DESTDIR}/usr/local"
|
||||||
"address-model=${DEPS_BITS}"
|
"address-model=${DEPS_BITS}"
|
||||||
"toolset=${DEP_BOOST_TOOLSET}"
|
"toolset=${DEP_BOOST_TOOLSET}"
|
||||||
|
5
deps/deps-windows.cmake
vendored
5
deps/deps-windows.cmake
vendored
@ -55,8 +55,8 @@ endmacro()
|
|||||||
|
|
||||||
ExternalProject_Add(dep_boost
|
ExternalProject_Add(dep_boost
|
||||||
EXCLUDE_FROM_ALL 1
|
EXCLUDE_FROM_ALL 1
|
||||||
URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
|
URL "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz"
|
||||||
URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
|
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND bootstrap.bat
|
CONFIGURE_COMMAND bootstrap.bat
|
||||||
BUILD_COMMAND b2.exe
|
BUILD_COMMAND b2.exe
|
||||||
@ -68,6 +68,7 @@ ExternalProject_Add(dep_boost
|
|||||||
--with-log
|
--with-log
|
||||||
--with-locale
|
--with-locale
|
||||||
--with-regex
|
--with-regex
|
||||||
|
--with-date_time
|
||||||
"--prefix=${DESTDIR}/usr/local"
|
"--prefix=${DESTDIR}/usr/local"
|
||||||
"address-model=${DEPS_BITS}"
|
"address-model=${DEPS_BITS}"
|
||||||
"toolset=${DEP_BOOST_TOOLSET}"
|
"toolset=${DEP_BOOST_TOOLSET}"
|
||||||
|
@ -1,5 +1,61 @@
|
|||||||
|
# Step by Step Visual Studio 2019 Instructions
|
||||||
|
|
||||||
# This how-to is out of date
|
### Install the tools
|
||||||
|
|
||||||
|
Install Visual Studio Community 2019 from [visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/). Older versions are not supported as PrusaSlicer requires support for C++17.
|
||||||
|
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 sources
|
||||||
|
|
||||||
|
Clone the respository. To place it in C:\src\PrusaSlicer, run:
|
||||||
|
```
|
||||||
|
c:> mkdir src
|
||||||
|
c:> cd src
|
||||||
|
c:\src> git clone https://github.com/prusa3d/PrusaSlicer.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile the dependencies.
|
||||||
|
Dependencies are updated seldomly, thus they are compiled out of the PrusaSlicer source tree.
|
||||||
|
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 and run the following:
|
||||||
|
```
|
||||||
|
cd c:\src\PrusaSlicer\deps
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -G "Visual Studio 16 2019" -DDESTDIR="c:\src\PrusaSlicer-deps"
|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
### Generate Visual Studio project file for PrusaSlicer, referencing the precompiled dependencies.
|
||||||
|
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 and run the following:
|
||||||
|
```
|
||||||
|
cd c:\src\PrusaSlicer\
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH="c:\src\PrusaSlicer-deps\usr\local"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile PrusaSlicer.
|
||||||
|
|
||||||
|
Double-click c:\src\PrusaSlicer\build\PrusaSlicer.sln to open in Visual Studio 2019.
|
||||||
|
OR
|
||||||
|
Open Visual Studio for C++ development (VS asks this the first time you start it).
|
||||||
|
|
||||||
|
Select PrusaSlicer_app_gui as your startup project (right-click->Set as Startup Project).
|
||||||
|
|
||||||
|
Run Build->Rebuild Solution once to populate all required dependency modules. This is NOT done automatically when you build/run. If you run both Debug and Release variants, you will need to do this once for each.
|
||||||
|
|
||||||
|
Debug->Start Debugging or press F5
|
||||||
|
|
||||||
|
PrusaSlicer should start. You're up and running!
|
||||||
|
|
||||||
|
note: Thanks to @douggorgen for the original guide, as an answer for a issue
|
||||||
|
|
||||||
|
|
||||||
|
# The below information is out of date, but still useful for reference purposes
|
||||||
|
|
||||||
We have switched to MS Visual Studio 2019.
|
We have switched to MS Visual Studio 2019.
|
||||||
|
|
||||||
@ -119,38 +175,4 @@ option to CMake, this will only produce a _Release_ build.
|
|||||||
Refer to the CMake scripts inside the `deps` directory to see which dependencies are built in what versions and how this is done.
|
Refer to the CMake scripts inside the `deps` directory to see which dependencies are built in what versions and how this is done.
|
||||||
|
|
||||||
\*) Specifically, the problem arises when building boost. Boost build tool appends all build options into paths of
|
\*) Specifically, the problem arises when building boost. Boost build tool appends all build options into paths of
|
||||||
intermediate files, which are not handled correctly by either `b2.exe` or possibly `ninja` (?).
|
intermediate files, which are not handled correctly by either `b2.exe` or possibly `ninja` (?).
|
||||||
|
|
||||||
|
|
||||||
# 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 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
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
- 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
|
|
@ -16,7 +16,7 @@ Full manual for GNUgettext can be seen here: http://www.gnu.org/software/gettext
|
|||||||
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization
|
https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization
|
||||||
2. Open this file in PoEdit as "Edit a translation"
|
2. Open this file in PoEdit as "Edit a translation"
|
||||||
3. Apply your corrections to the translation
|
3. Apply your corrections to the translation
|
||||||
4. Push changed PrusaSlicer.po and PrusaSlicer.mo (will create automatically after saving of PrusaSlicer.po in PoEdit) back to to the enter folder.
|
4. Push changed PrusaSlicer.po and PrusaSlicer.mo (will create automatically after saving of PrusaSlicer.po in PoEdit) into the original folder.
|
||||||
|
|
||||||
### Scenario 2. How do I add a new language support
|
### Scenario 2. How do I add a new language support
|
||||||
1. Get file PrusaSlicer.pot here :
|
1. Get file PrusaSlicer.pot here :
|
||||||
@ -71,6 +71,33 @@ https://github.com/prusa3d/PrusaSlicer/tree/master/resources/localization/list.t
|
|||||||
```
|
```
|
||||||
Notice, in this Catalog it will be totally same strings for initial text and translated.
|
Notice, in this Catalog it will be totally same strings for initial text and translated.
|
||||||
|
|
||||||
When you have Catalog to translation open POT or PO file in PoEdit and start to translation,
|
When you have Catalog to translation open POT or PO file in PoEdit and start translating.
|
||||||
it's very important to keep attention to every gaps and punctuation. Especially with
|
|
||||||
formatted strings. (using %d, %s, etc.)
|
|
||||||
|
## General guidelines for PrusaSlicer translators
|
||||||
|
|
||||||
|
|
||||||
|
- We recommend using *PoEdit* application for translation (as described above). It will help you eliminate most punctuation errors and will show you strings with "random" translations (if the fuzzy parameter was used).
|
||||||
|
|
||||||
|
- To check how the translated text looks on the UI elements, test it :) If you use *PoEdit*, all you need to do is save the file. At this point, a MO file will be created. Rename it PrusaSlicer.mo, and you can run PrusaSlicer (see above).
|
||||||
|
|
||||||
|
- If you see an encoding error (garbage characters instead of Unicode) somewhere in PrusaSlicer, report it. It is likely not a problem of your translation, but a bug in the software.
|
||||||
|
|
||||||
|
- See on which UI elements the translated phrase will be used. Especially if it's a button, it is very important to decide on the translation and not write alternative translations in parentheses, as this will significantly increase the width of the button, which is sometimes highly undesirable:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- If you decide to use autocorrect or any batch processing tool, the output requires very careful proofreading. It is very easy to make it do changes that break things big time.
|
||||||
|
|
||||||
|
- **Any formatting parts of the phrases must remain unchanged.** For example, you should not change `%1%` to `%1 %`, you should not change `%%` to `%` (for percent sign) and similar. This will lead to application crashes.
|
||||||
|
|
||||||
|
- Please pay attention to spaces, line breaks (\n) and punctuation marks. **Don't add extra line breaks.** This is especially important for parameter names.
|
||||||
|
|
||||||
|
- Description of the parameters should not contain units of measurement. For example, "Enable fan if layer print time is less than ~~n seconds~~"
|
||||||
|
|
||||||
|
- For units of measurement, use the international system of units. Use "s" instead of "sec".
|
||||||
|
|
||||||
|
- If the phrase doesn't have a dot at the end, don't add it. And if it does, then don't forget to :)
|
||||||
|
|
||||||
|
- It is useful to stick to the same terminology in the application (especially with basic terms such as "filament" and similar). Stay consistent. Otherwise it will confuse users.
|
||||||
|
|
||||||
|
BIN
doc/images/long_text_on_button.png
Normal file
BIN
doc/images/long_text_on_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -1163,8 +1163,8 @@ public:
|
|||||||
{
|
{
|
||||||
UNUSED(append);
|
UNUSED(append);
|
||||||
char dummy;
|
char dummy;
|
||||||
return sscanf(str.data(), " %lf , %lf , %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 2 ||
|
return sscanf(str.data(), " %lf , %lf , %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 3 ||
|
||||||
sscanf(str.data(), " %lf x %lf x %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 2;
|
sscanf(str.data(), " %lf x %lf x %lf %c", &this->value(0), &this->value(1), &this->value(2), &dummy) == 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -101,9 +101,9 @@ Pointfs FillArchimedeanChords::_generate(coord_t min_x, coord_t min_y, coord_t m
|
|||||||
//
|
//
|
||||||
static inline Point hilbert_n_to_xy(const size_t n)
|
static inline Point hilbert_n_to_xy(const size_t n)
|
||||||
{
|
{
|
||||||
static const int next_state[16] = { 4,0,0,12, 0,4,4,8, 12,8,8,4, 8,12,12,0 };
|
static constexpr const int next_state[16] { 4,0,0,12, 0,4,4,8, 12,8,8,4, 8,12,12,0 };
|
||||||
static const int digit_to_x[16] = { 0,1,1,0, 0,0,1,1, 1,0,0,1, 1,1,0,0 };
|
static constexpr const int digit_to_x[16] { 0,1,1,0, 0,0,1,1, 1,0,0,1, 1,1,0,0 };
|
||||||
static const int digit_to_y[16] = { 0,0,1,1, 0,1,1,0, 1,1,0,0, 1,0,0,1 };
|
static constexpr const int digit_to_y[16] { 0,0,1,1, 0,1,1,0, 1,1,0,0, 1,0,0,1 };
|
||||||
|
|
||||||
// Number of 2 bit digits.
|
// Number of 2 bit digits.
|
||||||
size_t ndigits = 0;
|
size_t ndigits = 0;
|
||||||
|
@ -49,8 +49,7 @@ BitmapTextRenderer::~BitmapTextRenderer()
|
|||||||
{
|
{
|
||||||
#ifdef SUPPORTS_MARKUP
|
#ifdef SUPPORTS_MARKUP
|
||||||
#ifdef wxHAS_GENERIC_DATAVIEWCTRL
|
#ifdef wxHAS_GENERIC_DATAVIEWCTRL
|
||||||
if (m_markupText)
|
delete m_markupText;
|
||||||
delete m_markupText;
|
|
||||||
#endif //wxHAS_GENERIC_DATAVIEWCTRL
|
#endif //wxHAS_GENERIC_DATAVIEWCTRL
|
||||||
#endif // SUPPORTS_MARKUP
|
#endif // SUPPORTS_MARKUP
|
||||||
}
|
}
|
||||||
|
@ -36,11 +36,8 @@ View3D::View3D(wxWindow* parent, Model* model, DynamicPrintConfig* config, Backg
|
|||||||
|
|
||||||
View3D::~View3D()
|
View3D::~View3D()
|
||||||
{
|
{
|
||||||
if (m_canvas != nullptr)
|
delete m_canvas;
|
||||||
delete m_canvas;
|
delete m_canvas_widget;
|
||||||
|
|
||||||
if (m_canvas_widget != nullptr)
|
|
||||||
delete m_canvas_widget;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool View3D::init(wxWindow* parent, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process)
|
bool View3D::init(wxWindow* parent, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process)
|
||||||
|
@ -595,17 +595,10 @@ struct Sidebar::priv
|
|||||||
|
|
||||||
Sidebar::priv::~priv()
|
Sidebar::priv::~priv()
|
||||||
{
|
{
|
||||||
if (object_manipulation != nullptr)
|
delete object_manipulation;
|
||||||
delete object_manipulation;
|
delete object_settings;
|
||||||
|
delete frequently_changed_parameters;
|
||||||
if (object_settings != nullptr)
|
delete object_layers;
|
||||||
delete object_settings;
|
|
||||||
|
|
||||||
if (frequently_changed_parameters != nullptr)
|
|
||||||
delete frequently_changed_parameters;
|
|
||||||
|
|
||||||
if (object_layers != nullptr)
|
|
||||||
delete object_layers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sidebar::priv::show_preset_comboboxes()
|
void Sidebar::priv::show_preset_comboboxes()
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
#undef times
|
#undef times
|
||||||
#undef accept
|
#undef accept
|
||||||
#undef wait
|
#undef wait
|
||||||
|
#undef abort
|
||||||
|
|
||||||
// Breaks compilation with Eigen matrices embedded into Slic3r::Point.
|
// Breaks compilation with Eigen matrices embedded into Slic3r::Point.
|
||||||
#undef malloc
|
#undef malloc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user