Introduction To Parasolid   

Chapters Parasolid Concepts >>>

Contents

[back to top]


1.1 Introduction to this volume

This volume provides a brief overview of this manual and contains information on the fundamental concepts of Parasolid, such as the Parasolid class structure entities, tokens, tags and identifiers, and how to use the PK interface.

This volume contains the following chapters:

[back to top]


1.2 The Parasolid documentation set

The Parasolid documentation set consists of the following manuals:

[back to top]


1.3 What is Parasolid?

Parasolid is a solid modeler. It can be used to:

Parasolid is designed to be the center or “kernel” of any system that is based on 3-D model data. For this reason it is often referred to just as “the kernel”, or “the modeler”. This documentation assumes that the system using Parasolid is an application that you are developing. For this reason, it is often referred to as “your application” or “the application”.

Parasolid is an exact boundary representation (B-rep) geometric modeler. This means that it represents solids (and other types of body) by their boundaries. By contrast, a constructive solids geometric (CSG) modeler represents solids procedurally, by combining the operations with which they are made. Parasolid knows where the edges of a solid are, whereas a CSG modeler would not. Because Parasolid is exact, calculations such as mass or clash detection can be made very accurately; in a faceted modeler such calculations would not be as accurate, because of the slight inaccuracies introduced into the model by the use of faceted surfaces. For more information on Parasolid’s accuracy, see Chapter 16, “Session And Local Precision”.

Parasolid provides the ability to perform operations, such as booleans, sectioning and offsetting, on models containing any combination of classic and facet geometry. For more information about convergent modeling and how to make use of convergent modeling,see Chapter 82.1, “What is Convergent Modeling?”.

[back to top]


1.4 Interfaces to Parasolid

There are several interfaces between Parasolid and your application:

Although the downward interfaces are components of Parasolid, you actually supply code to make them work yourself, as part of your application code:

The following table gives an overview of the tasks that your code needs to perform for each interface:

 

Downward interface

Tasks performed by your code

Frustrum

Memory management, data management.

Graphical Output

Visualisation (on-screen display, printing, etc.).

Foreign Geometry

Management of geometry types specific to your application.

In each case, the interface defined by Parasolid consists of a suite of functions for which you have to provide definitions.

The functions supplied to the frustrum, GO, and Foreign Geometry interfaces are located outside the kernel but called from within the kernel. By contrast, the PK consists of functions within the kernel that must be called from outside the kernel. In both circumstances your application is responsible for everything that goes on outside the kernel.

 

Note: The Kernel Interface is provided only as a means of supporting legacy code. Any application code you write should call the PK Interface, not the Kernel Interface.

Figure 1-1 shows the relationships between Parasolid and these interfaces.

 

 

Figure 1-1 Parasolid and its interfaces.

Communication between most of the different interfaces and Parasolid is bi-directional, the exception being Graphical Output.

 

Note: Transferring information from Parasolid via the frustrum is under the kernel’s control, not your application’s. This is because the kernel needs the files written and read by the frustrum during its operation. Some of them are used synchronously with calls to Parasolid from your application via the PK, but some are used unpredictably.

1.4.1 PK Interface and Kernel Interface

The PK Interface (usually referred to as the PK) is a library of functions that provide access to Parasolid. The functions fall roughly into four categories:

Part construction

Enquiry

Part management

Kernel management

The Kernel Interface (KI) is the original interface to Parasolid, and its functionality is now completely replaced by the PK. It is retained in Parasolid to support legacy code, and you should not use KI routines in new code.

This manual discusses the PK interface and methods throughout. If required, specific information on the KI is included in the KI Programming Reference Manual.

1.4.2 The frustrum

The frustrum is a set of functions that you have to provide as part of your application code. Whenever data needs to be saved or retrieved, the kernel calls functions in the frustrum. You must register these frustrum functions with Parasolid before your application code can make calls to PK functions.

Functions that you need to provide in the frustrum include:

The Example Application, provided on the Parasolid Jumpstart DVD, is a simple frustrum example for Windows NT. You are free to examine and use any of this code in your own frustrum if you find it useful.

The Parasolid Jumpstart DVD also contains a test frustrum that compiles on all platforms. You may find it useful to use this frustrum until you have implemented a working frustrum of your own, so that you can run acceptance tests, for instance.

For an introduction to providing a frustrum, see Chapter 6, “Supplying A Frustrum”. For a complete description of frustrum functionality that Parasolid can make use of, see the Downward Interfaces manual.

1.4.3 Graphical output

If your application needs to display model data in any way (either on screen, or using a printing device), you must provide a set of Graphical Output (GO) functions alongside the frustrum functions. In general, in order to draw pictures requested by the kernel, the GO functions output instructions to a graphics system (such as OpenGL) provided by your application. Like frustrum functions, GO functions are called by the kernel.

Parasolid calls GO functions when asked to create graphical data using one of the rendering functions available in the PK. The kernel prepares graphical data piecemeal, so one call to a PK rendering function normally generates many calls to the GO functions.

For more information on Graphical Output see the Downward Interfaces manual.

1.4.4 Foreign geometry

Foreign geometry functionality is not available for general release. All information relating to foreign geometry is issued separately in the Foreign Geometry User Manual.

[back to top]


1.5 Modeling solids

In Parasolid, modeling solids involves creating and modifying bodies. Bodies can also be combined using assemblies: an assembly consists of several bodies, together with information about how they are arranged. Bodies and assemblies are sometimes referred to as parts (a part can be either a body or an assembly).

Because Parasolid has such a range of modeling operations, you can use different approaches when creating and modifying bodies:

You can use both approaches on any particular model. Through a combination of different operations, a body of any type can be turned into almost any shape. Solids are not the only type of body supported by Parasolid, though other types are generally intended as transitional stages in modeling solids.

The structure, shape, and properties of a body are determined by its topology and geometry. These classes of entities combine to fully define the body.

For an introduction to the structure used in Parasolid models, see Chapter 14, “Model Structure”. For more about boolean operations, see Chapter 52, “Manifold Booleans”, and for an introduction to local operations, see Chapter 62, “Overview of Editing Models”.

[back to top]


1.6 Rendering, output and enquiry

There are several ways of getting information about parts out of Parasolid. This section introduces the major ones:

1.6.1 Rendering

You can generate wire-frame, hidden-line and faceted data using the available rendering functions. There are many options that let you control the pictures that are produced, such as whether or not to draw silhouette lines.

Rendering typically involves two of the interfaces to the kernel:

For more information on rendering, see Chapter 108, “Faceting Output Via GO”.

1.6.2 Output

The kernel includes functionality for saving parts that your application should use when saving model data. When a part is saved using the kernel, the frustrum controls how the part is stored. Parts can be saved in a number of ways: for example, as one or more files on a file system, or as an entry in a database.

When the kernel saves a part, it writes data to a transmit file via the frustrum. Your application gives the part a key - the name of the transmit file - which can be used to retrieve the part from the file again and load it into Parasolid. Retrieving parts works in much the same way as saving them: the kernel frustrum functions to read part data into Parasolid.

If your application uses partitions to group parts within a session (see Section 1.8.1, “Partitions”), you can save and retrieve a whole partition.

1.6.3 Enquiry

You can make enquiries about any body to find out information. These are some of the things Parasolid can do using enquiry functions:

You can also extract geometric information about a body’s points, curves and surfaces. This information can be used in two ways:

For more information about Parasolid’s enquiry functions, see Chapter 26, “Enquiry And Output Functions”.

[back to top]


1.7 Attaching other data to parts

Parasolid models can “carry” other information besides the internal structure that the modeler maintains automatically.

[back to top]


1.8 Utilities for running Parasolid

The facilities described in this section affect the way the kernel is used, and give flexibility in running Parasolid.

The location and format of files generated by the following utilities are dependent on how your application's frustrum is written.

1.8.1 Partitions

You can organise the entities in a modeling session into related sub-sessions using partitions. A partition can contain one or more bodies, and it can be stored as a single unit, allowing you to roll back the contents of one partition independently from any others.

 

Note: If you use partitions, you need to register a delta frustrum with Parasolid. For information on doing this, see the Downward Interfaces manual.

1.8.2 Rollback

The kernel can undo one or more operations that have been completed using rollback. Rollback provides a way of logging model data (such as the main features in a feature modeling application) and stepping back to previous kernel states. The kernel can also roll forward from a mark to which it has previously rolled back.

Rollback is controlled using rollback marks, which you set at appropriate intervals in a kernel session. The kernel then records the changes made to a model between rollback marks. To undo one or more operations, the model is returned to the state it was in at a chosen rollback mark. Rollback marks are numbered so the kernel can roll back to any specific mark.

Rolling back resets the modeler's memory to an earlier state, so additional data as well as topological and geometric items are affected. Rollback is used, in particular, to recover the state of the modeler and the model if a call to a PK function detects an error.

There are two methods of using rollback:

 

Note: If you use rollback, you need to register a delta frustrum with Parasolid. For information on doing this, see the Downward Interfaces manual.

1.8.3 Journals

Parasolid can record every call to a PK function in an external file called the journal file. This is a record of each PK function called in a session, with the arguments supplied to and results returned from those functions. This helps to debug applications that use the PK. For example, if a PK function fails, the journal might show that an argument of the wrong value was passed to the function.

The journal is text-based, to make it easy to examine in order to find out where problems are caused.

1.8.4 Snapshots

A snapshot is a record of the whole of the kernel's internal memory and modeler parameters. These files are most useful for reproducing faults. If you report a problem to Parasolid Support, you may occasionally be asked to provide a snapshot (or session) file.

[back to top]

Chapters Parasolid Concepts >>>