Install Engineering Sketch Pad (ESP)
Contents
3.1. Install Engineering Sketch Pad (ESP)#
Engineering Sketch Pad is used to model geometry throughout the design process.
In this page you can find step-by-step instructions on how to:
Install Pre-Built Engineering Sketch Pad (ESP) with Edge Attribute PlugIn
Compile Engineering Sketch Pad (ESP) and Edge Attribute PlugIn
3.1.1. Prerequisites#
The most important prerequisite for ESP is OpenCASCADE (included with pre-built versions). The recent ESP release only supports the versions marked 7.4.1 and 7.6.0, which are available at ESP’s website. Another prerequisite is a WebGL/Websocket capable browser. For example, Mozilla’s Firefox, Google Chrome and Apple’s Safari. CAPS depends on UDUNITS2 and Python.
3.1.2. Install Pre-Built Versions#
In order to install ESP, please follow the instructions below relevant to your operating system:
The pre-built versions of ESP can be downloaded from the Flexcompute GitHub Page. The pre-built versions include Edge Attribute PlugIn.
3.1.2.1. Linux#
Download the pre-built ESP file for Linux from above.
wget https://github.com/flexcompute/EngineeringSketchPad/releases/download/ESP121-Pre-Built-edgeAttr/ESP121Lin.tgz
Unpack the tar file in your desired location. There must be no space in the path to the installation directory.
tar -xf ESP121Lin.tgz
The *.tgz file can be deleted, if you wish. The unpacked distribution includes OpenCASCADE and Python.
Open a terminal and direct to the installation directory and setup the ESP.
cd ESP121
./setup.sh
Source the ESP environment in your terminal.
source EngSketchPad/ESPenv.sh
Test running ESP by issuing the below command:
serveCSM EngSketchPad/data/tutorial1.csm
3.1.2.2. Windows#
Download the pre-built ESP *.zip file from the Flexcompute GitHub Page.
Unpack the zip file in your desired directory. There must be no space in the path to the installation directory (eg, C:\ESP121). The *.zip file can be deleted, if you wish. The unpacked distribution includes OpenCASCADE and Python.
Open a Command Prompt as administrator, direct to the installation directory, and setup ESP.
cd ESP121
.\setup.cmd
Set the environment for ESP.
.\EngSketchPad\ESPenv.bat
To set the environment permanently: from the Start menu search for “environment” and select “Edit environment variables for your account”. Under User variables, select Path and click Edit, then add the path to the bin directory of EngineeringSketchPad (eg, C:\<path>\ESP121\EngSketchPad\bin).
Test running ESP by issuing the below command in the Command Prompt:
serveCSM EngSketchPad\data\tutorial1.csm
3.1.2.3. Windows Subsystem for Linux (WSL)#
From the Microsft Store, find Ubuntu-22.04 LTS and install it. Then, open the Ubuntu-22.04 terminal as administrator. Follow the below commands in terminal:
sudo apt update
sudo apt upgrade
sudo apt-get install firefox
After installing Firefox, make sure you can launch it from the terminal. In the event that you cannot launch Firefox from WSL, ensure that WSL is updated to the latest version and restart it.
To update WSL, from a Command Prompt or PowerShell (not Ubuntu terminal):
wsl --update
wsl --shutdown
After installing Firefox and confirming launch from the Ubuntu terminal, follow the ESP installation procedure in the previous section Linux within the Ubuntu terminal.
Note
The above instruction is tested on Windows 11. If you use WSL to install ESP, please make sure you can launch GUI app from your terminal.
3.1.3. Compile Engineering Sketch Pad and Edge Attribute Plugin#
This section explains how to build ESP step-by-step as a software relevant to your operating system.
3.1.3.1. Linux and MAC OS#
From ESP’s website download the *.tgz file according to your machine and unpack it in your desired directory. There must be no space in the path.
In order to build the software follow these instructions:
cd EngSketchPad/config
./makeEnv <path_of_OpenCASCADE_directory_containing_inc_and_lib>
This procedure produces two files at the top level: ESPenv.sh and ESPenv.csh. They can be used to source the ESP environment. In order to build ESP, the terminal must contain ESP’s environment.
For example, if you are using csh or tsch:
source ESPenv.csh
or if you are using bash/zsh:
source ESPenv.sh
From the terminal go to the source directory and compile the software:
cd EngSketchPad/src
make
The Flow360 automated meshing workflow requires an additional plugin for ESP. The Edge Attribute plugin can be retrieved from Flexcompute’s GitHub repository:
git clone https://github.com/flexcompute/EngineeringSketchPad.git
mv EngineeringSketchPad/PlugIn .
rm -rf EngineeringSketchPad
Make sure the terminal has ESP’s environment (see source the environment) and go to the Edge Attribute Plugin directory, then compile:
cd <DirectoryContainingPlugIn>/PlugIn/EdgeAttr/
make
3.1.3.2. Windows#
In order to compile ESP in Windows we use Microsoft Visual Studio 2022 Community from https://visualstudio.microsoft.com/downloads/. Make sure that you have also installed Python3.
After downloading the Visual Studio Installer, launch it and check “Desktop development with C++”. Prior to installing take note of the Windows SDK version on the right panel (eg, 10.0.19041.0). Select install.
Next, open a Command Prompt and execute the following commands to set the required Visual Studio variables. The ‘x64’ below is your machine architecture and ‘10.0.19041.0’ is the Windows SDK version.
cd C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\
.\vcvarsall.bat x64 10.0.19041.0
Download the pre-built ESP *.exe file from ESP’s website and unpack it in your desired directory. There must be no space in the path.
Open a Command Prompt and issue the below commands to compile the software.
cd C:\<path>\ESP121\EngSketchPad\config
.\bash.exe winEnv C:\path\to\ESP_ROOT\OpenCASCADE-7.6.0
cd ..
Set the environment for ESP.
.\ESPenv.bat
Direct to the source directory and compile.
cd src
.\make.bat
The Flow360 automated meshing workflow requires an additional plugin for ESP. The Edge Attribute plugin can be retrieved from Flexcompute’s GitHub repository:
cd %ESP_ROOT%
git clone https://github.com/flexcompute/EngineeringSketchPad.git
move EngineeringSketchPad\PlugIn .
rmdir /s EngineeringSketchPad
Make sure the Command Prompt has ESP’s environment (see source the environment) and go to the Edge Attribute Plugin directory, then compile:
cd PlugIn\EdgeAttr
nmake -f NMakefile
3.1.3.3. Windows Subsystem for Linux (WSL)#
Building ESP in Windows Subsystem for Linux (WSL) is similar to compiling ESP in Linux and MAC OS.
3.1.3.4. Test the Edge Attribute Plugin#
To test if the EdgeAttr Plugin is built correctly, in the same terminal or Command Prompt and the same directory where the plugin is built, issue the following command:
serveCSM test.csm
The ESP GUI should open in a browser window. Turn off Viz for faces from the build tree on the left. Hover the cursor on an edge (i.e. with green colors) and press 6. In the message panel, you should see EdgeName= String for the selected edge (e.g. Body 9 Edge 4).