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

Feature/gridedit 934 undo for curvilinear #318

Merged
merged 129 commits into from
Apr 18, 2024

Conversation

BillSenior
Copy link
Contributor

No description provided.

Changed name of function from GetNumActiveNodes/Edges to GetNumValidNodes/Edges
Fixed windows compilation error.
Added extra members to Mesh1/2D, for the number of valid nodes and edges
Updated error message when index is out of range.
@BillSenior BillSenior requested a review from lucacarniato April 4, 2024 09:12
grid->GetNode(ny, i).y = grid->GetNode(ny - 1, i).y + deltaY;
}

// // For left but bottom
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?


grid->ComputeGridNodeTypes();

// undoActions.Undo(); //
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

#pragma once

#include <memory>
#include <utility>
Copy link
Contributor

Choose a reason for hiding this comment

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

utility and vector not needed

void CommitAction(const ResetCurvilinearNodeAction& undoAction);

/// @brief Prints the node and edge connectivity to the output stream in a form that can be read by Octave/Matlab
void printGraph(std::ostream& out = std::cout);
Copy link
Contributor

Choose a reason for hiding this comment

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

This function should be removed

@@ -53,6 +53,20 @@ namespace meshkernel
/// @brief Overloads equality with another CurvilinearGridNodeIndices
bool operator==(const CurvilinearGridNodeIndices& rhs) const = default;

CurvilinearGridNodeIndices& operator+=(const CurvilinearGridNodeIndices& val)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would make sense to check if the addition or subtraction goes out of bounds here?

UInt FullNumN() const { return static_cast<UInt>(m_gridNodes.rows()); }

/// @brief Restore grid to state before grid line was added
void RestoreAction(const AddGridLineUndoAction& undoAction);
Copy link
Contributor

Choose a reason for hiding this comment

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

create an UndoAction folder where to put all actions, like you did for mesh

@BillSenior BillSenior merged commit ba97932 into master Apr 18, 2024
12 of 13 checks passed
@BillSenior BillSenior deleted the feature/GRIDEDIT-934_undo_for_curvilinear branch April 18, 2024 12:45
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.

2 participants