Thanks to visit codestin.com
Credit goes to github.com

Skip to content

blogharu/CS80Project

Repository files navigation

Capstone Project - CS80

Our Capstone Project is a project to automate SolidWorks operations from: generating new randomized objects to creating variables and constraints to keep objects in a certain shape and size, and optimize the objects based off of experimental data using statistics.

Installation

Clone the repository into a given directory

git clone https://github.com/blogharu/CS80Project.git

Dependencies

This projects uses:

  • Windows 10

  • Visual Studio

  • C#

  • SolidWorks 2019

  • Python3.4 and up

    • NumPy
    • SciPy

This project also uses references in Visual Studios to run properly:

SolidWorks:

  • SolidWorks.Interop.sldworks.dll

  • SolidWorks.Interop.swcommands.dll

  • SolidWorks.Interop.swconst.dll

  • SolidWorks.Interop.swdocumentmgr.dll

  • SolidWorks.Interop.swpublished.dll

    How to:

    • Right click the project in the right panel
    • Hover over "add" in the right click menu - Click "reference" - A pop-up will appear asking you to browse for the listed files above - Default directory is: C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\
    • Select the above files and add them

Build

Once cloned into a directory, opened the project in Visual Studios, and having referenced all of the dependencies, one can build this project in Visual Studios using admin/root privillages, then start SolidWorks, and there will be a Pikachu icon on the right menu bar; this is the add-on. There are a variety of features such as:

  • Adding and Deleting variables
  • Listing variables
  • Adding and Deleting constraints
  • Listing constraints
  • Auto generating a certain number of random objects and saving them as either STL or SLDWRKS files
  • Running a dataset through the Python optimization program.

This program uses a formatted file for the datasets thats auto generated by the add-on. The Python optimization program uses this same file but with filled in data for the experimental data that is left blank upon generation.

Steps to use program:

  1. Download the code from github,

  2. Open the program in Visual Studios in Administrator Mode (It's crucial that it's done in administrator mode, to allow the necessary permissions)

  3. Open the solution from our github.

  4. Grab the following files from your SolidWorks folder found on the C Drive - default directory is: C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\:

    • SolidWorks.Interop.sldworks.dll
    • SolidWorks.Interop.swcommands.dll
    • SolidWorks.Interop.swconst.dll
    • SolidWorks.Interop.swdocumentmgr.dll
    • SolidWorks.Interop.swpublished.dll

    and place them in CS80project->bin-Debug

  5. Build the program

    • Note: Running it will cause an error as it is not an executable
  6. Launch SolidWorks, click the pikachu icon and connect the python.exe

Usage

This section will cover usage and functionality of the add-on.

Functionality

Below we will go over the different funct

Variables

The add-on uses SolidWorks variables; that is, variables that are created using SolidWorks macros. It loads these already created variables into the add-on such that the object is able to be manipulated through our random generation python scripts.

Constraints

The add-on is able to constrain the object such that it doesn't lose shape while auto generating. Examples of common constraints are volume and length constraints.

Auto-Generation

As stated above, the add-on is able to auto generate different objects based off of the variables and constraints present in SolidWorks.

Optimization

Lastly, optimization is done using a formatted CSV file with filled in experimental data from different variations of the same object. A user is able to load this CSV file into the add-on to constrain the variables and hone in on an optimal solution based on the experiments.

Use Cases

Listed below are the different use cases for our add-on.

Design of Experiments

The main use of this add-on is to rapidly generate different variations of an object in-order to create a variable spread of the object and optimize it through different generations using statistics. We gather data: flow rate for filters, lift for propellers, etc., on the spread of the object and then feed this data into the optimization functions

Demo Video

Below links to a demo video:

Troubleshoot

  • Can't find the add-on. This is because the add-on isn't showing. To fix this:

    • Click the setting's (gear in top menu bar) dropdown menu
    • Click the "Add-ins" option
    • Under the "Other Add-ins" section click the checkbox next to "Addin"

Future Implementations

For this project we plan on attaching different statistical methods to it. Right now only one statistical method is supported: the regression method, but there are plans to increase the capabilities of this thiis project to use different methods including AI and Machine Learning. The possibilities of attaching whatever model you want to this program are endless.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •