bitbybit-occt-worker
Advanced tools
Comparing version 0.10.10 to 0.11.0
@@ -239,3 +239,3 @@ import * as Inputs from 'bitbybit-occt/lib/api/inputs/inputs'; | ||
*/ | ||
getWires(inputs: Inputs.OCCT.ShapeIndexDto<Inputs.OCCT.TopoDSShapePointer>): Promise<Inputs.OCCT.TopoDSWirePointer>; | ||
getWires(inputs: Inputs.OCCT.ShapeIndexDto<Inputs.OCCT.TopoDSShapePointer>): Promise<Inputs.OCCT.TopoDSWirePointer[]>; | ||
/** | ||
@@ -242,0 +242,0 @@ * Computes reversed wire from input wire |
@@ -100,2 +100,14 @@ export class CacheHelper { | ||
} | ||
else if (toReturn.compound && toReturn.data && toReturn.shapes && toReturn.shapes.length > 0) { | ||
let objDef = toReturn; | ||
const compoundHash = this.computeHash(Object.assign(Object.assign({}, args), { index: 'compound' })); | ||
objDef.compound.hash = compoundHash; | ||
this.addToCache(compoundHash, objDef.compound); | ||
objDef.shapes.forEach((s, index) => { | ||
const itemHash = this.computeHash(Object.assign(Object.assign({}, args), { index })); | ||
s.shape.hash = itemHash; | ||
this.addToCache(itemHash, s.shape); | ||
}); | ||
this.addToCache(curHash, { value: objDef }); | ||
} | ||
else { | ||
@@ -102,0 +114,0 @@ this.addToCache(curHash, { value: toReturn }); |
import { OpenCascadeInstance } from 'bitbybit-occt/bitbybit-dev-occt/bitbybit-dev-occt'; | ||
import { CacheHelper } from './cache-helper'; | ||
export declare const initializationComplete: (occ: OpenCascadeInstance, doNotPost?: boolean) => CacheHelper; | ||
export declare const initializationComplete: (occ: OpenCascadeInstance, plugins: any, doNotPost?: boolean) => CacheHelper; | ||
declare type DataInput = { | ||
@@ -5,0 +5,0 @@ /** |
@@ -8,3 +8,3 @@ import { ShapesHelperService } from 'bitbybit-occt/lib/api/shapes-helper.service'; | ||
let cacheHelper; | ||
export const initializationComplete = (occ, doNotPost) => { | ||
export const initializationComplete = (occ, plugins, doNotPost) => { | ||
cacheHelper = new CacheHelper(occ); | ||
@@ -14,2 +14,5 @@ const vecService = new VectorHelperService(); | ||
openCascade = new OCCTService(occ, new OccHelper(vecService, shapesService, occ)); | ||
if (plugins) { | ||
openCascade.plugins = plugins; | ||
} | ||
if (!doNotPost) { | ||
@@ -55,3 +58,11 @@ postMessage('occ-initialised'); | ||
if (!cacheHelper.isOCCTObject(res)) { | ||
result = res; | ||
if (res.compound && res.data && res.shapes && res.shapes.length > 0) { | ||
const r = res; | ||
r.shapes = r.shapes.map(s => ({ id: s.id, shape: { hash: s.shape.hash, type: 'occ-shape' } })); | ||
r.compound = { hash: r.compound.hash, type: 'occ-shape' }; | ||
result = r; | ||
} | ||
else { | ||
result = res; | ||
} | ||
} | ||
@@ -58,0 +69,0 @@ else if (Array.isArray(res)) { |
{ | ||
"name": "bitbybit-occt-worker", | ||
"version": "0.10.10", | ||
"version": "0.11.0", | ||
"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.10.10", | ||
"bitbybit-occt": "0.11.0", | ||
"rxjs": "7.5.5" | ||
@@ -61,0 +61,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
160742
4127
+ Addedbitbybit-occt@0.11.0(transitive)
- Removedbitbybit-occt@0.10.10(transitive)
Updatedbitbybit-occt@0.11.0