Graphics system
-
To follow on from yesterday's post, today we're going to look at two C# source files that work with the HTML page – and referenced JavaScript files – which I will leave online rather than reproducing here. As a brief reminder of the functionality – if you haven't yet watched the screencast shown last time – this version of the app shows an embedded 3D view that reacts to the creation – and deletion – of geometry from the associated AutoCAD model. You will see the bounding boxes for geometry appear in the WebGL view (powered by Three.js) as you're…
-
As part of my preparations for AU, I've been extending this Three.js integration sample to make it more responsive to model changes: I went ahead and implemented event handlers in .NET – much as we saw in the last post – to send interaction information through to JavaScript so that it can update the HTML palette view. The code is in pretty good shape, but I still need to decide whether to post it separately or with the other JavaScript samples I'm working on (I'll also be showing Paper.js and Isomer integrations during my AU talk, as well as a…
-
After last week's post on importing Minecraft data – in this case from Tinkercad – into AutoCAD, in today's post we're going to focus on the ultimately more interesting use case of generating Minecraft data from AutoCAD. We're going to see some code to dice up 3D AutoCAD geometry and generate blocks in a .schematics file using Substrate. Our "dicing" process – a term I've just coined for iterating through a 3D space, chunk by chunk – is going to use a couple of different approaches for determining there's any 3D geometry in each grid location. Firstly, though, we going…
-
A mere 2 among 100 million registered users, my boys are crazy about Minecraft. I've been looking into how I might be able to help them use Autodesk tools (well, AutoCAD) to generate Minecraft content. In this post we'll take a look at importing Minecraft data into AutoCAD, but ultimately the creation/export story is clearly more interesting (something we'll look at in the next post, I expect). To investigate dealing with Minecraft data – bearing in mind I didn't actually know anything much about its file formats – I took a look at the Minecraft export you can perform from…
-
As mentioned last week, I've been having fun with Fusion 360 to prepare a model to be displayed in the new Autodesk 360 viewer. The sample is now ready to view, although I'm not yet quite ready to post the code directly here, mainly because the API isn't yet publicly usable. Here's the app for you to take for a spin, as it were. The Autodesk 360 Viewing & Data API is currently being piloted by a few key partners, and hopefully we'll soon be broadening the scope to allow others to get involved (we first have to iron out…
-
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…
-
AutoCAD's geo-location API is a topic I've been meaning (and even promising) to cover for some time now. So here we are. 🙂 The below code sample is based on one shown at ADN's DevDays tour at the end of 2013 – for the AutoCAD 2014 release – but the API ended up not being fully usable (at least as far as I recall: someone should jump in and correct me if I have this wrong) until the 2015 release. I've taken the opportunity to use Editor.Command() to call a couple of commands synchronously – to turn on the GEOMAP…
-
The Autodesk Technical Summit is an annual, internal, 2-day technical conference for members of Autodesk's engineering staff. I've been lucky enough to attend since 2011 (the first was held in 2010), and have seen the event grow both in breadth and attendance, over the years: this year there were 500 attendees from around the world and some really excellent presentations. Most years I've been at the event as a presenter (I talked about F# in 2011, Kinect in 2012 and then both Kinect Fusion and Leap Motion in 2013): this is the first time I was there purely as an…
-
I had an interesting email last week from Josh Mathews: I'm having some trouble figuring out how to fix this problem I have and I'm not sure what the best way is to attack it. I have a large set of drawings that have these random strings of underscores strewn throughout the drawing (which look like random lines scattered all around when the drawing is printed – and make it confusing to look at), and so I'm trying to write a function that will iterate through the drawing and find all the text strings that contain ONLY underscores and then…
-
I have to say that I'm having an absolute blast getting to know the new API features in AutoCAD 2015. It turns out I'd barely scratched the surface with my original post about the impact for developers. It's a release that just keeps on giving. 🙂 One new feature that I've had a lot of fun playing with is the "cursor badge" capability, something you may have seen blogged about from a user's perspective. The good news is that the ability to add your own cursor badges is provided in the public API (although I did end up using an internal…