HTML

  • My friends in the Autodesk Developer Network team asked me to get involved with creating a sample for the API we're planning to launch soon for the new Autodesk 360 viewer. They were quite specific about the requirements, which was very helpful: something fun, perhaps with a steampunk theme, that shows some interesting possibilities around both the HTML5 container and the embedded viewer. I was also suggested the Morgan 3 Wheeler as a possible model to look into hosting, so I really didn't need to be asked twice. ๐Ÿ˜‰ I started by tracking down a model: I ended up using…

  • After introducing the series and looking at sample applications for 2D graphics using Paper.js and 2.5D graphics using Isomer, it's now really time to go 3D. We're going to use much of the same code we saw in the last post โ€“ with some simplification as we no longer need to sort the solids by distance โ€“ but this time we're going to feed data into an HTML client app that's fundamentally similar in nature to the one seen in this series of posts using Three.js. I'm happy to have some experience using Three.js, because it happens to be a…

  • After introducing the series and looking at a sample 2D JavaScript application, it's time to go 3D. Well, 2.5D, anyway. We're going to implement a simple sample using the Isomer library that extracts bounding box information about 3D solids โ€“ which could be extended to get more detailed topological information, albeit with quite some work โ€“ and displays them in an isometric view in the HTML canvas. This time we're only going to have a single button in our UI allowing model updates to be refreshed in our isometric view. I decided to leave this as a manual operation, but…

  • Having introduced this series, it's time to look at some code. This first sample shows how to create and host a web-page that uses an external graphics library โ€“ in our case Paper.js โ€“ within an AutoCAD application. The main "trick" to this is going to be getting the data from the HTML page into AutoCAD, which we'll do by extending AutoCAD's shaping layer. Bear in mind that this code will work with AutoCAD 2015, but I can't guarantee it will do so with 2014 (the JavaScript API was very much a "preview" in that release). Something I should say,…

  • This was a fun one. It was really only a single line of code but I decided to embellish it a bit to make it a bit more useful. The "task" I set myself was to open a web-page โ€“ this blog, in fact โ€“ inside AutoCAD as an MDI child. AutoCAD can now host web-pages directly inside its MDI frame โ€“ the New Tab Page is a great example of that โ€“ and this mechanism can be used for external applications, too. You can also load non-HTML documents into the frame, but it's quick and easy to use HTML.…

  • I've been looking for an interesting problem to solve using MapReduce for some time now. I've been curious about the paradigm and how it can be applied to churn through large sets of data across multiple processing cores: something that's especially relevant as we need to distribute processing โ€“ whether to cores that are local or up in the cloud โ€“ in order to improve software performance. I talked about much of this when I looked at F#'s Asynchronous Workflows way back when (nearly 6 years ago โ€“ ouch). MapReduce frameworks โ€“ and there are a number out there: in…

  • As promised, I'm going to spend some time this week looking at options for moving the Python code we've seen in this series of posts โ€“ that de-skews perspective images using CPython or IronPython code running on your desktop โ€“ to "the cloud". Which in this case I'm taking to mean Google App Engine (GAE), as it has native Python support and I hadn't done anything with it, before. ๐Ÿ™‚ As a first step โ€“ and I should probably say "at first glance" โ€“ it's really quite easy to take some existing Python code and host it behind a web-service…

  • So after several posts leading up to the big reveal, as it were, in today's post we're going to see the full "De-skew Raster" application in action โ€“ and give you the complete source to fool around with. The main addition over where we were in the last post is the HTML5 and JavaScript UI implementation, as well as the new C# command โ€“ called DESKEW โ€“ that loads and displays it: Our JavaScript code uses the new JavaScript API in AutoCAD 2014 to execute the other command (DESKEW_IMAGE, which we saw implemented last time) that drives the core Python…

  • As part of the project I'm working on to deskew perspective images and insert them as RasterImage entities inside AutoCAD, I spent quite some time migrating pure Python code โ€“ a good deal of which I had to create for various assignments as part of the linear algebra class I've now finished โ€“ for it to work inside IronPython. For those of you who aren't familiar with it, IronPython is a variant of Python that works with .NET via the Dynamic Language Runtime. Making it really easy to integrate with AutoCAD. The code as it stood previously was working inside…

  • Today marks the public release of the Leap Motion controller: people who pre-ordered devices will start to receive them today, so it seemed a good time to post something related to it. Last week I came across a really interesting JavaScript library called Paper.js. According to its website, it's "an open source vector graphics scripting framework that runs on top of the HTML5 Canvas. It offers a clean Scene Graph / Document Object Model and a lot of powerful functionality to create and work with vector graphics and bezier curves, all neatly wrapped up in a well designed, consistent and…