Skip to content

fix(potree2): incorrect node info#2800

Open
Desplandis wants to merge 1 commit into
iTowns:masterfrom
Desplandis:fix/potree2-hierarchy
Open

fix(potree2): incorrect node info#2800
Desplandis wants to merge 1 commit into
iTowns:masterfrom
Desplandis:fix/potree2-hierarchy

Conversation

@Desplandis

@Desplandis Desplandis commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes a hierarchy issue in Potree 2.x datasets where the child hierarchy was not correctly loaded due to a typo.
Added some tests too to catch similar future regressions.

@Desplandis Desplandis requested a review from ftoromanoff June 23, 2026 14:34
@Desplandis Desplandis force-pushed the fix/potree2-hierarchy branch from 165f0e1 to e0e9c7a Compare June 24, 2026 11:37
@Desplandis

Copy link
Copy Markdown
Contributor Author

@ftoromanoff Could you review this fix? I relaunched the functional tests.

@ftoromanoff ftoromanoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice rewrite of the tests with sinon.sandBox !

Comment on lines +7 to +9
const NODE_TYPE_NORMAL = 0;
const NODE_TYPE_LEAF = 1;
const NODE_TYPE_PROXY = 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use the same writing as in Potree2Node.js ?

const NODE_TYPE = {
    NORMAL: 0,
    LEAF: 1,
    PROXY: 2,
}

And same in Potree2Node.js.
use
const BYTES_PER_NODE = 22; at file level instead of using const bytesPerNode = 22; in the parseHierarchy() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants