Skip to content

3D InterOp TranslationDriver for Multi-Threaded and GUI Applications

← Back to blog | ADMIN | 15-06-2015

Spatial's 3D InterOp requires that all translations be done on the same thread that creates the SPAISystemInitGuard.

Hexagon pattern 1

Spatial's 3D InterOp requires that all translations be done on the same thread that creates the SPAISystemInitGuard. This complicates programs that may wish to create separate threads for a translation. This is often done in GUI applications that require the main thread to listen for events and handle all translation logic in a separate thread that will not impact the interactivity of the main thread. It would be highly undesirable to block all event processing for the duration of a translation, so a separate thread is often used to do the translation so that the application can still be interactive. 

Spatial has recommended that you follow the guidelines established in the document “InterOp: Important Note for Multi-threaded Applications.”  However, the example code there is specifically for file to file translations. The classes provided do not demonstrate how do to in-memory translations or provide a flexible mechanism for doing arbitrary translations on any arbitrary thread. It is far easier to spawn a new thread in an application for the translation and then close that thread when done. IOP does not support concurrent translations, so some caution must be made to not accidentally do two translations at once. 

This of course gets more and more complicated for real world applications. Often, a single code path for a translation cannot be maintained.  In one translation, you may want to only process BREP data. In another, you may want graphical data.  In yet a third, you may be interested in a file-to-file translation and not care to process in memory. This requires different code paths per translation and it is no trivial task to modify the example code into something that works for type of translation you may have. 

With the proper encapsulation, one class can manage all translations and drive them in such a way so that the conversion is done within the boundaries of one and only one SPISystemInitGuard. It will allow you to spawn and then destroy a thread in your application so that code management is easier and the translation is localized. It will allow you to implement any number of callbacks so that not only one translation code path is needed.  It can handle multiple different translations in an application with the reassurance that it abides by the restrictions of InterOp translators and does not force any of event processing threads to synchronously block for the entire duration of a translation.

To view an example of flexible code for use by any program that may invoke arbitrary threads to do translations, visit:  http://info.spatial.com/3dinterop_translationdriver

You might also like...

10 Min read
3D Interoperability
CAD Conversion SDK: Translate 3D Files Reliably Across Formats Summary What is CAD File Conversion and Why It Matters...
2 Min read
3D Interoperability
Software developers in the manufacturing field are often tasked with implementing expert-level algorithms for 3D...
CNC Routing Software 1
7 Min read
3D Interoperability
CNC routing software is an indispensable tool that gives manufacturers new levels of precision and speed in product...
5 Min read
3D Modeling
Software components are like the stage crew at a big concert performance: the audience doesn’t see them, but their...
Application Lifecycle Management Flow
4 Min read
3D Modeling
When you hear the term, Application Lifecycle Management (ALM), you likely think about the process that a software...
8 Min read
3D Modeling
What is Computer Aided Manufacturing The CAM Market Who Uses CAM Software? Trends in CAM What do CAM Software...
8 Min read
3D Modeling
There’s a lot of confusion around what the terms additive manufacturing and 3D printing mean.
4 Min read
3D Modeling
Additive manufacturing, often referred to as 3D printing, is a computer-controlled process for creating 3D objects.
7 Min read
3D Interoperability
Table of Contents Why industrial automation is important Advantages and Disadvantages of Industrial Automation The...
8 Min read
3D Modeling
What do you do? What Exactly is FEM? What You Need to Know About Choosing a FEM Modeler FEM and Partial Differential...
5 Min read
3D Modeling
Computational Fluid Dynamics (CFD) is a type of analysis that provides insight into solving complex problems, and...
2 Min read
3D Modeling
WRL files are an extension of the Virtual Reality Modeling Language (VRML) format . VRML file types enable browser...
Voxel model example
3 Min read
3D Modeling
Voxels are to 3D what pixels are to 2D. Firstly -- let’s examine what pixels actually are. Everything you see on your...
Point_cloud_torus
2 Min read
3D Modeling
Point-cloud modeling is typically used in the process of 3D scanning objects. Rather than defining surfaces through...
Polygonal Modeling
2 Min read
3D Modeling
Polygonal (or polyhedral) modeling is the most common type of modeling for video games and animation studios. This type...
aerodynamics-CFD
9 Min read
3D Modeling
Computational fluid dynamics (CFD) is a science that uses data structures to solve issues of fluid flow -- like...
BREP Model example
2 Min read
3D Modeling
BRep modeling, or Boundary Representation modeling, is, in CAD applications, the most common type of modeling. BRep is...
Feature Recognition Zoomed
5 Min read
3D Modeling
IN THIS ARTICLE: What is FEA (Finite Element Analysis) Principles of Finite Element Analysis and Simulation Software A...