Overview of packages in OCC

## The GC and the gce package

Both packages contain functions to create curves, surfaces and transformations using nontrivial definitions. For example, you can create a circle through 3 points.

Both package reside in the Modeling Data part of Open CASCADE. What's the difference? On first sight they seem to fulfill the same purpose. For example, they both provide a method to create a plane from a normal.

`GC_MakePlane (const gp_Pnt &P, const gp_Dir &V)`

`gce_MakePln (const gp_Pnt &P, const gp_Dir &V)`

The difference is subtle: While

**GC**creates passed-around-by-reference objects from the Geom package,

**gce**creates equivalent passed-around-by-value objects from the gc package!

The GC functions for creating 2d primitives are residing in the GCE2d package!

## ProjLib

Contains algorithms to project various curve types onto different kinds of surfaces.

#### important classes

*ProjLib_ProjectOnPlane*can project arbitrary curves onto planes along a specific direction. The result is still described as a 3d curve (lying in the plane)*ProjLib_Plane*can create a 2d description of a elementary curve lying inside the plane. gp_circ -> gp_circ2d*ProjLib_ComputeApprox*creates a approximation for the 2d description of an arbitrary curve lying inside an arbitrary surface.**Important**: If the surface is a plane and the curve is a spline curve, the result is not an approximation but exact

## BRepMesh

Contains routines to create mesh approximations of shapes.

#### important classes

*BRepMesh_IncrementalMesh*calls BRepMesh_FastDiscret to create the mesh geometry. (the name of the class suggests that it does something incrementally…)*BRepMesh_FastDiscret*does the actual triangulation of faces and edges. Obviously it's impossible to triangulate single edges or wires. The algorithm seems to always look for faces to triangulate and then converts the edges to polygons on the face triangulation ("PolygonOnTriangulation").*BRepMesh_GeomTool*seems to triangulate a curve or surface from the Geom package (does it really?)*BRepMesh_ShapeTool*is simply a wrapper for the topology explorer. You can traverse the edges and faces of a shape.

## GCPnts

Contains routines to designate sets of points on Curves using the Adaptor3d_Curve interface.

*GCPnts_TangentialDeflection*is used by BRepMesh to triangulate curves. It generates a set of points on a curve fulfilling a deflection constraint for successive points.

page revision: 16, last edited: 30 Mar 2011 07:20