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

Method WorkComplete

src/Tools.cc:319–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317};
318
319void StepBrepAsyncReadWorker::WorkComplete() {
320
321 Nan::HandleScope scope;
322 if (this->_retValue == 0) {
323
324 try {
325
326 std::list<v8::Local<v8::Object> > jsshapes;
327
328 for (std::list<TopoDS_Shape >::iterator it = shapes.begin(); it != shapes.end(); it++) {
329 const TopoDS_Shape& aShape = (*it);
330 extractShape(aShape, jsshapes);
331 }
332
333 v8::Local<v8::Array> arr = convert(jsshapes);
334
335 v8::Local<v8::Value> err = Nan::Null();
336 v8::Local<v8::Value> argv[2] = { err, arr };
337
338 callback->Call(2, argv, async_resource);
339
340 }
341 catch (...) {
342 this->SetErrorMessage(" exception in trying to build shapes");
343 return this->AsyncWorkerWithProgress::WorkComplete();
344 }
345 }
346 else {
347 return this->AsyncWorkerWithProgress::WorkComplete();
348 }
349}
350
351class StepAsyncReadWorker : public StepBrepAsyncReadWorker {
352public:

Callers

nothing calls this directly

Calls 2

extractShapeFunction · 0.85
convertFunction · 0.85

Tested by

no test coverage detected