Skip to content
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
8 changes: 6 additions & 2 deletions desc/geometry/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,9 @@ def from_values(cls, coords, N=10, basis="xyz", name=""):
warnif(
np.max(np.abs(coords_rotated[:, 2])) > 1e-14, # check Z=0 for all points
UserWarning,
"Curve values are not planar! Using the projection onto a plane.",
"Curve values are not planar! "
f"Max planarity violation of {np.max(np.abs(coords_rotated[:, 2])):1.2e} m."
" Using the projection onto a plane.",
)

# polar angle
Expand Down Expand Up @@ -1341,7 +1343,9 @@ def from_values(cls, coords, N=10, s=None, basis="xyz", name=""):
warnif(
np.max(np.abs(Z)) > 1e-14, # check that Z=0 for all points
UserWarning,
"Curve values are not planar! Using the projection onto a plane.",
"Curve values are not planar! "
f"Max planarity violation of {np.max(np.abs(Z)):1.2e} m."
" Using the projection onto a plane.",
)

if isinstance(s, str):
Expand Down
Loading