Octree node splitting from a prescribed list of nodes. #7350
-
Hi,
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 5 replies
-
Hi @tdinar, The current Orthtree API has some flaws, one of which is that Another issue which might be causing your problem is that nodes contain a manually allocated pointer to their data, so the "Node" type is actually only a thin handle. It might be worth trying I'm working to make the Orthtree API a little more ergonomic in a new branch, but it may be some time before the fixes appear in packaged versions of CGAL. As a temporary solution, a workaround could be to implement a custom
|
Beta Was this translation helpful? Give feedback.
-
@JacksonCampolattaro Thank you for your thorough explanation and suggestion of a workaround. I have been working on splitting leaves that satisfy a geometric constraint based on their bounding box. I confirm that When using a refinement predicate with the condition:
I am faced with these two issues:
I wish you luck with your work on the new branch, I can lend a hand if deemed beneficial. |
Beta Was this translation helpful? Give feedback.
-
Thank you for you help. 1-Think of it as in a game, when you touch an area, a circular domain is chosen. Any node within the domain satisfies the geometric constraint "and" if any of these nodes satisfy the depth criteria then it will be refined. I want to repeat on ancestors of said node(s) until the maximum depth is reached. All other nodes outside the domain would not change. So I think I need the && to satisfy both the geometric constraint and the maximum depth. 2-This makes sense, so I will try it this way. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help. The conditional you have provided works correctly. I am pushing through to verify my code and results. Best. |
Beta Was this translation helpful? Give feedback.
-
Hi, @JacksonCampolattaro
Do you have an idea what could be the cause and how to resolve the issue? I tried to find out with no success. Thanks. |
Beta Was this translation helpful? Give feedback.
-
The screenshot below shows a case with a min_depth of 2 and a max_depth of 6. Note that all nodes satisfying the geometric constraint are not plotted. At max_depth of 7 the algorithm produces the error shown above. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am suspecting the ordering is the reason for the error. I keep on
checking.
Thanks.
…On Fri, Apr 7, 2023 at 10:09 AM Sebastien Loriot ***@***.***> wrote:
CGAL's Multiset is a red-black tree. It might be that the ordering that
you are not consistent. That would explain the assertions.
—
Reply to this email directly, view it on GitHub
<#7350 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADIED6KYUSB2ABBTVLJA3W3W77DTVANCNFSM6AAAAAAWHG27HU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi @tdinar,
The current Orthtree API has some flaws, one of which is that
Node_access::split(node)
doesn't actually distribute the points between child nodes. This functionality was made public for unit testing. It shouldn't be causing precondition violations, but it can produce incorrect results.Another issue which might be causing your problem is that nodes contain a manually allocated pointer to their data, so the "Node" type is actually only a thin handle. It might be worth trying
node.is_null()
before you add each node tolist_nodes
, to see at which point they become invalid.I'm working to make the Orthtree API a little more ergonomic in a new branch, but it may be some time before…