# Mechanical Parts
Mechanical CAD files
#Work
* When a part is ready for manufacturing manually save it to production/ in the following formats:
* \*.stp - STEP
* \*.igs - IGES
* \*.dxf - DXF
* \*.dwb - DWB
* \*.pdf - 2D drawing
* \*.bmp - some view/screenshot from the CAD program
NOTE: DO NOT ADD THESE FILES TO REPOSITORY
* On git push a hook will upload files to the server
* The pattern for publishing on [wiki.elphel.com]:
> === PARTNUMBER - DESCRIPTION ===
> SOME OR NO INFO
> {{Cad4a\|PARTNUMBER}}
> \-\-\-\-
#Setup
##pre-push hook
###about
* Archive all \*.stp, \*.igs, \*.dxf, \*.dwb
* Add info to the meta header of all \*.pdf
* Crop all \*.bmp and convert them into jpeg.
* Back up all of the files into production/uploaded/ to prevent repeating the above actions
* Upload results to a file server ([community.elphel.com])
The hook runs at every git push even if there are no changes
###requirements
* imagemagick
###enable
* Copy githooks/pre-push into .git/hooks/
* Edit .git/hooks/pre-push - set remote_dir to a proper one.
* If the private ssh key name is not default, add -e to rsync line:
> rsync -e 'ssh -i /home/user/.ssh/key' -a -f '- /*/' . $remote_dir
* Make .git/hooks/pre-push executable
[community.elphel.com]:http://community.elphel.com/files/production/
[wiki.elphel.com]:http://wiki.elphel.com