.. _Flexcompute GitHub Page: https://github.com/flexcompute/EngineeringSketchPad/releases .. _ESPInstallation: Engineering Sketch Pad ********************** Engineering Sketch Pad (ESP) is used to model geometry throughout the design process. In this page you can find step-by-step instructions on how to: #. :ref:`Install Pre-Built Engineering Sketch Pad (ESP) with Edge Attribute PlugIn ` #. :ref:`Compile Engineering Sketch Pad (ESP) and Edge Attribute PlugIn ` .. note:: ESP121 with OpenCASCADE-7.4.1 is utilized for the Flow360 automated meshing workflow. To maintain consistency it is strongly recommended to download and install the same :ref:`pre-built ESP version`. .. _ESPPrerequisite: Prerequisites ============= The most important prerequisite for ESP is OpenCASCADE (included with pre-built versions). ESP supports OpenCASCADE version 7.4.1 and 7.6.0. They 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. .. _ESPInstall: Install Pre-Built Versions ========================== In order to install ESP, please follow the instructions below relevant to your operating system: .. _ESPPreBuiltLink: The pre-built versions of ESP can be downloaded from the `Flexcompute GitHub Page`_. The pre-built versions include Edge Attribute PlugIn. .. _ESPLinInstall: Linux ----- 1. Download the pre-built ESP file for Linux from above. .. prompt:: bash wget https://github.com/flexcompute/EngineeringSketchPad/releases/download/ESP121-Pre-Built-OCC741/ESP121OCC741Lin.tgz 2. Unpack the tar file in your desired location. There must be no space in the path to the installation directory. .. prompt:: bash tar -xf ESP121OCC741Lin.tgz The \*.tgz file can be deleted, if you wish. The unpacked distribution includes OpenCASCADE and Python. 3. Open a terminal and direct to the installation directory and setup the ESP. .. prompt:: bash cd ESP121OCC741 ./setup.sh 4. Source the ESP environment in your terminal. .. prompt:: bash source EngSketchPad/ESPenv.sh 5. Test running ESP by issuing the below command: .. prompt:: bash serveCSM EngSketchPad/data/tutorial1.csm .. _ESPWinInstall: Windows ------- 1. Download the pre-built ESP \*.zip file from the `Flexcompute GitHub Page`_. 2. 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. 3. Open a Command Prompt as administrator, direct to the installation directory, and setup ESP. .. prompt:: batch cd ESP121OCC741 .\setup.cmd .. _ESPWinEnvironmentSource: 4. Set the environment for ESP. .. prompt:: batch .\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:\\\\ESP121\\EngSketchPad\\bin). 5. Test running ESP by issuing the below command in the Command Prompt: .. prompt:: batch serveCSM EngSketchPad\data\tutorial1.csm .. _ESPWSLInstall: Windows Subsystem for Linux (WSL) --------------------------------- 1. From the Microsoft Store, find Ubuntu-22.04 LTS and install it. Then, open the Ubuntu-22.04 terminal as administrator. Follow the below commands in terminal: .. prompt:: bash 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): .. prompt:: batch wsl --update wsl --shutdown 2. After installing Firefox and confirming launch from the Ubuntu terminal, follow the ESP installation procedure in the previous section :ref:`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. .. _ESPCompile: 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. .. _ESPLinCompile: Linux and MAC OS ---------------- 1. 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. 2. In order to build the software follow these instructions: .. prompt:: bash cd EngSketchPad/config ./makeEnv .. _ESPLinEnvironmentSource: 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: .. prompt:: bash source ESPenv.csh or if you are using bash/zsh: .. prompt:: bash source ESPenv.sh 3. From the terminal go to the source directory and compile the software: .. prompt:: bash cd EngSketchPad/src make .. _EdgeAttCompileLin: 4. The Flow360 automated meshing workflow requires an additional plugin for ESP. The Edge Attribute plugin can be retrieved from Flexcompute's GitHub repository: .. prompt:: bash git clone https://github.com/flexcompute/EngineeringSketchPad.git mv EngineeringSketchPad/PlugIn . rm -rf EngineeringSketchPad Make sure the terminal has ESP's environment (see :ref:`source the environment `) and go to the Edge Attribute Plugin directory, then compile: .. prompt:: bash cd /PlugIn/EdgeAttr/ make .. _ESPWinCompile: Windows ------- .. _InstallVSWindows: 1. 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. 2. 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. 3. 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. .. prompt:: batch cd C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\ .\vcvarsall.bat x64 10.0.19041.0 4. Download the pre-built ESP \*.exe file from `ESP's website `_ and execute the file to unpack it in your desired directory. There must be no space in the path. 5. Open a Command Prompt and issue the below commands to compile the software. .. prompt:: batch cd C:\\ESP121\EngSketchPad\config .\bash.exe winEnv C:\path\to\ESP_ROOT\OpenCASCADE-7.6.0 cd .. .. _ESPWinEnvironment: 6. Set the environment for ESP. .. prompt:: batch .\ESPenv.bat 7. Direct to the source directory and compile. .. prompt:: batch cd src .\make.bat 8. The Flow360 automated meshing workflow requires an additional plugin for ESP. The Edge Attribute plugin can be retrieved from Flexcompute's GitHub repository: .. prompt:: batch cd %ESP_ROOT% git clone https://github.com/flexcompute/EngineeringSketchPad.git move EngineeringSketchPad\PlugIn . rmdir /s EngineeringSketchPad 9. Make sure the Command Prompt has ESP's environment (see :ref:`source the environment `) and go to the Edge Attribute Plugin directory, then compile: .. prompt:: batch cd PlugIn\EdgeAttr nmake -f NMakefile Windows Subsystem for Linux (WSL) --------------------------------- Building ESP in Windows Subsystem for Linux (WSL) is similar to :ref:`compiling ESP in Linux and MAC OS `. 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: .. prompt:: none 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).