Merge branch 'master' into tm_colldetection_upgr

This commit is contained in:
tamasmeszaros 2019-03-08 11:40:15 +01:00
commit 37eafb0761
6 changed files with 34 additions and 31 deletions

View file

@ -7,7 +7,7 @@ as the versions listed - generally versions available on conservative Linux dist
Perl is not required any more.
In a typical situaction, one would open a command line, go to the Slic3r sources, create a directory called `build` or similar,
In a typical situation, one would open a command line, go to the Slic3r sources, create a directory called `build` or similar,
`cd` into it and call:
cmake ..
@ -19,7 +19,7 @@ Additional CMake flags may be applicable as explained below.
### Dependency resolution
By default Slic3r looks for dependencies the default way CMake looks for them, ie. in default system locations.
By default Slic3r looks for dependencies the default way CMake looks for them, i.e. in default system locations.
On Linux this will typically make Slic3r depend on dynamically loaded libraries from the system, however, Slic3r can be told
to specifically look for static libraries with the `SLIC3R_STATIC` flag passed to cmake:
@ -65,9 +65,9 @@ To create a debug build, use the following CMake flag:
### Installation
In runtime, Slic3r needs a way to access its resource files. By default, it looks for a `resources` directory relative to its binary.
At runtime, Slic3r needs a way to access its resource files. By default, it looks for a `resources` directory relative to its binary.
If you instead wnat Slic3r installed in a structure according to the Filesystem Hierarchy Standard, use the `SLIC3R_FHS` flag
If you instead want Slic3r installed in a structure according to the File System Hierarchy Standard, use the `SLIC3R_FHS` flag
cmake .. -DSLIC3R_FHS=1

View file

@ -18,12 +18,12 @@ This will create a dependencies bundle inside the `build/destdir` directory.
You can also customize the bundle output path using the `-DDESTDIR=<some path>` option passed to `cmake`.
**Warning**: Once the dependency bundle is installed in a destdir, the destdir cannot be moved elsewhere.
(This is because wxWidgets hardcode the installation path.)
(This is because wxWidgets hardcodes the installation path.)
### Building Slic3r
If dependencies built without an error, you can proceed to build Slic3r itself.
If dependencies are built without errors, you can proceed to build Slic3r itself.
Go back to top level Slic3r sources directory and use these commands:
mkdir build

View file

@ -7,7 +7,7 @@ CMake installer can be downloaded from [the official website](https://cmake.org/
Building with newer versions of MSVS (2015, 2017) may work too as reported by some of our users.
_Note:_ Thanks to [**@supermerill**](https://github.com/supermerill) for testing and inspiration on this guide.
_Note:_ Thanks to [**@supermerill**](https://github.com/supermerill) for testing and inspiration for this guide.
### Dependencies
@ -20,7 +20,7 @@ The package comes in a several variants:
- [32 bit, Release mode only](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=destdir-32.7z) (38 MB, 520 MB unpacked)
- [32 bit, Release and Debug mode](https://bintray.com/vojtechkral/Slic3r-PE/download_file?file_path=destdir-32-dev.7z) (74 MB, 1.1 GB unpacked)
When unsure, use the _Release mode only_ variant, the _Release and Debug_ variant is only needed for debugging & developement.
When unsure, use the _Release mode only_ variant, the _Release and Debug_ variant is only needed for debugging & development.
If you're unsure where to unpack the package, unpack it into `C:\local\` (but it can really be anywhere).
@ -46,13 +46,13 @@ Conversely, if you're using Visual Studio version other than 2013, the version n
If `cmake` has finished without errors, go to the build directory and open the `Slic3r.sln` solution file in Visual Studio.
Before building, make sure you're building the right project (use one of those starting with `slic3r_app_...`) and that you're building
with the right configuration, ie. _Release_ vs. _Debug_. When unsure, choose _Release_.
with the right configuration, i.e. _Release_ vs. _Debug_. When unsure, choose _Release_.
Note that you won't be able to build a _Debug_ variant against a _Release_-only dependencies package.
#### Installing using the `INSTALL` project
Slic3r PE can be run from the Visual Studio or from Visual Studio's build directory (`src\Release` or `src\Debug`),
but for longer-term usage you migth want to install somewhere using the `INSTALL` project.
but for longer-term usage you might want to install somewhere using the `INSTALL` project.
By default, this installs into `C:\Program Files\Slic3r`.
To customize the install path, use the `-DCMAKE_INSTALL_PREFIX=<path of your choice>` when invoking `cmake`.
@ -91,7 +91,7 @@ You can also use the Visual Studio GUI or other generators as mentioned above.
The `DESTDIR` option is the location where the bundle will be installed.
This may be customized. If you leave it empty, the `DESTDIR` will be places inside the same `build` directory.
Note that the build variant that you may choose using Visual Studio (ie. _Release_ or _Debug_ etc.) when building the dependency package is **not relevant**.
Note that the build variant that you may choose using Visual Studio (i.e. _Release_ or _Debug_ etc.) when building the dependency package is **not relevant**.
The dependency build will by default build _both_ the _Release_ and _Debug_ variants regardless of what you choose in Visual Studio.
You can disable building of the debug variant by passing the `-DDEP_DEBUG=OFF` option to CMake, this will only produce a _Release_ build.

View file

@ -2,20 +2,20 @@
The purpose of this guide is to describe how to contribute to the Slic3rPE translations. We use GNUgettext for extracting string resources from the project and PoEdit for editing translations.
Those are possible to download here:
Those can be downloaded here:
- https://sourceforge.net/directory/os:windows/?q=gnu+gettext GNUgettext package contains a set of tools to extract strings from the source code and to create the translation Catalog.
- https://poedit.net PoEdit provides good interface for the translators.
After GNUgettext is installed it is recommended to add the path to gettext/bin to PATH variable.
After GNUgettext is installed, it is recommended to add the path to gettext/bin to PATH variable.
Full manual for GNUgettext you can see here: http://www.gnu.org/software/gettext/manual/gettext.html
Full manual for GNUgettext can be seen here: http://www.gnu.org/software/gettext/manual/gettext.html
### Scenario 1. How do I add a translation or fix the existing translation
### Scenario 1. How do I add a translation or fix an existing translation
1. Get PO-file from corresponding folder here:
https://github.com/prusa3d/Slic3r/tree/master/resources/localization
2. Open this file in PoEdit as "Edit a translation"
3. Apply your corrections to translation
3. Apply your corrections to the translation
4. Push changed Slic3rPE.po and Slic3rPE.mo (will create automatically after saving of Slic3r.po in PoEdit) back to to the enter folder.
### Scenario 2. How do I add a new language support
@ -23,10 +23,10 @@ https://github.com/prusa3d/Slic3r/tree/master/resources/localization
https://github.com/prusa3d/Slic3r/tree/master/resources/localization
2. Open it in PoEdit for "Create new translation"
3. Select Translation Language (for example French).
4. As a result you will have fr.po - the file contaning translation to French.
Notice. When the transtation is complete you need to:
4. As a result you will have fr.po - the file containing translation to French.
Notice. When the translation is complete you need to:
- Rename the file to Slic3rPE.po
- Click "Save file" button. Slic3rPE.mo will be created immediatly
- Click "Save file" button. Slic3rPE.mo will be created immediately
- Both Slic3rPE.po and Slic3rPE.mo have to be saved here:
https://github.com/prusa3d/Slic3r/tree/master/resources/localization/fr
( name of folder "fr" means "French" - the translation language).
@ -37,11 +37,11 @@ Each string resource in Slic3rPE available for translation needs to be explicitl
auto msg = L("This message to be localized")
```
To get translated text use one of needed macro/function (`_(s)`, `_CHB(s)` or `L_str(s)` ).
If you add new file resourse, add it to list of files contaned macro `L()`
If you add new file resource, add it to the list of files containing macro `L()`
### Scenario 4. How do I use GNUgettext to localize my own application taking Slic3rPE as an example
1. For conviniance create list of files with this macro `L(s)`. We have
1. For convenience create a list of files with this macro `L(s)`. We have
https://github.com/prusa3d/Slic3r/tree/master/resources/localization/list.txt.
2. Create template file(*.POT) with GNUgettext command:
@ -50,11 +50,11 @@ https://github.com/prusa3d/Slic3r/tree/master/resources/localization/list.txt.
```
Use flag `--from-code=UTF-8` to specify that the source strings are in UTF-8 encoding
Use flag `--debug` to correctly extract formated strings(used %d, %s etc.)
Use flag `--debug` to correctly extract formatted strings(used %d, %s etc.)
3. Create PO- and MO-files for your project as described above.
4. To merge old PO-file with strings from creaded new POT-file use command:
4. To merge old PO-file with strings from created new POT-file use command:
```
msgmerge -N -o new.po old.po new.pot
```
@ -71,6 +71,6 @@ https://github.com/prusa3d/Slic3r/tree/master/resources/localization/list.txt.
```
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.
It's very important to keep attention to every gaps and punctuation. Especially with
formated strings. (used %d, %s etc.)
When you have Catalog to translation open POT or PO file in PoEdit and start to translation,
it's very important to keep attention to every gaps and punctuation. Especially with
formatted strings. (using %d, %s, etc.)

View file

@ -12,7 +12,7 @@ There are three new features:
- _System preset_: These are the presets that come with Slic3r PE installation. They come from a vendor configuration bundle (not individual files like before). They are **read-only** a user cannot modify them, but may instead create a derived User preset based on a System preset
- _User preset_: These are regular presets stored in files just like before. Additionally, they may be derived (inherited) from one of the System presets
A derived User preset keeps track of wich settings are inherited from the parent System preset and which are modified by the user. When a system preset is updated (either via installation of a new Slic3r or automatically from the internet), in a User preset the settings that are modified by the user will stay that way, while the ones that are inherited reflect the updated System preset.
A derived User preset keeps track of which settings are inherited from the parent System preset and which are modified by the user. When a system preset is updated (either via installation of a new Slic3r or automatically from the internet), in a User preset the settings that are modified by the user will stay that way, while the ones that are inherited reflect the updated System preset.
This system ensures that we don't overwrite user's settings when there is an update to the built in presets.
@ -25,9 +25,9 @@ A settings modified in a User preset has an open lock icon:
![a user setting](setting_user.png)
Clickign the open lock icon restored the system setting.
Clicking the open lock icon restores the system setting.
Additionaly, any setting that is modified but not yet saved onto disk is represented by orange label and a back-arrow:
Additionally, any setting that is modified but not yet saved onto disk is represented by orange label and a back-arrow:
![a modified setting](setting_mod.png)

View file

@ -1145,8 +1145,11 @@ bool GLCanvas3D::Selection::is_single_full_instance() const
for (unsigned int i : m_list)
{
const GLVolume* v = (*m_volumes)[i];
if ((object_idx != v->object_idx()) || (instance_idx != v->instance_idx()))
return false;
int volume_idx = v->volume_idx();
if ((v->object_idx() == object_idx) && (v->instance_idx() == instance_idx) && (volume_idx >= 0))
if (volume_idx >= 0)
volumes_idxs.insert(volume_idx);
}
@ -5498,7 +5501,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
{
// the gizmo got the event and took some action, no need to do anything more
}
else if ((m_mouse.drag.move_volume_idx != -1) && m_mouse.dragging)
else if ((m_mouse.drag.move_volume_idx != -1) && m_mouse.dragging && m_gizmos.get_current_type() != Gizmos::SlaSupports)
{
m_regenerate_volumes = false;
do_move();