281 Commits

Author SHA1 Message Date
Caroline
f3b590911d Partial implementation #1405: minimum shell thickness option (#3885)
* Added Minimum shell thickness option

-Added the option to libslic3r
-Created some of the necessary checks for illegal values

* Enforce min_shell_thickness as 0 when spiral vase is enabled

-This could be switched to match the extrusion width, but we already know there will only be 1 perimeter so this is probably more logical

* Feature is implemented

-Added a method in PerimeterGenerator to determine the amount of perimeters needed to meet min_shell_thickness

* Added a test in perimeters.t

* Fixed styling as requested

-Removed the magic number in PerimeterGenerator::num_loops()
-Added more test cases in perimeters.t
-Added documentation of the new feature in slic3r.pl and README.md

* Implemented requested changes

-Removed the num_loops function from PerimeterGenerator
-Added a scalled min_shell_thickness variable to PerimeterGenerator
-Changed the loop_number logic to use a previously defined variable loops

* Resolved more implementation issues

-Added min shell to invalidate state method
-Created additional checks in PresetEditor and LayerRegion for min shell
-Fixed the tooltip to be more descriptive
2018-05-22 19:25:02 -04:00
Jacob Greenfield
4fa6251dd5 Pillar config (#4410)
Implements workaround for #4407 

* Added support for pillar size configuration.
* Pillars UI fix
* Pillar configuration fix
* Fixed misspelled variable name.
* Strings are not numbers.
* Fixed pillar spacing label.
2018-05-12 20:03:50 -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
Joseph Lenox
d6c44bd68f Fixed no-gui flag. 2017-09-03 13:37:09 -05:00
Joseph Lenox
d6469b284a Added --no-gui flag to force CLI usage (allows for CLI usage with AppImage build).
Forced --gui flag in AppImage build.
2017-09-02 13:36:20 -05:00
Alessandro Ranellucci
10efa91104 Removed the no_controller preference option, imported by mistake, having a true default, hiding controller from most users 2017-05-29 19:17:23 +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
platsch
cff79b6555 Command line help for --datadir option (#3897) 2017-04-20 12:03:23 +00:00
Alessandro Ranellucci
5c2a05cd3a Accept and ignore --no-plater and --gui-mode. #3876 2017-04-12 00:06:30 +02:00
Alessandro Ranellucci
3ba37b3ca5 One more fix for codesigned OSX packages. #2875 2017-03-29 21:14:41 +02:00
Alessandro Ranellucci
d5a0e78c16 Fixed regression in --load. #3816 2017-03-28 18:02:33 +02:00
Xoan Sampaiño
7ffb760556 Remove unused --no-plater option 2017-03-27 15:44:29 +02:00
bubnikv
cc1ddc5770 A new feature "support_material_buildplate_only" implemented.
Also a bug has been fixed for zero interface layers. Before
slic3r would put infinite number of interface layers over top surfaces,
if the number of interface layers was set to zero.
2017-03-26 13:54:03 -05:00
Alessandro Ranellucci
1fadfd6fb8 Merge remote-tracking branch 'origin/master' into gui3
Conflicts:
	lib/Slic3r/GUI.pm
	lib/Slic3r/GUI/Plater.pm
	lib/Slic3r/GUI/PresetEditor.pm
	slic3r.pl
	xs/src/libslic3r/Config.cpp
	xs/src/libslic3r/Config.hpp
2017-03-20 17:00:42 +01:00
Alessandro Ranellucci
d8a8e0d1c1 Rename/alias --overhangs to --detect-bridging-perimeters to match better the name used in GUI. #3532 2017-03-17 21:45:36 +01:00
Alessandro Ranellucci
a1c7b65741 Moved threads option from print settings to application preferences 2017-03-17 16:41:34 +01:00
Alessandro Ranellucci
5d77c160c6 Changes to the GUI. New preset editor dialog. Option overrides in plater and between configs. More. 2017-03-17 01:22:54 +01:00
Alessandro Ranellucci
53fee67489 New experimental option z_steps_per_mm. #1827 2017-03-14 16:46:11 +01:00
Alessandro Ranellucci
a29a954d78 If --print-center is not supplied, center print instead of the centroid of the supplied bed_shape instead of defaulting to 100,100. #2725 2017-03-13 12:41:28 +01:00
Alessandro Ranellucci
4b4a0c8a5c Split external_fill_pattern into top_infill_pattern and bottom_infill_pattern. Retrocompatibile change. #945 2017-03-12 13:01:14 +01:00
Alessandro Ranellucci
f670ad6821 New Interior Brim option. #2026 2017-03-12 00:31:15 +01:00
Alessandro Ranellucci
7355d39584 Prevent race conditions when loading files into GUI from command line 2017-03-05 16:52:05 +01:00
Alessandro Ranellucci
5470e89f7a Allow autospeed for gap fill. Now gap_fill_speed = 0 enabled autospeed (consistenly with other speed settings) and does not disable gap fill. A new fill_gaps option, defaulting to true, was added for this purpose. #2976 2017-03-05 01:53:57 +01:00
Alessandro Ranellucci
22ba87c3b3 Finished porting importers and read_from_file() to C++ 2017-03-01 22:19:30 +01:00
Alessandro Ranellucci
27e456039c New --cut-grid command for cutting a mesh in multiple tiles according to a XY grid 2016-12-17 20:30:40 +01:00
Alessandro Ranellucci
6575a15cf7 Bugfix: --rotate did not support decimal values and interpreted them as radians. #3460 2016-12-17 00:02:21 +01:00
Alessandro Ranellucci
e5412b5d69 Use --local-lib when calling cpanm 2016-12-16 15:49:41 +01:00
Alessandro Ranellucci
01cd85f7cf New command for importing 2.5D/TIN meshes in plater 2016-11-27 18:04:39 +01:00
Alessandro Ranellucci
ad9b985772 Merge pull request #3427 from lordofhyphens/repetier-flavor
Added Repetier FW flavor, fixed accel gcode generation for it.
2016-11-22 18:59:50 +01:00
bubnikv
aaae7bf1c0 New command line option: --dont-arrange
Don't arrange the objects on the build plate. The model coordinates
define the absolute positions on the build plate.
The option --print-center will be ignored.

Also there is a fix in the command line invocation of --duplicate-grid
so it will run, but still there is something broken there and the results
are not correct.
2016-09-05 11:15:07 -05:00
Joseph Lenox
e0d8101627 Added Repetier FW flavor, fixed accel gcode generation for it.
Addresses #3426
2016-07-16 09:52:11 -05:00
Joseph Lenox
0673389009 Adds Smoothieware flavor to Gcode, to avoid some weirdness in the new motion controls.
Avoids resetting extrusion axis after firmware retract (still resets after unretract)
with smoothieware.
2016-06-23 19:10:36 -05:00
bubnikv
d8be976356 The "controller" tab and the settings of the USB/serial connection was
made configurable. Now one may hide the "controller" tab and the USB/serial
connection configuration from the preferences. This is useful for someone,
who never connects his printer to the computer by a cable.
2016-05-16 23:57:53 +02:00
Alessandro Ranellucci
f006e66549 Refactored calls to Wx::Bitmap->new 2016-04-09 19:10:57 +02:00
Alessandro Ranellucci
8138fbf349 New --retract-lift-above and --retract-lift-below options. #763 #3057 2015-12-18 18:36:39 +01:00
Alessandro Ranellucci
1dc5f5531e If --save is called without any other config option, export full default settings. #2110 2015-06-02 22:05:53 +02:00
Alessandro Ranellucci
57e6a7becd Fix --help output: --retract-layer-change is disabled by default. #2846 2015-05-25 00:35:57 +02:00
Alessandro Ranellucci
6185f45815 Hopefully fix all problems with non-ASCII paths on Windows 2015-03-09 15:17:50 +01:00
Alessandro Ranellucci
66824fd17e Set STDOUT to UTF-8 2015-03-08 00:54:38 +01:00
Alessandro Ranellucci
1180a6d83f Merge pull request #2508 from strahlex/machinekit-gcode
added support Machinekit flavour GCode
2015-02-15 17:00:08 +01:00
Alessandro Ranellucci
43f4806142 Load files into the GUI when supplying them as command line arguments along with the --gui switch. #2644 2015-02-14 12:54:06 +01:00
Alexander Rössler
d35226b889 added support Machinekit flavour GCode 2015-02-06 18:48:46 +01:00
Alessandro Ranellucci
07cd25d0ec New option for customization of infill/perimeters overlap. #2459 2015-02-01 12:08:25 +01:00
Alessandro Ranellucci
059b00a829 New --before-layer-change option and new layer_z placeholder. #2602 2015-01-30 20:08:00 +01:00
Alessandro Ranellucci
7b980c1dc9 New option for vertical distance between object and support material, with special handling of the 0 case that disabled bridge flow/speed in order to allow for soluble material. #2491 #2272 #2069 #1942 #2435 #1703 2015-01-19 09:52:24 +01:00
Alessandro Ranellucci
306bc02e29 Fix --help, wrong default were displayed for a couple options. #2541 2015-01-15 17:49:22 +01:00
adius
4b38cffc60 Fix typo in documentation 2015-01-13 00:19:01 +01:00
Alessandro Ranellucci
47e4e8bb66 Option to use volumetric E values. #1746 2015-01-05 19:39:10 +01:00