Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Nov 15, 2023
1 parent 80ce29f commit adf0ae1
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 42 deletions.
4 changes: 4 additions & 0 deletions packages/jupytercad-extension/extension.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ const path = require('path');

const occPath = [
__dirname,
'../',
'../',
'node_modules',
'@jupytercad/jupytercad-opencascade',
'lib',
'*.wasm'
];
Expand Down
2 changes: 1 addition & 1 deletion packages/jupytercad-extension/src/worker/actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IJCadObject } from '../_interface/jcad';
import { OCC } from '@jupytercad/jupytercad-opencascade';
import * as OCC from '@jupytercad/jupytercad-opencascade';

import { IDict, WorkerAction } from '../types';
import { IJCadContent } from '../_interface/jcad';
Expand Down
2 changes: 1 addition & 1 deletion packages/jupytercad-extension/src/worker/occapi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OCC } from '@jupytercad/jupytercad-opencascade';
import * as OCC from '@jupytercad/jupytercad-opencascade';
import { v4 as uuid } from 'uuid';

import { IBox } from '../_interface/box';
Expand Down
2 changes: 1 addition & 1 deletion packages/jupytercad-extension/src/worker/occparser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IDict, IParsedShape } from '../types';
import { OCC } from '@jupytercad/jupytercad-opencascade';
import * as OCC from '@jupytercad/jupytercad-opencascade';

import { IJCadObject } from '../_interface/jcad';
import { IEdge, IFace } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion packages/jupytercad-extension/src/worker/operatorcache.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OCC } from '@jupytercad/jupytercad-opencascade';
import * as OCC from '@jupytercad/jupytercad-opencascade';

import { IJCadContent, Parts, IShapeMetadata } from '../_interface/jcad';
import { IDict } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion packages/jupytercad-extension/src/worker/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IJCadContent, IShapeMetadata } from '../_interface/jcad';
import { OCC } from '@jupytercad/jupytercad-opencascade';
import * as OCC from '@jupytercad/jupytercad-opencascade';
import { IBox } from '../_interface/box';
import { ICylinder } from '../_interface/cylinder';
import { ISphere } from '../_interface/sphere';
Expand Down
8 changes: 5 additions & 3 deletions packages/jupytercad-extension/src/worker/worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { initializeOpenCascade, OCC } from '@jupytercad/jupytercad-opencascade';
import initOpenCascade, {
OpenCascadeInstance
} from '@jupytercad/jupytercad-opencascade';
import {
WorkerAction,
IWorkerMessage,
Expand All @@ -8,11 +10,11 @@ import {
} from '../types';
import WorkerHandler from './actions';

let occ: OCC.OpenCascadeInstance;
let occ: OpenCascadeInstance;
const ports: IDict<MessagePort> = {};
console.log('Initializing OCC...');

initializeOpenCascade().then(occInstance => {
initOpenCascade().then(occInstance => {
console.log('Done!');
occ = occInstance;

Expand Down
2 changes: 0 additions & 2 deletions packages/jupytercad-opencascade/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ mainBuild:
- symbol: NCollection_BaseList
- symbol: NCollection_BaseMap
- symbol: Poly_Array1OfTriangle
- symbol: Poly_ArrayOfNodes
- symbol: Poly_ArrayOfUVNodes
- symbol: Poly_Connect
- symbol: Poly_PolygonOnTriangulation
- symbol: Poly_Triangle
Expand Down
3 changes: 0 additions & 3 deletions packages/jupytercad-opencascade/lib/index.d.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/jupytercad-opencascade/lib/index.js

This file was deleted.

18 changes: 8 additions & 10 deletions packages/jupytercad-opencascade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,27 @@
"name": "JupyterCad contributors"
},
"files": [
"lib/index.js",
"lib/index.d.ts",
"lib/jupytercad.opencascade.js",
"lib/jupytercad.opencascade.d.ts",
"lib/jupytercad.opencascade.wasm"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "lib/jupytercad.opencascade.js",
"types": "lib/jupytercad.opencascade.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/jupyter-cad/jupytercad.git"
},
"scripts": {
"build": "node build_opencascade_wasm.js",
"build:prod": "node build_opencascade_wasm.js"
"build": "node build_opencascade.js",
"build:prod": "node build_opencascade.js",
"clean": "rimraf ./lib",
"clean:all": "rimraf ./lib"
},
"devDependencies": {
"js-yaml": "^4.1.0"
"js-yaml": "^4.1.0",
"rimraf": "^3.0.2"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"opencascade.js": "beta"
}
}
11 changes: 1 addition & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ __metadata:
resolution: "@jupytercad/jupytercad-opencascade@workspace:packages/jupytercad-opencascade"
dependencies:
js-yaml: ^4.1.0
opencascade.js: beta
rimraf: ^3.0.2
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -9591,15 +9591,6 @@ __metadata:
languageName: node
linkType: hard

"opencascade.js@npm:beta":
version: 2.0.0-beta.b5ff984
resolution: "opencascade.js@npm:2.0.0-beta.b5ff984"
peerDependencies:
ws: ^8.5.0
checksum: 751fa25e3625497fb562d4c586e884020478b9c5aeae61c43ce10bac9a011826f5c7518c2126fc6b1f79792c83bbc4d43069bff40dfbee4e48137cb9a496424e
languageName: node
linkType: hard

"optionator@npm:^0.9.1":
version: 0.9.3
resolution: "optionator@npm:0.9.3"
Expand Down

0 comments on commit adf0ae1

Please sign in to comment.