5035 Commits

Author SHA1 Message Date
Joseph Lenox
54e86b7307 Reduce bounds on auto width again (the math likes to go very wide which is not feasible if your nozzle isn't really big).
Should address #4212
2018-01-05 20:02:54 -06:00
Joseph Lenox
d8a331fda0 Re-added original on_change hook back onto the optgroup that
contained the extruders so that the state of has_heatbed is
correctly updated.

Fixes #4249
2018-01-02 14:03:21 -06:00
Joseph Lenox
a1a2a31e77 Use the default extrusion width for the first loaded object if the configured perimeter width and first layer width is 0.
Fixes #4245
2017-12-29 20:12:34 -06:00
Giles Bathgate
966fd37ea7 Use statusbar to show warnings instead of obtrusive dialog box (#4220) 2017-12-29 19:17:13 -06:00
tmotl
dccb146b4a show close button for the first profile editor tab if controller tab is disabled (#4244) 2017-12-29 19:09:03 -06:00
platsch
6dd400914e Removed factor 4 from layer height gradation, don't apply min/max layer height limitation after gradation. Fixes #4235 (#4241) 2017-12-21 10:39:47 -06:00
platsch
93c898f4bc apply conditional gcode parser to tool change gcode (#4229)
* apply conditional gcode parser to tool change gcode

* provide [previous_retraction] and [next_retraction] in toolchange gcode and [current_retraction] in layer change gcode
2017-12-21 10:38:17 -06:00
Giles Bathgate
d0e2adea4e Ensure that modifiers are aligned to the center of the part. (#4170) 2017-12-21 10:36:50 -06:00
Joseph Lenox
d27b8a933e Revert "Ensure order of operations for calculating min_dz, also apply adjustment to first layer height."
This reverts commit e0a82eee3de44eb83dcd8bdf729b29457ddeac6a.
2017-12-17 19:41:15 -06:00
Joseph Lenox
498ac0c5b6 Revert "Caught another use of z steps per mm that needs to be clear in its application."
This reverts commit 8f26cd7619bed295f114ac279d6d63169086b400.

Fails tests.
2017-12-17 19:40:35 -06:00
Joseph Lenox
8f26cd7619 Caught another use of z steps per mm that needs to be clear in its application.
Fixes #4235
2017-12-16 23:36:53 -06:00
Joseph Lenox
e0a82eee3d Ensure order of operations for calculating min_dz, also apply adjustment to first layer height. 2017-12-16 23:30:33 -06:00
Giles Bathgate
54205b7df6 Fixes the GL_MULTISAMPLE and GL_ARRAY_BUFFER_ARB messages on failed launch (#4230) 2017-12-14 18:57:29 -06:00
Joseph Lenox
576a86d449 Consider filament start gcode when deciding whether or not to prepend heating gcode.
Fixes #4223.
2017-12-10 15:10:33 -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
rmx-it
02b5014b57 Fix compiling for FreeBSD (#4188)
Fix compiling at least for FreeBSD 11+
2017-12-07 18:33:21 -06:00
Joseph Lenox
8ca6171a0a Fix test and really emit {} on parse failure. 2017-11-06 22:03:27 -06:00
Joseph Lenox
f7e6d53e06 Allow the use of escaped open/close brackets so that brackets may be emitted in the output (does not permit use of {} inside evaluations).
Fixes behavior to emit brackets on failure.

Fixes #4180
2017-11-06 22:00:21 -06:00
Joseph Lenox
f366700b44 Emit original string on failure to parse. 2017-11-06 21:11:17 -06:00
Joseph Lenox
add2895f38 Commit workaround for #4174 to push brim slightly closer to model. 2017-10-30 16:17:35 -05:00
Joseph Lenox
5499674137 Changed comment to doxygen in BridgeDetector 2017-10-28 13:29:39 -05:00
Joseph Lenox
3a29aeccd9 Fix label for support material interface width. 2017-10-22 23:03:16 -05:00
Joseph Lenox
db2369526b Fix compilation on OSX because clang is specific about default constructors not being specified in exprtk 2017-10-22 19:35:10 -05:00
Can Geliş
a553d6de3d New configuration for support material interface extrusion width (#4086)
* different configuration for support material interface extrusion width

* add test for support material interface extrusion width
2017-10-21 17:16:49 -05:00
Can Geliş
451f2e3914 constant speed for too short displacements (#4088) 2017-10-21 17:14:54 -05:00
Joseph Lenox
e29fbee967 Pull changes to SVG.cpp to (#4144)
* Add lock/unlock using flock() for output gcode files.

* Added description of unsupported_edges() from the cpp

* Ported updates to SVG class from prusa3d/Slic3r. Thanks @bubnikv

* Revert "Add lock/unlock using flock() for output gcode files."

This reverts commit a0d42fe3dcda714a8ccc0230a113ed6f85159e6b.
2017-10-21 17:13:44 -05:00
Can Geliş
b3bd918f29 Fix comparison bw integer and pointer (#4155)
* Fix comparison bw integer and pointer

Error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

* Check for nullptr input string.
2017-10-21 14:58:24 -05:00
Giles Bathgate
2675e697ef Provide warning when object(s) are outside print bed. (#4163) 2017-10-21 11:11:16 -05:00
Joseph Lenox
202a90ff90 Math evaluation in gcode (#4157)
* Prototype gcode infix math, very basic.

* Adding exprtk math parser library, header only.
@ArashPartow
https://github.com/ArashPartow/exprtk@4e1315a87dcc99a1ccad21fae1def0c2d4913c0f

* Now evaluating strings with exprtk, only support no variables in input
strings.

* Moved executable code to cpp file, stubbed out xsp and let the testing begin...

* Added conditional gcode parser into export path, added tests.

* Added one more test to ensure that {if0} only removes up to newlines.

* Test failure to parse

* Add some compiler flags to compile out stuff from exprtk

* Fix debug messages to be more specific, don't use deleted stringstream = method.

* Trade expression speed for apparently around 50MB of object size.

* Removed an extra trim that was breaking existing tests.

* fix test

Fixes #3390
2017-10-20 21:40:05 -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
platsch
f302df3fb6 Renamed Layers Tab to Layer height table and updated description of this dialog (#4158) 2017-10-19 23:31:35 -05:00
Shien Yang Lee
dc6cfffae4 Added option to manually reorder sequentially printed objects via plater (#4153)
* Added option to tell Slic3r CLI to not arrange at all.

* Implement manual override to object printing order during sequential printing.

* Undo accidental merge of pull request #4146 from alexrj/Slic3r.git
2017-10-16 23:08:13 -05:00
Ahmed Samir
ed65c81d11 Add 3MF format to ReadMe.md (#4152) 2017-10-14 16:02:34 -05:00
Can Geliş
a28f431d04 fix acceleration gcode for reprapfirmware (#4083) 2017-10-01 23:25:34 -05:00
Chow Loong Jin
b9592961fa Fix importing of binary STLs in big-endian architectures (#4143)
Fix from https://github.com/admesh/admesh/pull/26
2017-10-01 16:01:51 -05:00
Joseph Lenox
7bf852201f Use input name for cut. Also use find_last_of() instead of find_first_of() to properly capture names with periods in them.
Fixes #4136
2017-09-28 23:53:56 -05:00
Joseph Lenox
695f5fd86c Add Adaptive slicing to CLI makefiles. 2017-09-28 22:39:24 -05:00
Joseph Lenox
e9c0c93ff1 Address warnings about comparing signed/unsigned integers. 2017-09-28 22:20:30 -05:00
Joseph Lenox
90f66ea9b9 Allows hiding of the Controller tab (controller tab still defaults to visible).
Fixes #3984
2017-09-28 07:49:09 -05:00
platsch
d1e4fa6889 Fixes tab/space artefact from adaptive-slicing merge (#4138) 2017-09-26 07:26:37 -05:00
Can Geliş
5514c84f2e Fix generating supports for hovering slices (#4129) 2017-09-24 13:45:21 -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
Joseph Lenox
29d2159e29 Increased maximum baud rate for serial connections to 500k for those of you who like to live dangerously. Fixes #4131 2017-09-24 12:52:31 -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
Joseph Lenox
7e018f1d38 Added toolchange command strip for dual-on-single applications. 2017-09-07 22:26:19 -05:00
Joseph Lenox
3e55603c1a Re-added the ability to move part meshes relative to another part mesh in the same object. (#4119) 2017-09-05 17:14:08 -05:00
Joseph Lenox
8aff101f9f Make slic3r.pl executable again. 2017-09-04 22:08:04 -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
tmotl
84275d08d2 Fix for issue #4021 - Crash due to backslash at end of text fields for Custom G-code (#4117)
* back-slash at end of line in printer settings.../custom g-code does not crash slic3r anymore (issue #4021)

* fixes issue #4021
2017-09-04 14:01:28 -05:00