22
33OpenCascade nodejs extension for solid modeling.
44
5- This nodejs extension provides * solid construction * to nodejs.
5+ This nodejs extension provides _ solid construction _ to nodejs.
66It provides a simple yet powerful javascript api to construct 3D geometry models.
77
88This project comes with a set of V8 wrappers around OpenCascade API and a sample web application.
99
1010[ ![ Build Status] ( https://travis-ci.org/OpenWebCAD/node-occ.png?branch=master )] ( https://travis-ci.org/OpenWebCAD/node-occ )
1111[ ![ Build status] ( https://ci.appveyor.com/api/projects/status/s5eaux89v2c0wmu4?svg=true )] ( https://ci.appveyor.com/project/erossignon/node-occ-6ktv4 )
1212
13-
1413### quick example
1514
16-
1715``` javascript
18- var occ = require (' occ' ).occ
16+ var occ = require (" node- occ" ).occ ;
1917
2018// construct a box
21- var box = occ .makeBox ([0 ,0 , 0 ],[100 ,100 ,50 ])
19+ var box = occ .makeBox ([0 , 0 , 0 ], [100 , 100 , 50 ]);
2220
2321// construct a cylinder
24- var cyl = occ .makeCylinder ([50 ,50 ,- 10 ],[50 ,50 ,60 ],40 )
22+ var cyl = occ .makeCylinder ([50 , 50 , - 10 ], [50 , 50 , 60 ], 40 );
2523
2624// cut the box with cylinder
27- box = occ .cut (box,cyl)
25+ box = occ .cut (box, cyl);
2826
2927// save result to a STEP file
30- occ .writeSTEP (" somefile.step" ,box)
31-
28+ occ .writeSTEP (" somefile.step" , box);
3229```
3330
34-
3531### video
32+
3633<a href =" http://www.youtube.com/watch?feature=player_embedded&v=swUPSa2zyrY " target =" _blank " ><img src="http://img.youtube.com/vi/swUPSa2zyrY/0.jpg "
3734alt="node occ" width="240" height="180" border="10" /></a >
3835
39-
4036### list of features
4137
42- - creation of basic shapes ( box, cylinder , cone , torus )
43- - boolean operation ( fuse , common , cut )
44- - features ( draftAngle)
45- - solid properties ( faces, edges, vertices, area , volume )
46- - import export ( STEP BREP )
47-
48-
38+ - creation of basic shapes ( box, cylinder , cone , torus )
39+ - boolean operation ( fuse , common , cut )
40+ - features ( draftAngle)
41+ - solid properties ( faces, edges, vertices, area , volume )
42+ - import export ( STEP BREP )
4943
5044### sample web application
5145
5246[ node-occ-sample] ( https://github.com/erossignon/node-occ-sample ) : sample nodejs/express REST API server to build solid , based on threejs
5347
54-
5548## installing node-occ from npm
5649
5750```
5851$npm install node-occ
5952```
6053
54+ ## building node-occ from source : prerequisites
6155
62- ## building node-occ from source : prerequisites
63-
64- ### on Windows
65- - you need Microsoft Visual Studio 2012
66- - please install OpenCascade oce-0.17 from https://github.com/tpaviot/oce/downloads to you c:\OCE-0.17 folder
67-
68- ```
69- >SET CL=/Ic:\OCE-0.17\include\oce
70- >SET LINK=/LIBPATH:c:\OCE-0.17\Win32\lib
71- >PATH c:\OCE-0.17\Win32\bin;%PATH%
72- >npm install node-occ
73- ```
74-
7556### on Linux
7657
58+ #### on ubuntu
7759
78-
79- ### on ubuntu
60+ (use nodejs 12.0)
8061
8162``` bash
82-
8363# installing nodejs and gyp utility to build extensions
8464sudo apt-get install nodejs npm
8565sudo npm install node-pre-gyp -g
@@ -91,28 +71,29 @@ sudo apt-get install cmake cmake-curses-gui g++ build-essential libtbb2
9171# ------------------------------------
9272git clone --recursive https://github.com/erossignon/node-occ.git
9373cd node-occ
94- npm install
74+ export OCCT_PACKAGE=occt-7.2.0
75+ export LD_LIBRARY_PATH=` pwd` /${OCCT_PACKAGE} /lib:$LD_LIBRARY_PATH
76+ npm install --build-from-source
9577make test
9678```
9779
98-
9980### on windows
100- - follow the tutorial in the [ wiki] ( https://github.com/erossignon/node-occ/wiki )
81+
82+ - follow the tutorial in the [ wiki] ( https://github.com/erossignon/node-occ/wiki )
10183
10284## dependencies:
10385
104- - threejs : https://github.com/mrdoob/three.js
86+ - threejs : https://github.com/mrdoob/three.js
10587
10688## acknowledgement:
107-
108- - OpenCascade : http://www.opencascade.org
109- - occmodel : https://github.com/tenko/occmodel
110- - ShapeSmith : https://github.com/bjnortier/shapesmith
11189
90+ - OpenCascade : http://www.opencascade.org
91+ - occmodel : https://github.com/tenko/occmodel
92+ - ShapeSmith : https://github.com/bjnortier/shapesmith
11293
11394## MIT License
11495
115- Copyright © 2012-2015 E. Rossignon
96+ Copyright © 2012-2019 E. Rossignon
11697
11798Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11899
0 commit comments