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

H2T_loadNpy: Add edges of bounding box to mesh structure #11

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

coprigent
Copy link

@coprigent coprigent commented Nov 14, 2023

This update adds the list of ridges of the bounding box to the output mesh when a .npy file is given to hex2tet.
To check the intended behaviour of this new feature, a example is given:
hexa.npy is a file describing a one-hexahedron mesh and tet-from-npy.mesh is the output given by hex2tet.
The output file contains a list of edges and a list of ridges.
example.tar.gz

@Algiane Algiane added label: ready to be merged Mar PR as ready to be merged and removed label: ready to be merged Mar PR as ready to be merged labels Nov 17, 2023
Copy link
Member

@Algiane Algiane left a comment

Choose a reason for hiding this comment

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

Thanks for this PR.

See in the comment a small request before integration.

Best

src/inout.c Outdated
ref = 0;
pos = 0;
for (i=0;i<t[0]-1; ++i) {
int p0, p1;
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to rename this variables np0 and np1?

It is a detail and this is probably not respected everywhere in the code but I think that it is a good habit to use some naming convention in variables name: p<i> or ppt for point structure or (MMG5_Point) pointers toward point structure (MMG5_pPoint), ip<i> for local point index and np<i> for global point index (int).

It allows an easier understanding for complex or large functions (without having to search or remember what the variable is used for.

Copy link
Author

Choose a reason for hiding this comment

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

This modification been done as requested.

@Algiane Algiane merged commit f936bc6 into MmgTools:develop Nov 20, 2023
8 checks passed
@Algiane
Copy link
Member

Algiane commented Nov 20, 2023

Thanks.

@coprigent coprigent deleted the feature/writeRidges branch November 20, 2023 16:13
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