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

Fixed LE radius projection #235

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
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
5 changes: 2 additions & 3 deletions pygeo/constraints/DVCon.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,14 +928,13 @@ def addLERadiusConstraints(
chordDir /= np.linalg.norm(chordDir)
for i in range(nSpan):
# Project actual node:
up, down, fail = geo_utils.projectNode(X[i], chordDir, p0, p1 - p0, p2 - p0)
lePts[i], fail = geo_utils.projectNodePosOnly(X[i], chordDir, p0, p1 - p0, p2 - p0)
if fail > 0:
raise Error(
"There was an error projecting a node "
"at (%f, %f, %f) with normal (%f, %f, %f)."
"at (%f, %f, %f) in direction (%f, %f, %f)."
% (X[i, 0], X[i, 1], X[i, 2], chordDir[0], chordDir[1], chordDir[2])
)
lePts[i] = up

# Check that points can form radius
d = np.linalg.norm(coords[:, 0, :] - coords[:, 1, :], axis=1)
Expand Down