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

Hint at what orientation means in the error message #144

Merged
merged 5 commits into from
Jul 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/algorithms/triangulation/check_args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ end
function Base.showerror(io::IO, err::InconsistentOrientationError)
print(io, "InconsistentOrientationError: ")
asinghvi17 marked this conversation as resolved.
Show resolved Hide resolved
if err.should_be_positive
print(io, "The orientation of the boundary curve with index ", err.index, " should be positive, but it is negative.")
print(io, "The orientation of the boundary curve with index ", err.index, " should be positive, but it is negative. You can fix this by passing the curve as `reverse(curve)`.")
asinghvi17 marked this conversation as resolved.
Show resolved Hide resolved
else
print(io, "The orientation of the boundary curve with index ", err.index, " should be negative, but it is positive.")
print(io, "The orientation of the boundary curve with index ", err.index, " should be negative, but it is positive. You can fix this by passing the curve as `reverse(curve)`.")
asinghvi17 marked this conversation as resolved.
Show resolved Hide resolved
end
return io
end
Expand Down Expand Up @@ -169,4 +169,4 @@ function has_consistent_connections_contiguous(boundary_nodes)
vₙ = get_boundary_nodes(boundary_nodes, nn)
v₁ ≠ vₙ && throw(InconsistentConnectionError(0, 0, 0, v₁, vₙ))
return true
end
end
Loading