Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitbybit-occt-worker

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitbybit-occt-worker - npm Package Compare versions

Comparing version 0.9.24 to 0.9.25

2

lib/api/occt/occt.d.ts

@@ -26,2 +26,4 @@ import { OCCTWorkerManager } from '../../occ-worker/occ-worker-manager';

shapeToMesh(inputs: Inputs.OCCT.ShapeToMeshDto<Inputs.OCCT.TopoDSShapePointer>): Promise<Inputs.OCCT.DecomposedMeshDto>;
deleteShape(inputs: Inputs.OCCT.ShapeDto<Inputs.OCCT.TopoDSShapePointer>): Promise<void>;
deleteShapes(inputs: Inputs.OCCT.ShapesDto<Inputs.OCCT.TopoDSShapePointer>): Promise<void>;
}

@@ -38,2 +38,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
deleteShape(inputs) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.occWorkerManager.genericCallToWorkerPromise('deleteShape', inputs);
});
}
deleteShapes(inputs) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.occWorkerManager.genericCallToWorkerPromise('deleteShapes', inputs);
});
}
}

@@ -9,2 +9,3 @@ import { OpenCascadeInstance } from 'bitbybit-occt/bitbybit-dev-occt/bitbybit-dev-occt';

cleanAllCache(): void;
cleanCacheForHash(hash: string): void;
cleanUpCache(): void;

@@ -11,0 +12,0 @@ isOCCTObject(obj: any): boolean;

@@ -23,2 +23,14 @@ export class CacheHelper {

}
cleanCacheForHash(hash) {
if (this.argCache[hash]) {
try {
this.argCache[hash].delete();
}
catch (_a) {
}
}
delete this.argCache[hash];
delete this.usedHashes[hash];
delete this.hashesFromPreviousRun[hash];
}
cleanUpCache() {

@@ -25,0 +37,0 @@ // TODO seems to have problems, not exactly sure what is the real cause. For now users will build up cache during the whole session.

@@ -27,2 +27,4 @@ import { ShapesHelperService } from 'bitbybit-occt/lib/api/shapes-helper.service';

if (d.action.functionName !== 'shapeToMesh' &&
d.action.functionName !== 'deleteShape' &&
d.action.functionName !== 'deleteShapes' &&
d.action.functionName !== 'startedTheRun' &&

@@ -69,2 +71,10 @@ d.action.functionName !== 'cleanAllCache' &&

}
if (d.action.functionName === 'deleteShape') {
cacheHelper.cleanCacheForHash(d.action.inputs.shape.hash);
result = {};
}
if (d.action.functionName === 'deleteShapes') {
d.action.inputs.shapes.forEach(shape => cacheHelper.cleanCacheForHash(shape.hash));
result = {};
}
// Only the cache that was created in previous run has to be kept, the rest needs to go

@@ -71,0 +81,0 @@ if (d.action.functionName === 'startedTheRun') {

4

package.json
{
"name": "bitbybit-occt-worker",
"version": "0.9.24",
"version": "0.9.25",
"description": "Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel adapted for WebWorker",

@@ -58,3 +58,3 @@ "main": "index.js",

"dependencies": {
"bitbybit-occt": "0.9.24",
"bitbybit-occt": "0.9.25",
"rxjs": "7.5.5"

@@ -61,0 +61,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc