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

Invalid .ele file when triangle_write_elements is called before triangle_write_nodes #23

Open
jzarl opened this issue Jan 9, 2018 · 2 comments

Comments

@jzarl
Copy link
Contributor

jzarl commented Jan 9, 2018

The fact that triangle_write_nodes() needs to be called before triangle_write_elements() was quite surprising to me.

It would be nice if this (and other dependencies, if they exist) were documented. Maybe it would even be possible to have the functions check for this automatically and fail if called in the wrong order?

@wo80
Copy link
Owner

wo80 commented Jan 10, 2018

Sure, this should be documented. The writenodes method is responsible for numbering the nodes. The original Triangle code uses the nonodewritten field of the behavior struct to check if it was called, otherwise the numbernodes method is called. I removed the field, but I guess it's the easiest way to restore this feature.

Regarding other dependencies: I've opened another IO related issue in #24

@wo80
Copy link
Owner

wo80 commented Jan 10, 2018

Additionally, numbering the nodes is done by using setvertexmark. So, if this field of the vertex data structure is actually used as intended (as an integer boundary marker), there should be some way to restore the original information after numbering.

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