Using Parasolid   

<<< Parasolid Release Area Chapters Functional Enhancements >>>

Contents

[back to top]


5.1 Parasolid

UNIX

Parasolid is supplied as

In order to use the shared object library supplied, applications must register a frustrum using PK_SESSION_register_frustrum - see Chapter 5, "Registering the Frustrum" in the Downward Interfaces Manual for further details.

NT

Two versions of Parasolid can be used in your applications, as follows:

The main Parasolid kernel is supplied as:

Function headers for the functions available in the full Parasolid kernel can be found in the file parasolid_kernel.h .

Parasolid Communicator is supplied as:

Function headers for the functions available in the Parasolid Communicator can be found in the file parasolid_communicator.h .

In order to use the supplied DLLs, your application must register a frustrum using PK_SESSION_register_frustrum - see Chapter 5, "Registering the Frustrum" in the Downward Interfaces manual for further details. See Chapter 8, "Environment", in this manual, for more details on building and linking Parasolid.

The file parasolid_link.com , or parasolid_link.bat on NT platforms, shows examples of linking or binding Parasolid.

 

Note: For applications not using the Frustrum registration mechanism, Foreign Geometry functions must be linked in - even if the Foreign Geometry functionality is not used - to resolve all 'downward' references from Parasolid. A file, fg.c , of example functions is supplied for this purpose.

[back to top]


5.2 Schema Files

When transmitting part files, the schema file for the current version of Parasolid will be written to the schema directory of your Parasolid installation if it is not already present. The schema directory must be writable for this reason. If a previous version of Parasolid has been used to transmit parts which are to be received into a new version then the schema file for the previous version must be present in the schema directory of the new version.

In an NT application, your frustrum can look for schema files in one of two ways:

The dummy frustrum uses an environment variable called P_SCHEMA.

 

Note: If you use the dummy frustrum on NT, the %P_SCHEMA% environment variable is assumed to point to a directory on an NTFS file system. If %P_SCHEMA% points to a DOS FAT file system instead, you must copy and rename the schema files so that they have the extension .s_t .

Take care to preserve schema files when updating Parasolid versions.

[back to top]


5.3 Frustrum

When writing simple Parasolid programs, you may wish to initially use the dummy frustrum provided. The command files 'frustrum_library.com' or 'frustrum_library.bat' on NT platforms will create you a dummy frustrum library from the 'C' file, although this library is provided with the release.

The dummy frustrum source is provided primarily as a guide to help you develop your own frustrum. It also gives you a frustrum to use during the initial phases of the application development.

 

Note: On NT and Windows 2000 we recommend that your frustrum creates text files as stream, i.e. LF terminated, rather than using the DOS default (CR and LF terminated). Implementation details can be found in the dummy frustrum.

The dummy frustrum is not fully functional and does not contain all of the system calls required for a working frustrum. See the notes in the source file, 'frustrum.c' for further details.

If you wish to use the dummy frustrum, then you must either set an environment variable called P_SCHEMA to be able to access the schema files, or you must modify the code in the dummy frustrum so that the schema directory is specified explicitly, and P_SCHEMA is not used.

If you decide to set P_SCHEMA rather than modify the code, do it as follows:

UNIX

Bourne shell

$ P_SCHEMA="full SCHEMA directory pathname"

'C' shell

$ setenv P_SCHEMA "full schema directory pathname"

NT

P_SCHEMA=full SCHEMA directory pathname

Your finished application should not use the dummy frustrum.

You will need to make sure this command is executed each time you log in. The simplest way to do this is to specify it in the Environment tab of the System Control Panel applet. Alternatively, you can add the statement to your '.profile' script or 'login.com' file as appropriate. The full pathname needs to be given so that Parasolid can be run from any directory location.

 

Note: Unlike UNIX, you do not explicitly use quote ( " ) marks when specifying environment variables in NT. This is true even if the pathname contains white space characters.

[back to top]


5.4 Kernel Interface Driver (KID)

[back to top]

5.4.1 Specifying environment variables

In order to run KID, you need to specify some environmental variables :

If your application uses the dummy frustrum, then you may have already specified P_SCHEMA.

UNIX

The environment variables should be set up as follows:

Bourne shell

$ PARASOLID="base directory pathname"
$ P_LISP="full LISP directory pathname"
$ P_SCHEMA="full SCHEMA directory pathname"
$ export PARASOLID P_LISP P_SCHEMA

'C' shell

$ setenv PARASOLID "base directory pathname"
$ setenv P_LISP "full LISP directory pathname"
$ setenv P_SCHEMA "full schema directory pathname"

NT

The environment variables should be set up as follows:

PARASOLID=base directory of pathname
P_LISP=full LISPDATA directory pathname
P_SCHEMA=full schema directory pathname

You need to make sure these commands are executed each time you log in. The simplest way to do this is to specify them in the Environment tab of the System Control Panel applet. Alternatively, you can add the statements to your '.profile' script or 'login.com' file as appropriate. The full pathnames should be given as this will permit Parasolid to be run from any directory location.

[back to top]

5.4.2 Running KID

KID is supplied as an executable file and can be invoked as described below

UNIX

Type the following at a UNIX prompt:

$ $PARASOLID/kid.exe

When executed, the image will attempt to load the file '$P_LISP/bbcini.lsp'

To allow file names of 255 characters (instead of the 14 character default length specified by some versions of UNIX) it is recommended that the UNIX operating system is re-configured.

If this is not done, KID will be limited to working with six character file keys and problems may occur when using rollback.

NT

Either open the base directory in Windows Explorer and double-click the file kid.exe, or type the following in a command prompt window:

$ %PARASOLID%\kid.exe

When executed the image will attempt to load the file '%P_LISP%\bbcini.lsp'.

[back to top]

5.4.3 KID Graphical Device Drivers

Opening a Graphics Window

HPPA HPUX

An X-window graphics driver is included within KID. To use this driver, invoke X-windows before executing KID, then before using any other graphics commands, type at the LISP prompt:

> (graphics open_device ´x)

KID creates a window, like any X-window, that can be re-sized, moved, etc. However you will need to refresh the graphics each time the window is manipulated by using:

> (graphics redraw)

SPARC Solaris

KID supports graphics on the SPARCstation via OpenWindows. An X-window graphics driver can be used by invoking OpenWindows before starting KID, then typing the following at the LISP prompt, before using any other graphics commands:

> (graphics open_device ´x)

NT

A Windows NT graphics driver is included within KID. To use this driver, type:

> (graphics open_device ´nt)

A separate graphics window will open; note that it isn't automatically placed in the foreground, and thus can be hidden by your console/lisp window.

On all other platforms:

The KID image provides graphics support for X-windows. To use this, type the following at the LISP prompt, before using any other graphics commands:

> (graphics open_device ´x)

Null graphics device

If no graphics are required, use:

> (graphics open_device ´null)

Opening a null device will allow you to call Parasolid rendering functions without getting graphics output (for example, for testing purposes).

Graphics Enquiry

You can ensure KID graphics are set up correctly using:

> (graphics enquire)

 

[back to top]

<<< Parasolid Release Area Chapters Functional Enhancements >>>