Persistent Geometry

The Persistent Geometry component describes geometric 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 Geometry consists of a set of atomic data models parallel to the geometric data structures described in the geometry packages. Geometric data models, independent of each other, can appear within the data model of any application. The system provides the means to convert each atomic transient data model into a persistent one, but it does not provide a way for these data models to share data.

Consequently, you can create a data model using these components, store data in, and retrieve it from a file or a database, using the geometric components provided in the transient and persistent "worlds". In other words, you customize the system by declaring your own objects, and the conversion of the geometric components from persistent to transient and vice versa is automatically managed for you by the system.

However, these simple objects cannot be shared within a more complex data model. To allow data to be shared, you must provide additional tools.

Persistent Geometry is provided by several packages.

The PGeom package describes geometric persistent objects in 3D space, such as points, vectors, positioning systems, curves and surfaces.

These objects are persistent versions of those provided by the Geom package: for each type of transient object provided by Geom there is a corresponding type of persistent object in the PGeom package. In particular the inheritance structure is parallel.

However the PGeom package does not provide any functions to construct, edit or access the persistent objects. Instead the objects are manipulated as follows:

- Persistent objects are constructed by converting the equivalent transient Geom objects. To do this you use the Translate function from the MgtGeom package.

- Persistent objects created in this way are used to build persistent data structures that are then stored in a file or database.

- When these objects are retrieved from the file or database, they are converted back into the corresponding transient objects from the Geom package. To do this, you use the Translate function provided by the MgtGeom package.

In other words, you always edit or query transient data structures within the transient data model supplied by the session.

Consequently, the documentation for the PGeom package consists simply of a list of available objects.

The PGeom2d package describes persistent geometric objects in 2D space, such as points, vectors, positioning systems and curves. This package provides the same type of services as the PGeom package, but for the 2D geometric objects provided by the Geom2d package. Conversions are provided by the Translate function of the MgtGeom2d package.

Example

//Create a coordinate system
Handle(Geom_Axis2Placement) aSys;

//Create a persistent coordinate PTopoDS_HShape.cdlsystem
Handle(PGeom_Axis2placement)
aPSys = MgtGeom::Translate(aSys);

//Restore a transient coordinate system
Handle(PGeom_Axis2Placement) aPSys;

Handle(Geom_Axis2Placement)
aSys = MgtGeom::Translate(aPSys);