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

Method add

src/ShapeFactory.cc:968–991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966
967
968v8::Local<v8::Value> ShapeFactory::add(const std::vector<Base*>& shapes)
969{
970 TopoDS_Compound compound;
971 BRep_Builder builder;
972
973 v8::Local<v8::Value> pJhis(Solid::NewInstance());
974 Solid* pThis = Nan::ObjectWrap::Unwrap<Solid>(Nan::To<v8::Object>(pJhis).ToLocalChecked());
975 try {
976
977 builder.MakeCompound(compound);
978
979 for (size_t i = 0; i < shapes.size(); i++) {
980
981 const TopoDS_Shape& shape = shapes[i]->shape();
982 builder.Add(compound, shape);
983 }
984
985 pThis->setShape(compound);
986
987 }
988 CATCH_AND_RETHROW_NO_RETURN("Failed in compound operation");
989 return pJhis;
990
991}
992
993NAN_METHOD(ShapeFactory::compound)
994{

Callers 1

jasmine-1.1.0.jsFile · 0.80

Calls 1

setShapeMethod · 0.45

Tested by

no test coverage detected