492 Commits

Author SHA1 Message Date
Kaustubh Tripathi
4f5b935ecf add new hash to save dialog ref and also a function to show the dialog 2019-10-22 08:43:52 -05:00
Michael Kirsch
d29ca746aa finalize renaming from 'extended_gui' to 'rotation_controls' 2019-07-05 10:58:59 -05:00
Sergey Alirzaev
1618aef2fa Show estimated printing time after exporting gcode
fixes https://github.com/slic3r/Slic3r/issues/4758
2019-05-01 08:20:10 -05:00
Alessandro Ranellucci
40df92a472 Rename "Extended GUI" to "Rotation controls" and simplify it 2018-11-24 19:47:18 -06:00
Joseph Lenox
26b2a1e0cd Go back to using regular Notebook instead of AuiNotebook for tabs. 2018-11-10 11:56:00 -06:00
Joseph Lenox
6d858885ba Don't close preset editor tabs. 2018-11-10 10:47:51 -06:00
Joseph Lenox
59164f7bbb If tabs are used, make them fixed instead of appearing/disappearing.
Fixes #4462
2018-11-10 09:59:48 -06:00
Joseph Lenox
c9a4e53117 Use Slic3r::var to refer to toolbar bitmap locations. 2018-10-14 15:03:23 -05:00
Gilbert
fd8a3303c4 Extended GUI (#4419)
* Extended GUI - 2nd try.

* Update Preferences.pm

missing comma
2018-10-14 14:51:02 -05:00
Harald Wagener
4853c014fb Auto-determine right pane button height. (#4535)
On HiDPI screens, the button height set to 30px will cause buttons of limited height with parts of the text cut off. Setting the height to `-1` seems to fix this so the buttons work fine.
2018-10-14 14:28:01 -05:00
Michael
65bcaff615 Actually update the print when moving to center (#4465) 2018-07-02 07:00:15 -05:00
Oekn5w
c058ae91d2 Moved resetting parameter of thumbnail generation to on_thumbnail_made (#4443) 2018-06-08 21:51:49 -05:00
Benjamin Landers
9856947d45 Rotating face to match plane (#4424)
* Prototype for selecting Face

* Fixed the speed issue - only allocates the array once

* Selecting faces works.

* Add UI elements to run rotate to bed function

(and a bad icon)

* Cleaned up a bit

* Optimized regular frame times (to a decent state) and added TODO for first frame time

* Add rotate face dialog

* Change how coloring for face selection works

* Cleanup according to comments

* Added grouped undos

* Easy fix for variant of #4420

* Added plane selection

* Edited UI labels to be more consistent

* Add a workable rotate face icon
2018-05-31 17:50:40 -05:00
Oekn5w
72db3392c8 "Reload from disk" - UI function overhaul (#4388)
* C++ backend work to support reloading modifier files

* UI update preserving configs and volumes of modifiers (those are not reloaded)

* clarifying variable names

* Setting up variables in the GUI enviroment

* Implementation of added variables in (new ModelVolume(*)) funcion

* Implementation of new reload function

* Overhaul of the reload function, also renaming of some variables

* Rewriting the main loop of the reload function, explicitly differentiating between the original file and later added parts and modifiers pointing to other files

* Whitespace cleanup

* Added dialog to choose from different reload behaviors, added hide and default option in preferences, copied volumes are matched the new object's origin translation
2018-04-23 12:04:47 -05:00
Gilbert
fd7e71d836 Changed variable_layer_height-icon from cog.png to variable_layer_height.png (#4270) 2018-02-08 16:33:29 -06:00
Ahmed Samir
1190a74f4e Support moving objects using keyboard arrows in the 2d plater view. (#4104)
* * Add nudge_instance to 2D.pm to move the selected instance.
* Add menu items ->, -<, ^, v keyboards shortcuts.

* Add Set nudge value as a config option in Preferences.

* Add Move instance submenu to Plater menu.

* Add Move instance icon.

* Remove move instance menu item and use EVT_KEY_DOWN instead in 2D.pm.

* Fix selecting objects between 3D and 2D platers.

* Fix Ubuntu keyboard focus error in 2D plater.

* Correct the keycodes in 2D.pm keyboard event.

* Fix Windows keyboard focus error.

* Remove Todo line.

* Adding a minimum value for 2d plater nudege variable and improving keyboard focus in 2D plater.
2018-01-05 20:16:04 -06:00
Giles Bathgate
966fd37ea7 Use statusbar to show warnings instead of obtrusive dialog box (#4220) 2017-12-29 19:17:13 -06:00
Giles Bathgate
b5276e6e25 Auto align z preference (#4218)
* Add preference to disable auto alignment to the z plane

* Make it clear auto-center preference only effects x,y
2017-12-07 18:35:01 -06:00
Giles Bathgate
2675e697ef Provide warning when object(s) are outside print bed. (#4163) 2017-10-21 11:11:16 -05:00
Giles Bathgate
4f2250dc70 Fix to autocenter option. (#4156)
* Fix to autocenter option.

Ensure that with autocenter turned off the part is not positioned
in the center of the bed.

* Ensure object is aligned to Z=0 with autocentering off.
2017-10-19 23:35:39 -05:00
Joseph Lenox
e6c715cad2 Merge branch 'adaptive-slicing' into merge-adaptive
# Conflicts:
#	xs/src/libslic3r/Model.cpp
#	xs/src/libslic3r/Model.hpp
2017-09-24 13:39:28 -05:00
Joseph Lenox
5ae6a7fe3e Corrected open() syntax. Fixes #4128, thanks to @rob-miller for the heads-up. 2017-09-24 12:56:10 -05:00
Ahmed Samir
1a2df5e491 Undo/Redo to rotate, miror, split, cut, etc (#4100)
* * Add UndoOperations package in Plater.pm
* Add undo/redo options to the plater menu with their icons.
* Add the 2 undo/redo stacks to Slic3r::GUI::Plater package.
* Add add_undo_operation, undo & redo sub routines to Slic3r::GUI::Plater.
* Add objet identifier variable to each newly created Slic3r::GUI::Plater::Object to keep track of objects referenced in the stacks of undo/redo.
* Add undo/redo to rotate, mirror, increase, remove.

* * Add undo/redo to cut operation.

* * Add undo/redo to split, decrease, change scale and reset.
* Fix pop and push error.a

* * Refactoring undo/redo functions.

* * Some fixes to undo/redo for  reset and decrease functions

* Some Fixes to undo/redo split, reset and cut operations.

* Improve undo/redo menu items sync.

* * limit the undo stack operations to save RAM.

* Remove debugging lines.

* Add undo/redo to Add models.

* Some Refactoring and some fixes.

* Some Refactoring.

Fixes #3265
2017-09-11 20:37:21 -05:00
Ahmed Samir
5cd9ecbe57 [GSoC 2017] Support 3MF Format Read/Write. (#4046)
* Include Miniz library in xs/src/miniz  and update CMakeLists.txt in /src

* Save porgress before merging from Slic3r upstream

* Add CLI --export-3mf option.

* Create the TMF Class.

* call IO::TMF:write function with the read model and the output file in slic3r.cpp
Fix miniz.c error:
 * Miniz source functions were included more than once (once during TMF.cpp and once during compiling miniz.c in /xs/src/miniz.
 * Miniz is a header file library.
 * Solution was to add #define MINIZ_HEADER_FILE_ONLY to include the header part of the single header library miniz.c.

* - Create a Zip archive contating a 3dmodel.model file conatining a basic string.
- Remove #define #define MINIZ_HEADER_FILE_ONLY in the previous commit ( It's not the solution)

* Write Model metadata element to the 3MF zip file.

* Renaming miniz.c to miniz.h,  if you want to include it in other file use #define MINIZ_HEADER_FILE_ONLY before including it.

* Adding zip lib as a wrapper

* Adding zip lib files

* Fix CMakeLists.txt zip library error:
Add zip lib to target_link_libraries.

* Add 3MF Read/Write Structure.
I think this makes TMF read/write more modular.

* Fix some errors in TMF.cpp

* Write ModelMaterial according to 3MF core specification.
fix some typos and variable names.

* Add 3MF Types and OPC relationships.
* Write types in "[Content_Types].xml" at /
* Create "_rels" folder at /

* Write for each Object its mesh vertices element in 3MF Document.

* Write Model Volumes of each object in the 3MF Document.
* write <triangles> element representing the volumes of each object.

* * Refactoring removed Camel Case style.
* Adding ModelObject part number attribute (Specific to the new 3MF format).

* Write 3MF Relationships in the zip archive.

* * Remove the first extension from the exported file name.

* Add partnumber to the constructor.

* Fix ContentTypes.xml file causing 3D Builder not to load the file.
* xmlns schema link added to < Types > element.

* * Write Slic3r metadata version.
* Write ModelMaterials custom config data.

* * Write ModelObject Slic3r custom configs data.
* Some Refactoring.

* * Write ModelVolume Sli3r custom configs to the 3MF Document.

* * Write ModelInstances to the 3MF Document and small refactoring

* * Fix ModelInstance transformation matrix in < build > element. The problem was that 3MF 3d matrices were row major matrices.

* Some Refactoring:
* Add namspaces as constant map<string, string> carrying name of namspace and the link to the namespace.

* *Fix std::map namespaces. I was using [] operator to access the map values but according to c++11 I must use .at(key) to compile.

* * Write colorgroup elements in Material Extension to 3MF core specs:
	* Created color_group attribute in Model class.
	* Created material_group attribute in ModelMaterial class. It's by default 0 whuch means basematerial or AMF read material.

* * Fix CMakeLists.txt zip target link libraries.

* Add data structure for 3MF Material Extension.

* Fix slic3r.cpp whitespace issues.

* Split TMFEditor class into TMF.hpp and TMF.cpp files

* Remove color groups attribute and put all material groups in the 3MF extension into one structure.

* Fix temprory Zip lib.
Modify TMFEditor class pivate and public memebers.

* Some Refactoring.
Make remove any extension not just the last one.

* Add a unit test case for write function.
Some refactoring

* Fix some issues found in the basic 3mf unit test case for TMF::write.

* Forget to change 2 lines in 23_3mf.t

* Some Refactoring

* Remove basename function in zip.c hoping the build pass.
Refactoring in the 23_3mf.t

* Add another test case for wrting a model containing  materials.

* Add SplitPyramid.amf test file in xs/t/amf

* Add basic TMFParserContext struct for reading 3MF XML model file.

* Add Expat handlers.

* Add member functions to TMFParserContext struc: startElement, endElement, characters and stop.

* Add 3mf extension to Model::read_from_file function
Ajust comments according to Doxygen syntax

* * ad model metadata
* Extract the 3dmodel.model file to disc.
* Read the extracted file using Expat XML er.

* Read basematerials found in the 3MF core specifications.
Fix some errors in reading metadata.
Add TMFEditor::read_model() function.

* Change material data structure to include all 3MF materials including (basematerials, m:colorgroups, etc)

* Read Object vertices.
Fix errors during reading basematerial.

* Read object mesh.

* Some Refactoring in TMFParserContext and TMF::Editor

* Read Objects (Objects with meshes, and objects containing other objects -components-)

* Read Build items (ModelInstances) without applying transformations yet.

* * Read scale and translations values from the transformation affine matrix found in the component tag.
* Some refactoring

* Get the rotaion Euler angles from the transformation matrix.

* Fix to get_transformation

* Fix metadata lost due to not copying them in the copy constructor.

* Read Slic3r custom config keys for ModelObjects.
Modify write Slic3r custom configs for ModelObject

* Read Slic3r custom configs of ModelVolumes.

* Refactor applying tranformation matri

* Fix in  reading 3mf format where wrong objects are deleted from the model

* Fix in 3MF read: When reading component tags.
When adding a component to the current object we first copy the object refered by objectid in component tag, then apply transformation to the copied object
then get the mesh of that object and finally delete this object copy and add that mesh to the current object.

* Write model metadata in descending order to make title appear first.

* Refactoring: Remove all assertions in 3MF read and replace it with TMFParserContext::stop() as if assertion fails the extracted 3dmodel.model file won't be deleted.

* Read basematerials in the original model materials map.
Remove the added model material groups.

* Fix fatal error in adding volume when reading 3MF model file.
The end offset should be equal to the size of facets minus one.

* Read color groups.

* some refactoring

* * Some fixes.

* Add model instance x, y rotations and (x,y,z) scaling.(Still working on them).

* Add translation z in the model instance.
Add x, y rotation to the model instance copy constructor.

* Fixes in writing slicer:volume tag

* Remove some todos.

* Improve write materials to adopt groups

* Some Fixes

* Some Fixes

* Read Slic3r materials custom print configs.

* Add basic test for 3mf read.

* Add another test for TMF::read().

* Revert change in slic3r.pl file and removed .DS_store files

* Use initialize list in TMFEditor constructor.
Add a new line in the end of slic3r.cpp

* Add partnumber to ModelObject::swap() function called by assignment operator.

* Deleted xs/t/3mf/.DS_Store

* Removed appling 3mf translation in the z_axis to the model instances.

* Add X&Y rotations, z_translation in 3D, 3D previews and layers plater. To be applied when duplicating objects, etc.

* Add the parent object part number to the split objects.

* Initialize Model metadata.
Add 2 STL test files.
Add all 3d model test files in xs/models folder.

* Add 3mf test (convert from/to STL).
Add partnumber in Model.xsp

* Changed material groups enum to scoped enums.
Fix a typo in 23_3mf.t

* Fix in 23_3mf.test.

* Include X&Y rotation angles, scaling vector in the transformation matrix in item tag.

* Add 3MF file extension to GUI.

* Fix reading slic3r:volume tag in 3mf document.

* Add X&Y rotations, scaling vecotr in the 2D platter. Those 3mf transformation parameters are applied in 2D, 3D, 3D preview and 2D toolpaths platters.

* Remove support for 3MF materials. The materials in 3mf are found at the object level and at the triangle level but not found at the volume level. They are not really useful in our case.

* Remove some warnings and add transformation matrix test.

* Remove headers included for IDE suggestions

* Some enhancements

* Some enhancements

* Fix a bug.

* Remove hardcoded Slic3r version & some enhancements.

* Add another test to 3mf and some enhancements.

* Remove models which became not used in 3mf tests.

* Small change in apply_transformation for model instance in tmf.cpp.

* Some Refactoring to TMF.cpp

* Remove size_t in for loops and use const auto ModelObject or ModelVolume in TMFEditor::write()
Some refactoring.

* Use nullptr instead of NULL in TMFEditor.

* Initialize  TMFParserContext data memebers instead of calling std::vector clear() function.

* Fix a typo caused by refactoring

* Add Export plate with modifiers as 3MF and Export object with modifiers as 3MF options to Slic3r GUI.

* * Remove zip library.
* Add Slic3r::ZipArchive class to handle creating zip files.

* Add extract_entry function to ZipArchive class

* * Modify TMF::write to adapt the new zip wrapper.
* Improvements in ZipArchive.

* * Improve TMFEditor:write by removing to_string template function aw we are using now ofstream.

* * Split ZipArchive class to .cpp and .hpp
* Add Doxygen documentation to ZipArchive class.
* Update MANIFEST file/
* Update CMakeLists.txt file

* * Some improvements to ZipArchive.

* Fix the failing 3MF test on windows.The problem was the end line is manipulated on windows as \r\n

* Add 3mf test files to MANIFEST file.
2017-09-04 21:40:50 +02:00
Joseph Lenox
13f121e3d9 Fixed warning/error about missing parenthesis (added during change for duet support). 2017-06-24 13:16:42 -05:00
Florens Wasserfall
546bc0f4d0 fixed merge problem 2017-06-21 17:18:49 +02:00
Florens Wasserfall
c0dfffe0ff Merge branch 'master' into adaptive-slicing 2017-06-21 15:49:24 +02:00
Joseph Lenox
abc96ad3bf Merge pull request #4032 from hyperair/fix-octoprint-send-gcode
Fix host_type comparison when sending G-code to octoprint
2017-06-17 15:03:53 -05:00
eMAKER
5fbb245b97 Duet upload improved to work with DuetWiFi and Duet 0.6(ethernet). Thanks to @rob-miller for testing and fix. (#4033) 2017-06-17 15:02:47 -05:00
Chow Loong Jin
8cd25fd7e9 Fix host_type comparison
host_type values are lowercase. This fixes a 404 error (because it attempts to
upload to /rr_upload) when sending G-code to Octoprint.
2017-06-17 18:00:23 +08:00
eMAKER
1c74067da0 Octoprint settings functionality expanded to allow upload to RepRapFi… (#4028)
* Octoprint settings functionality expanded to allow upload to RepRapFirmware on a Duet controller.

* octoprint_host renamed to print_host to enhance code readability.

Fixes #4022
2017-06-15 20:54:27 -05:00
Joseph Lenox
fccdd12fba Preset dialog is no longer modal, permitting manipulation of the plater view while the editor is open. 2017-06-03 16:49:31 -05:00
Alessandro Ranellucci
c22d20b9bb A few minor changes for improving usability of controller 2017-05-29 20:08:44 +02:00
Alessandro Ranellucci
4ab4831110 Fixed behavior of dirty settings not being correctly updated in the plater 2017-05-29 18:50:00 +02:00
Alessandro Ranellucci
a1b0246710 Fixed regression in dirty settings 2017-05-26 19:04:51 +02:00
Alessandro Ranellucci
ce68851a7c Fixed regression in placeholders with preset names. #3960 2017-05-22 00:10:07 +02:00
Alessandro Ranellucci
2cdc9b678f Merge branch 'preset-tabs' into gui3-shortcuts
Conflicts:
	lib/Slic3r/GUI/Plater.pm
2017-05-21 20:14:18 +02:00
Alessandro Ranellucci
060187ad17 Add preference option for displaying preset editors in dialogs or tabs 2017-05-21 18:48:08 +02:00
Alessandro Ranellucci
a3ddac06dd Save shortcut options instantly 2017-05-21 00:28:36 +02:00
Alessandro Ranellucci
ae88f843b5 Perform background processing when changing settings in the preset editor. #3835 #3853 2017-05-21 00:10:19 +02:00
Alessandro Ranellucci
9d1d5ccee9 Minor fixes about config and presets 2017-05-21 00:06:28 +02:00
Alessandro Ranellucci
dd6864314d Merge branch 'master' into gui3-shortcuts 2017-05-20 16:19:33 +02:00
Alessandro Ranellucci
31115e0369 Use UTF-8 in libslic3r. Future-proof portable solution for non-ASCII files. #2955 2017-05-18 16:50:50 +02:00
Alessandro Ranellucci
60f0ca52e3 Fix regression with non-ASCII paths on Windows. We'll need to work more on this when porting stuff to C++. #2955 2017-05-15 22:54:20 +02:00
Alessandro Ranellucci
8c77f47638 Fixed regression: no processing with background processing and auto-center parts enabled. #3862 2017-05-02 17:21:16 +02:00
Alessandro Ranellucci
7b300e2c20 Merge pull request #3915 from xoan/toggle-plater-menu
Disable Plater menu when there are no objects in plater
2017-05-01 20:09:34 +02:00
Alessandro Ranellucci
0cc9dad14a Further change. Since we now have shortcuts, and not overrides, remove the + button for adding them on the fly, as it doesn't provide any advantage over actually opening the profile. Oh the other hand, automatically list dirty options in the plater 2017-04-29 21:18:52 +02:00
Alessandro Ranellucci
2efb863a87 Update all shortcuts (including manually added ones) when closing the preset editor 2017-04-29 20:55:30 +02:00
Alessandro Ranellucci
202a00c270 Merge branch 'master' into gui3-shortcuts 2017-04-29 19:57:53 +02:00
Alessandro Ranellucci
9499122d58 Merge pull request #3864 from Samir55/gsoc
Adding Zoom
2017-04-29 19:26:56 +02:00