Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Apis #411

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5863040
guid helper
D4ve-R Jun 1, 2023
93851bc
CreateModel create minimal ifc
D4ve-R Jun 1, 2023
bfdefb8
modelApi
D4ve-R Jun 2, 2023
02a4818
refactor propsApi
D4ve-R Jun 2, 2023
8c7085a
building
D4ve-R Jun 2, 2023
23f91da
tests
D4ve-R Jun 2, 2023
bd0c6a0
refactor
D4ve-R Jun 2, 2023
c620d97
build project
D4ve-R Jun 2, 2023
19adec6
docker container
D4ve-R Jun 2, 2023
9a517d1
fix build error
D4ve-R Jun 2, 2023
040c394
modelApi
D4ve-R Jun 3, 2023
2dced0d
logging
D4ve-R Jun 3, 2023
8a3fec3
geomApi
D4ve-R Jun 3, 2023
9f2a5b6
modelApi
D4ve-R Jun 3, 2023
3aaca3a
fix point & direction bug
D4ve-R Jun 3, 2023
d7bbc2c
AddProject & AddApplication
D4ve-R Jun 3, 2023
151d13c
authors & actorrole
D4ve-R Jun 3, 2023
a5b0948
modelApi
D4ve-R Jun 4, 2023
560ee55
refactor
D4ve-R Jun 4, 2023
d8cb1d5
new tests
D4ve-R Jun 4, 2023
5ff874d
geomApi
D4ve-R Jun 4, 2023
f7947ec
CartesianPointList
D4ve-R Jun 4, 2023
1e5563f
refactor
D4ve-R Jun 4, 2023
1a0e44b
polyline
D4ve-R Jun 4, 2023
5664e1b
csgprimitive
D4ve-R Jun 4, 2023
bd124b4
spatialelements
D4ve-R Jun 4, 2023
e57358b
tests
D4ve-R Jun 4, 2023
25228c8
testing & fixing
D4ve-R Jun 4, 2023
d1d09e9
TriangulatedFaceSet
D4ve-R Jun 4, 2023
9ebf344
change schema gen, no explicit ID, proper default
D4ve-R Jun 5, 2023
0844e38
pre type conversion
D4ve-R Jun 5, 2023
89d58f6
guid
D4ve-R Jun 5, 2023
3cb1bce
build errors
D4ve-R Jun 6, 2023
650a353
build process
D4ve-R Jun 6, 2023
9c8cc3c
wasm error log
D4ve-R Jun 8, 2023
5cd713b
fix invalid ifc file
D4ve-R Jun 8, 2023
197f279
fix empty set parsing error
D4ve-R Jun 8, 2023
f125cc1
generic types
D4ve-R Jun 8, 2023
61402d4
modelApi
D4ve-R Jun 8, 2023
e1aa2a6
tests
D4ve-R Jun 8, 2023
ec043da
add support for writing integers
D4ve-R Jun 9, 2023
00db1e7
Merge branch 'main' into apis
D4ve-R Jun 9, 2023
80c65e2
RawLineData & deleteLines
D4ve-R Jun 9, 2023
b64bd45
SaveModel
D4ve-R Jun 9, 2023
9b59310
webifcapi createModel bool arg writeHeader
D4ve-R Jun 9, 2023
1b0607e
Merge branch 'main' into pr/411
beachtom Jun 30, 2023
2c3a1f4
Merge branch 'apis' of https://github.com/D4ve-R/web-ifc into pr/411
beachtom Jun 30, 2023
f43eefa
Update ifc-schema.ts
beachtom Jun 30, 2023
4317638
Fix Merge errors
beachtom Jun 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
.github/
.vscode/
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ ifcPrune.vcxproj.user
output
debug_output
.bin
build
# keep top level build directory
!build/
*/build
*.log
node_modules
dist/*
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM emscripten/emsdk:3.1.31
WORKDIR /web-ifc-app
WORKDIR /web-ifc
COPY package*.json .
RUN npm i -g cpy-cli
RUN npm i -g cpy-cli ts-node typescript make-dir esbuild
RUN npm i
COPY . .
RUN npm run build-release
EXPOSE 3000
ENTRYPOINT [ "npm", "run", "dev" ]
VOLUME [ "/web-ifc" ]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ The WASM library is built through emscripten, please see [the emscripten install

To build the WASM you also need CMAKE [see here](https://cmake.org/download/) and (on windows) MINGW [see here](https://sourceforge.net/projects/mingw/) - once installed (and in your path) run `npm run setup-mingw` to configure the environment for web-ifc.

Or you can use the docker image from `build` folder.
```bash
# build the docker image
npm run docker:build
# run the docker image with everything set up
docker run -v $(pwd):/web-ifc web-ifc-build npm run build-release
```

### WASM library

Run `npm install` to install all dependencies.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,17 @@
"copy-debug-to-dist": "make-dir dist && cpy \"src/wasm/build_debug/*.js\" dist && cpy \"src/wasm/build_debug/*.wasm\" dist ",
"build-wasm-debug": "make-dir src/wasm/build_debug && cd src/wasm/build_debug && emcmake cmake .. -DEMSCRIPTEN=true -DCMAKE_BUILD_TYPE=Debug && emmake make && npm run copy-debug-to-dist",
"build-wasm-release": "make-dir src/wasm/build && cd src/wasm/build && emcmake cmake .. -DEMSCRIPTEN=true -DCMAKE_BUILD_TYPE=Release && emmake make && npm run copy-to-dist",
"build-api": "make-dir dist/helpers && npm run build-ts-api && npm run build-web-ifc-api-browser && npm run build-web-ifc-api-node && npm run build-web-ifc-api-umd &&cpy README.md dist && cpy package.json dist",
"build-ts-api": "make-dir dist/helpers && cpy \"src/*.ts\" dist && cpy \"src/helpers/*\" dist/helpers --flat && tsc --incremental --emitDeclarationOnly && cpy dist/web-ifc-api.d.ts . --rename=web-ifc-api-node.d.ts",
"build-api": "npm run build-ts-api && npm run build-web-ifc-api-browser && npm run build-web-ifc-api-node && npm run build-web-ifc-api-umd &&cpy README.md dist && cpy package.json dist",
"build-ts-api": "tsc --incremental --emitDeclarationOnly && cpy dist/web-ifc-api.d.ts . --rename=web-ifc-api-node.d.ts && cpy \"src/*.ts\" dist && cpy \"src/helpers/*\" dist/helpers --flat && cpy \"src/api/*\" dist/api --flat",
"build-web-ifc-api-node": "make-dir dist && esbuild dist/web-ifc-api.ts --bundle --format=esm --external:path --define:__WASM_PATH__=\\\"./web-ifc-node\\\" --external:fs --external:os --external:perf_hooks --outfile=./dist/web-ifc-api-node.mjs && esbuild dist/web-ifc-api.ts --define:__WASM_PATH__=\\\"./web-ifc-node\\\" --bundle --platform=node --outfile=./dist/web-ifc-api-node.js",
"build-web-ifc-api-browser": "make-dir dist && esbuild dist/web-ifc-api.ts --bundle --format=esm --define:__WASM_PATH__=\\\"./web-ifc\\\" --outfile=./dist/web-ifc-api.js",
"build-web-ifc-api-umd": "make-dir dist && esbuild dist/web-ifc-api.ts --bundle --format=iife --define:__WASM_PATH__=\\\"./web-ifc\\\" --global-name=WebIFC --outfile=./dist/web-ifc-api-umd.js",
"build-viewer": "cd examples/viewer/ && npm run build",
"serve-viewer": "npm run build-viewer && cd examples/viewer/ && npm run start",
"dev": "npm run build-viewer && concurrently --kill-others \"npm-watch\" \"cd examples/viewer && npm run start\"",
"docker-build": "docker build -t web-ifc .",
"docker-run": "npm run docker-run-container && npm run docker-get-compiled-files ",
"docker-run-container": "docker run --rm -d -p 3000:5000 --name web-ifc-container web-ifc",
"docker-get-compiled-files": "docker cp web-ifc-container:/web-ifc-app/dist .",
"docker-run": "docker run -v $(pwd):/web-ifc --rm --name web-ifc-build web-ifc npm run build-release",
"docker-dev": "docker run -v $(pwd):/web-ifc --rm -d -p 3000:5000 --name web-ifc-container web-ifc npm run dev",
"postversion": "node src/setversion.js",
"test": "jest --runInBand ",
"test:unit": "jest --runInBand --testMatch['**/tests/unit/**/*.spec.ts']",
Expand Down
7 changes: 7 additions & 0 deletions src/api/baseApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {
IfcAPI
} from '../web-ifc-api';

export class BaseApi {
constructor(protected api: IfcAPI) {}
}
Loading
Loading