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/merge implicit #394

Merged
merged 348 commits into from
Nov 9, 2024
Merged

3djan/merge implicit #394

merged 348 commits into from
Nov 9, 2024

Conversation

3dJan
Copy link
Contributor

@3dJan 3dJan commented Oct 23, 2024

  • Support for Volumetric + Implicit Extension
  • Improved ResourceId generation
  • Resources are written in topological order
  • Rename enum value 'None' to 'BeamLatticeBallModeNone' to not use a python keyword
  • CMakePresets

Build workflow:

  • Getting rid of hard coded lib3mf version in workflow steps

martinweismann and others added 30 commits March 31, 2022 13:37
… in Source/API and Include/API, I am just to lazy to copy manually
…ode 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.
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 66.90821% with 137 lines in your changes missing coverage. Please review.

Project coverage is 66.08%. Comparing base (5abad20) to head (455fb21).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
Source/API/lib3mf_composematrixnode.cpp 69.64% 17 Missing ⚠️
Source/API/lib3mf_functionfromimage3d.cpp 66.66% 16 Missing ⚠️
Source/API/lib3mf_constmatnode.cpp 0.00% 13 Missing ⚠️
Source/API/lib3mf_function.cpp 77.55% 11 Missing ⚠️
Source/API/lib3mf_functionreference.cpp 67.74% 10 Missing ⚠️
Source/API/lib3mf_clampnode.cpp 45.45% 6 Missing ⚠️
Source/API/lib3mf_arcsinnode.cpp 0.00% 5 Missing ⚠️
Source/API/lib3mf_arctannode.cpp 0.00% 5 Missing ⚠️
Source/API/lib3mf_ceilnode.cpp 0.00% 5 Missing ⚠️
Source/API/lib3mf_crossnode.cpp 0.00% 5 Missing ⚠️
... and 16 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #394      +/-   ##
===========================================
- Coverage    71.11%   66.08%   -5.03%     
===========================================
  Files          271      395     +124     
  Lines        30317    44625   +14308     
===========================================
+ Hits         21561    29492    +7931     
- Misses        8756    15133    +6377     

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That file looks misplaced

<error name="INCOMPATIBLEPORTTYPES" code="4000"
description="Link could not be added, the port types are incompatible" />
<error name="GRAPHISCYCLIC" code="4001"
description="The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted." />
Copy link
Collaborator

@gangatp gangatp Nov 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in these words: function and directed

<param name="Value" type="string" pass="in" description="the value of the metadata" />
<param name="Type" type="string" pass="in" description="the type of the metadata" />
<param name="MustPreserve" type="bool" pass="in"
description="shuold the metadata be preserved" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: in "should"

</method>
</class>

<enum name="ImplicitNodeType" description="The type of the node">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImplicitNodeType and other implicit enums starts from value=1 rather than value=0. Is it by purpose?

<option name="ArcCos" description="Calculates the arccosinus" value="22" />
<option name="ArcTan" description="Calculates the arctangent" value="23" />
<option name="ArcTan2" description="Calculates the arctangent" value="24" />
<option name="Min" description="Calculates the minimum tow values" value="25" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: tow -> two in option Min

<option name="Log" description="Natural logarithmus" value="32" />
<option name="Log2" description="Logarithmus to the base 2" value="33" />
<option name="Log10" description="Logarithmus to the base 10" value="34" />
<option name="Select" description="If A is less B returns C, else D" value="35" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description change: A less than B

<option name="ArcTan2" description="Calculates the arctangent" value="24" />
<option name="Min" description="Calculates the minimum tow values" value="25" />
<option name="Max" description="Calculates the maximum of two values" value="26" />
<option name="Abs" description="Calcul the absolute value" value="27" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: calcul -> Calculates

<class name="FractNode" parent="OneInputNode" description="Returns the fractional part">
</class>

<class name="AbsNode" parent="OneInputNode" description="Calcul the absolute value">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Calcul -> calculates

<param name="UUID" type="string" pass="return" description="the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx'"/>
<method name="GetInputM20" description="Retrieves the input for the element 2 0">
<param name="M20" type="class" class="ImplicitPort" pass="return"
description="the input for the m2 element" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description: m2 -> m20

<param name="SliceStacInstance" type="handle" class="SliceStack" pass="return" description="returns the slicestack instance"/>
<method name="GetInputM13" description="Retrieves the input for the element 1 3">
<param name="M13" type="class" class="ImplicitPort" pass="return"
description="the input for the m3 element" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dexcription: m3-> m13

<param name="UUID" type="string" pass="in" description="the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx'"/>
<method name="GetInputM21" description="Retrieves the input for the element 2 1">
<param name="M21" type="class" class="ImplicitPort" pass="return"
decription="the input fr the m21 eement" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eement -> element

description="the added node" />
</method>

<method name="InverseNode" description="Add a InverseNode">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of InverseNode, it should be AddInverseNode to follow other method naming convention.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The format of this file has been changed, making it hard to find the actual changes. I have figured out a few typos, which can also be ignored. Please check the method renaming suggestion in ImplicitFunction::InverseNode -> ImplicitFunction::AddInverseNode.

*/

public:
CCrossNode() = delete;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default constructor is only deleted for this class. Should it be deleted for other ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a ctor, so no default ctor should be created anyway as long we do not request it explictily. Should be safe to remove this line.

*/

public:
COneInputNode() = default;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it supposed to be deleted instead of using default like many others?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be deleted

if (iIterator != m_ResourceMap.rend()) {
currentResourceID = iIterator->first + 1;
}
// Retrieve a unique Resource ID
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial implementation for this PR #386 was also quite similar. But @alexanderoster and @gangatp mentioned that this would require creating the set everytime and this can make things slower. This is why i introduced m_MaxResourceId.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your implementation is problaby much faster, but the key of m_ResourceMap is the UniqueResourceID, not the ModelResourceID.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

occupiedIDs should become a member of CModel, than it only has to be updated when adding or removing resources

)

file(GLOB_RECURSE SOURCES LIST_DIRECTORIES false CONFIGURE_DEPENDS Source/*.cpp) # Recursively get all .cpp files, the false is to not follow symlinks
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better :)

Copy link
Collaborator

@vijaiaeroastro vijaiaeroastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can approve once everyone is collectively done.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏾

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏾

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, this is fixed in ACT itself.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, this is fixed in ACT itself.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used anywhere ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not anymore

@vijaiaeroastro
Copy link
Collaborator

@3dJan @gangatp @ewaldbrADSK I am approving and merging this PR. Since there has not been any other objections, We will proceed as already discussed and fix the issues in develop branch after merging this PR.

@vijaiaeroastro vijaiaeroastro merged commit be3289c into develop Nov 9, 2024
40 of 42 checks passed
@3dJan 3dJan mentioned this pull request Nov 15, 2024
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.

4 participants