Bl
Bl
Bl
Bl
Bl
You are here:   Home »  Products »  PolyTrans|CAD+DCC  
Bl

Home > Supported File Formats > DGN to OpenGL C Code


How to convert DGN (MicroStation) to OpenGL C Code (.cpp)?


PolyTrans|CAD+DCC performs mathematically precise CAD, DCC/Animation, GIS and BIM 3D file conversions into all key downstream 3D packages and file formats. Okino software is used and trusted throughout the world by many tens of thousands of 3D professionals in mission & production critical environments, backed by respectable personal support directly from our core development team.

     

DGN

DGN is a 2D/3D file format, with its roots going back to the early 1980s, that is used as the native file format of such programs as Bentley's MicroStation and Intergraph's PDS software packages. Relative to deep history, DGN could be considered a competitor or rival to the Autodesk DWG file format. Okino considers both DGN and DWG rather "crude" and old file formats, depending on what vintage of file is used and whether the files contain ACIS-SAT/Parasolid "BREP solids" geometry or just 2D/3D vector geometry.

Okino considers a DGN V8 file to be of two varieties: (1) "GIS" like models defined using basic primitives like lines, curves, arcs and 3D objects defined by the extrusion and revolution of these basic elements - these types of files are typically glutted with an enormous number of basic elements which can result in massive scenes that can very slow to display and take up a lot of memory. (2) The second variety of DGN file uses the more modern "BREP solids" geometry type to define the 3D objects as lighter weight and more efficient NURBS surfaces and solids.

Okino spent over 20 years developing its DGN importers and exporters. As such, we understand the nuances of DGN and its related conversion issues. Please refer to our DGN importer WEB page which has extensive information on (1) the history of DGN and when to use DGN, (2) how to import massive DGN files (such as PDMS 3D plants, oil refineries, etc), (3) how to import from AVEVA PDMS and Intergraph PDS, and (4) our suggestions about using STEP or VRML2 as alternative conversion methods from Bentley's MicroStation.

     

OpenGL C Code

OpenGL is a cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.

Okino's OpenGL export converter writes out the scene database as a C code program in the Open GL scene description language. The resulting program can then be compiled and used to draw the 3D database directly using OpenGL. The database is output as a series of polygons with vertex positions, normals, colors and texture coordinates. In addition, the surface definitions (materials) associated with each polygon is used to set up the OpenGL shading parameters. Please note that each object is output as a separate C code function in the resulting file.