Skip to content

Variable Offset Fix#4540

Merged
Fedr merged 22 commits intomasterfrom
voxel/var-offset-fix-again
May 16, 2025
Merged

Variable Offset Fix#4540
Fedr merged 22 commits intomasterfrom
voxel/var-offset-fix-again

Conversation

@andrewerf
Copy link
Member

No description provided.

for ( auto& pt : cube.points )
pt = rot * pt;

auto offCube = weightedMeshShell( cube, WeightedPointsShellParametersRegions{ { 0.02f, 0.01f, 10.f }, {}, 0.f, false } );
Copy link
Contributor

@Fedr Fedr May 13, 2025

Choose a reason for hiding this comment

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

Is 10 extra layers important for the test? Better test with the default values.

Copy link
Member Author

Choose a reason for hiding this comment

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

Potentially, it highlights more errors.

@andrewerf andrewerf marked this pull request as ready for review May 16, 2025 07:31
@andrewerf andrewerf requested a review from Grantim May 16, 2025 07:31
Comment on lines +35 to +38
/// either
/// 1) bidirectional distances are computed, or
/// 2) input location is locally outside of the surface (by pseudonormal)
bool bidirectionalOrOutside = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Mb use enum instead of bool with two meanings?

Copy link
Member Author

@andrewerf andrewerf May 16, 2025

Choose a reason for hiding this comment

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

I think the point is that these two cases have the same operational meaning, so there is no point in separaring them.

Comment on lines +95 to +96
/// find the closest point only if weighted bidirectional distance to it is less than given value
float maxBidirDist = FLT_MAX;
Copy link
Contributor

Choose a reason for hiding this comment

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

does it work in bidirectionalMode=false?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is always used to set the maximum search radius

maxSearchRadius_( params.maxBidirDist + params.maxWeight )

@andrewerf andrewerf requested a review from Grantim May 16, 2025 09:24
@Fedr Fedr merged commit 642fd3a into master May 16, 2025
27 checks passed
@Fedr Fedr deleted the voxel/var-offset-fix-again branch May 16, 2025 10:10
MaxRayskiy pushed a commit that referenced this pull request Sep 27, 2025
* Determine outside/inside using pseudonormal to avoid artifacts near sharp edges.

* Remove weight tricks.

* Fix problem with points for which w > r.

* Update `MeshPointAndDistance`.

* `extraLayers` parameter and test.

* Fix old test.

* Fix windows warning.

* Do not remesh.

* Add continuity test.

* fix build

* Fix comparison.

* in progress

* code improvements

* renamings

* better names

* `extraLayers` -> `numLayers`.

* Add test that could highlight the limitation of the algorithm.

* Fix comments.

* Accelerate weightedMeshShell test

---------

Co-authored-by: Fedor Chelnokov <fedor.chelnokov@meshinspector.com>
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.

3 participants