Compare commits

...

No commits in common. "gh-pages" and "master" have entirely different histories.

349 changed files with 111711 additions and 5538 deletions

68
.gitignore vendored Normal file
View file

@ -0,0 +1,68 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.pyc
src/fabscan/FSVersion.py
# C extensions
*.so
# Distribution / packaging
.Python
env/
site/
sites/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
.DS_Store
src/www/version.txt
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
.idea/

48
.travis.yml Normal file
View file

@ -0,0 +1,48 @@
dist: trusty
group: edge
language: python
python:
- 2.7.15
before_install:
- openssl aes-256-cbc -K $encrypted_f5913d2a38b3_key -iv $encrypted_f5913d2a38b3_iv -in fabscan.key.enc -out fabscan.key -d
- sudo apt-get -qq update
- sudo apt-get install -y libcurl3 build-essential python-setuptools debhelper cdbs
dh-python fakeroot python-pip rsync
before_script:
- CURRENT_DATE=$(date +%Y%m%d%H%M)
- pip install mkdocs
- VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
- if [ -z ${TRAVIS_TAG} ]; then sed -i -e 's/'"$VERSION"'/'"$VERSION"'+'"$CURRENT_DATE"'/g'
debian/changelog; fi
- echo $TRAVIS_TAG
script: sudo make deb
after_success:
- FILE_NAME=$(ls -a ../*.deb)
#- travis_wait curl -T $FILE_NAME -u $FTPUSER:$FTPPASSWORD ftp://mariolukas.de/release/
- chmod 600 fabscan.key
- scp -o StrictHostKeyChecking=no -i fabscan.key $FILE_NAME $DEPLOY_USER@mariolukas.de:/var/deploy/release/.
env:
global:
- secure: k0Ms4zQL6KTWInxaS2G578OxmG2aJSicezcGESsDHg3RLI7zgyx4jn+3IdoGfZucXmMxjwPFpBvoVBYfJ4GY5ZrgV8ftvnReO7xn8obADtOmSupTy5eUX5S/K+b8VdjD/QQRO9Bn9lz7ekTauMqtv2usw93X3RTDFtEAtLwtBEuGMU4dhU1lHC/1HDxa0BGfhuEOsp9eedA641dwq3kVpw/6WRlpdyNLEL6l7HJ2ednOH+DXb5hTwSF+Wbg/Oe/pobn8xpFvYc8ZmlRVpiE0kL3lA4HZ5gdBCHAs9HuNsK8e3pKn9l71zqEFdZdbUylp/fFeN5uLYMnZSMKBOg03lRhtsICm6IN7d91Hazcd+vox5Jh0EBgKsEgrAoDSMjiMRj1ROnZXWgs/DYZh8nV+y23hY3BlvyD2AjwyxCHRLG4sIkGmhxe3EoaW1vBwZ4/QUp7AL6x9povUsJM4kU6sBu0+QaoKk1NKs+2xW4mpktS5i2WHuR/sJcmf8AWDkuTejSKBzmKJoSb2dluRYKHa7EpobA7hiCz+6Und13sGJDvF46QprCkuVmDeQc1wImpVj2Evn0KLRRq4z33mEtoMMbROJ1Pg7pXdaTvl9AxDHn60NIbfr7lWjcYIvaOpPSax5vCD6w2lDToDbwj/4K5mh80/bhOyWVCrfcJxQOYqxxQ=
- secure: mtixe+yGZ0+mDmcvcFhlETHbmS0umal53U8rh+gvn0+QuuVY0WilLUf5eE3tLZtifyrC0XHkGXpOiaRKS0k5sWuryhEHc5nU7h85uw209hHMNuR2wsMFTln6vUpjZkXxCUuY1qBS9SRK6JrBro0j8aDm7/hj/ESyjp+eexA6hjX/EuYHT5TjuPgrgx8V6kJAWLM56H7pQqFX2sYlCfqSPm4HntA50JP84FcJ6DOczV3RgwKJLXftYWRfcw4ANtcM+5uoaNXkNzdRmqB91W+A+k/lKmtAdpldJhVpsLt43nk+m75+EUjqinuvwzVlz2xPxUC3L/t8HAxqudmg+41MSDhUUcDnPN0AkIE6lzYsBkSZ6fR36xgPVnGHnsTTiN+j7aOpnxjrGzofb0KGOCbfn8TWiw013F7fM5gVL94FkIWpDrfgBgU/tdkmjhnMEnNqyYXsrtRIG+PexZV4PFg5GtStIZsy/BVZRvroHBnmQs7AS19w6NnsdvLHM6P3U+K37shpZgWSXKKKLyqV/NRi/iSa8dbPRISoZCn8x84vEU8bsTIUqT+n9cN75RbcSOIdvj4cDE+GJqWJh+afBfacuiYtgMMrh0/w3ad2ldCkF6uzBSsvPnuc+NBBp0M2uKiKhhqLz/uB8iYS0Gzmso6defDGgocnut++cRW2f3IfdAE=
before_deploy:
- export RELEASE_FILE_NAME=$(ls ../*.deb)
after_deploy:
- NOW=`date +%Y-%m-%d-%H-%M`
- cd ..
- git clone https://github.com/mariolukas/FabScanPi-Build-Raspbian.git
- cd FabScanPi-Build-Raspbian
- git config credential.helper "store --file=.git/credentials"
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials
- git tag v.${NOW} -m "new release ${RELEASE_FILE_NAME}"
- git push origin --tags
deploy:
provider: releases
skip_cleanup: true
file_glob: true
api_key:
secure: k0Ms4zQL6KTWInxaS2G578OxmG2aJSicezcGESsDHg3RLI7zgyx4jn+3IdoGfZucXmMxjwPFpBvoVBYfJ4GY5ZrgV8ftvnReO7xn8obADtOmSupTy5eUX5S/K+b8VdjD/QQRO9Bn9lz7ekTauMqtv2usw93X3RTDFtEAtLwtBEuGMU4dhU1lHC/1HDxa0BGfhuEOsp9eedA641dwq3kVpw/6WRlpdyNLEL6l7HJ2ednOH+DXb5hTwSF+Wbg/Oe/pobn8xpFvYc8ZmlRVpiE0kL3lA4HZ5gdBCHAs9HuNsK8e3pKn9l71zqEFdZdbUylp/fFeN5uLYMnZSMKBOg03lRhtsICm6IN7d91Hazcd+vox5Jh0EBgKsEgrAoDSMjiMRj1ROnZXWgs/DYZh8nV+y23hY3BlvyD2AjwyxCHRLG4sIkGmhxe3EoaW1vBwZ4/QUp7AL6x9povUsJM4kU6sBu0+QaoKk1NKs+2xW4mpktS5i2WHuR/sJcmf8AWDkuTejSKBzmKJoSb2dluRYKHa7EpobA7hiCz+6Und13sGJDvF46QprCkuVmDeQc1wImpVj2Evn0KLRRq4z33mEtoMMbROJ1Pg7pXdaTvl9AxDHn60NIbfr7lWjcYIvaOpPSax5vCD6w2lDToDbwj/4K5mh80/bhOyWVCrfcJxQOYqxxQ=
file: "${RELEASE_FILE_NAME}"
on:
tags: true
repo: mariolukas/FabScanPi-Server

275
CHANGELOG.md Normal file
View file

@ -0,0 +1,275 @@
# FabScanPi - Open Source 3D Scanner Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [0.8.0] - unreleased
### Added
### Changed
### Fixed
## [0.7.0] - 2019-02-21
### Added
- new settings dialog options for hardware contolling
- moved calibration button to settings dialog
- added new configuraitons in general settings tab
- prepared platform independet firmware setup (aka cyclop compatible mode)
- api route for live log stream
- api route for debug log zip download
- new firmware version
- made fabscan discoverable in find.fabscan.org
- apscheduler library for registery servcie and future scheduling tasks
- added meshmixer to package dependencies
- added avrdude config to package dependencies
### Changed
- replaced old image build script by a new one, based on official raspbian build scripts
- FSUpdate is working for different stages now
### Fixed
- fixed camera driver (pi and usb)
- fixed random artifacts at the beginning of object scan
## [0.6.0] - 2018-11-23
### Added
- introduced Tornado Web Framework
- added new version of frontend with some fixes
- added swapping support for high res scans
- added new refactored firmware v.20181123
### Changed
- refactored Websocket Server
- refactored Web Server
- refactored Streaming Handler
- refactored project structure
### Fixed
- Turntable Blocking mode
- Image Ring Buffer Flushing
- removed random artifacts at the beginning of object scan
- stepper missing steps bug (aka stepper wobble)
- avrdude bug
- gap at the beginning/end of a scan
## [0.5.0] - 2018-04-04
### Added
- new documentation parts (tnx to jens hackel)
- added stop sequence when scanner is not calibrated
- added new handlers for gracefull application shutdown
- added toast message at the end of calibration if calibration failed
### Changed
- replaced magic numbers by config values (tnx to jwalt)
- refactored camera driver ( much faster than before )
- removed dead code
### Fixed
- fixed pykka aktor threading bug in streams
- fixed typo in documentation (tnx to kradrat)
- fixed green cam bug
- fixed stepper motors step bug (variable number of steps should work now)
- deleting old calibration data before new calibration
- fixed update procedure, added assume yes option
- fixed start stop init script and added better logging to it
## [0.4.3] - 2017-07-26
### Added
- new meshing file formats (off, 3ds, x3d, xyz...)
- new sections to f.a.q. in docs
### Fixed
- fixed calibration data saving bug
- reworked meshing process and added new mlx filter scripts
## [0.4.2] - 2017-07-10
### Fixed
- fixed update notification bug
- fixed firmware issue which leaded to bricked devices.
## [0.4.1] - 2017-07-2
### Added
- added calibration notification message
### Fixed
- fixed preview stream issues
- fixed default config values
- fixed turntable pointcloud roi
## [0.4.0] - 2017-07-2
### Added
- added news to documentation
- added auto calibration
- added news screen to fabscan server start screen
### Fixed
- first fixes for upgrade
- fixed major bug with serial connection
### Changed
- improved laser line detection
## [0.3.1] - 2016-09-26
### Fixed
- fixed bug which created multiple instances for websocket server
- fixed bug which calculated wrong version numbers in upgrade check
## [0.3.0] - 2016-07-08
### Added
- added splash screen to frontend
- added auto upgrade to frontend and backend
- added calibration option to settings dialog
### Fixed
- fixed major laser detection error
- fixed some 3D calculation bugs
### Changed
- refactored core for making it more modular
- simplified the laser settings dialog (threshold values etc.) better preview now
## [0.2.1] - 2016-07-06
### Added
- added new dependencies to control file
### Fixed
- fixed avrdude flashing for FabScan HAT
## [0.2.0] - 2016-03-12
### Added
- added idle spinner to stream preview window
- added meshlab support to frontend
- added calibration stream option
- added meshalabserver support by calling via xvfb
- added new icons
- added system call stdouts to log file
- added version number of firmware and server visible in main window
### Fixed
- fixed issue #5, heavy CPU load
- fixed status bar
- fixed mpjeg close stream bug in chrome and firefox
### Changed
- refactored system callings, introduced new utils for system calls
- prepared frontend for laser stepper support
- replaced threejs v70 by a newer version v74
- refactored webgl directive, added support for switching between mesh and pointcloud (experimental)
- refactored laser detection algorithm, it is more stable now.
- refactored and extended share dialog options
- refactored httpRequestHandler
- refactored REST api
- replaced angular-slick
- refactored general file handling
## [0.1.15] - 2016-02-25
### Added
- added auto detection for arduino
- added some additional connection messages to frontend
- added override function for bassehttp logger to get cleaner logs
### Fixed
- fixed firmware autoflash bug, it finds the correct hex file now.
- fixed firmware autoflash bug, it finds the correct hex file now.
### Changed
- refactored and cleaned FSSerial.py
- removed serial port from default config
## [0.1.14] - 2016-02-23
### Fixed
- fixed firmware motor reverse issue
- fixed serial connection error for custom arduino installations.
## [0.1.13] - 2016-02-20
### Added
- added new frontend with saturation slider
- added funtions to support camera saturation adjustment
- added multilingual support (en only until now)
- added error handler message to frontend
### Fixed
- fixed issue #12 internet connection is no longer needed, added font-awsome fonts to www
- fixed issue #3 server hangs when laser not detected
- fixed mjepeg connection error bug, stack trace is not longer shown in log
- fixed some bugs in FSCamera.py
## [0.1.12] - 2016-02-10
### Changed
- switched from depricated python-support to dh_python2 package builder
- modified makefile to fit the new builder
## [0.1.11] - 2016-02-10
### Added
- added update instructions do documentation
### Changed
- modified init script
## [0.1.10] - 2016-02-10
## added
- new frontend version
## [0.1.9] - 2016-02-8
### Changed
- fixed debian package installer scripts
## [0.1.8] - 2016-02-8
### Changed
- fixed python package path error
## [0.1.7] - 2016-02-8
### Added
- added auto versioning to setup.py
### Changed
- fixed versioning in frontend
- fixed some camera parameters for better color scan results
- fixed issue #3
- fixed frontend
## [0.1.6] - 2016-02-4
### Added
- added motor enable/disable commands before and after scans to prevent hot motors
### Changed
- switched to firmware v.20160204 which supports custom boards and fixes some issues
### Fixed
- closed issue #4 added auto flash enable/disable option to config file
## [0.1.5] - 2016-01-15
### Added
- Added new Frontend version.
## [0.1.4] - 2016-01-14
### Fixed
- Fixed frontend
## [0.1.3] - 2016-01-11
### Fixed
- Fixed Firefox mjpeg stream issue
- Fixed pi camera exposure issue
## [0.1.2] - 2016-01-02
### Added
- New User Interface added
## [0.1.1] - 2016-01-02
### Fixed
- scan data folders
## [0.1.0] - 2016-01-02
### Added
- First Release of FabScanPi-Server.

22
ISSUE_TEMPLATE.md Normal file
View file

@ -0,0 +1,22 @@
## *Who* is the bug affecting?
<!-- Ex. All supervisors, Sally Supervisor, Level 1 CCs -->
## *What* is affected by this bug?
<!-- Ex. supervision, sending messages, texter profiles -->
## *When* does this occur?
<!-- Ex. After ending a conversation, every night at 3pm, when I sign off -->
## *Where* on the platform does it happen?
<!-- Ex. In the a Supervisor chat box, on the conversation profile page, on the two-factor screen -->
## *How* do we replicate the issue?
<!-- Please be specific as possible. Use dashes (-) or numbers (1.) to create a list of steps -->
## Expected behavior (i.e. solution)
<!-- What should have happened? -->
## Other Comments

339
LICENSE Normal file
View file

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

5
MANIFEST.in Normal file
View file

@ -0,0 +1,5 @@
recursive-include src/fabscan/mlx *
recursive-include src/fabscan/firmware *
recursive-include src/fabscan *.json
include README.md
include requirements.txt

38
Makefile Normal file
View file

@ -0,0 +1,38 @@
# $Id: Makefile,v 1.6 2014/10/29 01:01:35 Mario Lukas Exp $
#
PYTHON=`which python`
DESTDIR=/
BUILDIR=$(CURDIR)/debian/fabscanpi-server
PROJECT=fabscanpi-server
all:
@echo "make source - Create source package"
@echo "make install - Install on local system"
@echo "make rpm - Generate a rpm package"
@echo "make deb - Generate a deb package"
@echo "make clean - Get rid of scratch and byte files"
source:
$(PYTHON) setup.py sdist $(COMPILE)
install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
rpm:
$(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
deb:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
#$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
#rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
dpkg-buildpackage -b -uc -us -i -I -rfakeroot
clean:
$(PYTHON) setup.py clean
$(MAKE) -f $(CURDIR)/debian/rules clean
rm -rf build/ MANIFEST
rm src/fabscan/FSVersion.py
find . -name '*.pyc' -delete

28
PULL_REQUEST_TEMPLATE.md Normal file
View file

@ -0,0 +1,28 @@
<!--- Provide a general summary of your changes in the Title above -->
## Description
<!--- Describe your changes in detail -->
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->
## Screenshots (if appropriate):
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.

43
README.md Executable file
View file

@ -0,0 +1,43 @@
# FabScan PI - An Open-Source 3D Laser Scanner
[![Python Support](https://img.shields.io/badge/Python-2.7-green.svg)](https://www.python.org/)
[![Python Support](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
[![Build Status](https://travis-ci.org/mariolukas/FabScanPi-Server.svg?branch=master)](https://travis-ci.org/mariolukas/FabScanPi-Frontend.svg?branch=master)
<img src="docs/images/logo.jpg" width="400">
## What is FabScan PI
The FabScan project started in 2010 at [Germany's first FabLab in Aachen](http://hci.rwth-aachen.de/fablab). In 2014, development was taken over by Mario Lukas and the FabScanPi project was created. The
FabScan PI is the next iteration of the [FabScan 3D laser scanner](http://hci.rwth-aachen.de/fabscan). It uses a Raspberry PI and the Raspberry PI
camera module. The idea behind using a Raspberry Pi is to provide the same hardware setup for all FabScans.
Another benefit is that the FabScan gets a Stand-Alone, Web-Enabled 3D laser scanner.
The FabScan PI Server is written in Python. The Web-Enabled user inferface is written in JavaScript and HTML5 using WebGL. The code for
the interface can be found at: http://github.com/mariolukas/FabScanPi-Frontend
That enables people with different programming skills to [contribute to this project](http://mariolukas.github.io/FabScanPi-Server/contributing/).
FabScan PI is Free Software and released under the [GNU General Public License V2](https://www.gnu.org/licenses/gpl-2.0.html).
## Documentation
The FabScan documentation can be found at [http://www.fabscan.org](http://www.fabscan.org)
## Core Team
* Mario Lukas (project lead, core development)
* Watterott electronic (hardware)
* René Bohne (supervision until 2015)
* Jan Borchers (supervision until 2015)
## Contributions from
* Beckmann Mediendesign (FabScanPi Logo)
* Doug LaRue (build log, bug reporting)
* Christoph Emonds (code review)
* Jan Thar (case design, bug reporting, general support)
* Jens Hackel (documentation, bug reporting, testing)
* Francis Engelmann (original FabScan)
## This project is supported by
<a href="www.watterott.com"><img src="http://learn.watterott.com/images/banner.png" alt="Drawing"/></a> <a href="www.jetbrains.com"><img src="https://github.com/mariolukas/FabScanPi-Server/blob/master/docs/images/jetbrains.png" alt="Drawing" width="150"/></a>

View file

@ -1,234 +0,0 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Mario Lukas">
<link rel="shortcut icon" href="../images/fabscanpi_ICON.png">
<title>Community - FabScanPi</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css">
<link href="../css/extra.css" rel="stylesheet">
<script>
// Current page data
var mkdocs_page_name = "Community";
var mkdocs_page_input_path = "community.md";
var mkdocs_page_url = "/community/";
</script>
<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="../js/highlight.pack.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> FabScanPi</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li>
<li class="toctree-l1 ">
<a class="" href="..">Home</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../news/">News</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../hardware/">Hardware</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../software/">Software</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../examples/">Examples</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../developing/">Developing</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../contributing/">Contributing</a>
</li>
<li>
<li>
<li class="toctree-l1 current">
<a class="current" href="./">Community</a>
<ul>
<li class="toctree-l3"><a href="#slack">Slack</a></li>
<li class="toctree-l3"><a href="#google-group">Google Group</a></li>
<li class="toctree-l3"><a href="#facebook">Facebook</a></li>
<li class="toctree-l3"><a href="#twitter">Twitter</a></li>
</ul>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../faq/">F.A.Q</a>
</li>
<li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">FabScanPi</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> &raquo;</li>
<li>Community</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/mariolukas/FabScanPi-Server/edit/master/docs/community.md"
class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h1 id="slack">Slack</h1>
<p>Use the FabScan Slack channel for direct messaging and chat communication.
This is the fastest way of getting support.</p>
<p>Signup here: <a href="https://fabscan.signup.team">https://fabscan.signup.team</a></p>
<p>Or write an email to:
info@fabscan.org with subject "add me to slack" </p>
<h1 id="google-group">Google Group</h1>
<p>For general problems and information use the FabScan google group.
<a href="https://groups.google.com/forum/#!forum/fabscan">https://groups.google.com/forum/#!forum/fabscan</a></p>
<h1 id="facebook">Facebook</h1>
<p>Like our Facebook Page.
<a href="https://www.facebook.com/Fabscan/">https://www.facebook.com/Fabscan</a></p>
<h1 id="twitter">Twitter</h1>
<p>Tweets about FabScan can be found on Twitter.
<a href="https://www.twitter.com/l_k3">https://www.twitter.com/l_k3</a></p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../faq/" class="btn btn-neutral float-right" title="F.A.Q">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../contributing/" class="btn btn-neutral" title="Contributing"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
<p>© Copyright 2015-2016, Mario Lukas</p>
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<a href="https://github.com/mariolukas/FabScanPi-Server" class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
<span><a href="../contributing/" style="color: #fcfcfc;">&laquo; Previous</a></span>
<span style="margin-left: 15px"><a href="../faq/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script src="../js/theme.js"></script>
<script src="../js/main.js"></script>
</body>
</html>

View file

@ -1,346 +0,0 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Mario Lukas">
<link rel="shortcut icon" href="../images/fabscanpi_ICON.png">
<title>Contributing - FabScanPi</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css">
<link href="../css/extra.css" rel="stylesheet">
<script>
// Current page data
var mkdocs_page_name = "Contributing";
var mkdocs_page_input_path = "contributing.md";
var mkdocs_page_url = "/contributing/";
</script>
<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="../js/highlight.pack.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> FabScanPi</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li>
<li class="toctree-l1 ">
<a class="" href="..">Home</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../news/">News</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../hardware/">Hardware</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../software/">Software</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../examples/">Examples</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../developing/">Developing</a>
</li>
<li>
<li>
<li class="toctree-l1 current">
<a class="current" href="./">Contributing</a>
<ul>
<li class="toctree-l3"><a href="#contributing-to-this-project">Contributing to this project</a></li>
<li><a class="toctree-l4" href="#using-the-issue-tracker">Using the issue tracker</a></li>
<li><a class="toctree-l4" href="#bug-reports">Bug reports</a></li>
<li><a class="toctree-l4" href="#feature-requests">Feature requests</a></li>
<li><a class="toctree-l4" href="#pull-requests">Pull requests</a></li>
</ul>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../community/">Community</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../faq/">F.A.Q</a>
</li>
<li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">FabScanPi</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> &raquo;</li>
<li>Contributing</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/mariolukas/FabScanPi-Server/edit/master/docs/contributing.md"
class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h1 id="contributing-to-this-project">Contributing to this project</h1>
<p>Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.</p>
<p>Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.</p>
<h2 id="using-the-issue-tracker">Using the issue tracker</h2>
<p>The issue tracker is the preferred channel for <a href="#bugs">bug reports</a>,
<a href="#features">features requests</a> and <a href="#pull-requests">submitting pull
requests</a>, but please respect the following restrictions:</p>
<ul>
<li>
<p>Please <strong>do not</strong> use the issue tracker for personal support requests (use
<a href="https://groups.google.com/forum/#!forum/fabscan">FabScan Group</a> or <a href="https://fabscan.slack.com/messages/general/">Slack</a>).</p>
</li>
<li>
<p>Please <strong>do not</strong> derail or troll issues. Keep the discussion on topic and
respect the opinions of others.</p>
</li>
</ul>
<p><a name="bugs"></a></p>
<h2 id="bug-reports">Bug reports</h2>
<p>A bug is a <em>demonstrable problem</em> that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!</p>
<p>Guidelines for bug reports:</p>
<ol>
<li>
<p><strong>Use the GitHub issue search</strong> &mdash; check if the issue has already been
reported.</p>
</li>
<li>
<p><strong>Check if the issue has been fixed</strong> &mdash; try to reproduce it using the
latest <code>master</code> or development branch in the repository.</p>
</li>
<li>
<p><strong>Isolate the problem</strong> &mdash; create a <a href="http://css-tricks.com/reduced-test-cases/">reduced test
case</a> and a live example.</p>
</li>
</ol>
<p>A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What browser(s) and OS
experience the problem? What would you expect to be the outcome? All these
details will help people to fix any potential bugs.</p>
<p>Example:</p>
<blockquote>
<p>Short and descriptive example bug report title</p>
<p>A summary of the issue and the browser/OS environment in which it occurs. If
suitable, include the steps required to reproduce the bug.</p>
<ol>
<li>This is the first step</li>
<li>This is the second step</li>
<li>Further steps, etc.</li>
</ol>
<p><code>&lt;url&gt;</code> - a link to the reduced test case</p>
<p>Any other information you want to share that is relevant to the issue being
reported. This might include the lines of code that you have identified as
causing the bug, and potential solutions (and your opinions on their
merits).</p>
</blockquote>
<p><a name="features"></a></p>
<h2 id="feature-requests">Feature requests</h2>
<p>Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to <em>you</em> to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.</p>
<p><a name="pull-requests"></a></p>
<h2 id="pull-requests">Pull requests</h2>
<p>Good pull requests - patches, improvements, new features - are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.</p>
<p><strong>Please ask first</strong> before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different language),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project.</p>
<p>Please adhere to the coding conventions used throughout a project (indentation,
accurate comments, etc.) and any other requirements (such as test coverage).</p>
<p>Follow this process if you'd like your work considered for inclusion in the
project:</p>
<ol>
<li><a href="http://help.github.com/fork-a-repo/">Fork</a> the project, clone your fork,
and configure the remotes:</li>
</ol>
<p><code>bash
# Clone your fork of the repo into the current directory
git clone https://github.com/&lt;your-username&gt;/&lt;repo-name&gt;
# Navigate to the newly cloned directory
cd &lt;repo-name&gt;
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/&lt;upstream-owner&gt;/&lt;repo-name&gt;</code></p>
<ol>
<li>If you cloned a while ago, get the latest changes from upstream:</li>
</ol>
<p><code>bash
git checkout &lt;dev-branch&gt;
git pull upstream &lt;dev-branch&gt;</code></p>
<ol>
<li>Create a new topic branch (off the main project development branch) to
contain your feature, change, or fix:</li>
</ol>
<p><code>bash
git checkout -b &lt;topic-branch-name&gt;</code></p>
<ol>
<li>
<p>Commit your changes in logical chunks. Please adhere to these <a href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html">git commit
message guidelines</a>
or your code is unlikely be merged into the main project. Use Git's
<a href="https://help.github.com/articles/interactive-rebase">interactive rebase</a>
feature to tidy up your commits before making them public.</p>
</li>
<li>
<p>Locally merge (or rebase) the upstream development branch into your topic branch:</p>
</li>
</ol>
<p><code>bash
git pull [--rebase] upstream &lt;dev-branch&gt;</code></p>
<ol>
<li>Push your topic branch up to your fork:</li>
</ol>
<p><code>bash
git push origin &lt;topic-branch-name&gt;</code></p>
<ol>
<li><a href="https://help.github.com/articles/using-pull-requests/">Open a Pull Request</a>
with a clear title and description.</li>
</ol>
<p><strong>IMPORTANT</strong>: By submitting a patch, you agree to allow the project owner to
license your work under the same license as that used by the project.</p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../community/" class="btn btn-neutral float-right" title="Community">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../developing/" class="btn btn-neutral" title="Developing"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
<p>© Copyright 2015-2016, Mario Lukas</p>
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<a href="https://github.com/mariolukas/FabScanPi-Server" class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
<span><a href="../developing/" style="color: #fcfcfc;">&laquo; Previous</a></span>
<span style="margin-left: 15px"><a href="../community/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script src="../js/theme.js"></script>
<script src="../js/main.js"></script>
</body>
</html>

View file

@ -1,124 +0,0 @@
/*
This is the GitHub theme for highlight.js
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
color: #333;
-webkit-text-size-adjust: none;
}
.hljs-comment,
.diff .hljs-header,
.hljs-javadoc {
color: #998;
font-style: italic;
}
.hljs-keyword,
.css .rule .hljs-keyword,
.hljs-winutils,
.nginx .hljs-title,
.hljs-subst,
.hljs-request,
.hljs-status {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-hexcolor,
.ruby .hljs-constant {
color: #008080;
}
.hljs-string,
.hljs-tag .hljs-value,
.hljs-phpdoc,
.hljs-dartdoc,
.tex .hljs-formula {
color: #d14;
}
.hljs-title,
.hljs-id,
.scss .hljs-preprocessor {
color: #900;
font-weight: bold;
}
.hljs-list .hljs-keyword,
.hljs-subst {
font-weight: normal;
}
.hljs-class .hljs-title,
.hljs-type,
.vhdl .hljs-literal,
.tex .hljs-command {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-tag .hljs-title,
.hljs-rule .hljs-property,
.django .hljs-tag .hljs-keyword {
color: #000080;
font-weight: normal;
}
.hljs-attribute,
.hljs-variable,
.lisp .hljs-body,
.hljs-name {
color: #008080;
}
.hljs-regexp {
color: #009926;
}
.hljs-symbol,
.ruby .hljs-symbol .hljs-string,
.lisp .hljs-keyword,
.clojure .hljs-keyword,
.scheme .hljs-keyword,
.tex .hljs-special,
.hljs-prompt {
color: #990073;
}
.hljs-built_in {
color: #0086b3;
}
.hljs-preprocessor,
.hljs-pragma,
.hljs-pi,
.hljs-doctype,
.hljs-shebang,
.hljs-cdata {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.diff .hljs-change {
background: #0086b3;
}
.hljs-chunk {
color: #aaa;
}

File diff suppressed because one or more lines are too long

View file

@ -1,178 +0,0 @@
/*
* Sphinx doesn't have support for section dividers like we do in
* MkDocs, this styles the section titles in the nav
*
* https://github.com/mkdocs/mkdocs/issues/175
*/
.wy-menu-vertical span {
line-height: 18px;
padding: 0.4045em 1.618em;
display: block;
position: relative;
font-size: 90%;
color: #838383;
}
.wy-menu-vertical .subnav a {
padding: 0.4045em 2.427em;
}
/*
* Long navigations run off the bottom of the screen as the nav
* area doesn't scroll.
*
* https://github.com/mkdocs/mkdocs/pull/202
*/
.wy-nav-side {
height: 100%;
overflow-y: auto;
}
/*
* readthedocs theme hides nav items when the window height is
* too small to contain them.
*
* https://github.com/mkdocs/mkdocs/issues/#348
*/
.wy-menu-vertical ul {
margin-bottom: 2em;
}
/*
* Wrap inline code samples otherwise they shoot of the side and
* can't be read at all.
*
* https://github.com/mkdocs/mkdocs/issues/313
* https://github.com/mkdocs/mkdocs/issues/233
* https://github.com/mkdocs/mkdocs/issues/834
*/
code {
white-space: pre-wrap;
word-wrap: break-word;
padding: 2px 5px;
}
/**
* Make code blocks display as blocks and give them the appropriate
* font size and padding.
*
* https://github.com/mkdocs/mkdocs/issues/855
* https://github.com/mkdocs/mkdocs/issues/834
* https://github.com/mkdocs/mkdocs/issues/233
*/
pre code {
white-space: pre;
word-wrap: normal;
display: block;
padding: 12px;
font-size: 12px;
}
/*
* Fix link colors when the link text is inline code.
*
* https://github.com/mkdocs/mkdocs/issues/718
*/
a code {
color: #2980B9;
}
a:hover code {
color: #3091d1;
}
a:visited code {
color: #9B59B6;
}
/*
* The CSS classes from highlight.js seem to clash with the
* ReadTheDocs theme causing some code to be incorrectly made
* bold and italic.
*
* https://github.com/mkdocs/mkdocs/issues/411
*/
pre .cs, pre .c {
font-weight: inherit;
font-style: inherit;
}
/*
* Fix some issues with the theme and non-highlighted code
* samples. Without and highlighting styles attached the
* formatting is broken.
*
* https://github.com/mkdocs/mkdocs/issues/319
*/
.no-highlight {
display: block;
padding: 0.5em;
color: #333;
}
/*
* Additions specific to the search functionality provided by MkDocs
*/
.search-results article {
margin-top: 23px;
border-top: 1px solid #E1E4E5;
padding-top: 24px;
}
.search-results article:first-child {
border-top: none;
}
form .search-query {
width: 100%;
border-radius: 50px;
padding: 6px 12px; /* csslint allow: box-model */
border-color: #D1D4D5;
}
.wy-menu-vertical li ul {
display: inherit;
}
.wy-menu-vertical li ul.subnav ul.subnav{
padding-left: 1em;
}
.wy-menu-vertical .subnav li.current > a {
padding-left: 2.42em;
}
.wy-menu-vertical .subnav li.current > ul li a {
padding-left: 3.23em;
}
/*
* Improve inline code blocks within admonitions.
*
* https://github.com/mkdocs/mkdocs/issues/656
*/
.admonition code {
color: #404040;
border: 1px solid #c7c9cb;
border: 1px solid rgba(0, 0, 0, 0.2);
background: #f8fbfd;
background: rgba(255, 255, 255, 0.7);
}
/*
* Account for wide tables which go off the side.
* Override borders to avoid wierdness on narrow tables.
*
* https://github.com/mkdocs/mkdocs/issues/834
* https://github.com/mkdocs/mkdocs/pull/1034
*/
.rst-content .section .docutils {
width: 100%;
overflow: auto;
display: block;
border: none;
}
td, th {
border: 1px solid #e1e4e5 !important; /* csslint allow: important */
border-collapse: collapse;
}

250
debian/changelog vendored Normal file
View file

@ -0,0 +1,250 @@
fabscanpi-server (0.7.0) UNRELEASED; urgency=medium
* api route for live log stream
* api route for debug log zip download
* new firmware version
* made fabscan discoverable in find.fabscan.org
* apscheduler library for registery servcie and future scheduling tasks
* added meshmixer to package dependencies
* added avrdude config to package dependencies
* replaced old image build script by a new one, based on official raspbian build scripts
* FSUpdate is working for different stages now
* fixed camera driver (pi and usb)
* fixed random artifacts at the beginning of object scan
-- Mario Lukas <info@fabscan.org> Thu, 21 Feb 2019 22:47:00 +0100
fabscanpi-server (0.6.0) UNRELEASED; urgency=medium
* refactored webserver backend code
* introduced Tornado web framework
* fixed calibration non blocking bug.
* fixed flushing camera buffer
* fixed camera settings
* better camera stream performance (nearby live now)
* fixed gap at the beginning/end of a scan
* added swapping support for high res scans
* fixed avrdude bug
* fixed stepper missing steps bug (aka stepper wobble)
* added new version of frontend with some fixes
-- Mario Lukas <info@fabscan.org> Sat, 24 Nov 2018 15:47:00 +0100
fabscanpi-server (0.5.0) UNRELEASED; urgency=medium
* fixed pykka aktor threading bug in streams
* fixed bug realated to 400 step motors
* replaced magic numbers by config values (tnx to jwalt)
* fixed typo in documentation (tnx to kradrat)
* new documentation parts (tnx to jens hackel)
* fixed green cam bug
* added deleting old calibration data before new calibration
* refactored camera driver ( much faster than before )
* added abort sequence when scanner is not calibrated
* added new handlers for gracefull application shutdown
* fixed start stop init script and added better logging to it
-- Mario Lukas <info@fabscan.org> Wed, 28 Mar 2018 22:10:00 +0100
fabscanpi-server (0.4.3) UNRELEASED; urgency=medium
* fixed calibration data saving bug
* reworked meshing process and added new mlx filter scripts
* added new meshing file formats (off, 3ds, x3d, xyz...)
* added new things to f.a.q. in docs
-- Mario Lukas <info@fabscan.org> Sun, 26 Jul 2017 21:18:00 +0100
fabscanpi-server (0.4.2) UNRELEASED; urgency=medium
* fixed update notification bug
* fixed firmware issue which leaded to bricked devices.
-- Mario Lukas <info@fabscan.org> Mon, 10 Jul 2017 23:33:00 +0100
fabscanpi-server (0.4.1) UNRELEASED; urgency=medium
* fixed preview stream issues
* fixed default config values
* fixed turntable pointcloud roi
* added calibration notification message
-- Mario Lukas <info@fabscan.org> Sun, 2 Jul 2017 14:12:42 +0100
fabscanpi-server (0.4.0) UNRELEASED; urgency=medium
* first fixes for upgrade
* added news to documentation
* added auto calibration
* fixed major bug with serial connection
* improved laser line detection
* added news screen to fabscan server start screen
-- Mario Lukas <info@fabscan.org> Wed, 31 May 2017 12:22:42 +0100
fabscanpi-server (0.3.1) unstable; urgency=medium
* fixed bug which created multiple instances for websocket server
* fixed bug which calculated wrong version numbers in upgrade check
-- Mario Lukas <info@mariolukas.de> Mon, 26 Sep 2016 20:34:00 +0000
fabscanpi-server (0.3.0) unstable; urgency=medium
* refactored whole software for making it more flexible
* added splash screen to frontend
* added auto upgrade to frontend and backend
* fixed major laser detection error
* fixed some 3D calculation bugs
* simplified the laser settings dialog (threshold values etc.) better preview now
* added calibration option to settings dialog
-- Mario Lukas <info@mariolukas.de> Wed, 8 Jul 2016 17:52:00 +0000
fabscanpi-server (0.2.1) unstable; urgency=medium
* fixed avrdude flashing for FabScan HAT
* added new dependencies to control file
-- Mario Lukas <info@mariolukas.de> Wed, 6 Jul 2016 20:57:00 +0000
fabscanpi-server (0.2.0) unstable; urgency=medium
* fixed issue #5, heavy CPU load
* refactored system callings, introduced new utils for system calls
* system call stdouts are in logs now
* added meshalabserver support by calling via xvfb
* fixed mpjeg close stream bug in chrome and firefox
* added idle spinner to stream preview window
* prepared frontend for laser stepper support
* replaced threejs v70 by a newer version v74
* refactored webgl directive, added support for switching between mesh and pointcloud (experimental)
* refactored laser detection algorithm, it is more stable now.
* refactored and extended share dialog options
* made version number of firmware and server visible in main window
* added calibration stream option
* refactored httpRequestHandler
* refactored REST api
* replaced angular-slick
* added meshlab support to frontend
* refactored file handling
* fixed status bar
* added new icons
-- Mario Lukas <info@mariolukas.de> Sat, 12 Mar 2016 01:11:11 +0000
fabscanpi-server (0.1.15) unstable; urgency=medium
* added auto detection for arduino
* fixed firmware autoflash bug, it finds the correct hex file now.
* refactored and cleaned FSSerial.py
* removed serial port from default config
* added some additional connection messages to frontend
* added override function for bassehttp logger to get cleaner logs
-- Mario Lukas <info@mariolukas.de> Thu, 25 Feb 2016 20:54:11 +0000
fabscanpi-server (0.1.14) unstable; urgency=medium
* fixed firmware motor reverse issue
* fixed serial connection error for custom arduino installations.
-- Mario Lukas <info@mariolukas.de> Thu, 23 Feb 2016 07:42:10 +0000
fabscanpi-server (0.1.13) unstable; urgency=medium
* fixed issue #3 server hangs when laser not detected
* fixed issue #12 internet connection is no longer needed, added font-awsome fonts to www
* scanner does start even if serial or camera connection fails, a message is shown in frontend now
* fixed mjepeg connection error bug, stack trace is not longer shown in log
* fixed some bugs in FSCamera.py
* added new frontend with saturation slider
* added funtions to support camera saturation adjustment
* prepared multilingual support (en only until now)
-- Mario Lukas <info@mariolukas.de> Thu, 20 Feb 2016 00:18:22 +0000
fabscanpi-server (0.1.12) unstable; urgency=medium
* switched from depricated python-support to dh_python2 package builder
* modified makefile to fit the new builder
-- Mario Lukas <info@mariolukas.de> Thu, 10 Feb 2016 23:03:40 +0000
fabscanpi-server (0.1.11) unstable; urgency=medium
* modified init script
* added update instructions do documentation
-- Mario Lukas <info@mariolukas.de> Thu, 10 Feb 2016 08:24:40 +0000
fabscanpi-server (0.1.10) unstable; urgency=medium
* new firmware version
-- Mario Lukas <info@mariolukas.de> Thu, 10 Feb 2016 00:39:10 +0000
fabscanpi-server (0.1.9) unstable; urgency=medium
* fixed debian package installer scripts
-- Mario Lukas <info@mariolukas.de> Mon, 08 Feb 2016 23:21:19 +0000
fabscanpi-server (0.1.8) unstable; urgency=medium
* fixed python package path error
-- Mario Lukas <info@mariolukas.de> Mon, 08 Feb 2016 23:21:19 +0000
fabscanpi-server (0.1.7) unstable; urgency=medium
* fixed versioning in frontend
* fixed some camera parameters for better color scan results
* fixed issue #3
* added auto versioning to setup.py
* changed ui files
-- Mario Lukas <info@mariolukas.de> Mon, 08 Feb 2016 00:20:13 +0000
fabscanpi-server (0.1.6) unstable; urgency=medium
* switched to firmware v.20160204 which supports custom boards and fixes some issues
* added motor enable/disable commands before and after scans to prevent hot motors
* closed issue #4 added auto flash enable/disable option to config file
-- Mario Lukas <info@mariolukas.de> Thu, 04 Feb 2016 23:55:05 +0000
fabscanpi-server (0.1.5) unstable; urgency=medium
* Added new Frontend version.
-- Mario Lukas <info@mariolukas.de> Fri, 15 Jan 2016 08:57:01 +0000
fabscanpi-server (0.1.4) unstable; urgency=medium
* Fixed frontend
-- Mario Lukas <info@mariolukas.de> Thu, 14 Jan 2016 18:20:10 +0000
fabscanpi-server (0.1.3) unstable; urgency=medium
* Fixed Firefox mjpeg stream issue
* Fixed pi camera exposure issue
-- Mario Lukas <info@mariolukas.de> Mon, 11 Jan 2016 17:40:30 +0000
fabscanpi-server (0.1.2) unstable; urgency=medium
* New User Interface added
-- Mario Lukas <info@mariolukas.de> Sat, 02 Jan 2016 16:40:30 +0000
fabscanpi-server (0.1.1) unstable; urgency=medium
* BUGFIX: scan data folders
-- Mario Lukas <info@mariolukas.de> Sat, 02 Jan 2016 00:01:40 +0000
fabscanpi-server (0.1.0) unstable; urgency=medium
* First Release of FabScanPi-Server.
-- Mario Lukas <info@mariolukas.de> Fri, 01 Jan 2016 21:48:08 +0000

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
9

15
debian/control vendored Normal file
View file

@ -0,0 +1,15 @@
Source: fabscanpi-server
Section: net
Priority: optional
Maintainer: Mario Lukas (info@mariolukas.de)
Build-Depends: debhelper (>= 8.0.0), python (>= 2.7), dh-python, cdbs
X-Python-Version: >=2.7
Standards-Version: 3.9.3
Package: fabscanpi-server
Architecture: all
Homepage: http://fabscan.org
X-Python-Version: ${python:Versions}
Depends: ${misc:Depends}, ${python:Depends}, meshlab, xvfb, avrdude, strace, python-opencv, python-funcsigs, python-apscheduler, python-tornado, libtbb2, python-pil, python-serial, python-pykka, python-picamera, python-requests, python-rpi.gpio, python-semver, xvfb, meshlab, strace, avrdude, python-scipy
Description:
FabScanPi Server ist the backend of the Stand-alone, Web-enabled, Open Source 3D laser scanner.

27
debian/copyright vendored Normal file
View file

@ -0,0 +1,27 @@
Format: http://dep.debian.net/deps/dep5/
Upstream-Name: fabscanpi-server
Source: http://fabscanpi.org
Files: *
Copyright: 2014-2015, FabScanPi Project
License: AGPL-3+
Files: debian/*
Copyright: 2005-2010, Debian FabScanPi Maintainers <info@mariolukas.de>
License: GPL-2
License: AGPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU Affero General Public License
can be found in the file `/usr/share/doc/dspam/AGPL-3.gz'.

22
debian/fabscanpi-server.default vendored Executable file
View file

@ -0,0 +1,22 @@
# On what port to run daemon, default is 8081
PORT=8081
CONFIG=/etc/fabscanpi/default.config.json
SETTINGS=/etc/fabscanpi/default.settings.json
LOG=/var/log/fabscanpi/fabscanpi.log
# Path to the FabScabPi executable, use this to override the default setting "/usr/bin/fabscanpi"
#DAEMON=/usr/bin/fabscanpi-server
# What arguments to pass to fabscanpi, usually no need to touch this
DAEMON_ARGS="--config=$CONFIG --settings=$SETTINGS --logfile=$LOG"
# Umask of files fabscanpi generates, Change this to 000 if running fabscanpi as its own, separate user
#UMASK=022
# Process priority, 0 here will result in a priority 20 process.
# -2 ensures FabScanPi has a slight priority over user processes.
NICELEVEL=-2
# Should FabScanPi run at Start up?
START=yes

2
debian/fabscanpi-server.dirs vendored Normal file
View file

@ -0,0 +1,2 @@
etc
etc/sudoers.d

131
debian/fabscanpi-server.init vendored Executable file
View file

@ -0,0 +1,131 @@
#!/bin/sh
# /etc/init.d/fabscanpi-server
### BEGIN INIT INFO
# Provides: fabscanpi-server
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Should-Start: $time
# Should-Stop: $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the fabscanpi-server daemon
# Description: fabscanpi-server daemon
### END INIT INFO
DAEMONUSER=fabscan
DESC="FabScanPi Daemon"
NAME="fabscanpi-server"
DAEMON=/usr/bin/fabscanpi-server
PIDFILE=/tmp/$NAME.pid
PKGNAME=fabscanpi-server
SCRIPTNAME=/etc/init.d/$PKGNAME
LOG=/var/log/fabscanpi/fabscanpi.log
# Read configuration variable file if it is present
[ -r /etc/default/$PKGNAME ] && . /etc/default/$PKGNAME
# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
#. /lib/lsb/init-functions
is_alive()
{
pid=`cat $1` > /dev/null 2>&1
kill -0 $pid > /dev/null 2>&1
return $?
}
do_start() {
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
is_alive $PIDFILE
RETVAL="$?"
if [ $RETVAL != 0 ]; then
avrdude-autoreset -c arduino -p m328p -P /dev/ttyAMA0 -b 57600 -l /dev/null
/sbin/start-stop-daemon --start --user $DAEMONUSER \
--make-pidfile --pidfile $PIDFILE --background \
--exec /bin/bash -- -c "$DAEMON $DAEMON_ARGS"
RETVAL="$?"
fi
}
do_stop() {
/sbin/start-stop-daemon --stop --retry 5 --remove-pidfile --pidfile $PIDFILE --user $USER
RETVAL="$?"
[ "$RETVAL" = "2" ] && return 2
[ "$RETVAL" = "0" ] && return 0 || return 1
}
do_status() {
if [ -z `cat $PIDFILE` ];
then
echo "fabscanpi-server: not running."
else
echo "fabscanpi-server: running."
fi
}
case "$1" in
start)
#[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) echo "$NAME started.";;
2) echo "$NAME could not be started";;
esac
;;
stop)
#[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) echo "$NAME stopped.";;
2) echo "$NAME could not be stopped.";;
esac
;;
restart)
#log_daemon_msg "Restarting $DESC" "$NAME"
echo "Restarting $NAME..."
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) echo "$NAME restarted.";;
1) echo "$NAME is still running";; # Old process is still running
*) echo "$NAME failed to start" ;; # Failed to start
esac
;;
*)
# Failed to stop
# log_end_msg 1
echo "$NAME failed to stop"
;;
esac
;;
status)
do_status
;;
*)
echo "Usage: /etc/init.d/fabscanpi-server {start|stop|restart|status}"
exit 1
esac
exit 0

1
debian/fabscanpi-sudoers vendored Normal file
View file

@ -0,0 +1 @@
fabscan ALL=NOPASSWD: /usr/bin/apt-get update, /usr/bin/apt-get dist-upgrade -y, /usr/bin/avrdude

44
debian/postinst vendored Normal file
View file

@ -0,0 +1,44 @@
#!/bin/bash
# postinst script for fabscanpi-server
#
# see: dh_installdeb(1)
set -e
FABSCAN_USER=fabscan
CONF_DIR=/etc/fabscanpi
LOG_DIR=/var/log/fabscanpi
SCANS_DIR=/var/scans
PID_DIR=/var/run/fabscanpi
chmod 777 /usr/bin/autoreset
chmod 777 /usr/bin/avrdude-autoreset
# Allow $FABSCAN_USER to change the config and setting files
chown -R $FABSCAN_USER:nogroup $CONF_DIR
# Create log directory if necessary
if [ ! -d $LOG_DIR ];then
mkdir -p $LOG_DIR
fi
# Change permission to allow $FABSCAN_USER to write logs
chown -R $FABSCAN_USER:nogroup $LOG_DIR
# Create data directory if necessary
if [ ! -d $SCANS_DIR ];then
mkdir -p $SCANS_DIR
fi
#create folder for pid file
if [ ! -d $PID_DIR ];then
mkdir -p $PID_DIR
chown -R $FABSCAN_USER:nogroup $PID_DIR
fi
# Change permission to allow $FABSCAN_USER to write data
chown -R $FABSCAN_USER:nogroup $SCANS_DIR
/etc/init.d/fabscanpi-server start
exit 0

13
debian/postrm vendored Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
# postrm script for script for fabscanpi-server
#
# see: dh_installdeb(1)
set -e
SERVICE=fabscanpi-server
PIDFILE=/var/run/$SERVICE.pid
INIT_SCRIPT=/etc/init.d/$SERVICE
exit 0

32
debian/preinst vendored Normal file
View file

@ -0,0 +1,32 @@
#!/bin/bash
# preinst script for script for fabscanpi-server
#
# see: dh_installdeb(1)
set -e
FABSCAN_USER=fabscan
SERVICE=fabscanpi-server
INIT_SCRIPT=/etc/init.d/$SERVICE
SCANS_DIR=/var/scans
echo "KERNEL=="ttyAMA0", SYMLINK+="ttyS0",GROUP="dialout",MODE:=0666" > /etc/udev/rules.d/80-arduinopi.rules
if [ -f /etc/inittab ]; then
sed -i -e 's/T0:23:respawn:/#T0:23:respawn:/g' /etc/inittab
fi
if ps ax | grep -v grep | grep -v $0 | grep $SERVICE > /dev/null
then
if [ -f $INIT_SCRIPT ];then
echo "$SERVICE is running shutting down..."
$INIT_SCRIPT stop
fi
fi
adduser --system $FABSCAN_USER --home $SCANS_DIR --no-create-home > /dev/null 2>&1 || true
usermod -a -G dialout -G pi -G sudo -G tty $FABSCAN_USER
usermod -a -G dialout -G pi -G sudo -G tty pi
exit 0

15
debian/prerm vendored Normal file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# postrm script for script for fabscanpi-server
#
# see: dh_installdeb(1)
set -e
SERVICE=fabscanpi-server
INIT_SCRIPT=/etc/init.d/$SERVICE
if ps ax | grep -v grep | grep -v $0 | grep $SERVICE > /dev/null
then
$INIT_SCRIPT stop
fi

13
debian/rules vendored Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
#export PYBUILD_NAME=fabscanpi-server
export PYBUILD_INSTALL_ARGS_python2=--install-scripts=/usr/bin/
export PYBUILD_INSTALL_ARGS_python2=--prefix=/usr/
#export PYBUILD_DESTDIR_python2=debian/
#export PYBUILD_DISABLE=test
%:
dh $@ --with python2 --buildsystem=pybuild
#override_dh_usrlocal:

1
debian/source/format vendored Normal file
View file

@ -0,0 +1 @@
3.0 (native)

View file

@ -1,227 +0,0 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Mario Lukas">
<link rel="shortcut icon" href="../images/fabscanpi_ICON.png">
<title>Developing - FabScanPi</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css">
<link href="../css/extra.css" rel="stylesheet">
<script>
// Current page data
var mkdocs_page_name = "Developing";
var mkdocs_page_input_path = "developing.md";
var mkdocs_page_url = "/developing/";
</script>
<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="../js/highlight.pack.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> FabScanPi</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li>
<li class="toctree-l1 ">
<a class="" href="..">Home</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../news/">News</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../hardware/">Hardware</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../software/">Software</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../examples/">Examples</a>
</li>
<li>
<li>
<li class="toctree-l1 current">
<a class="current" href="./">Developing</a>
<ul>
<li class="toctree-l3"><a href="#fabscan-pi-server">FabScan PI Server</a></li>
<li class="toctree-l3"><a href="#fabscan-pi-web-interface">FabScan PI Web Interface</a></li>
<li class="toctree-l3"><a href="#building-fabscanpi-images">Building FabScanPi Images</a></li>
</ul>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../contributing/">Contributing</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../community/">Community</a>
</li>
<li>
<li>
<li class="toctree-l1 ">
<a class="" href="../faq/">F.A.Q</a>
</li>
<li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">FabScanPi</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> &raquo;</li>
<li>Developing</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/mariolukas/FabScanPi-Server/edit/master/docs/developing.md"
class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h2 id="fabscan-pi-server">FabScan PI Server</h2>
<p>The FabScan PI server code is located in this repository. The folder src/www contains the latest version of the
FabScan PI web interface. </p>
<p>Install build dependencies with <code>apt-get install build-essential python-setuptools debhelper cdbs dh-python</code></p>
<p>Afterwards the deb files can be build by calling <code>make deb</code></p>
<h2 id="fabscan-pi-web-interface">FabScan PI Web Interface</h2>
<p>The FabScan PI Web Interface is included in the server package. Developers can find the current code at </p>
<p><a href="http://github.com/mariolukas/">http://github.com/mariolukas/</a></p>
<p>The web interface is located at /usr/local/fabscanpi-server/www/ </p>
<p>For further information have a look at the repository. </p>
<h2 id="building-fabscanpi-images">Building FabScanPi Images</h2>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../contributing/" class="btn btn-neutral float-right" title="Contributing">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../examples/" class="btn btn-neutral" title="Examples"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
<p>© Copyright 2015-2016, Mario Lukas</p>
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<a href="https://github.com/mariolukas/FabScanPi-Server" class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
<span><a href="../examples/" style="color: #fcfcfc;">&laquo; Previous</a></span>
<span style="margin-left: 15px"><a href="../contributing/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script src="../js/theme.js"></script>
<script src="../js/main.js"></script>
</body>
</html>

142
docs-theme/base.html Normal file
View file

@ -0,0 +1,142 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
{%- block site_meta %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if page and page.is_homepage %}<meta name="description" content="{{ config.site_description }}">{% endif %}
{% if config.site_author %}<meta name="author" content="{{ config.site_author }}">{% endif %}
{% if config.site_favicon %}<link rel="shortcut icon" href="{{ base_url }}/{{ config.site_favicon }}">
{% else %}<link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">{% endif %}
{%- endblock %}
{%- block htmltitle %}
<title>{% if page and page.title and not page.is_hompage %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>
{%- endblock %}
{%- block styles %}
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ base_url }}/css/theme.css" type="text/css" />
<link rel="stylesheet" href="{{ base_url }}/css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="{{ base_url }}/css/highlight.css">
{%- for path in extra_css %}
<link href="{{ path }}" rel="stylesheet">
{%- endfor %}
{%- endblock %}
{%- block libs %}
{% if page and page.title != 'News' %}
<script>
// Current page data
var mkdocs_page_name = {{ page.title|tojson|safe }};
var mkdocs_page_input_path = {{ page.input_path|tojson|safe }};
var mkdocs_page_url = {{ page.abs_url|tojson|safe }};
</script>
{% endif %}
<script src="{{ base_url }}/js/jquery-2.1.1.min.js"></script>
<script src="{{ base_url }}/js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="{{ base_url }}/js/highlight.pack.js"></script>
{% if page and page.title == 'Examples' %}
<script src="{{ base_url }}/js/three.js"></script>
<script src="{{ base_url }}/js/PLYLoader.js"></script>
{% endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
{%- block analytics %}
{% if config.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}');
ga('send', 'pageview');
</script>
{% endif %}
{%- endblock %}
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
{# SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
{%- block site_name %}
<a href="{{ nav.homepage.url }}" class="icon icon-home"> {{ config.site_name }}</a>
{%- endblock %}
{%- block search_button %}
{% include "searchbox.html" %}
{%- endblock %}
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{%- block site_nav %}
<ul class="current">
{% for nav_item in nav %}
<li>{% include "toc.html" %}<li>
{% endfor %}
</ul>
{%- endblock %}
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ nav.homepage.url }}">{{ config.site_name }}</a>
</nav>
{# PAGE CONTENT #}
<div class="wy-nav-content">
<div class="rst-content">
{% include "breadcrumbs.html" %}
<div role="main">
<div class="section">
{% block content %}
{{ page.content }}
{% endblock %}
{% if page and page.title == 'Examples' %}
{% include "scans.html" %}
{% endif %}
</div>
</div>
{%- block footer %}
{% include "footer.html" %}
{% endblock %}
</div>
</div>
</section>
</div>
{% include "versions.html" %}
{%- block scripts %}
<script src="{{ base_url }}/js/theme.js"></script>
{%- for path in extra_javascript %}
<script src="{{ path }}"></script>
{%- endfor %}
{%- endblock %}
</body>
</html>
{% if page and page.is_homepage %}
<!--
MkDocs version : {{ mkdocs_version }}
Build Date UTC : {{ build_date_utc }}
-->
{% endif %}

185
docs-theme/scans.html Normal file
View file

@ -0,0 +1,185 @@
<!-- Div which will hold the Output -->
<div id="WebGL-output">
<div id="loading-indicator">
<div class="sk-three-bounce">
<div class="sk-child sk-bounce1"></div>
<div class="sk-child sk-bounce2"></div>
<div class="sk-child sk-bounce3"></div>
</div>
</div>
</div>
<ul class="example-preview">
<li><img id="duck-example" src="../examples/duck/duck.png"><a href="../examples/duck/duck_pointcloud.ply">Download</a></li><!--
--><li><img id="bear-example" src="../examples/bear/bear.png"><a href="../examples/bear/bear_pointcloud.ply">Download</a></li><!--
--><li><img id="glue-stick-example" src="../examples/glue_stick/glue_stick.png"><a href="../examples/glue_stick/glue_stick_pointcloud.ply">Download</a></li><!--
--><li><img id="sculpture-example" src="../examples/sculpture/sculpture.png"><a href="../examples/sculpture/sculpture_pointcloud.ply">Download</a></li><!--
--><li><img id="seal-example" src="../examples/seal/seal.png"><a href="../examples/seal/seal_pointcloud.ply">Download</a></li>
</ul>
<!-- Javascript code that runs our Three.js examples -->
<script type="text/javascript">
var camera, cameraTarget, scene, renderer;
var cameraDistance = 150;
var loader;
var loadGeometry;
var model;
var indicator = $('#loading-indicator');
indicator.show();
init();
animate();
function init() {
container = document.getElementById( 'WebGL-output' );
camera = new THREE.PerspectiveCamera( 45, container.clientWidth / (container.clientWidth*0.6), 1, 2000 );
camera.position.set( cameraDistance, 0, 0 );
cameraTarget = new THREE.Vector3( 0, 0, 0 );
scene = new THREE.Scene();
scene.fog = new THREE.Fog( 0x72645b, 200, 600 );
// Ground
geometry = new THREE.CylinderGeometry( 70, 70, 2, 32 );
material = new THREE.MeshBasicMaterial( {color: 0xDEDEDE} );
turntable = new THREE.Mesh( geometry, material );
turntable.name = "turntable";
scene.add( turntable );
// PLY file
loader = new THREE.PLYLoader();
loader.useColor = true;
loader.colorsNeedUpdate = true;
loadGeometry = function ( geometry ) {
if(model) {
scene.remove(model);
}
var material = new THREE.PointsMaterial({
size: 2,
vertexColors : THREE.VertexColors
});
model = new THREE.Points(geometry, material);
model.rotateX(-Math.PI/2);
model.geometry.computeBoundingSphere();
model.geometry.computeBoundingBox();
camera.position.y = model.geometry.boundingSphere.center.z*1.2;
cameraTarget = new THREE.Vector3( 0, model.geometry.boundingSphere.center.z, 0 );
turntable.position.y = model.geometry.boundingBox.min.z-1;
scene.add( model );
indicator.hide();
};
// Lights
scene.add( new THREE.HemisphereLight( 0x443333, 0x111122 ) );
addShadowedLight( 1, 1, 1, 0xffffff, 1.35 );
addShadowedLight( 0.5, 1, -1, 0xffaa00, 1 );
// renderer
renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setClearColor( scene.fog.color );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( container.clientWidth, container.clientWidth*0.6 );
renderer.gammaInput = true;
renderer.gammaOutput = true;
renderer.shadowMap.enabled = true;
renderer.shadowMap.renderReverseSided = false;
container.appendChild( renderer.domElement );
// resize
window.addEventListener( 'resize', onWindowResize, false );
}
function addShadowedLight( x, y, z, color, intensity ) {
var directionalLight = new THREE.DirectionalLight( color, intensity );
directionalLight.position.set( x, y, z );
scene.add( directionalLight );
directionalLight.castShadow = true;
var d = 1;
directionalLight.shadow.camera.left = -d;
directionalLight.shadow.camera.right = d;
directionalLight.shadow.camera.top = d;
directionalLight.shadow.camera.bottom = -d;
directionalLight.shadow.camera.near = 1;
directionalLight.shadow.camera.far = 4;
directionalLight.shadow.mapSize.width = 1024;
directionalLight.shadow.mapSize.height = 1024;
directionalLight.shadow.bias = -0.005;
}
function onWindowResize() {
camera.aspect = container.clientWidth / (container.clientWidth*0.6) ;
camera.updateProjectionMatrix();
renderer.setSize( container.clientWidth, container.clientWidth*0.6 );
}
function animate() {
requestAnimationFrame( animate );
render();
}
function render() {
var timer = Date.now() * 0.0005;
camera.position.x = Math.sin( timer ) * cameraDistance;
camera.position.z = Math.cos( timer ) * cameraDistance;
camera.lookAt( cameraTarget );
renderer.render( scene, camera );
}
document.getElementById('duck-example').onclick=function() {
indicator.show();
loader.load( '../examples/duck/duck_pointcloud.ply', loadGeometry);
};
document.getElementById('bear-example').onclick=function() {
indicator.show();
loader.load( '../examples/bear/bear_pointcloud.ply', loadGeometry);
};
document.getElementById('glue-stick-example').onclick=function() {
indicator.show();
loader.load( '../examples/glue_stick/glue_stick_pointcloud.ply', loadGeometry);
};
document.getElementById('sculpture-example').onclick=function() {
indicator.show();
loader.load( '../examples/sculpture/sculpture_pointcloud.ply', loadGeometry);
};
document.getElementById('seal-example').onclick=function() {
indicator.show();
loader.load( '../examples/seal/seal_pointcloud.ply', loadGeometry);
};
loader.load( '../examples/duck/duck_pointcloud.ply', loadGeometry);
</script>

BIN
docs/.DS_Store vendored Normal file

Binary file not shown.

20
docs/community.md Normal file
View file

@ -0,0 +1,20 @@
#Slack
Use the FabScan Slack channel for direct messaging and chat communication.
This is the fastest way of getting support.
Signup here: [https://fabscan.signup.team](https://fabscan.signup.team)
Or write an email to:
info@fabscan.org with subject "add me to slack"
#Google Group
For general problems and information use the FabScan google group.
[https://groups.google.com/forum/#!forum/fabscan](https://groups.google.com/forum/#!forum/fabscan)
#Facebook
Like our Facebook Page.
[https://www.facebook.com/Fabscan](https://www.facebook.com/Fabscan/)
#Twitter
Tweets about FabScan can be found on Twitter.
[https://www.twitter.com/l_k3](https://www.twitter.com/l_k3)

142
docs/contributing.md Normal file
View file

@ -0,0 +1,142 @@
# Contributing to this project
Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.
Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.
## Using the issue tracker
The issue tracker is the preferred channel for [bug reports](#bugs),
[features requests](#features) and [submitting pull
requests](#pull-requests), but please respect the following restrictions:
* Please **do not** use the issue tracker for personal support requests (use
[FabScan Group](https://groups.google.com/forum/#!forum/fabscan) or [Slack](https://fabscan.slack.com/messages/general/)).
* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
<a name="bugs"></a>
## Bug reports
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
1. **Use the GitHub issue search** &mdash; check if the issue has already been
reported.
2. **Check if the issue has been fixed** &mdash; try to reproduce it using the
latest `master` or development branch in the repository.
3. **Isolate the problem** &mdash; create a [reduced test
case](http://css-tricks.com/reduced-test-cases/) and a live example.
A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What browser(s) and OS
experience the problem? What would you expect to be the outcome? All these
details will help people to fix any potential bugs.
Example:
> Short and descriptive example bug report title
>
> A summary of the issue and the browser/OS environment in which it occurs. If
> suitable, include the steps required to reproduce the bug.
>
> 1. This is the first step
> 2. This is the second step
> 3. Further steps, etc.
>
> `<url>` - a link to the reduced test case
>
> Any other information you want to share that is relevant to the issue being
> reported. This might include the lines of code that you have identified as
> causing the bug, and potential solutions (and your opinions on their
> merits).
<a name="features"></a>
## Feature requests
Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to *you* to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.
<a name="pull-requests"></a>
## Pull requests
Good pull requests - patches, improvements, new features - are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.
**Please ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different language),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project.
Please adhere to the coding conventions used throughout a project (indentation,
accurate comments, etc.) and any other requirements (such as test coverage).
Follow this process if you'd like your work considered for inclusion in the
project:
1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
and configure the remotes:
```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/<repo-name>
# Navigate to the newly cloned directory
cd <repo-name>
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/<upstream-owner>/<repo-name>
```
2. If you cloned a while ago, get the latest changes from upstream:
```bash
git checkout <dev-branch>
git pull upstream <dev-branch>
```
3. Create a new topic branch (off the main project development branch) to
contain your feature, change, or fix:
```bash
git checkout -b <topic-branch-name>
```
4. Commit your changes in logical chunks. Please adhere to these [git commit
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your code is unlikely be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
feature to tidy up your commits before making them public.
5. Locally merge (or rebase) the upstream development branch into your topic branch:
```bash
git pull [--rebase] upstream <dev-branch>
```
6. Push your topic branch up to your fork:
```bash
git push origin <topic-branch-name>
```
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description.
**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
license your work under the same license as that used by the project.

19
docs/developing.md Normal file
View file

@ -0,0 +1,19 @@
## FabScan PI Server
The FabScan PI server code is located in this repository. The folder src/www contains the latest version of the
FabScan PI web interface.
Install build dependencies with ```apt-get install build-essential python-setuptools debhelper cdbs dh-python```
Afterwards the deb files can be build by calling ```make deb```
## FabScan PI Web Interface
The FabScan PI Web Interface is included in the server package. Developers can find the current code at
[http://github.com/mariolukas/](http://github.com/mariolukas/)
The web interface is located at /usr/local/fabscanpi-server/www/
For further information have a look at the repository.
## Building FabScanPi Images

4
docs/examples.md Normal file
View file

@ -0,0 +1,4 @@
### Examples
Here are some examples of scans created with FabScanPi.
Additionally you can find the examples together with derived meshes as .STL files at [Github](https://github.com/mariolukas/FabScanPi-Server/tree/master/docs/examples).

19
docs/examples/README.md Normal file
View file

@ -0,0 +1,19 @@
# FabScan PI - Sample Scans
This folder contains some sample scans made with the FabScan Pi.
![Rubber Duck](/docs/examples/duck/duck_icon.png)
duck - the famous fabscan rubber duck
![Fabscan Bear](/docs/examples/bear/bear_icon.png)
bear - the famous fabscan bear
![Seal Toy](/docs/examples/seal/seal_icon.png)
seal - a rubber seal toy
![Glue Stick](/docs/examples/glue_stick/glue_stick_icon.png)
glue_stick - a red glue stick, typically used for 3D printing
![sculpture](/docs/examples/sculpture/sculpture_icon.png)
sculpture - a sculpture head which was made of plaster

View file

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View file

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 131 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

422
docs/faq.md Normal file
View file

@ -0,0 +1,422 @@
**[Software](#software)**
**[Hardware](#hardware)**
**[Scanning Issues](#scanningIssues)**
**[Other](#other)**
------
# Software<a name="software"></a>
- **What username and password do I need for login the FabScanPi?**
The username / password is the same as in the standard raspbian configuration:
Username: **pi** <br/>
Password: **raspberry**
- **Do I have to perform the calibration every time when I restart my FabScanPi?**
No, the calibration data will be stored. We recommend to perform a calibration every time when the FabScanPi has been shipped, modified or the scan results show signs of deformation.
- **The calibrations fails every time. What can I do?**
The laser and the LED-light are needed for the calibration, they must be installed and be able to work. Make sure the box is closed during calibration so that no external light can cause problems.
- **Where can I find the calibration file?**
You can find it in the folder: ```/etc/fabscanpi```
The config file is named : ```default.config.json```
- **Where can I find the initial settings of the LED-light, Camera brightness, contrast and saturation?**
You can find it in the folder: ```/etc/fabscanpi```
The config file is named : ```default.settings.json```
- **Where can I find the log file?**
You can find it in the folder: ```/var/log/fabscanpi```
The config file is named : ```fabscanpi.log```
- **How can I view the log file?**
You can see the log file on screen by typing:
cat /var/log/fabscanpi/fabscanpi.log
- **How can I edit the log file?**
You can edit the log file with the nano editor by typing:
sudo nano /var/log/fabscanpi/fabscanpi.log
To save the file press "Ctrl+O" followed by "enter".
To exit the nano editor press "Ctrl+X".
- **How can I stop / start the FabScanPi server?**
You can stop the server from the console by typing:
sudo /etc/init.d/fabscanpi-server stop
or to (re) start:
sudo /etc/init.d/fabscanpi-server stop
- **How can I use the latest (probably unstable) software?**
You must edit the repository settings in the sources list in the console by typing:
```sudo nano /etc/apt/sources.list```
Add a new line to the sources.list that it looks exactly like this:
```deb http://archive.fabscan.org/ testing main```
Add a hash sign (#) in front of the already existing 'fabscan.archive.org' line so that it looks like:
```# deb http://archive.fabscan.org/ jessie main```
or
```# deb http://archive.fabscan.org/ stable main```
INFO: The '#' disables the packet sources in the line
![Reboot](images/SourcesList.jpg)
NOTE: In newer images the entry is called ```stable``` instead of ```jessie```
This will change the update source to the testing directory.
NOTE: To switch back to the official release you need to remove the # from the 2nd line and place it in front of the 3rd line.
To save your changes press CTRL + O, then ENTER and exit with CTRL + X
Now do an update and dist-upgrade:
$ sudo apt-get update
$ sudo apt-get dist-upgrade
Finally you should reboot the FabScanPi:
$ sudo reboot now
Alternatively you can switch off - switch on your FabScanPi
NOTE: Now you will use the testing data source. Because it is not officially released there will be NO SUPPORT for this version.
- **How can I switch back to an older version (stable) of the software?**
You must know the number of the older version you want to step back to (e.g.: 0.4.0-b373) :
Open a console (or remote ssh-console).
Type in: ```sudo apt-get install fabscanpi-server=0.4.0-b373```
Follow the questions in the installation procedure and finally restart the FabScanPi again.
NOTE: Please make sure you selected the correct packet source in the ``` /etc/apt/sources.list```
# Hardware<a name="hardware"></a>
- **What power source(s) do I need to get my FabScanPi working?**
The FabScanPi will need 12V DC and 5V DC. There are different options to fulfil this requirement:
**Option A:** Connect 12V DC to the HAT (round connector) and install a 12V DC - to - 5V DC regulator on the designated space on the HAT.
NOTE: For details and specifications please consult the hardware chapter.
**Option B:** Connect 12V DC to the HAT (round connector) and 5V DC to the raspberry (micro USB connector).
NOTE: Make sure you switch on the both power sources at the same time to avoid software trouble.
**Option C:** Connect 12V DC to the HAT (round connector) and connect a 5V DC power source to the 5V pin regulator pin on the HAT.
NOTE: For details and specifications please consult the hardware chapter.
- **What is the rotating direction of the scan table?**
It should move clockwise if not please consult the hardware chapter of our documentation and check the connection of your stepper.
- **Which camera will work?**
FabScan Pi can be built with both Raspberry Pi Camera Modules V 1.x or V 2.x.
- **I have a Raspberry Cam Module with NoIR. Can I use it?**
Theres no advantage in using the NoIR cam. The algorithms for the laser detection are made for the normal cam. Therefore we recommend to use the normal camera modules.
- **Is the LED-Ring / PCB-board with LEDs mandatory?**
Yes, because the light is needed to perform the calibration. It is also necessary to archive good quality texture scans.
- **Which LED-ring is compatible?**
Any ring using WS2812B LEDs (or compatible) will do. To avoid problems with the calibration we suggest using the FabScanPi LED-board.
- **My servo stepper / servo isn't working**
There is no implementation for the servo/stepper to move the laser until now.
- **No connection to Arduino, how can i fix that?**
When your FabScanPi-Server version is 0.5.0 and your avrdude version is Version 6.3-20171130 ( check for version with avrdude -v )
then edit the file `/usr/bin/avrdude-autoreset` and replace all `avrdude-original` with `avrdude`. Upgrade to the newest FabScanpi-Server
version >= 0.6.0 and you are done. After a restart it should work like usual.
Keep in mind that it is more recommended to use the newest version of the image which will include a working fix.
First you need to find out more about the problem. Have a look to the log file (see "How can i view the log file?" in F.A.Q.).
Find the section where the init sequence of the server starts. Look for the folowing line ...
```
fabscan.server - INFO - FabScanPi-Server 0.4.2
```
If the next lines look like the the debug output below, the fabscanpi-server is not able to flash the firmware
to the FabScanPi-HAT (or Arduino).
fabscan.scanner.laserscanner.FSSerial - ERROR - No FabScanPi HAT or compatible device found on port /dev/ttyAMA0
fabscan.scanner.laserscanner.FSSerial - ERROR - Fatal FabScanPi HAT or compatible connection error....
fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Reset FabScanPi HAT...
fabscan.scanner.laserscanner.FSSerial - ERROR - 'NoneType' object has no attribute 'write'
fabscan.scanner.laserscanner.FSSerial - DEBUG - 'NoneType' object has no attribute 'readline'
fabscan.scanner.laserscanner.FSSerial - ERROR - 'NoneType' object has no attribute 'write'
If this error occurs by the first run please start reading with 1. In case this error occurs after an fabscanpi-server update
and your software worked before, continue reading with 2.
----
1. First double check the solder joints of the 40-pin Header of the FabScanPi-HAT. If you are sure that there are no 'cold' solder joints move on
reading, otherwise resolder those joints. Try again and have a look to the logs. If the error still occurs continue reading with 3.
2. Check if your fabscanpi-server version is 0.4.2 or higher. Have a look into your default.config.json and check the serial baudrate. It should be 57600 for fabscanpi-server >= 0.4.2.
If you changed the baudrate and the error still occurs continue with reading 3.
3. Your bootloader is bricked, what means that you need to flash a new bootloader to your FabScanPi HAT. Continue with reading "How to flash the FabScanPi HAT Bootloader?"
----
- **How to flash the FabScanPi HAT Bootloader?**
**Option A: Using Raspberry Pi for flashing.**
Connect the FabScanPi HAT pins as described below. (solder some wires to the solder pads). Use a resistor 2k2...5k6 in series for every signal. (see picture for details)
```
RPi -> Target
IO25 -> Reset
IO11 -> SCK
IO10 -> MOSI
IO9 -> MISO
GND -> GND
```
>![drawing_400](images/isp_pi_hat.png)
> Download bootloader:
$ wget https://github.com/watterott/RPi-UNO-HAT/raw/master/docs/bloader.hex
Edit the file ```avrdude.conf``` and add the following lines:
$ sudo nano /usr/local/etc/avrdude.conf
programmer
id = "pi_isp";
desc = "GPIO bitbang";
type = "linuxgpio";
reset = 25;
sck = 11;
mosi = 10;
miso = 9;
;
Flash bootloader:
$ avrdude -c pi_isp -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m
**Option B: Using Arduino Uno (device ```ttyACM0``` or ```ttyUSB0```) for flashing.**
Connection (Arduino Uno connected to RPi via USB):
```
Uno -> Target
D10 -> Reset
D13 -> SCK
D11 -> MOSI
D12 -> MISO
GND -> GND
```
![drawing_400](images/isp_arduino_hat.png)
Download bootloader and ISP firmware:
$ wget https://github.com/watterott/RPi-UNO-HAT/raw/master/docs/bloader.hex
$ wget https://github.com/watterott/RPi-UNO-HAT/raw/master/docs/isp.hex
Flash ISP firmware to Arduino Uno:
$ avrdude -c arduino -P /dev/ttyUSB0 -b 115200 -p m328p -e -U flash:w:isp.hex:i
or
$ avrdude -c arduino -P /dev/ttyACM0 -b 115200 -p m328p -e -U flash:w:isp.hex:i
Flash bootloader:
$ avrdude -c stk500v1 -P /dev/ttyUSB0 -b 19200 -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m
or
$ avrdude -c stk500v1 -P /dev/ttyACM0 -b 19200 -p m328p -e -U flash:w:bloader.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD6:m -U efuse:w:0x05:m -U lock:w:0x0F:m
#### Scanning issues<a name="scanningIssues"></a>
- **My scan looks like a cylinder**
|![drawing_400](images/problem_2.png) | ![drawing_400](images/problem_2b.png) |
|---|---|
| This is the object. | This is the scan. |
The problem occurs when the laser is not aligned vertically. The following pictures show
the disalignment (blue) and how it should be aligned (red).
|![drawing_400](images/problem_2c.png) | ![drawing_400](images/problem_2d.png) |
|---|---|
| Disaligned Laser line | Aligned Laser line. |
The solution for this problem is turning the laser module as long as the line hits
the back wall of the scanner vertically. Be sure that the laser also passes the center
of the turntable ( this can be reached by turning the laser mount)
- **My scan looks doubled**
|![drawing_400](images/problem_1.png) | ![drawing_400](images/problem_1b.png) |
|---|---|
| This is the object. | This is the scan. The scan looks double. |
In this case check the label on your motor. Since the end of 2017 the stepper motor has 400
steps per full turn. The default config is set to 16x 400 = 6400 steps. If the scan looks like
on the picture, change the motor steps in the default config to 3200.
"turntable": {
"steps": 3200,
"radius": 70
}
| ![drawing_200](images/motor_1.png) | ![drawing_200](images/motor_2.png) |
|---|---|
| Motor with 400 steps. | Motor with 200 steps. |
- **The turntable is jerking during the scan process what can I do?**
This behavior is quite normal because every time a new image has been shot the table just moves to the next position. If the table is turning smoothly (clockwise) during scan preview everything should be fine.
- **My scan is cut-off on top and / or bottom. What can I do?**
Try to optimize your scan results by measuring the "origin_distance" of your calibration sheet. Correct the value in the configuration. Make sure the size of the black squares on your calibration sheet as the same as "square_size" in the calibration file.
- **The texture scan is mirror-inverted.**
Check the rotating direction of your turntable (and the connection of the stepper motor). Check and adjust your config-settings for the “dimension”-value.
- **The laser cannot be detected.**
Make sure your laser adjustment is correct. The laser must pass the scanning table right through the center. If no object is on the table the laser should be visible in the preview image (on the rear wall close to the left border of the image).
- **The scans dont have the same shape as the original.**
Check if your laser is aligned in vertical direction. Do another calibration.
- **Calibrations fails / no "Calibration finished" message is displayed**
Check the starting position of the calibration sheet and make sure your box is closed during the scan. The calibration sheet must be placed with a black square in the upper left corner.
#### Other<a name="other"></a>
tbd.

357
docs/hardware.md Normal file
View file

@ -0,0 +1,357 @@
#Bill of Materials
- Raspberry Pi 2 or Raspberry Pi 3
- [Stepper Motor, NEMA 17 type, 1.8° step angle (200 steps/revolution)](http://www.watterott.com/en/Stepper-Motor-Unipolar/Bipolar-200-Steps/Rev-42x48mm-4V-1200mA)
- [Pololu Universal Aluminum Mounting Hub for 5mm Shaft](http://www.watterott.com/en/Pololu-Universal-Aluminum-Mounting-Hub-for-5mm-Shaft-M3-Holes-2-Pack)
- Motor driver ([Silent Step Stick](http://www.watterott.com/en/SilentStepStick-with-Pins) recommended)
- [5V red line laser module](http://www.watterott.com/en/5mW-Laser-Module-emitter-Red-Line)
- [9g Servo Motor](http://www.watterott.com/en/Servo-HS-53) (not supported by the software now)
- [FabScanPi HAT](http://www.watterott.com/en/RPi-FabScan-HAT) for Raspberry Pi
- [12V to 5V switching regulator](http://www.watterott.com/de/CUI-V7805-2000-StepDown-5V/2A)
- [Raspberry Pi camera V2](http://www.watterott.com/en/Raspberry-Pi-Camera-v2)
- [Raspberry Pi Camera Connection Cable - 50cm](http://www.watterott.com/en/Raspberry-Pi-Camera-Connection-Cable-50cm)
- [FabScanPi Camera Mount](http://www.watterott.com/index.php?page=product&info=4930) with LED ring
- [FaBScanPi Case](http://www.watterott.com/en/FabScan-Pi-Housing-Parts)
- [Screw Set](http://www.watterott.com/en/FabScan-Pi-Screw-Set) or see the [Screws and Washers](#screws-and-washers) table
- [1x 12V / 2A power supply](http://www.watterott.com/en/Power-Supply-12V-2A)
#How to Assemble the Cabinet
The laser cut files can be found at [https://github.com/mariolukas/FabScan-Case](https://github.com/mariolukas/FabScan-Case)
![drawing_200](images/FabScanPI_closed.jpg)
![drawing_200](images/FabScanPi_opened.jpg)
<iframe width="560" height="315" src="https://www.youtube.com/embed/W9KgYL7sZN0" frameborder="0" allowfullscreen></iframe>
#The FabScanPi HAT
**General description**
The FabScan HAT is basically a combination of an [Arduino](https://www.arduino.cc/) and the old
[FabScan Shield](https://github.com/watterott/FabScan-Shield) for [Arduino](https://www.arduino.cc/). It provides all connectors for the hardware
parts (like motors, servos, lasers, LED's etc.) Instead of an USB
connection to the Raspberry Pi, the HAT is attached on the Pi's pinheaders.
The HAT communicates over a serial connection with the Rasperry Pi.
(GPIO14 and GPIO15 of the Raspberry Pi). The firmware and also updates are
flashed automatically by the FabscanPi-Server application.
![drawing_400](images/fabscanpihat.png)
**How to assemble the FabScanPi HAT**
* * *
_About soldering_
_If you are soldering for the very fist time, we suggest to read the comic ["Soldering is Easy"](https://mightyohm.com/files/soldercomic/FullSolderComic_EN.pdf) by Mitch Altman (soldering wisdom), Andie Nordgren (comic adaption) and Jeff Keyzer (layout and editing)._
* * *
<iframe width="560" height="315" src="https://www.youtube.com/embed/DogfNxk277Y" frameborder="0" allowfullscreen></iframe>
The FabScanPi HAT will be delivered with the main components already assembled. You only need to install the headers and connectors which fit your demand.
![drawing_400](images\hat_assembly_1.jpg)
Let's start with the female 8-pin headers for the stepper motor controllers. First the two headers which are designated with "Stepper Turn Table". Put one in and flip the pcb to solder the pins on the rear side. Solder one pin first and make sure the header is still in the correct position. A "third hand" tool or a pcb-holder are very helpful for this job.
Now you can select between three options
- **Option A:** Two stepper motor ports for the laser adjustment or
- **Option B:** Two servo connector ports for the laser adjustment or
- **Option C:** Two stepper and two servo connector ports for the lasers (additional headers required)
**Option A:**
Use the remaining four 8-pin femal pin headers and install them on the pcb. You can now use the HAT with three stepper motors (1x turn table, 2x laser control)
![drawing_400](images\hat_assembly_2a.jpg)
**Option B:**
Use an electronics wire cutter to cut off two 3-pin male headers from the long male-header. Put them into the pinholes labeled "Servo opt." You can now use the HAT with one stepper motors (1x turn table) and two servos (2x servo opt.).
![drawing_400](images\hat_assembly_2.jpg)
**Option C:**
If you are unsure about using servos or stepper motors you can install both. Therefore you'll need to buy four 8-pin female headers which are at least 8 mm of height. Install them at the pinholes for the "Stepper Laser 1 and 2". Also cut off two 3-pin male headers from the long male-header. Put them into the pinholes labeled "Servo opt." Now you can use either servo controllers nor the connectors for the servos.
![drawing_400](images\hat_assembly_2b.jpg)
**Connector for the LED-Ring**
The next connector is the JST connector for the RPi-RingLight. Make sure the direction is correct. Fix it and solder the three pins on the rear side of the PCB.
![drawing_400](images\hat_assembly_3.jpg)
The pins of the JST connector on the HAT have the following configuration:
![drawing_400](images\JST-HAT-Configuration.jpg)
**Connectors for the stepper motors**
Here you can use the three 4-port screw terminals if your stepper cables have no connector plug.
![drawing_400](images\hat_assembly_4.jpg)
If the stepper motor cables have an 4-pin female connector you can use three 4-pin male headers (to be cutted off from the long header).
![drawing_400](images\hat_assembly_4a.jpg)
**Connector for Laser(s) and Laser safety switch**
The next connector to be installed is the 6-port screw terminal. It must be soldered into the corresponding pin holes between the JST connector and the 8-pin female header for the table stepper. Later this 6-port terminal will be used to connect the Laser(s) and the Laser safety switch.
![drawing_400](images\hat_assembly_5.jpg)
**Power Connector** (DC- jack)
Now the DC-jack power connector will be installed into three oval pin holes across from the 2x20-pin socket header. Soldering is done from the top side of the PCB.
![drawing_400](images\RPi-FabScan-HAT13.jpg)
**Assembling the Raspberry-Pi Connector**
Now the 2x20-pin socket connector must be installed from the rear side of the PCB (where we only did soldering till now). Soldering of the 2x20-pin connector is done on the front side (where all our parts are placed). This connector is used as interface for the Raspberry-Pi.
![drawing_400](images\hat_assembly_7.jpg)
**ATTENTION:** The power connector in the image above image is soldered in an alternative way. The recommended way is shown in the second last image.
The center pin is for +12V DC, the outer connector tongue is for GND.
![drawing_400](images\Power_Connector_HAT.jpg)
**Mount the 5V DC/DC converter or 5V external Power Source**
Additionally to the 12V DC coming from the power supply the FabScanPi needs 5V DC. Now you have to decide if you want to use a DC/DC converter IC which generates the 5V out of the 12V from the external 12 power supply (common solution).
For the DC/DC converter option you can find further instructions and pictures on the [Watterott electronic website](https://github.com/watterott/RPi-FabScan-HAT/blob/master/hardware/RPi-FabScan-HAT_Assembly.pdf).
If you are using another power supply which is capable of delivering 12V and 5V DC you can connect it as well. Details can be found [here](#5V-EXT).
#Connecting the Stepper Motor(s)
There are different kinds of stepper motos. Mostly with 4 or 6 leads. For
connecting the stepper motor to the FabScanPi HAT you need to know the
corresponding lead pairs of the motor coils. The best way to find out something
about the motor is to have a look at the datasheet of the motor manufacturer.
In the following desciptions the pairs are called (2B, 1B) and (1A, 2A).
![drawing_300](images/4wires.jpg)
![drawing_300](images/6wires.jpg)
There are several ways to find the pair wires without a datasheet. Some of them
are described here:
**Method with an ohm-meter**
Simply measure pairs of wires for their resistance. If the resistance is a few ohms
( < 100 Ω) only, you've found a pair. The other two wires should make up the other pair.
**Methods without an ohm-meter**
First, try turning the motor with your fingers, and notice how hard it is. Then,
stick wires together in pairs. If the motor turns noticeable harder, you've found a pair.
Another method is to use an LED, hold any two wires to the ends of a LED and turn the
motor (twiddle in both directions), the LED will light if the wires are a pair,
swap wires until you light the LED.
![drawing_400](images/hat_wires.jpg)
#Connecting the Lasers
The FabScanPi HAT provides connectors for two lasers. But only one laser
is supported until now. Connect your laser to the connectors labeled
with ...
![drawing_450](images/laser_connection.jpg)
**Safety switch**
There is the possibility to add a laser safety switch which disables the laser
when the lid is opened. The FabScanPi HAT provides a connector for such a switch.
If you don't need a switch you still have to bridge this connector with
a cable to get the lasers work. (left image: with bridged connector,
right image: connecting a switch)
![test](images/laser_safety.jpg)
![test](images/laser_safety_switch.jpg)
#Connecting the Motor drivers
TODO
#Connecting the Power Supply
The FabScanPi will need 12V DC and 5V DC. There are different options to fulfil this requirement:
**Option A: ** (recommended)
Connect 12V DC to the HAT (round connector) and install a 12V DC - to - 5V DC regulator on the designated space on the HAT. Make sure the 5V power regulator can provide a current of min. 2.0A
for 1 turntable stepper motor, 1 PiCam and 1 laser.
![drawing_400](images/fabscanpihat_12to5.png)
| Pin label | Description |
| -------------- | ---------------------------------------- |
| Inp. | 12V from HAT as input for regulator |
| (white square) | Ground (GND) |
| 5V | 5V output from regulator to FabScanPi HAT |
For the DC/DC converter option you can find further instructions and pictures on the [Watterott electronic website](https://learn.watterott.com/fabscan/hat_assembly.pdf).
NOTE: For the final stage of constuction a more powerful power supply is needed. At the moment there are no technical specifications available.
**Option B:**
Connect 12V DC to the HAT (round connector) and 5V DC to the raspberry (micro USB connector).
NOTE: Make sure you switch on the both power sources at the same time to avoid software trouble.
**Option C:**<a name="5V-EXT"></a>
Connect 12V DC to the HAT (round connector) and connect a 5V DC power source to the 5V pin regulator pin on the HAT. Make sure the 5V power source can provide a current of min. 2.0A for
1 turntable stepper motor, 1 PiCam and 1 laser.
![drawing_400](images/fabscanpihat_5V.png)
| Pin label | Description |
| -------------- | ------------------------------------ |
| (white square) | Ground (GND) |
| 5V | Output from external 5V power source |
NOTE: For the final stage of constuction a more powerful power supply is needed. At the moment there are no technical specifications available. Make sure you switch on the both power sources at the same time to avoid software trouble.
#Connecting the LED Ring
This small manual will help you to assemble the Camera and LED ring combination. You will need a light if you want to perform texture scans (Check mark is set for Color Scan).
![drawing_400](images/RingLicht_1.jpg)
This is how it should look like if you finished the assembly.
The Ring-Light will include the parts you can see in the next picture below (the camera modul is sold separately):
![drawing_400](images/RingLicht_1b.jpg)
IMPORTANT: You will need the standard camera modul (which has a green pcb). The module used in the pictures is the IR version which has the same dimensions but different optical specifications.
Step 1: Slide one end of the flat ribbon cable into the connector of the camera module (1). Make sure the blue plastic is on the side facing away from the camera. Push the lock bar of the connector gently into the lock position (2).
![drawing_400](images/RingLicht_2.jpg)
Step 2: Merge the flat ribbon cable through the elongated hole in the LED board.
![drawing_400](images/RingLicht_3.jpg)
Step 3: Put the four Screws through the holes in the camera board. The heads must be on the side where the lens is situated. Then put a spacer on every screw (as shown in the next picture).
![drawing_400](images/RingLicht_4.jpg)
Step 4: Put the Camera modul on the LED board. All four screws must fit the appropriate hole. This can be a bit tricky but it is doable.
![drawing_400](images/RingLicht_5.jpg)
Step 5: Put a nut on each screw an pull them hand-tight.
![drawing_400](images/RingLicht_6.jpg)
Now the Camera-LED assembly is ready for installation.
The pins of the JST connector on the LED board have the following configuration:
![drawing_400](images/JST-LEDboard-Configuration.jpg)
#Additional Motors for the Lasers
TODO
#Screws and Washers
Even if you use the screw set from Watterott, as given in the *BOM*, here is the the usage reference:
**Screws**
| Type | Length | Qty | Usage |
| ---- | ------ | ---- | ----------------------- |
| M2 | 16 | 2 | Servo Hitec-HS53 |
| | | 2 | Security Switch |
| | | 1 | 5mW line Laser red |
| M2.5 | 15 | 4 | RaspberryPi |
| M3 | 10 | 4 | Stepper motor |
| | | 4 | RPi-RingLight |
| | | 4 | Turn-table Mounting Hub |
**Washers**
| Type | Heigth | Qty | Usage |
| ------- | ------ | ---- | ------------- |
| 3.4/4.5 | 1 | 4 | Stepper motor |
| 2.5/4.5 | 3 | 4 | RaspberryPi |

BIN
docs/images/.DS_Store vendored Normal file

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View file

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB

View file

Before

Width:  |  Height:  |  Size: 633 KiB

After

Width:  |  Height:  |  Size: 633 KiB

View file

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View file

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View file

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 347 KiB

After

Width:  |  Height:  |  Size: 347 KiB

View file

Before

Width:  |  Height:  |  Size: 6.7 MiB

After

Width:  |  Height:  |  Size: 6.7 MiB

View file

Before

Width:  |  Height:  |  Size: 7.2 MiB

After

Width:  |  Height:  |  Size: 7.2 MiB

View file

Before

Width:  |  Height:  |  Size: 4.5 MiB

After

Width:  |  Height:  |  Size: 4.5 MiB

View file

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 5.2 MiB

View file

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 5.2 MiB

View file

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View file

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

View file

Before

Width:  |  Height:  |  Size: 5.4 MiB

After

Width:  |  Height:  |  Size: 5.4 MiB

View file

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 5.5 MiB

View file

Before

Width:  |  Height:  |  Size: 6.9 MiB

After

Width:  |  Height:  |  Size: 6.9 MiB

View file

Before

Width:  |  Height:  |  Size: 4 MiB

After

Width:  |  Height:  |  Size: 4 MiB

View file

Before

Width:  |  Height:  |  Size: 4.6 MiB

After

Width:  |  Height:  |  Size: 4.6 MiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View file

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View file

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 372 KiB

After

Width:  |  Height:  |  Size: 372 KiB

Some files were not shown because too many files have changed in this diff Show more