Skip to content

Adding command line useability improvements. #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SasaKaranovic
Copy link

Added

  • Added requirements.txt to allow end users to install all dependencies using pip install -r requirements.txt
  • Added checking if input file is correct type (.stl/.gcode)
  • Added check for output folder and if it does not exist and attempt to create it before running transformation
  • Added printout of the transformation 'settings' before running
  • Added option to recognize transform options (angle, direction) from the .gcode file name
  • Added help section. Each script can be run with -h to list available options and their description

Modified

  • Modified script to use argparse and accept command line arguments
  • Script now accepts command line arguments to specify input file, output file, direction, angle etc.

How to install script dependencies

Run pip install -r requirements.txt (assuming you have Python and PIP installed)

How to run the script

Transform

Transform input.stl STL file and save output to transformed folder. Use angle of 16 degrees and run 1 iteration. Default is outward transformation.

Example:
Transformation_STL_var_angle.py --file input.stl --output transformed --angle 16 --iterations 1

Back transform GCode

Back transform test_transformed_outward_16deg_0.8n_0.55mm_PETG_MK3S_32m.gcode and save to transformed folder. Use filename to detect transformation parameters.

Example:
Transformation_STL_var_angle.py --file test_transformed_outward_16deg_0.8n_0.55mm_PETG_MK3S_32m.gcode --output transformed

Alternatively you could also specify angle and direction via command line parameters.

@packocrayons
Copy link

I was about to make the same PR, however I think it's beneficial to retain the original functionality - keep the definitions at the top (FILE_NAME, CONE_ANGLE etc) and use those as the default parameter to the argparser. That keeps the original workflow unchanged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants