Coder Social home page Coder Social logo

protractr's Introduction

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.

protractr's People

Contributors

n-wach avatar dependabot[bot] avatar pconrad avatar

Stargazers

 avatar Adam Vaizman avatar Devamardeep Hayatpur avatar Sabreen Mehvish avatar  avatar Michael Geiger avatar Javier Vizoso avatar Jeff Carpenter avatar Mr zhan avatar Rayan Makhmutov avatar Hannah Twigg-Smith avatar Jarad Olson avatar  avatar Norbert Pozsonyi avatar koch avatar  avatar Austin Whittier avatar Ebbe Steenhoudt avatar  avatar ZOS avatar Jiří Hon avatar Numeralz avatar Bai Xv avatar iamnotstone avatar Marc Bartels avatar  avatar Wolf Vollprecht avatar  avatar Bao avatar Faiz Surani avatar Stéphane Mor avatar Ganesh Sankaran avatar  avatar  avatar  avatar asdass avatar  avatar  avatar farmer avatar Narahari Rao avatar  avatar Winson avatar Simon avatar  avatar  avatar  avatar Joe Geldart avatar Gáspár Körtesi avatar Joachim Wester avatar Joseph Sullivan avatar  avatar

Watchers

James Cloos avatar  avatar

protractr's Issues

Nice work! Question?

I've written geometric constraint solvers in the past and this looks like a great start. I was curious how exactly the constraint solver works. I looked through the codebase and it sort of reminds me of the Overveld relaxation method. Looks like maybe you did this as a student project. Did you happen to do a write up by any chance?

Consider giving user more feedback on the constraints

Currently, hovering over a constraint gives the user only feedback by highlighting points.

Consider differentiating different types of constraints, and providing richer feedback to the user so that they can understand better what is happening

Consider clarifying some use cases.

For now, the focus seems to be on implementing features because you can.

Think about it from the standpoint of "why".

That is, what is a case of a piece of art, or a diagram that I want to draw, (whether artistic or scientific, or explanatory, whatever... ) where I would want each of the constraints you are building, and then, perhaps make a video where you say: Here's my finished product. Now let me show you step by step, how I constructed it and how, in the course of that, I used each of the tools in my toolbox.

If it isn't possible to come up with a "The quick brown fox jumped over the lazy dog" type of diagram, then make it two or three different diagrams. But the challenge is to see if you can cover a use case for each of the constraints.

Why? Because I think getting inside the head of the user will help you understand how to better design the UI/UX and also how to prioritize the different features you might add, whether new constraints, ui improvements, whatever...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.