What is an XCGM file?
XCGM is the file format of the CGM geometric modeling kernel, the same kernel family used inside Dassault Systèmes applications. In 3D InterOp, it serves as a hub for data exchange: a model read from any supported CAD format can be saved to XCGM, and an XCGM file can be translated back to the other formats that 3D InterOp supports.
An XCGM file is a ZIP archive made of several packages: one for the product structure, one for the geometric representation and one for visualization. The archive both bundles and compresses the content, and the format is extensible, so applications can add their own data with a defined set of XML tags. It builds on 3D XML, the lightweight XML-based format of Dassault Systèmes.
How is an XCGM file structured?
XCGM can hold two main representations of the same part, exact CGM geometry and tessellation, and a single reference can carry both. A wheel part, for example, can be stored with its visualization mesh and its precise geometry side by side.
| Content | What it holds |
| Product structure | References (reusable parts and sub-assemblies) and instances (placements of a reference), with names, visibility, position and color |
| Exact geometry | CGM B-rep topology and geometry |
| Mesh and polyline data | Polyhedral bodies with mesh surfaces and polyline curves |
| Visualization | Tessellated faces, edges and wires, and graphical PMI |
| Metadata | Units, author, version, modification date and format type, at assembly and part level |
| Extensions | Application-specific data added through XML tags |
What Is XCGM Used For? Applications and Industry Use Cases
XCGM is used by applications built on the CGM kernel to save models with their full product structure, keeping precise geometry and lightweight tessellation in the same file. Because it is the native format of the kernel, it is also the most direct way to move CGM data between tools, test environments and teams without losing precision.
For software developers, XCGM is a convenient intermediate format. An application can convert any format supported by 3D InterOp to XCGM in batch, store the result, and reuse it later for modeling, visualization or further translation. Large assemblies can be loaded faster thanks to multi-process import.
Challenges or Common Pitfalls
XCGM is tied to the CGM ecosystem. Applications that do not use CGM or 3D InterOp generally cannot open it, so it is better suited to exchange between CGM-based tools, or as an intermediate format, than to delivering data to arbitrary partners.
Some kinds of data have specific rules. Graphical data is supported at part level only, not when it is applied at assembly level or on part occurrences, and only the highest level of detail is read and written. Free points are not supported, and application data kept in memory as miscellaneous data is not stored in the file, so it must be saved separately.
How Spatial Helps
Our 3D InterOp SDK both imports and exports XCGM files. On import, it reads the exact topology and geometry, which arrive as a native CGM model when CGM is the target modeler, and XCGM parts can also be imported into 3D ACIS Modeler or Parasolid. Polyhedral bodies made of mesh surfaces and polylines are supported as well.
3D InterOp gives access to the full product structure of an XCGM file, with the name, visibility, position and color of each instance, and to document information such as units, author, version and modification date at assembly and part level. After B-rep import, name, visibility, color and transparency are available on the topology, and color and name are carried over to CGM, ACIS or Parasolid.
Tessellated faces, edges and wires can be both read and written, along with graphical PMI made of text, symbols, polylines and filled polygons. Check the 3D InterOp documentation for the XCGM versions supported in your release.