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

args.target_edge_len ignored when the edge length is large #8

Open
ikoruk opened this issue Aug 26, 2022 · 5 comments
Open

args.target_edge_len ignored when the edge length is large #8

ikoruk opened this issue Aug 26, 2022 · 5 comments

Comments

@ikoruk
Copy link

ikoruk commented Aug 26, 2022

There seems to be a threshold over which the mesh is simply returned without any refinement, ignoring target_edge_len. This seems to be the case if the edge length is even 0.01 the bounding box size.

@ikoruk ikoruk closed this as completed Aug 26, 2022
@ikoruk ikoruk reopened this Aug 26, 2022
@Yixin-Hu
Copy link
Contributor

Hi, the target_edge_len controls the max edge length in the output. This is because if the input has high-frequency features and you want to preserve them, then it's impossible to get a very coarse mesh.

@ikoruk
Copy link
Author

ikoruk commented Aug 29, 2022

Hi, the problem is actually the opposite. Above a certain edge length the mesh returned is always the same mesh. (Which is too coarse)

@Yixin-Hu
Copy link
Contributor

Could you share the input and the command you used?

@ikoruk
Copy link
Author

ikoruk commented Aug 31, 2022

I'm trying a very simple triangle: [0, 0], [1, 0], [0.5, 1] with a target edge length of 0.05. It results in an average edge length of 0.2847.

Here is the output:

Loading and preprocessing ...
remove duplicates:
#v 3->3
#e 3->3
simplify:
#v 3->2
#e 3->1
Loaded and preprocessed.
time = 0.0598474s

BSP subdivision...
#v 102->125
#f 166->212
BSP subdivision done.
time = 0.00156363s

Mesh optimization...
#v = 125(125)    unrounded = 0
#t = 212(212)
max_energy = 10.2876
avg_energy = 2.89565
min_angle = 12.7835, max_angle = 116.565
< 5: 0, < 10: 0, < 15: 0.0188679
> 175: 0, > 170: 0, > 165: 0

//////////////// preprocessing ////////////////
edge collapsing...
queue_s.size() = 595
success 30
re-push 68
queue_s.size() = 65
success 4
re-push 6
queue_s.size() = 1
success 0
re-push 0
edge collapsing done!
time = 0.475119s
#v = 91(125)    unrounded = 0
#t = 148(212)
max_energy = 3.69612
avg_energy = 2.33998
min_angle = 24.4348, max_angle = 109.722
< 5: 0, < 10: 0, < 15: 0
> 175: 0, > 170: 0, > 165: 0

//////////////// postprocessing ////////////////
edge collapsing...
edge collapsing done!
time = 6.2761e-05s
#v = 91(125)    unrounded = 0
#t = 148(212)
max_energy = 3.69612
avg_energy = 2.33998
min_angle = 24.4348, max_angle = 109.722
< 5: 0, < 10: 0, < 15: 0
> 175: 0, > 170: 0, > 165: 0

Mesh optimization done.
time = 0.476664s

A target edge length of 0.02 results in an even higher average edge length of 0.33. Only at 0.01 does it return a closer (though still far) average edge length of 0.0349.

@Yixin-Hu
Copy link
Contributor

Yixin-Hu commented Sep 1, 2022

Ok, I'll check it

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

No branches or pull requests

2 participants