{"id":58,"date":"2017-09-26T09:28:08","date_gmt":"2017-09-26T09:28:08","guid":{"rendered":"http:\/\/www.haxtom.com\/?p=58"},"modified":"2017-09-26T09:31:02","modified_gmt":"2017-09-26T09:31:02","slug":"recube-find-material-configurations","status":"publish","type":"post","link":"http:\/\/www.haxtom.com\/?p=58","title":{"rendered":"ReCube: How to find material configurations"},"content":{"rendered":"<p><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/MaterialSnip.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-68\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/MaterialSnip-300x187.jpg\" alt=\"\" width=\"300\" height=\"187\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/MaterialSnip-300x187.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/MaterialSnip.jpg 558w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>During work on ReCube there was one point which was unclear to me: How to find material and color codes used in cartridge memory?<\/p>\n<p style=\"text-align: left;\">Cartridge is using 2 banks of its memory. First is for general cartridge info (max amount, material and color type) second is for current filament amount status. For me more interesting was first bank.<\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/cartridge_state.jpg\"><img loading=\"lazy\" class=\"size-medium wp-image-59 aligncenter\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/cartridge_state-300x40.jpg\" alt=\"\" width=\"300\" height=\"40\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/cartridge_state-300x40.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/cartridge_state.jpg 549w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>Red rectangle show material and color code of my cartridge with is Dark Grey PLA. Of course at the beginning it was not known for me that this part of memory is description of color and material, I have found it doing decompilation of &#8220;Cube Print.exe&#8221;, original slicer for Cube3.<\/p>\n<p>At\u00a0https:\/\/github.com\/0xd4d\/dnSpy you can find very useful \ud83d\ude42 tool for decompilation of .net exe files. dnSpy have many features like debugger and assembly editor and what is important it is FREE.<\/p>\n<p>So start dnSpy and drag&amp;drop our &#8220;Cube Print.exe&#8221; into main window. After a wile you will see Cube Print disassembled and additionally all dependency files which are used by Cube Print.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/CubePrint_dissasemble.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-60\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/CubePrint_dissasemble-300x155.jpg\" alt=\"\" width=\"300\" height=\"155\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/CubePrint_dissasemble-300x155.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/CubePrint_dissasemble-768x398.jpg 768w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/CubePrint_dissasemble-1024x531.jpg 1024w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/CubePrint_dissasemble.jpg 1202w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Lets check what is Cube Print doing at startup:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Cube-Print-startup.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-61\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Cube-Print-startup-300x132.jpg\" alt=\"\" width=\"300\" height=\"132\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Cube-Print-startup-300x132.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Cube-Print-startup-768x337.jpg 768w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Cube-Print-startup-1024x449.jpg 1024w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Cube-Print-startup-680x300.jpg 680w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Cube-Print-startup.jpg 1646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>We see that it starting main process and after Possible upgrade checks it performs initialization of constants &#8211;\u00a0CubifyConstants.CubifyConstantsIntialize();. Lets check this method, so CTRL+right mouse and we are in. That what is showing to us:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Colors.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-62\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Colors-300x151.jpg\" alt=\"\" width=\"300\" height=\"151\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Colors-300x151.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Colors-768x385.jpg 768w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Colors.jpg 839w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Mine 101 means:<\/p>\n<p><strong> MaterialTypes\u00a0=\u00a0CubifyConstants.MaterialTypes.PLA,<\/strong><br \/>\n<strong>ColorHexCode\u00a0=\u00a0&#8220;#FF53565A&#8221;,<\/strong><br \/>\n<strong>ColorEnum\u00a0=\u00a0101,<\/strong><\/p>\n<p>In this document are collected all pairs color and material type which are supported by ReCube Pro:\u00a0<a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/MaterialColors.ods\">Material&amp;Colors<\/a><\/p>\n<p>Generally if you go deeper into Cube Print construction you can find more information not only regarding material types but also Cube3\/Cube Pro communication protocol and output file (*.cube3) construction.<\/p>\n<p>I also recommend to play a bit, similar way with &#8220;Cubeit_Dir\\cubeit.exe&#8221; file you can find there something like this:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/codefromname.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-65\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/codefromname-157x300.jpg\" alt=\"\" width=\"157\" height=\"300\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/codefromname-157x300.jpg 157w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/codefromname.jpg 365w\" sizes=\"(max-width: 157px) 100vw, 157px\" \/><\/a><\/p>\n<p>Have fun \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During work on ReCube there was one point which was unclear to me: How to find material and color codes used in cartridge memory? Cartridge is using 2 banks of its memory. First is for general cartridge info (max amount, material and color type) second is for current filament amount status. For me more interesting&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"http:\/\/www.haxtom.com\/?p=58\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":68,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[15,16,4,14,13,17],"_links":{"self":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts\/58"}],"collection":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=58"}],"version-history":[{"count":3,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":69,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions\/69"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/media\/68"}],"wp:attachment":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}