Skip to content
Victofel edited this page Dec 19, 2016 · 27 revisions

#ShapeFactory Module (Work in progress)#

###ShapeFactory.makeBox()### Creates a box

Parameters:

  • 3 numbers: dx,dy,dz
  • 2 points: p1,p2
  • 1 point + 3 numbers: pt,dx,dy,dz //TODO
  • 1 object with { x: 1,y: 2,z: 3, dw:) //TODO

Box

Examples:

occ.makeBox(10,10,10);
occ.makeBox((0,0,0),(10,10,10));
occ.makeBox((0,0,0),10,10,10);
occ.makeBox(----);

###ShapeFactory.makeCylinder()### Creates a cylinder

Parameters:

  • Vertical Cylinder by Radius and Height: r, h
  • Vertical Cylinder by Origin point, Radius and Height: pt, r, h
  • Cylinder by 2 Points and Radius: pt1, pt2, r

Cylinder

Examples:

occ.makeCylinder(3,10);
occ.makeCylinder((0,0,0),3,10);
occ.makeCylinder((0,0,0),(0,0,10),3);

###ShapeFactory.makeCylinder()### Creates a torus

Nan::SetMethod(target,"makeCone",      ShapeFactory::makeCone);
Nan::SetMethod(target,"makeSphere",    ShapeFactory::makeSphere);
Nan::SetMethod(target,"makeTorus",     ShapeFactory::makeTorus);
Nan::SetMethod(target,"makePrism",     ShapeFactory::makePrism);
Nan::SetMethod(target,"makeThickSolid",ShapeFactory::makeThickSolid);
Nan::SetMethod(target,"makeDraftAngle",ShapeFactory::makeDraftAngle);
Nan::SetMethod(target,"makeFillet",    ShapeFactory::makeFillet);
// target->Set(NanSymbol("makeChamfer")NanNew<FunctionTemplate>(ShapeFactory::makeDraftAngle);

Nan::SetMethod(target,"makePlaneMirror", Transformation::makePlaneMirror);

// edges
Nan::SetMethod(target,"makeLine",        Edge::static_createLine);
Nan::SetMethod(target,"makeCircle",      Edge::static_createCircle);
Nan::SetMethod(target,"makeArc3P",       Edge::static_createArc3P);

//xx Nan::SetMethod(target,"makeEdge", ShapeFactory::makeEdge);

Nan::SetMethod(target,"makeWire",    ShapeFactory::makeWire);
Nan::SetMethod(target,"makeFace",    ShapeFactory::makeFace);

Nan::SetMethod(target,"fuse",          ShapeFactory::fuse);
Nan::SetMethod(target,"cut",           ShapeFactory::cut);
Nan::SetMethod(target,"common",        ShapeFactory::common);
Nan::SetMethod(target,"compound",      ShapeFactory::compound);

Nan::SetMethod(target,"writeSTL",      writeSTL);
Nan::SetMethod(target,"writeSTEP",     writeSTEP);
Nan::SetMethod(target,"writeBREP",     writeBREP);
Nan::SetMethod(target,"readSTEP",      readSTEP);
Nan::SetMethod(target,"readBREP",      readBREP);

// Vertex Nan::SetMethod(target,"makeVertex", ShapeFactory::makeVertex);

//xx Nan::SetMethod(target,"oceVersion",NanNew("0.13"));
target->Set(Nan::New("oceVersion").ToLocalChecked(),  Nan::New("0.13").ToLocalChecked());

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