slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.32k stars 1.29k forks source link

[GSoC] Samir55 / 3MF file format #3934

Closed alranel closed 6 years ago

alranel commented 7 years ago

This issue is dedicated to the GSoC student @Samir55 who proposed to implement support for the 3MF file format in Slic3r: https://summerofcode.withgoogle.com/projects/#6343944127381504

This topic was discussed in this original issue:

2811

@Samir55 already contributed to the Slic3r codebase by adding zoom commands (pull request #3864, merged).

@Samir55, welcome to Slic3r! Would you please introduce yourself to the Slic3r community? Please mention any experience with 3D printing or similar technologies, and include your time zone and operating system.

Samir55 commented 7 years ago

List of what to be tested in 3MF (Read/ Write):

I will read a 3mf file and write it, then compare the output with the expected one.

Samir55 commented 7 years ago

Dev Log(30 - July):

Samir55 commented 7 years ago

Dev Log(31 - July):

lordofhyphens commented 7 years ago

@Samir55 I left my comments on the pull request (which is probably the easiest way, I find, to leave a code review on github).

Samir55 commented 7 years ago

Dev Log(2 - August):

Dev Log(4 - August):

Samir55 commented 7 years ago

Dev Log(5 - August):

Samir55 commented 7 years ago

@alexrj @lordofhyphens Why those 2 STL models give segmentation fault when adding I try to read them in Slic3r GUI.

This is the message :

ahmedsamir@ahmedsamir:~/Slic3r$ perl slic3r.pl
Parentheses missing around "my" list at /home/ahmedsamir/Slic3r/lib/Slic3r/GUI/Plater.pm line 1874.

(slic3r.pl:24443): Gtk-CRITICAL **: IA__gtk_window_resize: assertion 'width > 0' failed
Segmentation fault (core dumped)

If I converted them using CLI into OBJ it worked. However if they are converted to 3mf, Slic3r gives segmentation fault.

ahmedsamir@ahmedsamir:~/Slic3r/build$ ./slic3r Spider_ascii.stl --export-obj
File exported to Spider_ascii.stl.obj
ahmedsamir@ahmedsamir:~/Slic3r/build$ ./slic3r Spider_binary.stl --export-obj
File exported to Spider_binary.stl.obj
ahmedsamir@ahmedsamir:~/Slic3r/build$ ./slic3r Spider_binary.stl --export-3mf
Segmentation fault (core dumped)
ahmedsamir@ahmedsamir:~/Slic3r/build$ ./slic3r Spider_ascii.stl --export-3mf
Segmentation fault (core dumped)

I tried to trace where this segmentation fault occurs, It is in TriangleMesh::repair() function.

What's wrong with those 2 files?

lordofhyphens commented 7 years ago

Offhand, I'd say it's because STL is a terrible format ;) See if it still segfaults when exporting to AMF.

Samir55 commented 7 years ago

Dev Log(7 - August):

@alexrj @lordofhyphens Sorry, I have not been working full time this week, I have been busy (changing our home wall paint). I will finish what is left very soon, Also these issues I want to afterwards work on them (May be extended after GSoC period):

lordofhyphens commented 7 years ago

You're welcome to have at those issues ;)

Samir55 commented 7 years ago

Dev Log (11 -> 15 August):

3MF read/ write:


Samir55 commented 7 years ago

@alexrj @lordofhyphens I have implemented my own zip wrapper. I will push those commits soon :), I am also working on adding undo/redo. Regarding the final evaluation and submitting my work, I will submit the link of the 3mf pull request. Does that seem fine?

lordofhyphens commented 7 years ago

That should be fine (submitting the PR).

It's been pretty good work I've seen so far. If you have the time, making a final pass over your code with -Weffc++ switch on (I mentioned it on IRC) may be helpful to you.

alranel commented 7 years ago

The Pull Request was merged. Success! Congrats to @Samir55 for the great job :)