Skip to content

Double voxel offset for performance#277

Merged
Grantim merged 2 commits intomasterfrom
Double_voxel_offset_for_performance
Jul 15, 2022
Merged

Double voxel offset for performance#277
Grantim merged 2 commits intomasterfrom
Double_voxel_offset_for_performance

Conversation

@Grantim
Copy link
Contributor

@Grantim Grantim commented Jul 15, 2022

No description provided.

@Grantim Grantim requested a review from Fedr July 15, 2022 11:26
[[nodiscard]] MRMESH_API Mesh offsetMesh( const MeshPart& mp, float offset, const OffsetParameters& params = {} );

// Offsets mesh by converting it to voxels and back two times
// only closed meshes allowed (only Offset mode)
Copy link
Contributor

Choose a reason for hiding this comment

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

worth adding that typically offsetA and offsetB have distinct signs

ProgressCallback cb )
{
if ( cb )
cb( 0.0f );
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we check the result of cb?

Comment on lines +66 to +68
const std::vector<openvdb::Vec3s>& pointsRes,
const std::vector<openvdb::Vec3I>& trisRes,
const std::vector<openvdb::Vec4I>& quadRes,
Copy link
Contributor

Choose a reason for hiding this comment

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

remove Res suffix

convertToVDMMesh( mp, xf, Vector3f::diagonal( voxelSize ), points, tris );

if ( cb )
cb( 0.1f );
Copy link
Contributor

Choose a reason for hiding this comment

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

again, check result of cb?

for ( EdgeId e : leftRing( *this, f ) )
{
if ( !right( e ) )
if ( isBdEdge( e, region ) )
Copy link
Contributor

Choose a reason for hiding this comment

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

isBdEdge is true of any boundary of the region, even if right face exists

@Grantim Grantim merged commit 16a4d8f into master Jul 15, 2022
@Grantim Grantim deleted the Double_voxel_offset_for_performance branch July 15, 2022 13:29
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