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

Simplify UnitProto after building a CsgUnit #1415

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

esseivaju
Copy link
Contributor

@esseivaju esseivaju commented Sep 19, 2024

This is mostly for validation purposes, eventually I think we should only use the transformed CsgTree on GPU.

Requires #1418

@esseivaju esseivaju added enhancement New feature or request orange Work on ORANGE geometry engine labels Sep 19, 2024
/*!
* Result of a DeMorgan simplification.
*/
struct DeMorganSimplifierResult
Copy link
Member

Choose a reason for hiding this comment

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

This could be a general "simplification" mapping. Perhaps it should be moved to CsgTree itself (imagine a function that runs "simplify" on the tree itself)?

struct DeMorganSimplifierResult
{
CsgTree tree;
std::vector<NodeId> equivalent_nodes;
Copy link
Member

Choose a reason for hiding this comment

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

Old node ID is the index, new node ID is the value? (Maybe new_nodes?)

@@ -391,7 +391,7 @@ TEST_F(CsgTreeUtilsTest, transform_negated_joins)
auto s1 = this->insert(Surface{S{1}});
auto n0 = this->insert(Negated{s1});
auto j0 = this->insert(Joined{op_and, {s0, n0}});
auto simplified = transform_negated_joins(tree_);
auto simplified = transform_negated_joins(tree_).tree;
Copy link
Member

Choose a reason for hiding this comment

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

You should test the mapping result too...

Copy link

github-actions bot commented Oct 9, 2024

Test summary

 3 279 files   5 076 suites   3m 31s ⏱️
 1 528 tests  1 501 ✅ 27 💤 0 ❌
16 929 runs  16 866 ✅ 63 💤 0 ❌

Results for commit 4f8f07f.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request orange Work on ORANGE geometry engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants