# How can I read this 3mf-File

So I am trying to get the XSD-Schema from this object. When I open the File I just get something like this code (snippet):

¸†2¡Q·2ºyƒeCã2ï…w ïÀ|¼ðAøä[0Ÿ |>‚|ó‘å2²ºFƒ¼Æò1ùàåcj@ÞùÐ¸Ì{áÈ;0/|¾
ùÌ'Ÿ„ Á|d½¬¬¯Õ ¯±|l¾…­Œo@ÞùÐ¸Ì{áÈ;0/|¾ùÌ'Ÿ„ Á|d½œ¬¯Ó ¯±|h\æ­Œo@Þù¸|
ßBs¦5–Œ~ôè»­£(™c´“Ç£[yp1:æ'Ã‰c4Jó Uâ˜ÍÇ<h—8^'Ð¯É


What is this? How can I convert it back? I need to edit the structure manually.

Three likely culprit:

• The file is compressed but your machine can't detect it. So for example the 3MF model has been zipped, and what you are trying to do is opening the zip archive in the text editor, rather than the file that is in the zip archive. Solution: try to see if common decompress utilities like zip, gzip, 7z can open the file.
• The file is a 3MF model but the character encoding in the file being different than the one your editor is expecting (typically Unicode/UTF-8, these days). Solution: read on the rest of this answer.
• The file is a binary one that is totally unrelated to 3MF. So in essence: an error, you are trying to open maybe an MP3 or a JPG file believing it to be a 3MF instead.

As for the "wrong encoding" option... Oversimplifying a bit, the story goes like this:

• computers write data to files in bytes,
• a byte can only be set to one of its 256 possible values,
• in the early days of computing, when computers were just glorified calculators, it was enough to have a 1:1 ratio between the byte possible values and the symbols one wanted to use, so ASCII was born (actually ASCII only "mapped" the first 127 values of the byte, but that is a detail). So: value #49 would represent a 1, value #90 a Z and so on...
• shortly afterwards, computers became powerful enough that people wanted to use them to process human languages, so the need for more characters (like accented ones åáä or the ones from non-latin alphabets like Cyrillic язы́к or arabic عَرَبِيّ‎`, or...) came to be and engineers speaking different languages had the "brilliant" idea to each use the other 127 "free slots" in a byte for their favourite languages, thus a plethora of extended ASCII encodings was born, each using the same byte value, but each mapping to a different symbol.
• later on, people began to realise the need to combine the use of say Gaelic, English, Japanese and Farsi with mathematical symbols, and thus they came up to way to map symbols to values expressed as the product of more bytes (so for example: 2 bytes encoding could map 256x256=65536 symbols). Again: each system using the same values but different symbols.
• finally after decades of frustrated users and expensive bugs, engineers around the world settled for a multi-byte standard that has 1,114,112 possible values that could contain all characters one can possibly need, and Unicode was born.

Back to your question: despite unicode having been around for a few decades now, legacy software and sloppy programming are a thing, and there are still systems that do not use unicode internally but some legacy "special purpose" encoding.

Unfortunately, it is impossible to say with certainty how a file was encoded, so occasionally you may find yourself opening a file and starting decoding it according to a "conversion table" that is not the one used by the author of the file itself. This is what it looks like is happening to you.

Onward to what you can try to do to fix this...

First of all: as attentive readers may have already inferred, you will need the actual file for this. In fact if you cut-and-paste its "content" from an editor what you are really doing is cutting-and-pasting the decoding your computer did of the byte values, and not the byte values themselves.

• Try one of the online detectors like this one, using "English" as a language. These detectors work by trying all the decoders they know of until the decoded file will have English (or another language of your choice) words in it. This may not work for you as a 3MF file is mostly numbers, not text, but it is worth a shot.
• Guesstimate what encoder may have been used. For example: if you got the file from an old windowsXP machine from Eastern Europe, chances are it may have been encoded with "windows-1251". Use an online converter to see if you were right about it.
• Use brute force. For this you will require to write a simple programme or ask somebody to do it for you, but the key idea here is to have a script taking your original file and decoding it using all encoders in that programming language knows of. Then it will be up to you to open each decoded file individually and verify if it worked or not.
• Preventive comment: I am intimately familiar with the difference between UCS and UTF. I chose to conflate the two for keeping the answer (that focuses on the rationale behind the existence of several encodings) more to the point. :) – mac Jan 18 '18 at 6:35
• I less words, he has the wrong file editor or viewer. – Fernando Baltazar Jan 19 '18 at 20:27
• @FernandoBaltazar - nope, 3MF is a textual, XML-based format. Any text editor is capable of displaying it correctly. The problem is either the unexpected encoding or the file being corrupted/not being a 3MF one. – mac Jan 19 '18 at 20:43
• This happens if you are using a wrong file editor or viewer, even if the file might be corrupted. All windows files has internally this ascii code. – Fernando Baltazar Jan 19 '18 at 21:14
• @FernandoBaltazar - I suspect you are using the wrong terms to express yourself. Windows never used ASCII as a character set. As far as I know the first version of Windows already had CP 1252, while DOS used CP 437. I am not a Windows expert, but I believe Windows switched to Unicode/UTF-16 with the XP edition. – mac Jan 19 '18 at 21:37

Seems to be your are trying to edit a file with the wrong file editor.

If you have Microsoft® Windows® 8.1, you can print directly using the 3MF format included. Simply set the print options in the 3D Print PropertyManager and print to the 3D printer. A preview of the print bed and the model's location within the print bed lets you modify settings before committing to a 3D print job.

To access the 3D print dialog box and specify print options, click File > 3DPrint. The print dialog box that is available depends on your installed 3D print driver.

If you need to get the STL you may need to use a file conversion, here is a youtube tutorial to makeprintable