Skip to content
Victofel edited this page Dec 17, 2016 · 25 revisions

``Welcome to the node-occ wiki!

How to build it##

Please select your favorite OS:

<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0; text-align: center;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg .tg-fefd{color:#000000;vertical-align:top;text-align: center;} </style>
[Mac OS X]("https://github.com/erossignon/node-occ/wiki/Build-on-Mac") Windows Ubuntu

compiling occ on windows:

pre-requistes:

  • make sure you have at least Microsoft Visual Studio 2015 or Visual Studio Express installed.
  • download and install CMAKE http://www.cmake.org/download/ (the tutorial assumes that cmake is installed in c:\tools\cmake)
  • install node-js 32 bits version 0.12 from www.nodejs.org
  • start a CMD dos box with VisualStudio 32 bits environment set
  • In the VisualStudio 32bis CMD box, execute the following script, to fetch, compile and install OpenCascade Libraries
cd c:\
git clone https://github.com/tpaviot/oce.git
cd oce
git checkout OCE-0.17.2
cd ..
# git submodule update --init --recursive
mkdir oce_build
cd    oce_build
c:\tools\cmake\bin\cmake  -D OCE_INSTALL_PREFIX:STRING='C:/OCE-0.17.2' -D OCE_DRAW:BOOLEAN=FALSE -D OCE_OCAF:BOOLEAN=FALSE -D  OCE_VISUALISATION:BOOLEAN=FALSE -D OCE_DISABLE_X11:BOOLEAN=TRUE -D OCE_USE_PCH:BOOLEAN=TRUE  ../oce
msbuild oce.sln /m
msbuild oce.sln /p:Configuration=Release /m
    
set VisualStudioVersion=14.0
msbuild INSTALL.vcxproj /p:Configuration=Release /m

compile node-occ

  • In the VisualStudio 32bits CMD box, execute the following script
mkdir c:\projects
cd c:\projects
git clone https://github.com/erossignon/node-occ
cd node-occ  
SET CL=/Ic:\OCE-0.17.2\include\oce
SET LINK=/LIBPATH:c:\OCE-0.17.2\Win32\lib
PATH c:\OCE-0.17.2\Win32\bin;%PATH%
npm install 
  • verify that node-occ is up and running by launching the tests
npm test 
  • start the Node-occ web console:
cd c:\projects\node-occ\sample
node app.js

Methods

  • ShapeFactory
    • Creation
    • Edition
      • Thick Solid (Shell)
      • Draft Angle
      • Fillet
      • Chamfer
      • Fuse (Union)
      • Cut (Difference)
      • Common (Intersect.)
      • Compound (?)
      • Vertex
      • Edge
      • Wire
      • Face
  • Wire
  • Transformation
    • Basic
      • Translation
      • Rotation
      • Scale
      • Mirror by Plane
      • Mirror by Axis
  • Import/Export
Clone this wiki locally