TECHNICAL OVERVIEW
HOOPS Exchange is a set of high performance software libraries designed to provide software developers with the ability to read and write popular 3D formats from within their application. Exchange reads CAD data from the most popular 3D file formats and converts that 3D data to the PRC data format, a highly compressed and open file format that is currently submitted for ISO standardization. PRC is also one of the container formats used for 3D in Adobe PDF.
HOOPS Exchange is optimized to read various kinds of 3D data, especially those coming from computer-aided design (CAD) systems. Most of the data types stored by CAD systems are supported by Exchange:
Exchange also provides the capability to write PRC data to file. This PRC data file can then be inserted into a 3D PDF file. 3D PDF is currently used in 3D documentation workflows for several large industries, including aerospace, automotive, architecture and construction. The manufacturing industry has come to rely on PDF for the exchange of manufacturing documentation, distribution of service and parts manuals, and capture and submission of regulatory documentation.
Reading CAD files into an Exchange-enabled application is a very simple process. The first step is to set the options to control what data is read, and then call a single API to load the CAD file, which provides access to the original CAD data in the PRC data format.
HOOPS Exchange includes a Parasolid connector component. This connector uses the native Parasolid APIs to ensure that the mathematical representation of the source data is correctly matched to the expectations of the Parasolid modeler. During this process, a variety of healing and optimization algorithms are used to ensure the imported model is of the highest quality. If a developer is only interested in the B-rep data, then they can use a single, high-level API which extracts B-rep from any file and brings it into an active Parasolid session. This approach greatly reduces the time needed to integrate HOOPS Exchange into a Parasolid-based application.
HOOPS Exchange provides full access to the B-rep definition of the model, which developers can use to import their model to their geometric engine. APIs are also provided which allow developers to adapt the model to the constraints of their geometry kernel. Operations like splitting periodic surfaces and converting trimming curves between parametric and 3D space are available through this API.
HOOPS Exchange is able to export to a number of B-rep formats, including STEP, IGES, JT, and ACIS. Developers can use these file exporters to avoid needing to query into the B-rep. Instead, they simply use HOOPS Exchange to automatically convert the model to their BREP file of choice, then import that model into their system. The export can be performed on a whole model through one single high-level API, or performed on a per-part basis depending on the preferred use-case. Face and body level attributes are maintained during export.
PRC format stands for Product Representation Compact Format. PRC is a highly accurate and highly compressible format for describing 3D CAD models including assemblies and Product and Manufacturing Information (PMI). A PRC file is a sequential binary file, written in a portable way.
The PRC format is an openly published format subject to ISO certification ISO/AWI 14739-1. The specification document is included in our documentation and can be viewed here.
PRC supports PDF-based documentation workflows and can also be used as an independent 3D visualization file format. By using PRC, documents can be created that are interoperable with Computer Aided Manufacturing (CAM) and Computer Aided Engineering (CAE) applications. PRC supports documentation requirements for design reviews as well as distribution of detailed design documentation to supply chains. In addition, its use can help support regulatory mandates which require the use of open standards.
Specifically, PRC supports the following data forms:
PRC is currently used in 3D documentation workflows for several large industries, including aerospace, automotive, and architecture. The manufacturing industry has come to rely on PDF for the exchange of manufacturing documentation, distribution of service and parts manuals, and capture and submission of regulatory documentation.
The release of PRC to ISO has accelerated innovation around PRC, driving even broader adoption of PRC, and is helping to ensure that PRC evolves to meet the 3D documentation needs of product manufacturing and related industries.
While there are a number of other 3D file formats, PRC integrates well with document formats such as PDF and XML. Specifically, PRC supports:
In December 2008 Adobe Systems released the PRC format to the AIIM (http://www.aiim.org).
AIIM is an ANSI (American National Standards Institute) accredited standards development organization. AIIM also holds the Secretariat for the ISO (International Standards Organization) committee focused on information management compliance issues, TC 171. TC 171 is the ISO committee that developed the existing ISO standards relating to Adobe PDF/A and PDF/E. Accordingly, AIIM is an authority that ANSI uses to submit proposed standards to ISO.
In June 2010 Adobe transitioned future development of the PRC standard to Tech Soft 3D, who is committed to working together with AIIM to develop the PRC specification as an open ISO-certified standard. The normal time frames for the development of an ISO standard range from 24 – 36 months.
In general usage the term PRC is used to mean the PRC file format.
Developers using HOOPS Exchange will encounter another usage of the term PRC to represent the data structures that exist in memory within a HOOPS Exchange process either after a file has been loaded directly or after the application has populated the structures prior to export.
These internal data structures used by HOOPS Exchange to store CAD data in a general form that maps very closely to those that define a PRC file on disk. In particular, there is no requirement to write a file to disk during the process of reading a CAD file and then parsing the resulting data into a host application.
Exchange has a full topological structure for describing manifold and non-manifold models. Local tolerances can also be retained for vertices and edges.
The PRC file format comprises the union of all geometric entities defined and used by the major mechanical CAD systems and relevant open standards e.g. STEP and IGES. Each entity is stored in the original parametric form as defined by the originating modeling system. Therefore, PRC has a significant advantage over many existing standards as there is no requirement for loss of precision or accuracy when 3D curve and surface data is represented in PRC.
Surface definitions are preserved for the following surface types:
All curves and surfaces can be fitted with NURBS curves and surfaces that are accurate to a user specified tolerance.
Access functions are provided so that all modeler specific curves and surfaces can be obtained in their original parametric form. Additionally PRC files containing modeler specific curve and surface definitions can be created from the appropriate functions in HOOPS Exchange.
HOOPS Exchange provides functions to convert all modeler-specific curves and surfaces to a standard general standard form i.e. NURBS. A tolerance can be specified for the conversion process so that the resultant curve or surface is accurate to within that tolerance (typically 0.001 mm).
HOOPS Exchange provides functions to measure the modeler-specific surfaces directly based on the UV parameterisation to return an accurate 3D point.
Files stored in the PRC format can be highly compressed. A compressed PRC file written by HOOPS Exchange can be typically 100 times smaller than the original proprietary CAD file and is typically three times smaller than U3D, a legacy 3D format still used in PDF.
Regular compression refers to directly representing the CAD data without loss or transformation from the original CAD system. Regular compression includes:
Regular compression refers to directly representing the CAD data without loss or transformation from the original CAD system. Regular compression includes:
Both parametric and tessellated geometry can be stored in a compressed form in the PRC file to a specified physical tolerance relative to the original shape. This tolerance is typically 0.001mm for parametric data and 0.01mm for tessellated data.
For NURBS data knot vectors, multiplicities, control points and weights are all stored in a compressed format. NURBS can also be approximated using simpler canonical surface forms such as planes and cylinders. For tessellated data triangle meshes, vertex coordinates, normals and textures are all compressed.
A variety of lossy techniques are used including variable coordinate basis, elimination of redundant coordinates and storage of floating point numbers in reduced numbers of bits depending on required precision.
The PRC file format contains versioning information that allows both forward and backward compatibility. This is fully implemented by HOOPS Exchange:
Each PRC file contains a global unit definition in the header. The unit is specified in multiples of millimeters, with 1 being one millimeter, 10 being one centimeter, etc. In addition an identifier indicates if this unit is the same as the source CAD file.
Additionally, for assemblies of multiple parts, each Product Occurrence can have its own units. However for consistency and ease of use HOOPS Exchange converts all the underlying data into a single unit for the model file.
When formats are read in that do not have units or for whom units are unreliable, HOOPS Exchange defines a default unit. These formats are U3D, STL and Dassault Systèmes CGR.
There are several types of tolerances associated with HOOPS Exchange and the data in a PRC file:
Tolerance values have no units and need to be combined with the units specified in the Model File and Product Occurrences to get physical real world values.
For example, if the dTolerance parameter of A3DGetSurfaceBaseAsNurbs is specified as 0.001 and the unit is 1000 then the real world tolerance is 1mm.
Some modeling systems support variable tolerances for tolerant modelling. This is to allow for the situation where sets of faces, edges, or vertices need to be considered as connected even when the distance between the vertex coordinates is greater than the global tolerance for that modeling system.
This helps support cases such as translating data from a modeler with a looser tolerance to one with a tighter tolerance.
PRC supports local tolerances on faces, edge and vertices and these are preserved by HOOPS Exchange when they exist in the source CAD file.
String-based attribute data can be added to entities using the miscellaneous attributes mechanism. HOOPS Exchange uses miscellaneous attributes to ensure all names specified within the original CAD file are correctly preserved. Additionally attributes can be used to store user data on any entity.
Character encoding for strings is in UTF8 format.
Some CAD formats support persistent and non-persistent unique identifiers for entities.
An identifier remains persistent if it remains the same even after the CAD file has been modified, with the exception that if the entity is destroyed the identifier is also removed. An identifier is non-persistent if it could change as successive versions of the file are saved.
CATIA V5, NX, Pro/Engineer and Parasolid XT support persistent identifiers.
As well as the ability to store user data using the Miscellaneous Attribute mechanism, application-defined data can be stored as a binary stream in the PRC file associated with subtypes of assemblies, representation items and markup data.
User data is stored as a bit stream along with the size of the stream for that item. This allows an application that does not have the definition for that data to still read the PRC file and even store the data.
In order to distinguish between user data from different applications in the same PRC file each block of user data is identified by a unique identifier for the authoring application. To obtain a unique identifier for your application, please contact Tech Soft 3D.
HOOPS Exchange supports reading tessellated data directly from the original CAD file, and also provides an internal tessellator so that all general and modeler-specific curves and surfaces can be converted to polygon data.
HOOPS Exchange divides tessellation data into three types:
For formats where both surface and corresponding tessellated data is available, a flag is available to determine whether to retrieve the tessellated data directly from the file or whether to calculate it from the surface geometry. For:
The tessellation process is aimed at producing low numbers of polygons for visualization purposes. A separate tessellator is used by the STL export process to create well-formed meshes such that all connecting edges meet at coincident vertices and long-thin triangles are avoided.
Tessellation data supports vertex normals and texture coordinates. Polygonal data can be provided either in a structured form so that each B-rep face and corresponding face loops are identified within the vertex arrays, or the entire body can be represented just as a single tessellated entity. Optimized triangle forms are available i.e. tristrips and trifans.
Tessellation parameters are available to control the degree of tessellation of both curves and surfaces when a file is loaded. For curves the maximum angle between linear chords can be specified.
For surfaces the maximum distance of the tessellated surface from the true surface is expressed as a ratio of the bounding box of the entity. This allows a uniform tessellation of entities irrespective of the physical size of the entity. Additionally a maximum deviation can be specified as can the minimum angle between each edge that forms a triangle.
Some CAD formats support multiple configurations of a model or assembly structure. A configuration is a specific arrangement of the model with respect to its defining hierarchy. For example parts may be in different positions, have different geometry or be omitted entirely in different configurations.
An example might be a model of a car with the steering wheel on the left side in one configuration and on the right side in a second configuration. A configuration is separate to a view.
HOOPS Exchange supports configurations for CATIA V4, I-deas and SolidWorks. In Pro/Engineer configurations are known as family tables and the initial/generic version is supported.
In HOOPS Exchange the term view is used specifically to refer to a particular representation of the 3D scene, including the camera settings, entity visibilities, colors, and positions.
For example a view could be an ‘exploded view’ where geometric entities are displayed in different positions and markup labels are used to describe instructions relating to how to assemble the model. A series of such views could comprise a work instruction.
On Microsoft Windows, HOOPS Exchange uses an explicit external linking mechanism to expose API calls to a host application.
Explicit linking requires the application to specifically load and unload the HOOPS Exchange DLL and to obtain the address of each function so that it can then be called via a function pointer.
HOOPS Exchange provides a full set of macros to manage this process and to ensure that application code that calls Exchange functions can look like normal code that uses implicit linking.
External linking offers the application the chance to exit gracefully if for some reason the DLLs are not present. It also allows DLLS in one binary format to be used successfully with different binary formats - for example DLLs built with Visual Studio 2008 can be used successfully with Visual Studio 2010.
Product and Manufacturing Information is read by HOOPS Exchange and stored in the Markup classes. As well as providing a complete graphical representation, for semantic PMI HOOPS Exchange maintains the logical hierarchy of the PMI as represented in the CAD system.
PMI markups are associated with assemblies, sub-assemblies and parts. If relevant, PMI is associated with individual topology so that feature control frames and datum references can be displayed correctly. Leader lines attach markup items to geometry. Exchange works to provide an accurate tessellation that looks exactly as it does in the originating CAD system.
Exchange provides a complete representation of the PMI associated with a model. PMI information returned by Exchange includes:
Extensive graphical information is given including color, line width, linestyle, face pattern, font, symbol, transformation matrix and display types e.g. billboarding, in the camera view plane and fixed size.
The Adobe MyriadCAD OpenType font is provided with HOOPS Exchange to ensure standard GD&T symbols are available. Licensees of HOOPS Visualize may also use the Tech Soft 3D TrueType font (ts3d.ttf).
HOOPS Exchange reads and store a variety of graphical attributes from the original CAD files and hierarchical scenegraphs with defined attribute inheritance can be constructed.
Graphical entities include styles, materials, transparency, images, texture pipelines for multi-texturing and advanced blending, line patterns, solid, hatched, dotted and vector fill patterns, ambient, directional, point and spot light definitions and perspective and orthographic cameras.
Whilst internally HOOPS Exchange is written in C++ and makes use of class inheritance, to enhance compatibility with other programming languages the API is C-based. The hierarchical object model is retained in the data structures provided through the API.
The main data types are termed ‘PRC Entities’ and these represent classes that are hidden from the HOOPS Exchange developer. Data is obtained from and added to PRC entities through corresponding C structures, and there is one struct for each PRC entity.
A variety of callbacks are available to customize memory allocation and deallocation, progress indication and error reporting.
Predefined functions are available to allocate and deallocate memory using the HOOPS Exchange memory manager. Callbacks are available to replace these with an application specific memory manager if desired.
Whilst all necessary functions return a status to indicate success or failure, further messages, warnings and errors can be trapped and handled via the custom report callbacks.
A wide range of return codes are defined for specific conditions such as bad input data, geometry problems, failure to convert to NURBS, failure to convert to canonicals, inappropriate tolerances and incorrect parameterization, topology problems, incorrect loops, incorrect co-edges, tessellation problems, incorrect markup data etc.
Out of memory conditions are also reported in the return code of the function that caused the condition.
Ideally the code that processes PRC data is structured to reflect the hierarchy of the PRC format, with one function to process or create each of the PRC entities. Additionally, helper functions may be useful to perform repeated tasks, such as processing or creating attribute data that can apply to a broad category of PRC entities.
The PRC hierarchy is similar whether the application is primarily interested in visualization data, markup and PMI, parametric geometry and topology, or any combination of these.
When integrating HOOPS Exchange an evaluator may initially focus on tessellation data, then hooking up attribute and markup data, and finally B-rep topology and geometry. This step by step approach allows a developer to get the parsing structure correct and quickly visualize the results before tackling the more complex areas of markup and B-rep.
PRC is the main 3D container format that is supported within Adobe PDF. Adobe also supports U3D.
U3D is a polygonal format defined by the 3D Industry Forum, which included Intel, Boeing and Adobe. Adobe original chose U3D as the 3D container format for PDF. However U3D does not support accurate surface definitions, so Adobe subsequently added PRC as an alternate format for representing 3D data within PDF. Adobe continues to support both formats within PDF and Acrobat although U3D is generally recognized as a legacy format.
HOOPS Exchange can read U3D and PRC and write PRC. As previously described in this document, the internal data structures used by HOOPS Exchange correspond closely to the sections within a PRC file.
The main advantages of using PRC for publishing PDF documents are:
The PRC export capability is suitable for use by companies who already have a PDF generation capability.
Companies who wish to define more advanced PDF workflows e.g. for enterprise-wide document management or for document based data exchange outside the company firewall should contact their Tech Soft 3D account manager.
HOOPS Exchange pre-processes all IGES data to maximize our success rate with IGES data. In addition to fixing geometric problems we also try our best to handle corrupt files and incomplete geometric definitions. In addition we provide a sew API which allows you to turn a collection of surfaces into water-tight solids within a user-supplied tolerance. This is done automatically and without any user intervention. Finally, an API is provided which will allow you to post-process imported data and prepare it for import into your system. Some of the things we do here include splitting periodic surfaces, ensuring C1 continuity, moving trimming curves from parameter to 3D space (and vice-versa), eliminating small edges, adjusting topological tolerances as well as a host of other minor modeler-specific adjustments. This functionality is automatically invoked when you export to ACIS and Parasolid to ensure that the imported data can be successfully operated upon by ACIS and Parasolid.