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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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