AutoCAD and the Kinect

Description

Kinect and AutoCAD? Yes, you sure can...

Note: These samples are currently based on the Kinect for Windows Beta 2 SDK and while since the v1 release I've tried to avoid Beta 2 projects, there's been some requests for more LOB Kinect usage examples and I've not seen many/any AutoCAD & Kinect examples. I'm sure if there's sufficient interest Kean will update the samples for v1...

UPDATE 3/21/2012: Yep, Kean was all over it and has released a v1 compatible version, Updated AutoCAD + Kinect for Windows samples.

AU 2011 Samples: Integrating Microsoft® Kinect™ with AutoCAD®

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).

...

Additional Material

The session included a number of more complicated samples, demonstrating techniques for integrating AutoCAD with Kinect:

For additional samples and further reading, please be sure to visit:

http://through-the-interface.typepad.com/through_the_interface/kinect

Project Information URL (SDK Beta 2): http://through-the-interface.typepad.com/through_the_interface/2011/11/au-2011-samples-integrating-microsoft-kinect-with-autocad.html, http://through-the-interface.typepad.com/through_the_interface/kinect

Project Source URL (SDK Beta 2): http://through-the-interface.typepad.com/files/KinectSamples.zip

Project Information URL (SDK v1): http://through-the-interface.typepad.com/through_the_interface/2012/03/updated-autocad-kinect-for-windows-samples.html

Project Source URL (SDK v1): http://through-the-interface.typepad.com/files/KinectSamples-v1.zip

image

image

Contact Information:

The Discussion

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.