<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Igor Goldvekht on Medium]]></title>
        <description><![CDATA[Stories by Igor Goldvekht on Medium]]></description>
        <link>https://medium.com/@IgorGee?source=rss-85da9b5282e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0cvOSAZnojaaEZLnFrUp3g.jpeg</url>
            <title>Stories by Igor Goldvekht on Medium</title>
            <link>https://medium.com/@IgorGee?source=rss-85da9b5282e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:17:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@IgorGee/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to be a Magician with Shapeways APIs]]></title>
            <link>https://medium.com/shapeways-tech/how-to-be-a-magician-with-shapeways-apis-f255d99e3c4b?source=rss-85da9b5282e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f255d99e3c4b</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[3d-printing]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Igor Goldvekht]]></dc:creator>
            <pubDate>Fri, 13 May 2016 20:45:23 GMT</pubDate>
            <atom:updated>2016-05-13T20:45:23.093Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L992GrWcO7j8fUOb4BpXww.jpeg" /></figure><p>I’m sure we’ve all wanted to be magicians at some point in our lives. The act of making physical objects appear, disappear, and forming illusions that will make you question physics. What an extraordinary power to have, to make things appear and materialize out of thin air. Not to mention seeing the wonder in the eyes of the audience that you perform for. This is how I viewed magic as a child. Though I loved the idea of being a magician, I never pursued it as I was never much of a performer.</p><p>Instead, I pursued software engineering, a career I find equally awe-inspiring. However, from my experience in that field, the magic was limited to creating interactive applications on a 2D screen. But that generalization died fairly quickly when I discovered <a href="https://www.shapeways.com/">Shapeways</a> and their magical APIs.</p><p>I’d like to share my journey through my exploration of the <a href="https://developers.shapeways.com/getting-started?li=devhome_main">Shapeways API</a> and how I came to build <a href="https://github.com/IgorGee/Carbonizr">Carbonizr</a>. Coming into Shapeways, I was a big advocate of mobile apps, so naturally, I wanted to utilize their APIs to make an Android app. Since I was new to so many technologies, I decided to start small and get some inspiration from an existing feature within Shapeways. I chose the 3D Pendant Creator, and went straight to work to building Carbonizr, the physical photo creator.</p><p>My first step was to figure out how to generate the actual models. To do that, I had to learn a bit about <a href="http://shapejs.shapeways.com/v2">ShapeJS</a> and their APIs. I found the exact ShapeJS script I was looking for, which was appropriately named “2D to 3D”. With the hindsight of trying to keep costs low, I adjusted the script to produce a 4cm x 4cm x 4mm square 3D model with one of the faces being the photo embossed/engraved. Given a photo, this script creates a grayscale image of the photo, embosses the darker colors and engraves the lighter colors. Despite its simplicity, the outcome is absolutely incredible. I could honestly spend an entire day playing around with this script and seeing its results. <a href="https://shapejs.shapeways.com/v2/tutorials/2d-images">Try it!</a></p><p>My next step was to figure out how to call the ShapeJS script programatically from my server. To do that, I needed to figure out the ShapeJS endpoints and what kind of information to give it. In addition to getting the model, I also wanted a preview image of the model so my users would have a quick reference of their results. The general workflow for ShapeJS can be seen in the sequence diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/0*UUrNHgQNgSSQQSUg." /></figure><p>You’ll notice I do some looping when I talk to ShapeJS. There’s a small quirk with ShapeJS where there’s a chance it will forget the jobID of your model when you try to call endpoints referring to it. This is fairly easy to work around; simply retry the whole process until all of your calls succeed. This shouldn’t take more than 5 retries though so be sure to limit the calls you make. You should also skip some endpoint calls if they were previously successful. For example, if I got my preview image, but getting the model file failed, there’s no reason for me to call the preview image endpoint again, simply update and immediately call the GET saveModelCached endpoint. This is probably the biggest annoyance when it comes to using the ShapeJS API, but like I said, the workaround is fairly simple.</p><p>Phew, now that we got that out of the way, it’s time to start preparing the model to be used on the phone. I’ll spare you the arduous process that it took to get me to realize what I had to do to prepare the models. I needed to convert the model into something that the Android 3D rendering library, LibGDX, can render on my phone in addition to the STL equivalent of that converted model. The reason I needed to create the STL equivalent is because that is one of the file formats that Shapeways accepts. The main tools at play here were <a href="https://www.blender.org/">Blender</a> and <a href="https://github.com/libgdx/fbx-conv">fbx-conv</a>. Both are incredibly robust tools and I highly recommend them whenever programmatically working with 3D files.</p><p>After all those conversions and modifications, I simply zip up the files and send them to the phone. There I unzip the files, and display them, ready for rendering. The first time I had one of the models render on my phone, I was filled with excitement and wonder. Within seconds, a picture on my phone was being generated into a 3D model that I could move around and rotate freely on my mobile device. It’s pretty cool to see a 3D model on a website, but the feeling just isn’t the same when it’s on your phone. Being able to move the model with your fingers almost feels like an actual 3D model of that photo was in your hands. If only there were a way to physically feel that model…</p><p>Oh wait… Shapeways does actual 3D printing. This thought actually went through my head during the euphoria I had of my working functional application. I got so enveloped with the capabilities of the API that I lost track of the bigger picture in regard to what Shapeways enables you to do.</p><p>The final step was to figure out how to let the user order the model from Shapeways. To sell a model on Shapeways, you have to open up a shop. Opening a shop is pretty simple, just a couple of clicks here and there and voila, you are now a shop owner. But the tricky bit is now to upload all the models the app generates into a purchasable product from the Carbonizr shop. This step was by far the easiest, the only information you need to provide is the material(s) you want to sell your product in. There are a bunch more options you can set and play around with when setting the model up in the shop, such as the publicity, price, as well as the ability to download the source files!</p><p>So how exactly do I get the model to the store? Well, it was a simple matter of sending the STL file to my server, creating the appropriate JSON settings for the model being put up for sale, and uploading the model with the options to Shapeways. Upon success of the upload, Shapeways gives me back a response containing the URL to the product up for sale. From there, it’s just a matter of sending the user straight to the product page when they press the upload button. And just like that, you can go from a digital photo to a physical product in about 60 different materials, in seconds. If you don’t think that’s magic, then you must know actual magic. That or you are the creator of these APIs and libraries, but what’s the difference? ;)</p><p>When I held the printed models that were autogenerated for me, I came to a sudden realization. In my short time period within the field of computer science and software engineering, nearly everything produced and taught was virtual and intangible. Chilling is the best way I can describe how I felt when I held those models for the first time in my hand. I had thought that computer science and software engineering were incredibly powerful and flexible fields to work in with boundless creativity but limited to virtual products. To be able to combine the power and flexibility of computers with physical objects that you can interact with is revolutionary. I feel like I caught a glimpse of the future and its possibilities, and that is what sent chills down my spine.</p><p>If you think about it, Carbonizr is a relatively simple application, yet the experience it provides is quite magical. In fact, I always feel guilty when mentioning the app to other people and claiming that I created it since the meat of this application is the result of combining a few API calls from Shapeways and ShapeJS. Hats off to the developers on both teams for creating a robust API that enables developers like me to create applications that instill wonder and a sense of magic to both me and my users.</p><p>So if you ever wanted a quick and relatively easy way to become a magician, I highly recommend playing around with Shapeways API. I can assure you that you will relive your childhood wonderment of magic.</p><figure><a href="https://github.com/IgorGee/Carbonizr"><img alt="" src="https://cdn-images-1.medium.com/max/799/1*-FiTiDdJoZZ95xHkLvZobw.jpeg" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f255d99e3c4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shapeways-tech/how-to-be-a-magician-with-shapeways-apis-f255d99e3c4b">How to be a Magician with Shapeways APIs</a> was originally published in <a href="https://medium.com/shapeways-tech">Shapeways Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>