AutoCAD and the Kinect!

http://channel9.msdn.com/coding4fun/kinect/AutoCAD-and-the-Kinect

“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…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:Displaying and importing point clouds Drawing 3D polylines Sweeping simple solids Sweeping segmented solids Navigating a 3D model

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

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

Project Information URL: 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: http://through-the-interface.typepad.com/files/KinectSamples.zip

Contact Information:Blog: http://through-the-interface.typepad.com/ Twitter: @keanw”

-Sent from Weave for Windows Phone 7

This entry was posted in Kinect. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s