GithubHelp home page GithubHelp logo

machineagency / machine-o-matic Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 13.89 MB

Explore the design space of modular fabrication machines

HTML 0.10% JavaScript 78.69% CSS 0.13% Scala 0.27% Python 11.27% C++ 5.81% Makefile 2.64% Roff 0.05% Processing 0.01% C 0.69% Shell 0.34% TypeScript 0.01%

machine-o-matic's Introduction

machine-o-matic

Explore the design space of modular fabrication machines

machine-o-matic's People

Contributors

jhaazpr avatar

Stargazers

 avatar

machine-o-matic's Issues

Establish interface over ThreeJS and DOM

Do this after getting back into the codebase and handling other issues. Establish a clean interface for the following constructs:

  • Stages
  • Tools
  • Connections
  • GUI elements
  • Animation and Kinematics

It's probably not going to be this simple, and may involve a huge refactor. So post comments and updates here.

Stage Addition, Selection, Renaming, Deletion

Add functionality to add and delete stages, while keeping a clear list of existing stages in a menu.

Click on a stage highlights the menu item, and clicking on the menu item highlights the stage in the GUI.

Support:

  • Adding stages (with default names)
  • Stage selection
  • Renaming stages
  • Deleting stages

Keeping all of these in a nice data structure, or writing a function that takes in the scene graph and returns the list of stages.

image

Improve connection interface

  • Include a graphical element for connections
  • Add snap-to-connection handling
  • Enable connection deletion and editing—data structures should support this.

Virtual node instruction parsing

Given an instruction like:

{ "x1": 300, "x2": 300, "y": 170}

meaning "turn the x1 stage motor 300 steps" etc., and given a mapping of virtual stage motors to physical motors:

{ "x1": PHYS_X, "x2": PHYS_Y, "y" PHYS_Z }

spin the physical motors synchronously.

Implement Connections

This is potentially the hardest issue, but the most important. Implement connections, so that the user can attach one stage to the platform of another. See the picture:

image 3

Given stage A which will be connected to stage B, let's assume that we can only connect stage A to stage B's platform. In the MOM DSL, that would be

A.PLACE -> B.platform

PLACE can be one of the following:

  • MIDDLE: the bottom of A (facing opposite the platform) right in the middle
  • LEFT: the bottom of A at the left end
  • RIGHT: the bottom of A at the right end
  • LEFT_EDGE: the short side of A on the left, think making a 3D printer and attaching a stage to the z-axis stages
  • RIGHT_EDGE: same as above, but on the right.

Add Library of Tools

To replace the abstract red cylinder, add three different tools that you can switch between, for example:

  • Pen
  • Drag knife
  • Scorer
  • 3D print head

Each tool should come with a set of default actions based on actuating the motor.

Add GUI control elements

Add graphical control elements for:

  • Switching between rotation and translation
  • Making a connection between two elements
  • Anything else that requires polish

Virtual to physical motor mapping

Add a layer of indirection by prompting the user questions like "which motor is for stage x1?". Say the user presses the button corresponding to the Y motor on the Arduino shield. Then calls to virtual motor x1 should be sent to the Y motor.

Ideally the user should be able to reset this virtual -> physical mapping.

If the user changes the machine configuration, we must prompt the user for a new mapping since the virtual motors or their kinematics may have changed.

Improve Stage Graphics to Include Platform

Right now stages are green rectangular prisms PLUS the prisms' outlines. Given a prism, we group it with its outline:

geometry = geometries[ options.Geometry ];
// scale geometry to a uniform size
geometry.computeBoundingSphere();
let scaleFactor = 160 / geometry.boundingSphere.radius;
geometry.scale( scaleFactor, scaleFactor, scaleFactor );
let edges = new THREE.EdgesGeometry(geometry);
lines = new THREE.LineSegments(edges, new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 5 } ));
mesh = new THREE.Mesh( geometry, material );
let group = new THREE.Group();
group.add(lines);
group.add(mesh);
scene.add(group);

But we also want to have a little platform on the stage. We can add another prism, as well as more lines.

image 2

DSL Parser

Given a mom program, parse it into our nice AST.

Stage rotation

Add controls so that users can rotate the stages on any of the three rotational axes. There is already a rotation controller implementation in THREE.TransformControls but I don't currently call it because it gets mixed up with the translate controller thingy.

Note: the stages must snap to 90 degree angles.

Optional: add controls to move the camera.

image 1

Refactor frontend script.js to be more modular

Right now the code is hacked from some of the examples on the three.js page. It would be nice to have functions be more modular. Perhaps use a functional programming paradigm, or at least clean things up.

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.