Skip to main content

An interface for Python 3.10 and CST Studio Suite 2024, and the implementation has been tested working on CST 2026

Project description

mzcst_2024

实现与CST 2024交互的接口。包括cst.interfacecst.resultscst.edacst.asymptoticcst.radarcst.units

使用本包前请按CST官方帮助文档的指导安装 python_cst_libraries,以便本包的正常使用。

如果您的CST安装在默认路径(C:\Program Files (x86)\CST Studio 2024\),那么使用本包将不需 要额外配置,否则请按照官方帮助配置PYTHONPATH

开发本包的主要目的是:规避CST内置Python接口的类型提示缺失问题。

使用本包后就不再需要直接调用官方的cst包。

至少本包内其他模块都通过本模块的接口间接与CST交互。

注意:本模块主要在 Python 3.10.16CST Studio Suite 2024 SP5 环境开发和调试。

目前已有的测试发现本包能兼容 CST 2026,但考虑到兼容性,暂不修改本包的依赖要求。

以下内容来自CST 2024的官方帮助文档。

CST Python Libraries

Some features of the CST Studio Suite tools can be controlled via CST Python Libraries.

Overview

The cst package provides a Python interface to the CST Studio Suite.

  • cst.interface - Allows controlling a running CST Studio Suite.
  • cst.results - Provides access to 0D/1D Results of a cst file.
  • cst.eda - Provides an interface to a Printed Circuit Board (PCB).
  • cst.asymptotic - Provides an interface to the Asymptotic Solver.
  • cst.radar - Provides routines for automotive RADAR post processing.
  • cst.units - Provides methods to work with units supported by CST Studio Suite.

What’s New in This Version

Support for Python 3.6.x (64-bit) and Python 3.7.x (64-bit) is deprecated and will be removed in the next CST Studio Suite release.

New package cst.radar available.

New package cst.units available.

cst.results opens project files generated with CST Studio Suite 2023 or CST Studio Suite 2024.

cst.results available as separately installable wheel.

Setup

Bundled Python interpreter

The CST Studio Suite installation comes with Python 3.9 (64-bit), which requires no further setup to start using it with the CST Python Libraries. Various packages like numpy and scipy are pre-installed.

Custom Python interpreter

The CST Python Libraries can also be used from external Python environments. We strive to support all the Python versions that have not reached the end-of-life as indicated here and were released before the release of this CST Studio Suite version. The items marked as deprecated in the list below will be removed in the next CST Studio Suite release. Please upgrade your Python interpreter accordingly and avoid using the deprecated versions.

Supported Python versions:

  • Python 3.11.x (64-bit)
  • Python 3.10.x (64-bit)
  • Python 3.9.x (64-bit)
  • Python 3.8.x (64-bit)
  • Python 3.7.x (64-bit) (end-of-life, deprecated)
  • Python 3.6.x (64-bit) (end-of-life, deprecated)

32-bit versions of Python are not supported.

To make sure your interpreter is able to load the CST Python Libraries, a minimal package can be installed that links to the actual CST Studio Suite installation::

pip install --no-index --find-links "<CST_STUDIO_SUITE_FOLDER>/Library/Python/repo/simple" cst-studio-suite-link

where CST_STUDIO_SUITE_FOLDER should be replaced with the path to the CST Studio Suite installation on your system. Do not install this package if you don’t have CST Studio Suite installed on the same machine as the python interpreter.

Note: Under linux The above package requires you to set an environment variable named CST_STUDIO_SUITE_LINK_INSTALLPATH_2024 pointing to the installation path of the CST Studio Suite. Consult your operating system user manual on how to set environment variables.

Note: Although not recommended, but if desired, instead of installing the cst-studio-suite-link package, you can add or modify the PYTHONPATH system environment variable to include:

  • Windows: CST_STUDIO_SUITE_FOLDER/AMD64/python_cst_libraries
  • Linux: CST_STUDIO_SUITE_FOLDER/LinuxAMD64/python_cst_libraries

or add it in-script via::

>>> import sys
>>> sys.path.append(r"<PATH_TO_CST_AMD64>/python_cst_libraries")

Please replace PATH_TO_CST_AMD64 with the system dependent paths indicated above (i.e. under Windows use: CST_STUDIO_SUITE_FOLDER/AMD64 under Linux: CST_STUDIO_SUITE_FOLDER/LinuxAMD64).

You have succesfully set up your Python environment when you are able to execute the following code without error::

>>> import cst
>>> print(cst.__file__) # should print '<PATH_TO_CST_AMD64>/python_cst_libraries/cst/__init__.py'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mzcst_2024-2026.1.28.2041.tar.gz (73.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mzcst_2024-2026.1.28.2041-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

Details for the file mzcst_2024-2026.1.28.2041.tar.gz.

File metadata

  • Download URL: mzcst_2024-2026.1.28.2041.tar.gz
  • Upload date:
  • Size: 73.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for mzcst_2024-2026.1.28.2041.tar.gz
Algorithm Hash digest
SHA256 3151b8b6845fd1ca629565a839963c7ae1823eece583af0bdcbe1804d322c140
MD5 17c04519859ba777572f9e792716f434
BLAKE2b-256 514fd439e2bf628c1350ef4965ad27f8049b9b05a8606373295189b6a3953e7e

See more details on using hashes here.

File details

Details for the file mzcst_2024-2026.1.28.2041-py3-none-any.whl.

File metadata

File hashes

Hashes for mzcst_2024-2026.1.28.2041-py3-none-any.whl
Algorithm Hash digest
SHA256 d814cf78fe99f585217515a3f09642073701f07b7fb18b7937cc7c281bb15be2
MD5 7d8cb491772cb375a764db3080b0ad63
BLAKE2b-256 ba09a45292f94308734c3cccd3c9e5b54822cb2cd0defec9782a5a54402c6d7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page