Skip to content

Conversation

andrewerf
Copy link
Member

Basically, applying the same idea as for cellular structures but for TPMS. This should drastically reduce memory consumption and improve performance.

Basically, applying the same idea as for cellular structures but for TPMS. This should drastically reduce memory consumption and improve performance.
@andrewerf andrewerf requested a review from Fedr October 12, 2025 13:38
return res;
const float period = 1.f / params.frequency;
const auto voxelSize = getDimsAndSize( size, params.frequency, params.resolution ).size;
const float minVoxelSize = std::min( voxelSize.x, std::min( voxelSize.y, voxelSize.z ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const float minVoxelSize = std::min( voxelSize.x, std::min( voxelSize.y, voxelSize.z ) );
const float minVoxelSize = std::min( { voxelSize.x, voxelSize.y, voxelSize.z } );

}
return res;

MeshBuilder::uniteCloseVertices( result, maxVoxelSize );
Copy link
Contributor

Choose a reason for hiding this comment

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

it is better to call uniteCloseVertices( result, 0 ), or very small value if rounding errors are inevitable

Copy link
Member Author

Choose a reason for hiding this comment

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

The basic element is created from voxels, thus we cannot guarantee the precision smaller than the voxel size.

@andrewerf andrewerf merged commit ef085ea into master Oct 18, 2025
35 checks passed
@andrewerf andrewerf deleted the voxels/porous-filling-tpms-repetitions branch October 18, 2025 13:28
andrewerf added a commit that referenced this pull request Oct 18, 2025
andrewerf added a commit that referenced this pull request Oct 18, 2025
Fedr pushed a commit that referenced this pull request Oct 19, 2025
* Change topology for thick surfaces.

* Revert "Only use voxels to construct a base element, then repeat it. (#5227)"

This reverts commit ef085ea.

* Use parallel decimation.

* PR comments.
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