-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Add ability to style objects in point clouds #2104
feat: Add ability to style objects in point clouds #2104
Conversation
This pull request introduces 2 alerts when merging 6b6139f into dd3b620 - view on LGTM.com new alerts:
|
6b6139f
to
94328b2
Compare
This pull request introduces 2 alerts when merging 94328b2 into 6fcc8cc - view on LGTM.com new alerts:
|
94328b2
to
50e0141
Compare
This pull request introduces 1 alert when merging 50e0141 into ee5c380 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging caf63a7 into ee5c380 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging bfa4c5f into ee5c380 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging 6c9f639 into 21c5693 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging 358bef7 into 21c5693 - view on LGTM.com new alerts:
|
5f0b294
to
74be15f
Compare
Features included at this point:
|
Codecov Report
@@ Coverage Diff @@
## feat/point-cloud-styling #2104 +/- ##
============================================================
- Coverage 71.20% 70.37% -0.84%
============================================================
Files 259 271 +12
Lines 10794 11072 +278
Branches 1364 1405 +41
============================================================
+ Hits 7686 7792 +106
- Misses 2955 3123 +168
- Partials 153 157 +4
|
This pull request introduces 1 alert when merging 5854f35 into 21c5693 - view on LGTM.com new alerts:
|
There were failures in the examples workflow. This usually means a visual regression test has failed. Image diffs for visual tests can be downloaded as an artifact here. If there are no artifacts there's an error somewhere else in the examples workflow. If you have made intentional changes you can update the image snapshots by running |
1 similar comment
There were failures in the examples workflow. This usually means a visual regression test has failed. Image diffs for visual tests can be downloaded as an artifact here. If there are no artifacts there's an error somewhere else in the examples workflow. If you have made intentional changes you can update the image snapshots by running |
There were failures in the examples workflow. This usually means a visual regression test has failed. Image diffs for visual tests can be downloaded as an artifact here. If there are no artifacts there's an error somewhere else in the examples workflow. If you have made intentional changes you can update the image snapshots by running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks very good, and a great addition with high potential for impact. Not quite sure what to do with the playground SDK, and unless absolutely necessary, I don't think we can release it. As the barrier using CDF is already quite large as they need to authenticate themselves.
I still need to do some manual testing, but have some code comments you can look at in the mean time. Also probably a lot we can do a better job of unit testing here (ref. regression in code-coverage).
viewer/packages/pointclouds/src/styling/annotationsToObjects.ts
Outdated
Show resolved
Hide resolved
This pull request fixes 2 alerts when merging b809e4b into 21c5693 - view on LGTM.com fixed alerts:
|
This pull request introduces 1 alert and fixes 2 when merging 2b38883 into 21c5693 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 2 when merging f5f8aeb into 21c5693 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request fixes 2 alerts when merging b15e42f into 21c5693 - view on LGTM.com fixed alerts:
|
This pull request fixes 2 alerts when merging 9ce2801 into 21c5693 - view on LGTM.com fixed alerts:
|
This pull request fixes 2 alerts when merging d8ad572 into 21c5693 - view on LGTM.com fixed alerts:
|
This pull request fixes 2 alerts when merging 397ab09 into 21c5693 - view on LGTM.com fixed alerts:
|
This pull request fixes 2 alerts when merging db398ca into 21c5693 - view on LGTM.com fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry... Some of the comments are more suggestions than requested fixes.
import { createPointCloudModel } from '../../../test-utilities/src/createPointCloudModel'; | ||
import { CognitePointCloudModel } from './CognitePointCloudModel'; | ||
|
||
describe(CognitePointCloudModel.name, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel like there is more that can be tested here 😅
viewer/packages/pointclouds/src/styling/annotationsToObjects.ts
Outdated
Show resolved
Hide resolved
viewer/packages/pointclouds/src/styling/shapes/CompositeShape.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Renovate Bot <bot@renovateapp.com>
They'll be back for the acceleration structure
ba0b9cf
to
a342d48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accepting with a little doubt. Still feel the code quality of the point cloud library is a little brittle (I know you didn't write it), and we should probably take more ownership of it and refactor, simplify and remove anything we don't need. Also need to have a lot more testing going forward.
Other than that, I am really looking forward to seeing how this will look like in practice. Good job!
* chore(deps): update dependency @cognite/sdk to v7.4.0 (#2160) Co-authored-by: Renovate Bot <bot@renovateapp.com> * improvement: remove unused 'headers' for custom data sources and update docs (#2164) * fix: clearing wrong render target (#2166) * example: add UI for setting point size type (#2157) * improvement: Make typescript strict (#2163) * fix: fix all strict typechecking errors * improvement: don't return primitive collections if empty * chore: lint fix * improvement: make byteOffset 0 if undefined * improvement: unhackify helper function * fix: fix that byteOffset fix * fix: fix type errors for tests * fix: correct BinaryHeap bevaviour Co-authored-by: Christopher J. Tannum <christopher.tannum@cognite.com> Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com> * chore(deps): update dependency @cognite/sdk to v7.5.0 (#2165) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com> * feat: simple styling in the works * feat: working visualization of pipe system Pipe data not included * feat: add simple styling interface for point clouds Also temporarily add data.ts to allow for testing for people who are not me * refac: make object style LUT 2D * refactor: let EPT loader take non-hardcoded object list * feat: automatically fetch annotations from server on point cloud load * chore: update Migration example for annotation fetching * fix: remove unused import * fix: remove not-yet-available feature * feat: add arbitrarily oriented boxes as stylable objects * refactor: some cleanup among stylable shapes * fix: don't import anything externally to worker * chore: lint fix * feat: blend style color with original RGB * chore: lint fix * chore: fix LGTM warnings * chore: update yarn lock * test: fix constructor in test * chore: remove unused member variable * chore: remove unused import Fixes LGTM error * fix: make @cognite/sdk-playground a peer dependency * fix: fix that pesky visual test error * refactor: factor out default EPT metadata file name * improvement: make "then" into an "await" * refactor: refactor annotation translation * chore: make public variable private-gettable * fix: correct import path * fix: refer to private field, not public getter * refactor: rewrite point cloud buffer parsing * improvement: be stricter in specifying optional types * improvement: make use of color constants * improvement: rewrite 0-vector check * fix: correct paratheses in shader * improvement: mappify array transformation * improvement: make ShapeType an enum * improvement: remove out-commented import * chore: lint fix * fix: make CogniteClientPlayground optionality annotation stricter * test: add trivial test for CognitePointCloudModel * fix: add missing creation function file * refactor: move some responsibility from PointCloudManager to -Factory * improvement: then -> await * fix: make indices be of type Uint32 * feat: add fromThreeVector3 utility function * refactor: parser-worker logic * improvement: make parse(data) actually return parsed data * improvement: improve readability * refactor: simplify primitive translation * improvement: renamed/simplify objectId assignment * refactor: change terminology from "StyledObject" to "StylableObject" * refactor: simplify Box constructor * chore: minor cleanup * improvement: simplify composite bounding box computation * fix: correct Box constructor call * fix: repair, please type checker, and lint after merge * improvement: remove computeBoundingBox for shapes for now They'll be back for the acceleration structure * chore: another lint fix * chore: add warning regarding point-object matching * refactor: remove "StylableObjectInfo" abstraction * chore: lint fix Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Lars Moastuen <lars.moastuen@cognite.com> Co-authored-by: Christopher J. Tannum <christopher.tannum@cognite.com> Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>
* chore(deps): update dependency @cognite/sdk to v7.4.0 (#2160) Co-authored-by: Renovate Bot <bot@renovateapp.com> * improvement: remove unused 'headers' for custom data sources and update docs (#2164) * fix: clearing wrong render target (#2166) * example: add UI for setting point size type (#2157) * improvement: Make typescript strict (#2163) * fix: fix all strict typechecking errors * improvement: don't return primitive collections if empty * chore: lint fix * improvement: make byteOffset 0 if undefined * improvement: unhackify helper function * fix: fix that byteOffset fix * fix: fix type errors for tests * fix: correct BinaryHeap bevaviour Co-authored-by: Christopher J. Tannum <christopher.tannum@cognite.com> Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com> * chore(deps): update dependency @cognite/sdk to v7.5.0 (#2165) Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com> * feat: simple styling in the works * feat: working visualization of pipe system Pipe data not included * feat: add simple styling interface for point clouds Also temporarily add data.ts to allow for testing for people who are not me * refac: make object style LUT 2D * refactor: let EPT loader take non-hardcoded object list * feat: automatically fetch annotations from server on point cloud load * chore: update Migration example for annotation fetching * fix: remove unused import * fix: remove not-yet-available feature * feat: add arbitrarily oriented boxes as stylable objects * refactor: some cleanup among stylable shapes * fix: don't import anything externally to worker * chore: lint fix * feat: blend style color with original RGB * chore: lint fix * chore: fix LGTM warnings * chore: update yarn lock * test: fix constructor in test * chore: remove unused member variable * chore: remove unused import Fixes LGTM error * fix: make @cognite/sdk-playground a peer dependency * fix: fix that pesky visual test error * refactor: factor out default EPT metadata file name * improvement: make "then" into an "await" * refactor: refactor annotation translation * chore: make public variable private-gettable * fix: correct import path * fix: refer to private field, not public getter * refactor: rewrite point cloud buffer parsing * improvement: be stricter in specifying optional types * improvement: make use of color constants * improvement: rewrite 0-vector check * fix: correct paratheses in shader * improvement: mappify array transformation * improvement: make ShapeType an enum * improvement: remove out-commented import * chore: lint fix * fix: make CogniteClientPlayground optionality annotation stricter * test: add trivial test for CognitePointCloudModel * fix: add missing creation function file * refactor: move some responsibility from PointCloudManager to -Factory * improvement: then -> await * fix: make indices be of type Uint32 * feat: add fromThreeVector3 utility function * refactor: parser-worker logic * improvement: make parse(data) actually return parsed data * improvement: improve readability * refactor: simplify primitive translation * improvement: renamed/simplify objectId assignment * refactor: change terminology from "StyledObject" to "StylableObject" * refactor: simplify Box constructor * chore: minor cleanup * improvement: simplify composite bounding box computation * fix: correct Box constructor call * fix: repair, please type checker, and lint after merge * improvement: remove computeBoundingBox for shapes for now They'll be back for the acceleration structure * chore: another lint fix * chore: add warning regarding point-object matching * refactor: remove "StylableObjectInfo" abstraction * chore: lint fix Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Lars Moastuen <lars.moastuen@cognite.com> Co-authored-by: Christopher J. Tannum <christopher.tannum@cognite.com> Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>
* feat: Add ability to style objects in point clouds (#2104) * feat: point cloud API for styling (#2179) * feat: Webassembly setup (#2353) * Update point cloud feature branch from master (#2416) * feat: Rust/Webassembly octree implementation for faster point-object assignment (#2327) * feat: custom classification (#2320) * docs: finalize point cloud styling docs (#2500) * refactor: move point cloud object provider to data-providers and expose object bounding boxes (#2522) * fix: point cloud custom transformation (#2550) * improvement: various fixes for point clouds (#2551) * fix: export point cloud object metadata (#2552) * Various big and small fixes Co-authored-by: Lars Moastuen <lars.moastuen@cognite.com> Co-authored-by: Christopher J. Tannum <christopher.tannum@cognite.com> Co-authored-by: Savokr <savelii.novikov@cognite.com> Co-authored-by: Pramod S <87521752+pramodcog@users.noreply.github.com>
No description provided.