773 Commits

Author SHA1 Message Date
Joseph Lenox
d07aaa87fd Further implementation of Plater and Plater2D. 2018-04-29 12:16:31 -05:00
Joseph Lenox
d02516d8fe Added factory function for new_from_defaults. Stubbed out new_from_cli. 2018-04-29 12:14:25 -05:00
Joseph Lenox
48b13aa1c7 Stubbed Plater constructor. 2018-04-29 10:13:39 -05:00
Joseph Lenox
31ed51de00 added descriptive comment to GUI 2018-04-29 10:13:00 -05:00
Joseph Lenox
3fda71e5dd Move slic3r_gui link higher in the chain (as it relies on libslic3r). 2018-04-29 10:08:38 -05:00
Joseph Lenox
bd6fe7114a Be more selective in what is compiled with C++11. 2018-04-29 10:08:10 -05:00
Joseph Lenox
44944a9b7d Move ZipArchive to its own library. 2018-04-29 10:07:41 -05:00
Joseph Lenox
72703ca0e8 Added menu mechanism to load 3d models. 2018-04-28 23:39:00 -05:00
Joseph Lenox
ce77ade904 Added handling to deal with if the lambda function passed in is a nullptr type. 2018-04-28 23:38:27 -05:00
Joseph Lenox
c2d10aeeed Moved plater stubs to its own cpp 2018-04-28 23:37:27 -05:00
Joseph Lenox
87b3f9582e Ensure unknown revision still works. 2018-04-28 23:13:12 -05:00
Joseph Lenox
8fb78ca5d7 Spit out the result of git rev-parse --short HEAD in AboutDialog. 2018-04-28 21:40:37 -05:00
Joseph Lenox
ac24ab827e Add AboutDialog to GUI and menu. 2018-04-28 20:53:49 -05:00
Joseph Lenox
47354beacc Added stdexcept include, convert VAR_ABS_PATH and VAR_REL to wxStrings. 2018-04-28 18:53:14 -05:00
Joseph Lenox
c0d8e68606 working on higher-level cpp Slic3r::Config that has a similar interface to the old Perl one. 2018-04-28 18:18:10 -05:00
Joseph Lenox
d24001b92d Check for datadir in OnInit(). 2018-04-28 18:17:10 -05:00
Joseph Lenox
399db5902c More misc functions (used to live as static functions in Slic3r::GUI perl file).
Passing -DVAR_ABS and -DVAR_ABS_PATH=/path/to/slic3r/var on compile redirects where Slic3r expects to find its var directory.
2018-04-28 18:15:16 -05:00
Joseph Lenox
d145ee3465 Finish renaming Config->ConfigBase in libSlic3r to make room for a Slic3r::Config that has an interface closer to the Perl version. 2018-04-28 18:12:26 -05:00
Joseph Lenox
2ec07cb93c Added CATCH v2.2.2 header 2018-04-28 12:32:54 -05:00
Joseph Lenox
5fc089ef99 Stub out more of the interface, working our way out from GUI::App::OnInit() 2018-04-26 21:43:00 -05:00
Joseph Lenox
a677002886
Update GUI.hpp 2018-04-25 00:30:47 -05:00
Joseph Lenox
137716b8a3 added misc utility functions for the UI, including functions to get user home (for slic3r directory) and path to var. 2018-04-24 23:52:13 -05:00
Joseph Lenox
7211acc32d stubbed Notifier class and misc helper function 2018-04-24 23:00:53 -05:00
Joseph Lenox
221432d2ea stub out more menus 2018-04-24 22:46:26 -05:00
Joseph Lenox
1d4b369e73 Relaxed cmake version. 2018-04-24 20:19:31 -05:00
Joseph Lenox
19bc2eabdc Tab panel initializes. 2018-04-24 20:17:04 -05:00
Joseph Lenox
b04d58ecef Stubbing out more of the UI. 2018-04-24 17:21:18 -05:00
Joseph Lenox
3dfe61de48 experiment to stub out C++ only GUI 2018-04-24 08:07:32 -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
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
bcd8603785 boost-nowide library was being added on all platforms. Fixed. 2017-06-01 19:34:22 -05:00
Joseph Lenox
4a1ece4688 Point to correct nowide-iostreams location on Windows. 2017-06-01 19:33:30 -05:00
Joseph Lenox
b3d33ff3da Fix CMakeLists to point to nowide/iostream.cpp, removed duplicate file.
Oh, nowide iostream.cpp was in the dir, I'm just blind.
2017-05-31 23:50:23 -05:00
Joseph Lenox
6065b23ce5 Added iostream.cpp from boost.nowide when building on Windows platforms.
Simplified target_link_libraries().
2017-05-31 21:23:35 -05:00
Alessandro Ranellucci
9ddc0ff451 Merge branch 'master' into utf8 2017-05-19 10:47:31 +02:00
Alessandro Ranellucci
6b68b71c78 Use C++ range-based iterations in slic3r.cpp and remove unused variables 2017-05-18 16:51:50 +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
ff6baf89ae Use C++ range-based iterations in slic3r.cpp and remove unused variables 2017-05-17 21:05:14 +02:00
Alessandro Ranellucci
969f28f9d3 New GCodeTimeEstimator class, with basic estimation code by @lordofhyphens. #3747 2017-03-24 17:54:02 +01:00
Alessandro Ranellucci
ad666beac0 Ported GCodeReader and SpiralVase to C++ 2017-03-19 01:40:18 +01:00
Alessandro Ranellucci
4f17a7b236 Fixes to CMake compilation 2017-03-17 22:38:19 +01:00
Alessandro Ranellucci
22ba87c3b3 Finished porting importers and read_from_file() to C++ 2017-03-01 22:19:30 +01:00
Alessandro Ranellucci
8326f75af8 Ported AMF parsing/writing to C++ (by @bubnikv) 2017-03-01 21:29:29 +01:00
Alessandro Ranellucci
117fb30636 Ported CoolingBuffer to C++/XS 2016-12-21 23:09:58 +01:00
Alessandro Ranellucci
5cbdb7865d Cut by Grid also in GUI 2016-12-18 13:10:25 +01:00
Alessandro Ranellucci
d0f22196ad New --rotate-x and --rotate-y CLI options 2016-12-18 00:42:43 +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
a778cd9820 Cut along X and Y axes too 2016-12-17 19:51:29 +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