CAD Exchanger SDK
Measurement Units

Table of Contents

Overview

CAD Exchanger implicitly uses millimeters as the unit of length measurement and radians as the unit of plane angle measurement.

Each format has its own conventions on what units of measurement are used to store geometric data. CAD Exchanger takes these conventions into account and performs scaling of coordinates, lengths and angles when importing and exporting models. Import and export parameters classes also contain methods (Base_ReaderParameters::SetLengthUnit(), Base_WriterParameters::LengthUnit()) allowing to specify the length unit that will be used if the format has no conventions about units (e.g. STL, OBJ) or when the choice is arbitrary (as is often the case in export).

As a result of these scaling procedures, all length (or derived) parameters provided via SDK API are assumed to be in millimeters. Likewise, coordinates retrieved from B-Rep or polygonal representations are also in millimeters.

Support of units across formats and the unit handling strategies in import and export are summarized in the table below:

Format Unit assignment Import behavior

Export behavior

IGES File-wide Scale lengths/coordinates according to file-wide units

Scale lengths/coordinates according to Base_WriterParameters::LengthUnit()

STEP Per-product Scale lengths/coordinates and angles according to per-product units

Scale lengths/coordinates according to Base_WriterParameters::LengthUnit(), save angles in radians

ACIS-SAT File-wide Scale lengths/coordinates according to file-wide units

Scale lengths/coordinates according to Base_WriterParameters::LengthUnit()

Parasolid-XT Meters and radians by convention Scale lengths/coordinates from convention unit

Scale lengths/coordinates to convention unit

JT Per-Logical Scene Graph element; same as Parasolid for XT segments Scale lengths/coordinates of mesh and JT B-Rep data using units in LSG; same as Parasolid for XT segments

Scale lengths/coordinates of mesh according to JT_WriterParameters::PolyRepresentationUnit(); same as Parasolid for XT segments

SolidWorks Same as Parasolid Same as Parasolid

N/A

IFC File-wide Scale lengths/coordinates and angles according to file-wide units

N/A

Rhino File-wide Scale lengths/coordinates according to file-wide units

Scale lengths/coordinates according to Base_WriterParameters::LengthUnit()

OBJ No unit information Scale lengths/coordinates according to Base_ReaderParameters::SetLengthUnit()

Scale lengths/coordinates according to Base_WriterParameters::LengthUnit()

STL No unit information Scale lengths/coordinates according to Base_ReaderParameters::SetLengthUnit()

Scale lengths/coordinates according to Base_WriterParameters::LengthUnit()

VRML Meters and radians by convention Scale lengths/coordinates according to Base_ReaderParameters::SetLengthUnit() Scale lengths/coordinates according to Base_WriterParameters::LengthUnit()
X3D Meters and radians by convention N/A

Scale lengths/coordinates according to Base_WriterParameters::LengthUnit()

BRep Millimeteres and radians by convention No scaling

No scaling