Categories

CAD Models in C#: Developing with Eyeshot

CAD Models in C#: Developing with Eyeshot

DMC recently developed some desktop applications for clients in C# that require 3D modeling. We’ve been using a third-party CAD tool developed by devDept called Eyeshot. If you are working in the world of graphic design, 3D animation rendering, or physics simulations, there could be better options for your needs, like gaming engines such as Unity and nVidia PhysX.

However, if you are working in the engineering world of CAD files, Eyeshot is by far the best tool available for C#. There is a lot of great functionality out of the box and it is pretty extensible. Without further ado, I’ll share a few of the fun things we’ve done!

File Compatibility

We’ve used Eyeshot to pull in DXF, DWG, STL (including Mesh entities), and STEP files. It also supports reading and saving OBJ, IGES, and several other formats. Conversion between formats can sometimes take some work depending on the details, but is generally doable.

GIF of a 3D house model demonstrating auto transparency in EyeShot
Demonstration of real-time movement behind objects and automatic transparency to keep it visible 
Model source: Modern Building by S. Prasanth
 

GIF of 3D valve model demonstrating EyeShot's automatic collision detection
Our custom object creation, editing, and collision detection algorithms on display
Model source: 6mm Bolt Head Knob for Unscrewing by Aidan McMaster

Point and Object Creation

You can use Eyeshot to build your own full-fledged CAD generator or editor. However, the applications we’ve been developing so far are not aimed at CAD jockeys. We’ve made some simple point, line, bar, and curve creation and editing tools. While Eyeshot has support for 3D mice, we are aiming at simple mouse or touch screen (and yes, multi-touch!) interfaces. Eyeshot has some nice multi-touch functionality out of the box, although we’ve found we had to build onto it with quite a bit of customization.

Real-Time Updates and Animation

We’ve set up our application to show objects moving in real time by feeding in live, real world coordinates. This also can be used to show pre-recorded animations. Update rates of 60 frames per second are easily achievable.

Collision Detection

We’ve had several uses for collision detection algorithms, which can always be a tricky subject. Generally game engines are better for collision detection as Eyeshot lacks this functionality out of the box, but we have implemented some of our own routines for multiple different purposes.

One is to verify that created objects live in a valid space and don’t collide with other objects in a non-dynamic situation. The other is to verify whether or not there are collisions with moving objects. In both cases you always have to use an approximation method, such as hit boxes, and some innovative 3D geometry and math.

Skinning

Eyeshot allows you to apply images (materials) to objects to add a little more life to the model. You also can adjust the transparency of different entities and layers. One cool feature we added was dynamic transparency to hide objects that are in the way of viewing a moving object.

Overall, we look forward to continuing to use Eyeshot in future projects, especially as DevDept continues to improve the program and add new features requested by users.

Learn more about DMC's C# programming expertise and services.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Categories