![]() |
Using Parasolid |
<<< Parasolid Release Area | Chapters | Functional Enhancements >>> |
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.
Two versions of Parasolid can be used in your applications, as follows:
The main Parasolid kernel is supplied as:
pskernel_archive.lib
) which has been created using the Microsoft Visual C/C++ 32 bit compiler. An executable image can be made by linking the object of a main program with the Parasolid, Frustrum and (if required) Foreign Geometry libraries.
pskernel.dll
) created from the object file library (using all default options with the exception of
/BASE:0x40000000
). An executable image can be made by linking the object of a main program with the Frustrum and (if required) Foreign Geometry libraries and the Parasolid 'interface library',
pskernel.lib
in the
dll
directory.
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:
pscommunicator.dll
) created from the object file library (using all default options with the exception of
/BASE:0x40000000
). An executable image can be made by linking the object of a main program with the Frustrum and (if required) Foreign Geometry libraries and the Parasolid 'interface library',
pscommunicator.lib
in the
dll
directory.
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.
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.
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.
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:
$ P_SCHEMA="full SCHEMA directory pathname"
$ setenv P_SCHEMA "full schema directory pathname"
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. |
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.
The environment variables should be set up as follows:
$ PARASOLID="base directory pathname" $ P_LISP="full LISP directory pathname" $ P_SCHEMA="full SCHEMA directory pathname" $ export PARASOLID P_LISP P_SCHEMA
$ setenv PARASOLID "base directory pathname" $ setenv P_LISP "full LISP directory pathname" $ setenv P_SCHEMA "full schema directory pathname"
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.
KID is supplied as an executable file and can be invoked as described below
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.
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'.
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)
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)
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.
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)
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).
You can ensure KID graphics are set up correctly using:
> (graphics enquire)
<<< Parasolid Release Area | Chapters | Functional Enhancements >>> |