Welcome to the Simple_SIM project, a minimalist Python venture tailored to streamline your experience with KLayout and PyAEDT. At its core, Simple_SIM breaks down the foundational concept of graphical representation like lines, arcs, taper lines, curved polyline, and coplanar waveguides into two highly focused Python files: dxf_compiler.py
and HFSS_compiler.py
.
- Visit the Simple_SIM GitHub repository.
- Click on the green
Code
button on the right. - Choose
Download ZIP
. - Once downloaded, extract the ZIP file to a location of your choice.
Anaconda is a popular distribution of Python that simplifies package management and deployment.
- Download Anaconda for your operating system.
- Follow the installation instructions for your operating system from the Anaconda installation guide.
Anaconda Navigator is a GUI tool that comes with the Anaconda distribution.
- Open Anaconda Navigator from your applications or programs list.
- Click on
Environments
on the left sidebar. - Click on
Create
at the bottom. - Name it
simple_sim_env
and choose the Python version you want (e.g., 3.X). Click on theCreate
button. - After the environment is created, make sure it's activated (should be highlighted in green).
- Open PyCharm and choose
Open
to load theSimple_SIM
directory you extracted from the ZIP file. - Once the project is open, navigate to
File
>Settings
(orPreferences
on macOS) >Project: Simple_SIM
>Python Interpreter
. - Click on the gear icon and choose 'Add'.
- From the left pane, select 'Conda Environment' and then 'Existing environment'.
- Select the interpreter from the
simple_sim_env
environment you created in Anaconda Navigator. The path would typically be in the Anaconda directory underenvs/simple_sim_env/bin/python
. - To automatically install the required packages, navigate to
Tools
in the top menu and selectSync Python Requirements
. This will read therequirements.txt
file and install all necessary packages.
- Open the
Simple_SIM
directory (that you extracted from the ZIP file) in VSCode. - Press
Ctrl + Shift + P
to open the command palette. - Type and select "Python: Select Interpreter".
- Choose the interpreter from the
simple_sim_env
environment you created in Anaconda Navigator. - Open the terminal in VSCode (View > Terminal) and type:
pip install -r requirements.txt
To get started, first clone the Simple_SIM repository from GitHub:
git clone https://github.com/Henriksen-Lab/Simple_SIM.git
Navigate to the cloned directory:
cd Simple_SIM
Using Python's built-in venv:
# Using venv module for Python
python -m venv venv
# Activate the virtual environment
# For Windows
venv\Scripts\activate
# For macOS and Linux
source venv/bin/activate
Using Anaconda (if installed):
conda create --name simple_sim_env python=3.X
conda activate simple_sim_env
Replace 3.X
with your desired Python version.
To install the required packages,
pip install -r requirements.txt
This project is structured into two primary components, providing an optimized and seamless way to draw various patterns and export them in the appropriate format:
Defined in the HFSS_compiler.py
file, the HFSS class acts as the foundation, encapsulating the necessary functionalities to draw specific patterns and ensures the precise exportation of the HFSS model format.
The dxf_compiler.py
file houses the DXF Compiler class, a subclass of the HFSS Compiler class. This deliberate hierarchy guarantees that the output in the HFSS model mirrors exactly what is depicted in the generated DXF file.
- Simplified Drawing: Easy-to-use methods for drawing fundamental shapes such as lines, circles, and tapered lines.
- Unified Output: Designed to ensure uniformity between the HFSS and DXF outputs, preventing discrepancies and ensuring accuracy.
- Expandable: The structured class hierarchy allows for seamless expansions and additions to the available drawing patterns and functionalities.