Git Product home page Git Product logo

nc.js's Introduction

NC.js

NC.js is the Web interface for the Digital Thread. This provides a rich REST API for process and models as well as a matching client that displays the 3D part models for the machining workpiece, tools, CNC, as well as removal simulation, PMI annotations, MTConnect positional data, QIF face status, and other aspects of a Digital Twin on the Digital Thread.

This software uses Javascript under the Apache license, so that you can customize the client and REST API as desired. On the server, the REST API uses the STEPNode native Node.js wrapper for the STEP Tools commercial technology stack, which handles STEP and STEP-NC read/write, analysis, geometry manipulation, and material removal simulation.

You can find live examples of NC.js running at www.steptools.com/demos

Screenshot

nc.js's People

Contributors

cabral450 avatar david-loffredo avatar funnymanpatrick avatar ghemingway avatar ian-h-chamberlain avatar lphoward avatar lumarc avatar nicholasfay avatar rennat avatar sam-son avatar seveibar avatar sjbeale avatar uuqv avatar wgaggioli avatar williamgrh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nc.js's Issues

Safari does not support ES6 style even after transpile

This seems to be an issue in the way Safari handles webworkers and is nearly impossible to debug because of how Safari treats them (breakpoints, console.log, etc. do not work in webworkers).

Options: revert to old version of webworker.js or ignore support for Safari until its treatment of webworkers is more sane.

Server/Client should only handle one file

If we switch primary application endpoint to / or /stepnc , and load the file we serve from a command line argument, we can remove the Backbone.js dependency, as well as simplify the serving.

Problem loading Frontend

After downloading the StepNCViewer I tried to set it up like described at the readme file. But I always receive following massage from the tool when landing on the Frontend:

[email protected] start-dev /root/cad.js
node src/server/api_server.js -e development

info: CAD.js API Server listening on: 8080
info: Redis Connected.
info: Configuring auth/auth plugin: permit
info: Setting User-Validation function
info: Setting User-Authorization function
info: Configuring storage plugin: filesystem
info: Assembly Root: /root/cad.js/data
info: NC Root: /root/cad.js/data
GET /cad.js?resource_url=/data/cutter/index.xml 304 - - 101.958 ms
GET /js/main.css 304 - - 47.866 ms
GET /js/main.js 304 - - 72.403 ms

and then finish. The tool is not showing anything on 127.0.0.1:8080..
Is there a bug or am I doing something wrong?

Attempting to load a non-existent project crashes the server

To recreate, start the server and attempt to load a project that doesn't exist:
Messages:

GET /stepnc/asdf 304 - - 125.858 ms
This project doesn't exist
Finder: no file open
GET /v2/nc/projects/asdf/workplan/ 500 1259 - 10.850 ms
TypeError: Cannot read property 'map' of undefined
    at exeFromId (/Users/ianchamberlain/step/StepNCViewer/src/server/api/v2/step.js:19:54)
    at _getMwp (/Users/ianchamberlain/step/StepNCViewer/src/server/api/v2/step.js:38:24)
    at Layer.handle [as handle_request] (/Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/layer.js:95:5)
    at /Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/index.js:277:22
    at param (/Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/index.js:349:14)
    at param (/Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/Users/ianchamberlain/step/StepNCViewer/node_modules/express/lib/router/index.js:410:3)
GET /v2/nc/projects/asdf/state/loop/ 304 - - 2.261 ms
Assertion failed: (val->IsString() == true), function Write, file ../src/string_bytes.cc, line 358.
This project doesn't exist

Process finished with exit code 134

Fix Slider in Edge

In the Edge browser, the slider spacing so the buttons below the slider are positioned incorrectly.

Top menu first child spacing

The extra spacing on the left of the first child makes it look a little off. Also, the border that appears when hovering over the button is cut off on the left.

Sidebar scroll on initial load

When the server first spins up, the first workingstep is the current workingstep. When the client loads the server, the sidebar scrolls and the workingstep is cutoff. This isn't an issue for other workingsteps, just the first one.

Desktop view does not always expand to full width

To see this, begin with a full-sized desktop window, then resize until the view is narrow enough to switch to a mobile view. Then, resize back to full size – the CAD.js area will typically (in my case) stop expanding right at some point, leaving a white bar on the far right side of the screen.

Sidebar scroll on initial load

When a client first loads up the server, if it is on a workingstep below the initial scroll point, the sidebar should scroll so that it is in view.

No graceful server exit path

We always have to kill process, which usually causes it to hang, which means finding it in the task mangler.... Really need to add proper server exit ability.

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.