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

3djan/fix class param life time #401

Closed
wants to merge 28 commits into from
Closed

Conversation

3dJan
Copy link
Contributor

@3dJan 3dJan commented Dec 5, 2024

Temporary fix for the problem, that passing shared_ptr from an API call directly back to the API can result in an access violation. To fix this permanently we need this PR in act.

martinweismann and others added 28 commits April 2, 2024 17:12
Previously libreSSL could not be built on arm64 machines, so there was a flag to build the test only for intel x86_64 machines. 

After updating the libreSSL library, it might not be the case anymore. So removing the CMAKE_OSX_ARCHITECTURE flag.
Update CMakeLists.txt to ignore cmake_osx_architecture in TESTS
… not installed through PyPI, the examples would work as long as the SDK structure is maintained)
* Added CMake and CPack configuration for building and packaging lib3mf across all platforms, including Debian and RPM builds + VCPKG.
* Updated and debugged workflows, .gitignore, and integration tests, ensuring smooth deployment and artifact handling.
* Fixed paths and linking issues across Windows, macOS, and Linux, including handling symlinks and double zipping problems.    
* Enhanced SDK generation and included examples for various build variants, ensuring compatibility and thorough testing.    
* Cleaned up and finalized actions, environment variables, and documentation for consistent and efficient builds and deployments.
…introduction + CI / CD action improvements

* Added CMake and CPack configuration for building and packaging lib3mf across all platforms, including Debian and RPM builds + VCPKG.
* Updated and debugged workflows, .gitignore, and integration tests, ensuring smooth deployment and artifact handling.
* Fixed paths and linking issues across Windows, macOS, and Linux, including handling symlinks and double zipping problems.
* Enhanced SDK generation and included examples for various build variants, ensuring compatibility and thorough testing.
* Cleaned up and finalized actions, environment variables, and documentation for consistent and efficient builds and deployments.
…les (#372)

* Include an additional artifact that packs the code with submodules

* exclude unnecessary stuff

* avoid recursion

* avoid zip.zip
…tically make the version change in required places (#373)

* Included a new script to automatically update lib3mf version in all the required places

* Include some rudimentary documentation in lib3mf_version_update.py
* Included a new script to automatically update lib3mf version in all the required places

* Include some rudimentary documentation in lib3mf_version_update.py

* updating zlib 1.3.1

* updating zlib 1.3.1 version file

* Update README.md

* Modify integration tests

* Fix some mistakes in integration tests

* Accidentally reverted zlib version. Switching back

* Include total must pass and must fail in all integration test outputs

* There's multiple release artifacts with .zip extension. Some adjustments are required

* Fix the issue in 2 integration test workflows. Only 1 must fail now

* Attempting to fix the last two releases action

* Cleaned a little more. All Integration tests should pass now.

* Introduce some more generics in actions (Integration test suite url is not hard coded anymore)

* Make test suite url fetching local to the test jobs

* Switch to hard coded urls for now. Can switch in the next release

* Weird osx build error fix in .yml and .sh

---------

Co-authored-by: gangatp <[email protected]>
Co-authored-by: gangatp <[email protected]>
* Check existing resource ids from OPC package before generating a resource id #380 #355 #183 + Temporary fixes to some CI/CD issues in OSX (due to updated runners in Github)
This PR includes <cstdint> explicitly in headers.
---------

Signed-off-by: Christopher Fore <[email protected]>
Co-authored-by: Martin Weismann <[email protected]>
Co-authored-by: gangatp <[email protected]>
Co-authored-by: Vijai Kumar S <[email protected]>
Co-authored-by: Vijai Kumar S <[email protected]>
* Fix default filter attribute

* Rename linear to linearcolor

* Always write ScalarFieldFromImage3D-channel

* Fix fieldid vs scalar/vector3d-fieldid

* Implement RemoveProperty

* Implement RemoveBoundary and RemoveColor

* Add test for properties

* Fix some iterators

* Add tests for iterators

* Add composite volumetric data

* Replace "Red", "Green",... with "R", "G", ...

* Using file globbing for gathering source files, removing unused *.cpp files

* Adding generateWrapper-script for linux64

* [lib3mf.xml] Introducing ImplicitNode and InplicitAddition

* [genertateWrapperAndBindingsLinux64.sh] Creating implementation stubs in Source/API and Include/API, I am just to lazy to copy manually

* Updating year and version

* ModelReaderNode for implicit node

* Introducing addition node

* [lib3mf.xml] Removing ImplicitAdditon. Introducing a class for each node type is to much effort. Adding dynamic inputs and outputs to the base node type, and introducing an enum with the node types. This also allows the user to choose between modeling the node types as classes or to choose a dynamic approach.

* [lib3mf.xml] Adding node types

* Introducing a resource Function that wraps an Implicit Function

* Adding install step for cmake config

* ImplicitFunction is now a resource

* [CMakeLists.txt] Disabling optimization for gcc in debug

* AddFunction works

* [lib3mf_implicitfunction] Avoiding dynamic casting of underlying resource

* Adding NMR_Model prefix to all implicit classes

* Moving methods for writing implicit functions to NMR_ModelWriterNode_Implicit

* Write out functions to resource section

* Adding reader for implicit function

* [.gitignore] Ignoring TestOutput

* [API] Replacing the Accessor by an Iterator to be consistent with the ResourceIterator

* Extending the model for implicit nodes,ports etc.

* Reading node elements of a function

* Adding input and output ports automatically

* Reading input ports

* Adding SetupWriteReadx.3mf to .gitignore

* Input ports with references can be written and read back again

* Writing function inputs and outputs

* Reading inputs and outputs of a function

* Throw on incompatible port types

* Introducing FindInput/FindOutput

* Constants can be written and read back

* Reading and writing constvec

* Reading and writing constMat

* Untracking and deleting 3mf files generate by tests

* Adding missing #include <memory> and some static casts for 32 bit platforms

* Replacing std::make_unique to be c++11 compatible

* Should now compile on 32 bit platforms

* Missed another cast

* Replacing cast to wrong type

* [github action] Use ubuntu-latest runner rather than 18.04

* [CMakeLists.txt] VS2022 failed to compile lib3mf because compile options meant for the c++ compiler were passed to the resource compiler

* [CMakeLists.txt] Using generator expressions only for ninja

* [CMakeLists.txt]  target_compile_definitions -> target_compile_options

* [CMakeLists.txt] Adding buildcache support

* [implicit] Updating naming of inputs and outputs

* [implicit] Correcting case of some node names

* Adding ScalarFieldFunction and Vector3DFieldFunction

* Writng the new function based fields, but Seg Fault in ImplicitSphere test

* [Volumetric tests] Check if the output directory already exists

* [.gitifnore] Adding .vs

* Adding CMakeSettings for legacy visual studio versions

* Adding decomposevector-node for implicit graph

* [Volumetric test] New gyroid test, fixing some issues on the way

* Update lib3mf.xml

* Restructure Function-classes, add 'tag'

* Fix CMakeLists (potentially)

* [NMR_ModelImplicitNode.h] Adding missing argument name

* Removing extra qualification

* Removing another unnessary qualification

* [build.yml] macos-10.15 -> macos-11

* [build.yml] Using macos-11 runner for deploy-macos

* Introducing Resource Node, that allows to set a resource id that than can be used as input for the mesh node

* [implicit] Introducing port type for resource id

* [implicit] point -> pos to make nameing more consistent

* [implicit] Resources are now set by setting a Resource

* [implicit] Resources are now set by setting a Resource part II

* Adding .clang-format

* [Volumetric tests] Exporting implicit model with a sub function

* Removing faulty call to base class constructor that is already called automatically

* Adding test for loading a 3d image

* Updating test file

* Adding debug config

* Introducing NMR_ModelFunctionFromImage3D

* Implementing lib3mf_functionformimage3d

* Adding reader for FunctionFromImage3D

* Adding writer for FunctionsFromImage3D

* Writing test file for FunctionFromImage3D

* Fixing integration test for functionFromImage3D

* Comparing functionsFromImage3D. Tests fails, api for accessing functions has to be changed

* Extending test and fixing writing/reading of resource ids

* Breaking change: Dropping Fields in favor of Functions. Tests are WIP

* Replacing Fields with Functions

* [NMR_ModelImplicitFunction] addLink now also resolves output ports

* [volumetric tests] Disabling broken tests, new tests requiered

* [Volumetric tests] Updating compare functions and fixing issue with wrong resource ids

* [volumetric tests] Adding volume data elements

* Readding Transform for VolumeData elements (boundary, color, property)

* [volumetric tests] CreateImplicitWithFunctionFromImage3D writes Transformation

* [volumetric tests] Adding more tests

* [volumetirc tests] Using cube instead of pyramid to make it easier to validate the test results

* [functionfromimage3d writer] Using ModelResourceId for image3dID

* formatting

* [ModelFunctionFromImage3D] Fetching resource in getter rather than getter

* [volumetric test] setting boundary threshold

* [NodeTypes] NodeTypeMap considers port types and multiple combinations

* [ImplicitNodeTypes] Adding nodes and types according to spec

* [implicit] Adding per node type validation

* Adding OutputName to all volume data elements

* outputname -> channelname to be consistent with old spec

* Implementing ChannelName into volumedata reader

* Adding missing channel attribute to writer

* [implicit] Adding clamp

* [implicit] Using optionalclass for FindOutput and FindInput

* [implicit] Implementing removeNode

* [implicit] Adding clear method to implicit functions

* [lib3mf.xml] Introducing MinFeatureSize and MeshBBoxOnly

* Writing and reading minfeaturesize and meshbboxonly

* [lib3mf_model] Introducing mergeFunctions

* Replacing resourceids during merging of functions

* Introducing MergeFromModel

* [volumetric] Adding test for merging a second function

* [NMR_Model] Creating new package ids for the merged functions

* Fixing broken tests

* [ImplicitFunction] Introducing SortNodesTopologically

* [Volumetric tests] Adding volume element to shell from mesh test

* Fixing warning that is turning into error with VS2022

* Removing solidthreshold attribute from <boundary> element

* Introducing ImplicitNodeConfiguration, to set port types during construction of nodes

* [Implicit] Initializing port types based on the set node configuration

* Fixing warnings and errors from gcc

* Satisfying clang warnings

* Using local independent std::from_chars for parsing floating point numbers

* Setting c++17 for all compiler

* Replacing strtof with fnStringToFloat

* [fnStringToDouble] Adding std::chars_format::general, not all compiler seem to support the overload with 3 arguments

* [build.yml] Changing all runners to latest

* Revert "Replacing strtof with fnStringToFloat"

This reverts commit 27ca9de181dc1213a1f06ef6d626fb5d89c552df.

* Falling back to strtod for non c++17 complaint platforms

* [lib3mf.xml] Adding spezialized node classes

* [lib3mf.xml] Adding spezialized factory methods for implicit nodes

* Generating new API with ACT

* [implicit] Adding factories for spezialized node types

* [Volumetric tests] Using new API for node creation

* [CImplicitNode] Explicitly initalizining m_pImplicitNode in derived classes

* [Volumetric tests] Passing again

* [Volumetric/Implicit] Enabling dynamic_pointer_cast for nodeiterator->getCurrent()

* [Volumetric] Improving error messages

* Ports now know the referenced port, not just its name

* Introducing DirectedGraph

* [build.yml] Don't fail cli if codecoverage fails

* Adding fast_float as submodule

* Using fast_float for string parsing

* [Common/graph] Unsigned indices

* [GraphAlgorithms]  Resolving signed/unsigned mismatch

* Updating accroding to spec: UnsignedMesh, vectorfroamscalar, matrixfromrows, matrixfromcolumns

* Adding fallback value to volume data elements

* Improving Volumetric tests, so that the output files make more sense

* Breaking change: Adding implicit namespace with prefix "i", writing and reading considers the namespace. Writing explicitly the default channel name for volumedata:boundary

* [NMR_ImplicitNodeTypes] Adding VectorFromScalar and UnsignedMesh

* [implicit] Don't write inputs for nodes that are not supposed to have them

* Fixing namespace check for volumetric and implicit

* Updating namespace urls for volumetric and implicit

* CheckRequiredExtensions now considers Volumetric and Implict namespace

* Introducing BoundaryShape, removing boundary from VolumeData

* Introducing ModelBoundaryShapeObject

* Implementing wrapper for boundary shape

* Reader for boundary shape

* Removing boundary from volume data

* Making VolumeData a Resource (WIP)

* [CModelVolumeData] Removing boundary

* [VectorFromScalarNode] Adding missing implementation by inheriting OneInputNode

* Adding VolumeData as resource

* [BoundaryShape] Implementing writer

* Add XML attribute for boundary shape ID

* [API] Introducing AddBoundaryShape

* [Volumetric tests] fixing some tests, but requiers api mehtod to query BoundaryShapeObjects

* [Volumetric tests] Tests pass again

* [CBoundaryShape] Adding implementation for Set and GetVolumeData

* [.gitmodules] Adding cpp-base64

* [.gitmodules] Adding googletest, libzip and zlib

* Renaming boundary shape to level set

* Correcting filename case

* Correcting more filename cases

* Implement IsMeshObject method in CLevelSet class

* Introducing IsLevelSetObject

* Add GetLevelSetByID method to IModel interface

* Fix null pointer exception in CMeshObject::GetVolumeData()

* Add support for CModelLevelSetObject in CObject::fnCreateObjectFromModelResource

* [implicit] Adding mod (glsl) node

* Adding missing ctor for CMoeNode

* Resource -> ConstResourceID

* [WriterNode_Implicit] Writing function outputs at the end of functions rather than in the beginning to avoid forward references

* cherrypicking fix for functionfromimage3d to read scale and offset

* Add CMakePresets.json for build configurations

* [levelset] Adding missing override for IsComponentsObject()

* [levelset] Adding missing override for IsComponentsObject()

* Writing id attribute of <volumedata>

* Removing XML constants for scalar and vector fields

* Reading volumedata id attribute

* feat: Add volumeData Id assertion and validation in Volumetric tests

* XML constants for volumedata and levelset attributes

* Add writePrefixedIntAttribute method to ModelWriterNode

* Levelsets writes volumeid

* Mesh writer does not write VolumeData anymore

* refactor: Update attribute name in ModelReaderNode_LevelSet.cpp

* ModelReaderNode100_Mesh reads volumeid

* volumedata is wrtten out as a resource

* CModelReaderNode100_Mesh parses volumeid with namestace prefix

* Implicit: function -> implicitfunction, for now both element names are accepted for reading to migrate existing files

* CLevelSet::GetVolumeData returns nullptr if no volumedata is set

* Levelset writes volumeid without namespace prefix

* Correcting string literals based on findings by quality logic

* Writing prefix for functions inputs again

* Improving error messages

* Enhance CNMRException to include detailed error messages and improve exception handling

* Improving resource ID handling for merging implicit functions

* [CModel] Refactor resource ID generation to ensure uniqueness

* generateResourceID now considers the model resource id rather than the UniqueResourceID

* Update GitHub Actions to use checkout and upload-artifact actions version 4

* Update GitHub Actions to use download-artifact action version 4

* Refactor model writer to introduce dedicated methods for writing base materials, textures, and colors

* Extract resource write methods

* Extracting writeResource

* Write resources in topological order

* Add cyclic dependency check to resource sorting algorithm

* Prevent duplicate metadata addition and enhance test coverage for model merging

* Fixing mix up between unique and model resource id

* Rename UniqueResourceID to ModelResourceID in CModelImplicitNode

* Enhance error message for resource ID not found exception to include details on potential forward references

* Fixing issue with merging functions

* Adding new tesf files for volumetric test

* Setting parent of merged implicit nodes

* Implement RemoveResource method in model interface and bindings

* Remove package resource ID from resource handler upon resource removal

* Add function resource verification in volumetric tests and update function count handling

* Refactor function count retrieval and clean up debug output for merged implicit functions

* Resolving merge conflicts

* Update dynamic library copy command to use version variable for consistency

* Update dynamic library copy command to include version suffix

* Rename enum value 'None' to 'BeamLatticeBallModeNone' to not use a python keyword

* Update lib3mf_DIR paths to use environment variable for versioning

* Increasing code coverage of binding tests

---------

Co-authored-by: Martin Weismann <[email protected]>
… the life time of the classParam instance. Needs to be fixed in ACT as well to be permanent.
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 79.31034% with 6 lines in your changes missing coverage. Please review.

Project coverage is 66.08%. Comparing base (eb799bc) to head (82abc09).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
Autogenerated/Source/lib3mf_types.hpp 33.33% 4 Missing ⚠️
Include/API/lib3mf_image3diterator.hpp 0.00% 1 Missing ⚠️
...clude/Model/Classes/NMR_ModelFunctionFromImage3D.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #401      +/-   ##
==========================================
- Coverage   69.19%   66.08%   -3.12%     
==========================================
  Files         271      395     +124     
  Lines       28691    44625   +15934     
==========================================
+ Hits        19854    29489    +9635     
- Misses       8837    15136    +6299     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vijaiaeroastro
Copy link
Collaborator

@3dJan I guess we can close this PR.

@3dJan 3dJan closed this Dec 16, 2024
@3dJan 3dJan deleted the 3djan/Fix_ClassParamLifeTime branch December 16, 2024 13:32
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.

5 participants