October 2014

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  










« AU 2011 Handout: Integrating Microsoft® Kinect™ with AutoCAD® | Main | Adding speech recognition to AutoCAD via Kinect »

November 16, 2011

AU 2011 Samples: Integrating Microsoft® Kinect™ with 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 not helped by the fact I only have a headshot posted on my blog. It did make me feel a bit like Kurt Russell’s character in Escape from L.A., where he keeps being told “I thought you’d be taller”. Not something Jeremy Tammik ever hears, I suspect. :-)

Anyway, I’ve had some fun over the last few days combining the various Kinect samples I’ve posted on this blog into a single “KinectSamples” project, which will form the core of the Kinect demos I’ll present at AU 2011. I took the opportunity to factor out common functionality from many of the samples, introducing something of a class hierarchy, in the process.

Here are the commands for you to build and try:

  • KINSKEL
    • “My first Kinect” sample, showing how to create a rudimentary jig to display skeleton data inside AutoCAD
  • KINECT
    • Dynamically displays a point cloud at the chosen resolution (see KINBOUNDS), and captures/imports a full resolution, colorised point cloud on click
  • KINBOTH
    • Overlays both skeleton and point cloud data in an AutoCAD jig, creating linear geometry and importing a point cloud on click
  • KINSNAPS
    • Captures a sequence of point clouds and combines them prior to import
  • KINSAMP
    • A system variable, rather than a command, that specifies the sampling rate for the point cloud display (50 means one in fifty points gets displayed, 1 means they all do)
  • KINBOUNDS
    • Allows definition of a clipping volume for point cloud display and import. This clipping volume is respected by all commands in the sample allowing point cloud import
  • KINPOLY
    • Draws a sequence of 3D polylines while jigging (and then importing) a point cloud
  • KINEXT
    • Sweeps a circular profile along a spline path
  • KINEXT2
    • Sweeps a circular profile along a spline path, creating regular segments to improve performance and reliability
  • KINNAV
    • Navigates a 3D model by adjusting the view based on input from Kinect

Many of these samples now use the following class hierarchy (listed with a brief description and the names of the commands they help implement):

  • DrawJig (the core AutoCAD base class)
    • KinectSkeletonJig (our simplest sample, kept as a flat class, to simplify copy & paste into a new project – KINSKEL)
    • KinectJig (base class for the more complex samples, handles sensor initialisation and message forcing)
      • KinectPointCloudJig (handles display of a point cloud - KINECT)
        • KinectCombinedJig (displays a skeleton on top – KINBOTH)
        • KinectDelayJig (combines a sequence of snapshots – KINSNAPS)
        • KinectPolyJig (draws 3D polylines – KINPOLY)
        • KinectSolidsJig (sweeps a circle along a spline path – KINEXT)
        • KinectSegmentedSolidsJig (ditto in segments – KINEXT2)

I may yet factor some more in advance of AU – there may be an opportunity to put some kind of gesture handling base class in there, for instance – but having too deep a hierarchy may also make it a little harder to understand the code. We’ll see what makes sense (and I get time for).

blog comments powered by Disqus

Feed/Share

10 Random Posts