├── .github
└── ISSUE_TEMPLATE
│ ├── bug-typo-report.md
│ └── feature_request.md
├── .gitignore
├── AppletScreenshot.png
├── LICENSE.txt
├── PULL_REQUEST_TEMPLATE.md
├── README.md
├── exportedRuler_example.svg
├── index.html
├── paper-full.js
├── rulerGenerator.js
└── style.css
/.github/ISSUE_TEMPLATE/bug-typo-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug/Typo report
3 | about: Create a report to help us improve
4 | title: "[BUG/TYPO] Bug/Typo title"
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug/typo is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behaviour:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behaviour**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information if applicable):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information if applicable):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[FEATURE REQUEST] Feature request title"
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 |
--------------------------------------------------------------------------------
/AppletScreenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Robbbb/VectorRuler/d3f2ca8a7641e53a2e93b26c9244b9b5903de8e0/AppletScreenshot.png
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Robb Godshaw
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | - [ ] I confirm that all the content in this pull request is original work and I am the original author
2 | - [ ] I have nothing that prevents me from submitting this work (like a clause in a work contract)
3 | - [ ] I understand that the work I am submitting will be released under the terms of the licence of this repository
4 | - [ ] I have double-checked all of the above and checked the tick-boxes
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | VectorRuler
2 | ===========
3 | [
4 | ](http://robbbb.github.io/VectorRuler/)
5 |
6 | A Javascript-based generator of laser cutter friendly etchable rulers
7 | ### Features
8 | + **SVG** Genrates fully vector based rulers ready for laser-etching, printing, plotting, or CAD applications
9 | + Similar lines are grouped as labeled SVG layers when opened in Adobe Illustrator or Inkscape.
10 | + Each line is labeled by its resolution and number as an SVG object
11 | + Code is well-commented and sylistically sound allowing for easy modifications and pull requests
12 | + Uses [Paper.js](http://paperjs.org/) for drawing and export
13 | + I referenced the [excellent SVG export example here](http://paperjs.org/features/#svg-import-and-export)
14 | + The default font is not ideal for laser cutting, as it is not a true [single-line font.](https://www.google.com/search?q=single+line+font&oq=single+line+font&aqs=chrome..69i57j69i60j69i65j69i59j69i61j69i60.2077j0j7&sourceid=chrome&es_sm=91&ie=UTF-8)
15 | + The text is editable as text, so it can easily be changed in Illustrator or Inkscape.
16 |
17 |
18 | Viewing the very well organized document tree of an exported ruler in Illustrator:
19 |
20 | + Open the [Layers] Palette (Window > Layers)
21 | + click the [ ►Layer 1] arrow to view its children
22 | + There will be a group for each tick level (1"in, ½:"in, ¼"in, ⅛"in... or 1cm. 0.1cm, 0.01cm...)▼
23 | + All the labels can easily be changed in terms of size or font
24 |
25 | ### Contributing
26 | Pull requests, corrections, translations & fixes are welcome. Any contributions must be submitted under the same license as the original piece of work (see below). Take a look at any open issues or submit new ones if there is something that needs to be fixed or added.
27 |
28 | Watch this video on how to contribute to open source for a complete overview -> https://www.youtube.com/watch?v=UWA4wyacY2A
29 |
30 | ### License
31 | Unless otherwise specified, everything in this repository is covered by the following licence:
32 |
33 | Content is available under the [MIT license](https://github.com/Robbbb/VectorRuler/blob/master/LICENSE.txt).
34 |
--------------------------------------------------------------------------------
/exportedRuler_example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |