openwebcad / node-occ-sample Goto Github PK
View Code? Open in Web Editor NEWSample WebGL application using node-occ
License: MIT License
Sample WebGL application using node-occ
License: MIT License
npm start
> [email protected] start /home/serapath/Desktop/dev/labs/PLAYGROUND/node-occ-sample
> node app
module.js:598
return process.dlopen(module, path._makeLong(filename));
^
Error: /home/serapath/Desktop/dev/labs/PLAYGROUND/node-occ-sample/node_modules/node-occ/lib/binding/occ.node: invalid ELF header
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/serapath/Desktop/dev/labs/PLAYGROUND/node-occ-sample/node_modules/node-occ/lib/bindings.js:4:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node app'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-occ-sample package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-occ-sample
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-occ-sample
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/serapath/.npm/_logs/2017-04-16T18_04_34_958Z-debug.log
OS : Windows 10 64 bit
D:\projects\current\Struct\node-occ-sample>npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 761 packages in 12.437s
1 package is looking for funding
run `npm fund` for details
found 1030 vulnerabilities (524 low, 42 moderate, 464 high)
run `npm audit fix` to fix them, or `npm audit` for details
D:\projects\current\Struct\node-occ-sample>npm start
> [email protected] start D:\projects\current\Struct\node-occ-sample
> node ./node_modules/webpack/bin/webpack.js; node dist/app.js
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module 'D:\projects\current\Struct\node-occ-sample\node_modules\webpack\bin\webpack.js;'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./node_modules/webpack/bin/webpack.js; node dist/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Vishnu\AppData\Roaming\npm-cache\_logs\2020-09-06T14_46_08_580Z-debug.log
npm ERR! Linux 4.4.0-151-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: node ./node_modules/webpack/bin/webpack.js; node dist/app.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script 'node ./node_modules/webpack/bin/webpack.js; node dist/app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-occ-sample package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./node_modules/webpack/bin/webpack.js; node dist/app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-occ-sample
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-occ-sample
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/node-occ/node-occ-sample/npm-debug.log
I'm trying to port the node-occ-sample into my ScadaJS. Currently I could succesfully send the script from webapp (https://aktos.io/aecad/#/webcad), process in the server, then send back to the client (check console output after "Update model" in https://aktos.io/aecad/#/webcad):
[{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303683,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{"1:1:1:lateral":{"shapeType":"FACE","orientation":"FORWARD","area":1256.6370614359173,"numWires":1,"isPlanar":false,"hasMesh":false},"m1:m1:1:top:0:0":{"shapeType":"FACE","orientation":"FORWARD","area":59.690260418206094,"numWires":2,"isPlanar":true,"hasMesh":false},"1:m1:m2:lateral:0:0":{"shapeType":"FACE","orientation":"FORWARD","area":439.822971502571,"numWires":1,"isPlanar":false,"hasMesh":false},"1:m2:bottom:0":{"shapeType":"FACE","orientation":"REVERSED","area":160.22122533307947,"numWires":1,"isPlanar":true,"hasMesh":false},"2:1:1:lateral":{"shapeType":"FACE","orientation":"FORWARD","area":1130.9733552923253,"numWires":1,"isPlanar":false,"hasMesh":false},"2:m1:m2:lateral:0:0":{"shapeType":"FACE","orientation":"FORWARD","area":339.29200658769776,"numWires":1,"isPlanar":false,"hasMesh":false},"2:m2:bottom:0":{"shapeType":"FACE","orientation":"REVERSED","area":141.37166941154072,"numWires":1,"isPlanar":true,"hasMesh":false}},"cmd":"cut(\"e5e1a75a28e4d99a988b5a5935f0f092f812a358\",\"ac8a766f688c35bbdd1692a55f02110106619e3b\")","uuid":"5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303678,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([21,0,0])","uuid":"41fddc8ae3ce286d0a614d6f02b76e89e75f9ad4"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303683,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([-21,0,0])","uuid":"801814e7e1f159fd97ea2a24a7163514f7bdfa97"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303674,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([0,-21,0])","uuid":"c143da69d0e58749b82d1195b99c1cdd25ac0c70"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303683,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([0,21,0])","uuid":"7fa05590d0b9f6d05532d3b81c1587b10badfde8"}]
First I prepared a basic scene and then I tried to display those JSON objects when I received, but I can't manage to display the JSON (see https://stackoverflow.com/a/33615426).
After failing to upload the JSON output of ScriptRunner to https://threejs.org/editor/, I wanted to ask for your help.
What is the basic client setup for displaying the JSON output?
Hello,
I try to install this sample occ project, unfortunately npm install failed...
Does it suppose to work under windows ?
Best regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.