Jurajzovinec / drawing-slicer

This single page web application will scale your drawing to desired format (A3 . . . A0) and will slice this in to multiple PDFs formatted as A4.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drawing Slicer !



Drawing slicer is application developed mostly for DIY hobbiest who are interested in printing huge drawing formats without necessity of owning large scale printer. Drawing slicer will slice your standard ISO drawing into smaller drawings of your choice (A4 is the most favourite one).

Idea ?

I came up with this idea when I needed to print template for manufacturing of my giant surfskate. Due to pandemic I was not able to do so, so I developed short python script which will cut my A0 design into A4 format.

  1. Drawing created in CAD

  1. Sliced drawing with Drawing-Slicer and merged with tape

  1. Giant surfskate (cut based on template from step 2)

Backend ?

Core of the backend is based on NodeJs application written in typescript. Backend however uses python microservices, in order to handle reading and cutting of the pdf file. Also algorithmic part of slicing is done by python microservices. Users pdf file is handled with AWS S3 bucket storage system, whose bucket data are cleared with every succesful download.

Frontend ?

Frontend is based on React framework and as backend, also frontend is written in typescript. User actions are dynamically driven by use-state hooks. CSS naming classes uses BEM structure convention.

Initialize pythonServices virtual environment (Windows)

  1. Create python venv in this folder with:
python -m venv python_modules
  1. Activate venv with:
. python_modules\Scripts\activate
  1. Install external packages with:
pip install -r requirements.txt
  1. Check if path to python interpreter is set correctly at config.ts file
const config: configVariablesInterface = {
    PYTHON_INTERPRETER_PATH: (process.env.NODE_ENV === 'production') ? 'python' :
    (path.resolve(process.cwd(), 'python_modules/Scripts/python')),
    PYTHON_SLICE_SERVICE_PATH: (path.resolve(process.cwd(), 'python_services/service_slice_file.py')),
    PYTHON_INPUT_TEST_SERVICE_PATH: (path.resolve(process.cwd(), 'python_services/service_validate_file.py'))
}

Alternatively put this sequence into cmd.

python -m venv python_modules && . python_modules\Scripts\activate && pip install -r requirements.txt

About

This single page web application will scale your drawing to desired format (A3 . . . A0) and will slice this in to multiple PDFs formatted as A4.


Languages

Language:TypeScript 59.9%Language:Python 29.3%Language:CSS 8.1%Language:HTML 2.7%