-
Notifications
You must be signed in to change notification settings - Fork 6
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
Provide a conan recipe for ease of use #46
Provide a conan recipe for ease of use #46
Comments
Vtu11 is a small C++ header-only library to write unstructured grids using the vtu file format. It keeps the mess of dealing with file writing in different formats away from you. Currently it does not add any features for setting up the required data structure because this vastly differs based on the context in which vtu11 is used. See https://github.com/phmkopp/vtu11 Fixes issue: phmkopp/vtu11#46
See conan-io/conan-center-index#14802 for the issue |
Hey @jellespijker, this sounds great! I have tried Cura once, and we will probably use it in the future for our research on numerical methods for LPBF. I'm glad that our project helps you, if you have any other improvements, then let me know! |
I originally thought that you needed to add files to our project, but I realized that this is not true? Either way, let me know how I can help, and thanks a lot for taking care of this :) |
You can use Conan in- and out-source. The CCI (conan-center-index) uses out-source for obvious reasons, so no change or maintenance required from your side. |
Curious about your research with regards to laser powdered bed tho ;-) |
As I know from experience there are some downsides and upsides of adding a library to the CCI; It will be tested, build and compiled in 100+ different configuration, with various compilers (compiler versions and OS). This always brings to light that the package didn't take into account certain things, because he a developer normally doesn't build all these locally. At least I don't ;-) So this is just for FYI. There are some issues with using older compiler and the
The easiest fix for me is to exclude the configuration of being valid for these, but you might want to look into these error to see how you can make your lib more rugged. |
In short: we developed an efficient method for simulating LPBF based on a simple thermal model here. So far, it's just a proof of concept, but we want to start simulating real problems, which requires a few extensions. We also started working on numerical optimization of laser beam shapes here. Also this work is just an initial attempt, there are many things one can optimize for. |
Hmm, we do have a few configurations in our CI, but certainly not hundreds of them. Let me have a look at this. |
With regards to the CI failure for gcc-5, it can also mean that I forgot to add a compiler flag or something like that btw. I'm investigating now. |
btw, feel free to contact me on LinkedIn https://www.linkedin.com/in/jellespijker/ |
@phmkopp It looks like I was missing the |
It fails on Windows now for some reason, will look into this at a later time. |
This is probably connected to zlib, I don't think we test it with MSVC. Let me have a look. |
For sure, I refused to create a LinkedIn account so far, but eventually I might have to :) |
I reproduced the error you linked and it looks like we have the same issue as discussed here, that The second option is probably less invasive, considering that users of vtu11 headers may use this max macro (although, who does that ... but okay). Shall I update this quickly? |
@phmkopp I have faced this error before, this is how I solved it in another usecase: https://github.com/KratosMultiphysics/CoSimIO/blob/master/co_sim_io/includes/filesystem_inc.hpp I think the same could be used for vtu11 |
@philbucher it would go in alias.hpp, into the #endif, where we include ghc filsystem. I think either works. But these checks are really not that important ... |
@jellespijker We created a new release (v1.2) that hopefully fixes the issue you had and also a few other things that lead to clang and msvc warnings that we discovered earlier. |
Finally got some time again, will try out v1.2 |
All packages have been been build successful. The PR is now waiting for 3 approving PRs on their side. Thank you guys for the quick fix. |
Awesome :) Thanks again for taking care of this! |
I will create a PR for the readme explaining how people can use it with Conan against your repo once it is merged and available to the public |
Yes, that would be great! I was thinking of doing the same after having a look, but given my limited knowledge, it would be much better coming from you. |
I thought you guys might be interested in my hobby PR Ultimaker/CuraEngine#1806 It is still very much in WIP but made possible with your lib |
I have very little ideas of what I'm looking at, but it looks very nice :) Thank you! I'll take a look later and see how it develops. Again, if you need any changes from us, just let us know. |
* Add recipe for vtu11 Vtu11 is a small C++ header-only library to write unstructured grids using the vtu file format. It keeps the mess of dealing with file writing in different formats away from you. Currently it does not add any features for setting up the required data structure because this vastly differs based on the context in which vtu11 is used. See https://github.com/phmkopp/vtu11 Fixes issue: phmkopp/vtu11#46 * Fix indention of the url sources * Use std namespace for nullptr * Add -std=c++11 flag when relevant * Revert "Use std namespace for nullptr" This reverts commit 6ce965e. * explicit type initialization * Use size_t instead of ULong Visual Studio doesn't know this type * Replace include and namespace alias for msvc * Revert "Use size_t instead of ULong" This reverts commit d951f75. * Add replace_in_file import * Use version 1.2.0 This version should fix the compilation for the msvc * Remove patches There are none to be applied * Remove unused imports * Specify encoding * Update recipes/vtu11/all/test_package/CMakeLists.txt Co-authored-by: Uilian Ries <[email protected]> * Apply suggestions from code review Co-authored-by: Chris Mc <[email protected]> Co-authored-by: Uilian Ries <[email protected]> * Use patch for filesystem when compiling with C++17 Removing the filesystem.hpp failed when compiling on some Windows systems MSVC needs this to actually report the right value when using the __cplusplus pre-definition macro. See here for details: https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus * don't use fuzz when patching --------- Co-authored-by: Uilian Ries <[email protected]> Co-authored-by: Chris Mc <[email protected]>
Hi @phmkopp,
[links to PR to follow]
Thank you for providing this small vtu writer. The functionality of this library will help me out a lot I think. I'm one of the developers work on Cura https://github.com/Ultimaker/Cura, which is a 3D printing slicing software that has an external back-end written in C++ https://github.com/Ultimaker/CuraEngine were we do a lot operations on different geometric structures (polygons, meshes, etc). our algorithms and issues can be hard to debug without some graphical aid's. I'm planning to write a small graphical debugger which will log all our polygons with helpful debugging information to a VTU file, such that these can analyzed in a more human way, using Paraview.
For this library to be able to integrate in our builds and development environment, we need a Conan recipe. Conan is a C++ dependency manager. Since I think more people would benefit from your library I wrote a recipe, such that it can be added to the conan-center-index as a PR.
People can just use your library out-of-the box by installing Conan
add a
conanfile.txt
containingTheir CMakeLists.txt can then be
Conan has then generated the CMake modules for the vtu11 package according to currently used, OS, Architecture, Options, Compiler flags etc. But they can also use your project for other build tools, such as: MSbuil, Visual Studio, b2, autotools, xcode... what ever they use.
The above is just the bare minimum most simplistic usage. More fine-grained control can be achieved with a
conanfile.py
. Which we use to build and deploy Cura and all here internal and external dependencies with millions of users over 3 OSes.Additional information:
The text was updated successfully, but these errors were encountered: