AutoCAD

  • Yesterday evening, I had a nice chat by phone with a local development partner, here in Switzerland. I'm meeting with a member of his development team, next week, and we were establishing a way of us identifying one another at the train station. Rather than offering to wear a pink carnation, I suggested the visitor check the photo on my blog before coming. The developer – who had seen me in person, before – suggested it might be helpful if he mentioned to his colleague that I was "short and bald"… I'm apparently shorter than he'd initially expected – clearly…

  • As promised, here's my handout for CP3840, the main class I'm teaching at this year's AU. Introducing Kinect Since Kinect for Xbox 360® was launched on November 4th, 2010, the device has taken the world by storm: it became the quickest selling consumer electronics device ever (according to the Guinness Book of World Records), selling 8 million units in the first 60 days. This record has since been surpassed, but still. Kinect was originally intended to be a controller for the Xbox 360 gaming system – allowing you to play games without a controller, or, as Microsoft like to say,…

  • After an initial attempt at adjusting the view in AutoCAD based on input from Kinect, this post takes it further by implementing a more effective orbit/zoom capability. The proportions/rates of each are currently still hard-coded – and so will vary in effectiveness depending on the scale of the model being navigated – but it's certainly a step in the right direction (and much closer to being demoable than my previous attempt). All in all it works quite well: when I get the chance, I'll try to put together another screencast to show it in action. The good news is that…

  • The looming AU material deadline has finally forced me to work out how to use Kinect gestures to navigate within an AutoCAD model. It's far from perfect, but the fundamentals are all there: we have a loop – outside of a jig, this time, as we don't need to display a point cloud or generate geometry in-place – that takes skeleton data provided by the Kinect and uses it to adjust the current view. Like most people, my head gets a bit twisted when dealing with DCS and WCS, cameras, targets, views, etc., but thankfully I stumbled across an old…

  • This question came up, from our friends over at The Swamp: I have been re-building some old code  in VS2010 using the 2012 ObjectARX SDK and came across some      'blablabla is obsolete: use thingy instead' warnings. The code still compiles and runs fine but I want to start thinking about the future. a few examples will follow, please add any others you come across. […] The next was to do with the Table Class i.e.  Autodesk.AutoCAD.DatabaseServices.Table In fact, there are a myriad of obsolete warnings in the Table class  ... some of them appear to have no documented resolution,…

  • I'm not sure why it's taken me so long to get around to posting this code. It was originally developed by Philippe Leefsma for last year's Developer Days, to demonstrate a very interesting API added to AutoCAD 2012. Looking back, it appears it was covered in this DevTV session, posted when AutoCAD 2012 was announced, so the information has been there for some of you to find, at least. Anyway, as many of you will know, associative arrays are an extremely powerful feature within AutoCAD that allow you to create impressive results. You can create rectangular, polar and path-based arrays,…

  • Over the last couple of months, Wayne Brill has been delivering online AutoCAD .NET training. The training has received very positive feedback from attendees. Recordings of most of the sessions are now (or will soon be) available from our online API webcast archive (which is also accessible via http://autodesk.com/apitraining –> Webcast Archive). You'll notice that the recordings start with session 2: we had some technical issues with the first week's recording, but as the material for these classes is essentially the same material as that used for Wayne's DevTV sessions (which are all linked to from this post, including the…

  • This interesting question came up in our discussion forums: Does anyone have a routine that will insert all the drawings from a single folder into one drawing to create a legend sheet? I'm trying to document the company's various blocks and details for dissemination amongst several offices. The simplest – and most elegant, in my opinion – approach for addressing this requirement is via the Table object, which allows you to include block thumbnails in each of its cells. So we would need to import the various drawings into the current drawing as blocks, and then point the various cells…

  • This post follows on from this recent post which showed a flat port of the previous OpenNI/NITE code which swept a single solid along a spline path defined by the user being tracked by the Kinect device. As mentioned, the previous approach was ultimately flawed, as adding vertices to our spline path made the whole thing problematic (as the sweep operation became less and less likely to succeed). The updated code adopts a slightly different approach: it creates the solid in segments, creating a new segment whenever there's an error encountered or when the current segment exceeds a certain length.…

  • A big thanks to Ishwar Nagwani – an old friend, colleague and member of Autodesk Consulting working in our Bangalore office – for kindly providing this code. Ishwar tells me that he has come across many developers struggling to identify holes in 3D solid using its boundary representation (Brep). The code he has provided works on the basis that a hole's normal is typically facing inwards and will therefore intersect the hole's axis of symmetry, providing we extend the line representing the normal by the hole's radius and the line representing the axis of symmetry by the cylinder's height (just…