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

About loadMultipleFiles and solveIntersections functions. #25

Open
ihsienlee opened this issue Nov 18, 2024 · 2 comments
Open

About loadMultipleFiles and solveIntersections functions. #25

ihsienlee opened this issue Nov 18, 2024 · 2 comments

Comments

@ihsienlee
Copy link

Dear Gianmarco,
Thanks for getting back to me so quickly.
I tried to using the loadMultipleFiles funtion but I got the message.

image

I switched the solveIntersections funtion to a different one.
solveIntersections(in_coords,in_tris,in_labels,arena,gen_points,out_tris,out_labels);

But I got this.

image

Thank you for your assistance.
Best regards,
I-Hsien Lee

@gcherchi
Copy link
Owner

gcherchi commented Dec 9, 2024

Dear Lee,
Could you please paste here the code of how you are using the "loadMultipleFiles" function?

@E99y-Lin
Copy link

Hi gcherchi, I’m responding on behalf of Lee. Below is Lee's code.
image

The two error messages mentioned by Lee can be explained as follows, based on my understanding:
In the file io_functions.cpp, the variable extern int vert_offset is declared at line 43 and used at line 81 within the loadMultipleFiles function. My understanding is that declaring a variable as extern informs the compiler that this variable has already been declared in another .cpp file and should be used directly without redeclaration. However, no other declaration of this variable exists across the entire project. As a result, calling the loadMultipleFiles function fails.
When I removed the extern keyword from int vert_offset in io_functions.cpp, the compilation completed without the undefined reference to vert_offset error.

In solve_intersections.cpp, at line 44, the declaration of meshArrangementPipeline includes a parameter bool parallel, which expects a boolean value.
In the project's original main.cpp, the solveIntersections function being used is the one defined at line 89 of solve_intersections.cpp. Upon inspecting this function, I noticed that at line 94, when meshArrangementPipeline is called, its last parameter is parallel_value. This variable is declared at line 42 as bool parallel_value = true;
image
However, in the other three overloads of the solveIntersections function within the same file, the calls to meshArrangementPipeline do not provide the last boolean parameter.
Since the calls to meshArrangementPipeline in the other three solveIntersections functions do not include the final bool parameter, the compiler interprets them as calls to a different overload of meshArrangementPipeline. However, because no such overload is defined, the compiler generates an "undefined method" error.
Could you please confirm if my understanding is correct?
Thank you for your assistance.

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

3 participants