1246 Commits

Author SHA1 Message Date
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
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
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
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
e9c0c93ff1 Address warnings about comparing signed/unsigned integers. 2017-09-28 22:20:30 -05:00
platsch
d1e4fa6889 Fixes tab/space artefact from adaptive-slicing merge (#4138) 2017-09-26 07:26:37 -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
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
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
timor
81b6f9e261 Update required ParseXS and XSpp versions 2017-09-04 01:21:59 +02:00
Joseph Lenox
c84bc71361 Regression: Check on absolute value of xy_size_compensation instead of raw value > 0 to permit negative offsets again.
Fixes #4101
2017-09-02 23:01:43 -05:00
Can Gelis
98e0b81445 make --has-heatbed to compatible with other cli arguments 2017-08-12 14:50:32 +03:00
Can Gelis
6d9279db72 add --bed-shape cli arg 2017-08-12 14:49:29 +03:00
Joseph Lenox
aa20fb65e0 Bugfix: refer to getBool() instead of getting a reference to the object itself for config options.
Fixes #4043
2017-06-22 16:17:20 -05:00
Joseph Lenox
b6708e87f0 Check that last_send buffer is large enough in addition to whether or not we have sent data.
Avoids a crash at reconnect, leaves an error message from printer (currently use M110 0 to get back to a good state)

Fixes #4009
2017-06-21 20:50:39 -05:00
Florens Wasserfall
c0dfffe0ff Merge branch 'master' into adaptive-slicing 2017-06-21 15:49:24 +02:00
Florens Wasserfall
49a5f7e9a4 better (correct) boundary conditions for layer height spline 2017-06-21 15:16:02 +02:00
Florens Wasserfall
a386136c31 removed legacy debugging code 2017-06-21 15:14:54 +02:00
Florens Wasserfall
ad9c4e2565 Bugfix: legacy return value exception caused problems with vertical surfaces 2017-06-21 10:19:35 +02:00
Alessandro Ranellucci
2ee32bb244 Added new option for additional overlap between regions printed with distinct extruders or settings 2017-06-19 11:25:11 +02:00
Joseph Lenox
98fca9090b Same derp, different file. 2017-06-15 22:06:47 -05:00
Joseph Lenox
58f3290a93 Oops, moved it to a different class by mistake. 2017-06-15 21:42:40 -05:00
Samir55
1e8cd3f199 Model.hpp Doxygen Documentation (#3958)
* Documenting Model Class (Still un finished functions)

* Add Model Material Documentation

* Documenting ModelInstance

* Documenting ModelVolume

* Documenting the ModelObject Class

* Applying some enhancement to Model.hpp Documentation

* Removed some todos in the code

* Remove Todos in Model.hpp

* Fix some functions dcumentation.

* Removed todo found in Model.hpp

* Update Model.hpp

* Update Model.cpp

Put back align_instances_to_origin. Not sure why this was removed to start with.

* Update Model.xsp

put back removed function (this should be a doc-only change)

* Update Model.hpp

Re-added function that should have not been removed in a doc-only change (re: scope)
2017-06-15 21:17:20 -05: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
46504db02f tab->space in GCodeSender 2017-06-13 07:47:37 -05:00
Joseph Lenox
2bedc5c9df Link to libstdc++ statically. (#4016)
* Link to libstdc++ statically.

* use a linker flag instead.

* Update Build.PL

* Link to static paths on Travis only.

* Fix SFTP to abort of SFTP errors.

* Create sftp.sh

* always set -static-libstdc++ now in ldflags

also removed gcc 4.6 workaround

* remove buggy gcc check for 4.7, it is no longer supported

* Remove -lstdc++

Static linking is done on Travis for linux.

* Filter -lstdc++ on linux, static c++
2017-06-09 08:05:21 -05:00
Joseph Lenox
5e7fbe177d Always format month/day/hour/second/minute placeholder variables out to their full width.
Fixes #4019
2017-06-09 07:57:27 -05:00
Joseph Lenox
9f0335b4b8 Replaced throwing strings with exception objects. Fixes #3433 2017-06-04 09:05:41 -05:00
Joseph Lenox
e2b3d25edf Added Printer and Filament notes to things to avoid invalidating. 2017-06-03 23:29:56 -05:00
Joseph Lenox
c36fadd297 comment the notes() and preamble() in gcodewriter 2017-06-03 19:58:31 -05:00
Joseph Lenox
375b334ad8 Bugfixes: Fix CLI definition for printer notes and remove dupe qw() 2017-06-03 19:58:18 -05:00
Joseph Lenox
e064fdf170 Added notes to beginning of output gcode.
Order is Print -> Filament -> Printer.
Empty fields should not produce any output.

Also a bugfix - Printer notes were implemented as Strings when should have been String.
2017-06-03 19:26:58 -05:00
Alessandro Ranellucci
5493f4b0a6 Bugfix: prevent crash in brim code. #3981 2017-06-01 10:33:32 +02:00
Daniel Goldman
af6b094d29 Doxygen Documentation for Layer.hpp, Layer.cpp, LayerRegion.cpp, LayerRegionFill.cpp (#3979)
* Migrated comments in Layer.hpp

* Comments for Layer Class

* Comments for LayerRegion

* Comments for LayerRegionFill
2017-05-29 22:06:57 -05:00
Alessandro Ranellucci
b2a6dce75b Merge branch 'gui3-shortcuts' 2017-05-29 18:51:57 +02:00
Alessandro Ranellucci
3469800223 Fixed crash when cutting meshes with very very tiny triangles. #3953 2017-05-26 20:57:50 +02:00
Alessandro Ranellucci
5f038e85ef Removed warning about unused variables 2017-05-26 20:57:42 +02:00
Alessandro Ranellucci
8efbc7636e Improvements to triangulation, trying to workaround weaknesses of poly2tri, but no success. #3953 2017-05-26 17:20:45 +02:00
Alessandro Ranellucci
5a1e8e0f65 Fix some compilation warnings 2017-05-24 13:21:13 +02:00
Alessandro Ranellucci
846478520f Fix some compilation warnings 2017-05-24 13:19:57 +02:00
Alessandro Ranellucci
8a3094fe5f Merge branch 'master' into gui3-shortcuts 2017-05-21 20:03:57 +02:00
Alessandro Ranellucci
6e2ffaf4ca Bugfix: first_layer_temperature was ignored by ooze_prevention for first layer skirt/brim. #3964 2017-05-21 16:34:19 +02:00
Alessandro Ranellucci
fbb606d026 Fix typo in last commit preventing compilation. #3969 2017-05-21 15:29:47 +02:00
Joseph Lenox
c4fe123b32 Tweaked doxygen config for libslic3r. 2017-05-20 22:48:53 -05:00
Joseph Lenox
a7331c2966 Doxygen comments for Flow 2017-05-20 22:32:50 -05:00
Joseph Lenox
ff21018f32 Oops, accidentally cut ; off 2017-05-20 22:12:14 -05:00
Joseph Lenox
bfb8166673 Doxygen comments for Extruder, ExtrusionEntity, BridgeDetector. 2017-05-20 22:07:02 -05:00