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

Here the steps to build on Mac OS:

Requirements

  • Install Homebrew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  • Install NodeJS: brew install node

  • Install Node-gyp: sudo npm install node-gyp -g

  • Install Mocha: sudo npm install mocha -g

  • Install Cmake: brew install cmake

  • Install Cmake GUI: sudo port install cmake +gui (To install Port, please click here)

  • Install XCode: [App Store] (https://itunes.apple.com/es/app/xcode/id497799835?mt=12)

  • Install XCode Command Line: xcode-select --install

Clone the repository and build OCE

  • Clone the repository: git clone --recursive https://github.com/erossignon/node-occ.git
  • Change directory to node-occ cd node-occ
  • Build OCE: sh prepare_build.sh

NOTE: In my case, it drops me an error: node-occ/oce/src/OSD/gettime_osx.h:81:5: error: redefinition of enumerator '_CLOCK_REALTIME' I don't like the solution but I edit the file gettime_osx.h and I delete the enumerator definition.

Now is a good time to grap a cup of coffee! :)

  • npm install
  • node-gyp configure
  • node-gyp build
  • mocha

Execute the sample

  • cd sample
  • npm install
  • node app.js

Visit http://localhost:3000 with Chrome, Firefox or Safari


Tests

Verify that node-occ is up and running by launching the tests

npm test 

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