MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / Face

Class Face

src/Face.h:10–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <vector>
9class Wire;
10class Face: public Base {
11
12 friend class Mesh;
13 TopoDS_Face m_face;
14 Nan::Persistent<v8::Object> m_cacheMesh;
15 virtual ~Face();
16
17public:
18 int numWires();
19 double area();
20 bool fixShape();
21 bool isPlanar();
22 bool hasMesh();
23 std::vector<double> inertia();
24
25 const gp_XYZ centreOfMass() const;
26
27 TEAROFF_POINT(Face,centreOfMass,Point3Wrap,gp_XYZ);
28
29 virtual const TopoDS_Shape& shape() const;
30 const TopoDS_Face& face() const {
31 return m_face;
32 }
33 virtual void setShape(const TopoDS_Shape&);
34
35 bool buildFace(std::vector<Wire*>& wires);
36
37 static NAN_METHOD(extrude);
38
39 virtual v8::Local<v8::Object> Clone() const;
40
41 virtual Base* Unwrap(v8::Local<v8::Object> obj) const {
42 return Nan::ObjectWrap::Unwrap<Face>(obj);
43 }
44 virtual void InitNew(_NAN_METHOD_ARGS);
45
46
47 v8::Local<v8::Object> createMesh(double factor, double angle, bool qualityNormals);
48
49 static void Init(v8::Local<v8::Object> target);
50 static v8::Local<v8::Object> NewInstance(const TopoDS_Face& face);
51
52 static NAN_METHOD(New);
53 static NAN_METHOD(createMesh); // custom mesh
54 static NAN_PROPERTY_GETTER(_mesh);
55 static NAN_METHOD(getWires);
56
57 static NAN_METHOD(NewInstance);
58
59 static Nan::Persistent<v8::FunctionTemplate> _template;
60};

Callers 7

isSeamMethod · 0.70
setShapeMethod · 0.70
createMeshMethod · 0.70
_registerNamedShapeMethod · 0.70
NAN_METHODFunction · 0.70
chamferFunction · 0.70
filletFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected