How to set-up a Parasolid environment to use the TranslateToPkParts sample on Windows

This guide describes all the required steps to quickly use Parasolid within HOOPS Exchange by setting-up the TranslateToPkParts sample available with every package:

  1. First of all, download any HOOPS Exchange Windows package on our developer zone.
  2. Replace the “include\hoops_license.h” license file by one you can generate here.
  3. Copy the 2 .dll files (pskernel.dll and pskernel_net.dll) from your Parasolid installation and replace the existing ones located in the “bin\win64” of your HOOPS Exchange folder.
  4. Open the Exchange .sln project in Visual Studio, select the x64 platform and set the TranslateToPkParts sample as the default project to launch.
  5. Edit the project debug properties by putting the path corresponding to your “base\schema” folder installation of Parasolid in the “Environment” field. Notice that you mustn’t use any quote (for example “P_SCHEMA=D:\Documents\Parasolid\x64_win_release_31_0_228\base\schema”).
  6. Go to the property manager, unroll the TranslateToPkParts project, then select the “Debug | x64” mode and double click on “PARASOLID”. In the “User Macros” section, fill both the 2 fields “PARASOLID_INSTALL _DIR” and “PARASOLID_INSTALL_DIR_64” with the path to your Parasolid root installation folder (for example “D:\Documents\Parasolid\x64_win_release_31_0_228”).
  7. Finally get back to the Solution Explorer and set the desired Command Arguments under the Debugging section. The first parameter is the input file, the second one is the output Parasolid (ie the .xmt_txt, but you don’t need to specify the extension) and the third is the filepath used to generate the log.
    The next optional arguments are the different Parasolid options (healing, sew, sewexchange, merge and simplify) you can perform during the process, by default they’re all deactivated.
    Here’s a template of command arguments you can copy & paste: “\path_to_your_file\input.stp” “path_to_folder\output” “another_path\log.txt” -healing 0 -sew 0 -sewexchange 0 -merge 0 -simplify 0

During step 3, copying the psbodyshop.dll as well may also be required if simplify or merge operations need to be performed.