Skip to main content

A Wrapper around Solidworks VBA API for Automating Geometry Modifications for Python based Optimization and Design Space Exploration.

Project description

pySW

A Wrapper around Solidworks VBA API for Automating Geometry Modifications for Python-based Optimization and Design Space Exploration

pySW is simply a Python wrapper around Solidworks built-in VBA API for automated modifications to Solidworks assemblies and parts.

The primary purpose of pySW is optimization studies, Design Space Exploration studies, etc. Many good libraries offer a framework for single and multi-objective optimization, like pymoo, openMDAO and pyOpt written in Python itself. Design space can be explored using libraries like pyDOE. Apart from these, the famous Scipy library provides functions for minimizing (or maximizing) objective functions, possibly subject to constraints.

In many cases, the optimization or the space exploration problem is not straightforward that it cannot be expressed as an equation or a set of equations. Some problems require some communication links between various software. For example, consider the optimization of a winglet of a commercial aircraft. This problem requires modifying and saving geometry using a CAD program, using a CAE program for analyzing and saving results of the analysis, and a third program/code to act as a link between CAD and CAE code as well as perform the tasks of optimization or space exploration. The first task can be performed using pySW and the third task using the libraries mentioned above.

Note: Solidworks is proprietary software of 3DS Systems. If you have access to Solidworks, pySW will make your life much easier if you want to optimize using Solidworks. As an option, FreeCAD is an open-source primarily CAD program written completely in Python. It also as modules for CFD using OpenFOAM and FEM analyses.

It currently cannot modify or create sketches.

pySW version 1.4 onwards includes a feature to extract dimensions and tolerances from a SolidWorks drawing (.SLDDRW) document.

Installation

You can install pySW from pip from the command prompt by running:

pip install pySW

Dependencies:

  1. pywin32
  2. Numpy
  3. pandas

You can install the dependencies by running the following commands in the command prompt. If you have installed the open-source Anaconda distribution for Python, please check if the libaries are already installed.

pip install pywin32
pip install numpy
pip install pandas

License

GNU Lesser General Public License v3

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

pySW-1.4.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

pySW-1.4-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file pySW-1.4.tar.gz.

File metadata

  • Download URL: pySW-1.4.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.21.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pySW-1.4.tar.gz
Algorithm Hash digest
SHA256 897cc2b0b39b4593c93f83b419af43316c2d18e0c1ea5141a7b6f17eeb697e45
MD5 8920c5ec67411cd0d5f95709e8dd37e1
BLAKE2b-256 f07e5424fc40f1aa0b542b280160f497681f0c2f9f8f064c28f70d443f24c1dd

See more details on using hashes here.

File details

Details for the file pySW-1.4-py3-none-any.whl.

File metadata

  • Download URL: pySW-1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.21.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pySW-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 acfbc5d2eb335f87cd1a1e2e56598af04224e640d361b8933c31d5971f7a2a7e
MD5 e1e03f1dfe1d7af199ef61f79130f0e3
BLAKE2b-256 a4c032c8f4b7b8d1b66c90f84543d93b02226b468cafe406bc757d67bd06bb94

See more details on using hashes here.

Supported by

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