Skip to content

n-wach/protractr

Repository files navigation

protractr

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

Structure and Documenation

View the docs!

Protractr is composed of two main modules:

  • gcs is used to describe and solve geometric sketches, which are composed of figures and relations.
  • ui displays the current sketch and allows a user to modify it

Contributing

To get started:

  1. Clone this repo, and cd into it

  2. Run npm install

  3. Make changes to the TypeScript source. This should be done under the scripts directory.

  4. To test your changes, run:

    npm run build
    

    You should then see that the file dist/bundle.js has been created/updated. This is a single JavaScript file combining all the compiled TypeScript. To view your changes, open index.html in a browser.

  5. To make a new release on Github Pages, first commit all local changes. Then run release.sh. This will recompile dist/bundle.js, as well as generate the docs. Then, the changes will be moved to the gh-pages branch and pushed to Github.