In Teigha you can work with solids and shells using boundary representations, or B-Reps. In different Teigha products, Teigha Drawings (for working with both .dwg and .dgn files), Teigha PRC, and Teigha BIM, there are separate implementations of B-Rep interfaces, but you can work with them using the common class OdBrBrep.
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:
Teigha Visualize has a mapping mechanism to use correct texture settings even when mapping coordinates are not present. In this tutorial, we’ll create a sphere and the texture will be set using mappers.
Let’s see how to create a ball.
Suppose we have a model and a database ID. Let’s get a pointer to the database, add an entity to this model, and append a sphere to it.