Persistent Topology

The Persistent Topology component describes topological data structures which can be stored in the database. These packages provide a way to convert data from the transient "world" to the persistent "world".

Persistent Topology is based on the BRep concrete data model provided by the topology packages. Unlike the components of the Persistent Geometry package, topological components can be fully shared within a single model, as well as between several models.

Each topological component is considered to be a shape: a TopoDS_Shape object. The system's capacity to convert a transient shape into a persistent shape and vice-versa applies to all objects, irrespective of their complexity, including:

- vertex

- edge

- wire

- face

- shell

- solid, and so on.

When a user creates a data model using BRep shapes, he uses the conversion functions that the system provides to store the data in, and retrieve it from the database. The data can also be shared.

Persistent Topology is provided by several packages.

The PTopoDS package describes the persistent data model associated with any BRep shape; it is the persistent version of any shape of type TopoDS_Shape. As is the case for persistent geometric models, this data structure is never edited or queried, it is simply stored in or retrieved from the database. It is created or converted by the Translate function provided by the MgtBRep package.

The MgtBRepAbs and PTColStd packages provide tools used by the conversion functions of topological objects.

Example

//Create a shape
TopoDS_Shape aShape;

//Create a persistent shape
PtColStd_DoubleTransientPersistentMap aMap;

Handle(PTopoDS_HShape) aPShape =
aMap.Bind2(MgtBRep::Translate
(aShape,aMap,MgtBRepAbs_WithTriangle));

aPShape.Nullify();

//Restore a transient shape
Handle(PTopoDS_HShape) aPShape;

Handle(TopoDS_HShape) aShape =
aMap.Bind1(MgtBRep::Translate
(aPShape,aMap,MgtBRepAbs_WithTriangle));

aShape.Nullify();