A constraint-based 2D Sketching tool - View on Github Pages
Functionality is planned to match basic Solidworks sketches containing Points, Lines, Circles, and Arcs. Most of Solidworks' relations are currently supported, with the remaining to be implemented soon.
Examples:
Supported relations
- Horizontal
- Vertical
- Colinear
- Tangent Line
- Tangent Circle
- Concentric
- Midpoint
- Intersection
- Coincident on Point
- Coincident on Line
- Coincident on Circle
- Radius Equal
- Line Length Equal
Missing relations
- Perpendicular
- Parallel
- Fix / Lock Entity
Protractr is composed of two main modules:
gcsis used to describe and solve geometric sketches, which are composed of figures and relations.uidisplays the current sketch and allows a user to modify it
To get started:
-
Clone this repo, and
cdinto it -
Run
npm install -
Make changes to the TypeScript source. This should be done under the
scriptsdirectory. -
To test your changes, run:
npm run buildYou should then see that the file
dist/bundle.jshas been created/updated. This is a single JavaScript file combining all the compiled TypeScript. To view your changes, openindex.htmlin a browser. -
To make a new release on Github Pages, first commit all local changes. Then run
release.sh. This will recompiledist/bundle.js, as well as generate the docs. Then, the changes will be moved to thegh-pagesbranch and pushed to Github.