Using samples to get acquainted with the PRC format
January 19, 2017
Teigha PRC is a toolkit for reading, rendering and creating PRC files (also known as 3D PDF). It is included in a standard Teigha subscription. PRC (Product Representation Compact) is a 3D file format that is used to represent 3D model data. The main purpose of the PRC format is to provide a compact binary form for CAD data visualization. It provides the visual equivalent of 3D data and calculates the shape measurements with high accuracy without using specific CAD applications. The PRC format is optimized for storing different types of CAD data such as coordinate systems, curves, surfaces, solids and so on.
The main Teigha PRC example that contains “how to create” code is OdPrcCreate located in the \Prc\Examples\OdPrcCreate\ folder. The release package includes a prebuilt OdPrcCreate.exe application in the “exe” folder. Also, a project file is available in the release package (for Microsoft® Windows®). So it is possible to start the prebuilt application or debug it using Microsoft Visual Studio®. Information about OdPrcCreate is here (login required).
OdPrcExCommands module example
One more interesting example is OdPrcExCommands.tx which is an extension module. This module contains a set of example commands. We have added all example cases from the OdPrcCreate example as commands to the OdPrcExCommands module. So it is possible to load this module and use the OdPrcCreate example cases as commands in an application. Source files for OdPrcExCommands are in the Prc\Examples\OdPrcExCommands\ folder and a prebuilt version with a project file is also available in the release package.
OdaPrcApp viewer application for Windows
OdaPrcApp is a Windows-based viewer for .prc files. Source files can be found in the Prc\Examples\win\OdaPrcApp\ folder. A prebuilt version and a project file are included in the release package. The main advantages of OdaPrcApp are its user interface and support of all major Teigha PRC features. OdaPrcApp is able to load, create, save and render .prc files. Also it supports loading of .tx modules and execution of commands.