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

Calculate height of section levels #31

Merged

Conversation

mkeshavarzi
Copy link
Contributor

@mkeshavarzi mkeshavarzi commented Aug 5, 2022

Calculates z value for a section plane for each level + a camera location based on IFC model height and a screen size Coefficient. Please note main.test.js and flags.test.js have been temp removed to allow push. Need to resolve.

Please note main.test.js and flags.test.js have been temp removed to allow push. Need to resolve.
Given the height of the tallest level in IFC file, we estimate a camera height location considering by also utilizing a screen size coefficient
@pablo-mayrgundter pablo-mayrgundter marked this pull request as draft August 5, 2022 08:43
@pablo-mayrgundter
Copy link
Member

Heya, I'm happy to review. While you still have tests excluded please leave in draft. I just flipped it.

Are there sample screens?

@mkeshavarzi
Copy link
Contributor Author

Heya, I'm happy to review. While you still have tests excluded please leave in draft. I just flipped it.
Are there sample screens?

Thanks! No graphics in this one yet, just calculating coordinates.

@pablo-mayrgundter
Copy link
Member

Got it checked out with git checkout upstream/CalculateSectionAndCamera, though leaves the local client in "detached" state. Anyways..

I uncomment calSecLevels and run:

> node lib/src/calLevSec.js ~/bldrs/3d\ models/IFC/Schependomlaan.ifc out.ifc
Input file:  /Users/pablo/bldrs/3d models/IFC/Schependomlaan.ifc
web-ifc: 0.0.34 threading: 0

But no output to out.ifc.

@mkeshavarzi
Copy link
Contributor Author

Got it checked out with git checkout upstream/CalculateSectionAndCamera, though leaves the local client in "detached" state. Anyways..

I uncomment calSecLevels and run:

> node lib/src/calLevSec.js ~/bldrs/3d\ models/IFC/Schependomlaan.ifc out.ifc
Input file:  /Users/pablo/bldrs/3d models/IFC/Schependomlaan.ifc
web-ifc: 0.0.34 threading: 0

But no output to out.ifc.

The script doesn't output an ifc. It outputs a simple array of height values.

To see the values, please uncomment line 31:
console.log(elevValuesAll)

and run:
node lib/src/calLevSec.js ifcFileName
(in your case):
node lib/src/calLevSec.js ~/bldrs/3d\ models/IFC/Schependomlaan.ifc

for example:

Input file:  lib/src/testdata/haus.ifc
web-ifc: 0.0.34 threading: 0
[ 0, 2.7 ]```

@pablo-mayrgundter
Copy link
Member

Hi Mohammed. Sorry, I lost track. Everything's running locally for me, though you have the existing tests deleted. Just remove them from this PR.

What were you blocked on for testing?

@mkeshavarzi
Copy link
Contributor Author

Hi Mohammed. Sorry, I lost track. Everything's running locally for me, though you have the existing tests deleted. Just remove them from this PR.

What were you blocked on for testing?

My block is I can't run main.test.js and flags.test.js, and hence cannot push the code without removing them.

@pablo-mayrgundter
Copy link
Member

Ah, I see. Not sure how to fix this. The version of ifclib that's being referenced is somehow being confused. The main branch is ahead of your branch and has fixed those reference problems.

I tried updating tool/package.json to depend on the upstream version, 5.3.3, and then doing yarn install, but that doesn't seem to fix it:

> grep 5.3 tool/package.json
  "version": "5.3.1",
    "@bldrs-ai/ifclib": "^5.3.3"
> yarn install
> npm ls
@bldrs-ai/ifctool-root@5.3.1 /Users/pablo/c/pm/ifctool
├── @babel/core@7.18.6
├── @babel/eslint-parser@7.18.2
├── @babel/plugin-syntax-import-assertions@7.18.6
├── @babel/preset-env@7.18.6
├─┬ @bldrs-ai/ifclib@5.3.1 -> ./lib
│ ├── @log4js-node/log4js-api@1.0.2
│ ├── json2csv@5.0.7
│ └── web-ifc@0.0.35
├─┬ @bldrs-ai/ifctool@5.3.1 -> ./tool
│ ├── @bldrs-ai/ifclib@5.3.3.                    # GOOD!
│ └── log4js@6.6.0
├── esbuild@0.14.48
├── eslint-config-google@0.14.0
├── eslint-plugin-import@2.26.0
├── eslint@8.19.0
├── husky@7.0.4
├── jest@27.5.1
├── shx@0.3.4
└── three@0.142.0

However:

> grep version node_modules/\@bldrs-ai/ifclib/package.json
  "version": "5.3.1"

and indeed tests still fail with the bad ref to Exception which was indeed missing from from 5.3.1

tool/src/main.js Outdated Show resolved Hide resolved
tool/src/main.test.js Outdated Show resolved Hide resolved
tool/src/flags.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants