a multi body shape
| 5 | class Edge; |
| 6 | // a multi body shape |
| 7 | class Solid : public Shape { |
| 8 | |
| 9 | protected: |
| 10 | Solid() {}; |
| 11 | virtual ~Solid() { |
| 12 | m_cacheMesh.Reset(); |
| 13 | }; |
| 14 | |
| 15 | public: |
| 16 | virtual v8::Local<v8::Object> Clone() const; |
| 17 | virtual Base* Unwrap(v8::Local<v8::Object> obj) const { return Nan::ObjectWrap::Unwrap<Solid>(obj); } |
| 18 | |
| 19 | Nan::Persistent<v8::Object> m_cacheMesh; |
| 20 | |
| 21 | const TopoDS_Solid& solid() const { |
| 22 | return TopoDS::Solid(shape()); |
| 23 | } |
| 24 | |
| 25 | int numSolids(); |
| 26 | int numFaces(); |
| 27 | int numShells(); |
| 28 | |
| 29 | double volume(); |
| 30 | double area(); |
| 31 | bool hasMesh(); |
| 32 | |
| 33 | virtual void InitNew(_NAN_METHOD_ARGS); |
| 34 | |
| 35 | v8::Local<v8::Object> createMesh(double factor, double angle, bool qualityNormals = true); |
| 36 | |
| 37 | typedef enum BoolOpType { |
| 38 | BOOL_FUSE, |
| 39 | BOOL_CUT, |
| 40 | BOOL_COMMON, |
| 41 | } BoolOpType; |
| 42 | |
| 43 | int boolean(Solid *tool, BoolOpType op); |
| 44 | //xx int chamfer(const std::vector<Edge*>& edges, const std::vector<double>& distances); |
| 45 | //xx int fillet(const std::vector<Edge*>& edges, const std::vector<double>& distances); |
| 46 | |
| 47 | // static Handle<v8::Value> fillet(const v8::Arguments& args); |
| 48 | // static Handle<v8::Value> chamfer(const v8::Arguments& args); |
| 49 | |
| 50 | // default mesh |
| 51 | static NAN_PROPERTY_GETTER(_mesh); |
| 52 | |
| 53 | static NAN_METHOD(createMesh); // custom mesh |
| 54 | |
| 55 | static NAN_METHOD(getEdges); |
| 56 | static NAN_METHOD(getVertices); |
| 57 | static NAN_METHOD(getFaces); |
| 58 | static NAN_METHOD(getShells); |
| 59 | static NAN_METHOD(getSolids); |
| 60 | static NAN_METHOD(getOuterShell); |
| 61 | static NAN_METHOD(getShapeName); |
| 62 | static NAN_METHOD(getAdjacentFaces); |
| 63 | static NAN_METHOD(getCommonEdges); |
| 64 | static NAN_METHOD(getCommonVertices); |
no outgoing calls
no test coverage detected