Teigha Blog

Find out what's new and more

Teigha Support of OBJ Format

OBJ is a file format developed by Wavefront that is commonly used to store 3D model geometric definitions. It is mainly used as an exchange format between different 3D applications and has become one of de-facto standards for model interoperability. Many 3D model libraries provide an option to download their models in this neutral format.

conversion rendering getting started

Creating a NURBS Curve

With Teigha you can create Non-Uniform Rational Basis Spline (NURBS) curves using the Teigha Ge library and its classes OdGeNurbCurve2d and OdGeNurbCurve3d.

Let’s consider a 3D version of a curve (2D curves have all the same behavior). A NURBS curve is defined by its order, a set of weighted control points, and a knot vector. This data can be set to a curve using a constructor:

rendering Example getting started

Working with Surface Fit Polygon Meshes

A polygon mesh can be of the surface fit type, which defines the polygon mesh using an approximation method to create an object that is more smooth. In Teigha, polygon mesh surface fit is provided by the following function:

rendering Example getting started

Overriding Visual Styles of Elements in Teigha BIM

Learn how to override Visual Styles of the elements in Teigha BIM.

rvt rfa rendering Example

Teigha Kernel: OdGsView Interactivity Mode

Interactivity mode is a new feature of the Teigha graphics system . It allows for automatic interruption of the drawing process if the process is taking a long time. Of course in this case the drawing will not be drawn completely, but this feature can be useful for multiple consecutive redraws when the result of the intermediate redraw is not so important.

rendering Example sources

Frequently Asked: How can I solve a large coordinates problem during geometry display and graphics cache auto-regeneration?

Vectorization modules based on DirectX/OpenGL graphics APIs ("WinOpenGL.txv", "WinDirectX.txv" and "WinGLES2.txv") don’t render geometry accurately for large coordinates due to hardware limitations.

rendering getting started

Frequently Asked: How do I disable/enable lights inside blocks?

By default, displaying light sources inside block inserts is enabled and Teigha rendering takes them into account. But large drawings can contain many light sources which can seriously downgrade rendering performance.

rendering getting started

Frequently Asked: How can I modify drawn colors from my application during display?

Sometimes rendering applications require a modification to drawn colors during rendering without a long update of geometry cache.

rendering getting started

Graphic System Overlays

Complex graphic scenes with a large number of elements are sometimes drawn slowly. In this case, dynamic graphic elements (such as cursors, grip/snap points, selection rectangles, user interface elements, and so on) are drawn slowly too because to correctly combine graphic scenes and dynamic graphic elements, the renderer must redraw all underlying scene elements.

rendering performance Example

Hatch Types and Exporting to PDF

Sometimes ODA members ask about exporting hatches and why a resulting .pdf file is very slow to open or why the quality of exported hatches is poor. This article explains a few things about hatches and exporting them to PDF.

There are three main types of hatches in .dwg files:

export rendering