Iss14#110
Open
Zetison wants to merge 3 commits intoSINTEF:iss14from
Open
Conversation
Member
|
This needs to be rebased on master |
There was a problem hiding this comment.
Pull request overview
This PR addresses #108 by updating order elevation so non-open (unclamped) and periodic knot vectors are handled by falling back to an implicit/interpolation-based implementation, while introducing an explicit order-elevation algorithm intended for open knot vectors.
Changes:
- Updated
SplineObject.raise_orderto route non-open/periodic cases to a newraise_order_implicitmethod and added an explicit open-knot-vector path. - Added a new
raise_order_1Dhelper (derivative-based degree elevation) used by the explicit path. - Renamed
Curve.raise_ordertoCurve.raise_order_implicitto align with the new dispatch behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| splipy/utils/init.py | Updates __all__ exports (currently adds an invalid export). |
| splipy/SplineObject.py | Adds explicit order elevation, implicit fallback, and a new 1D helper implementation. |
| splipy/Curve.py | Renames curve-specific order elevation implementation to raise_order_implicit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'check_section', 'check_direction', 'ensure_flatlist', 'is_singleton', | ||
| 'ensure_listlike', 'rotate_local_x_axis', 'flip_and_move_plane_geometry', | ||
| 'reshape', | ||
| 'reshape','raise_order_1D' |
| from splipy import BSplineBasis | ||
| from splipy.utils import reshape, rotation_matrix, is_singleton, ensure_listlike,\ | ||
| check_direction, ensure_flatlist, check_section, sections | ||
| import splipy.state as state |
Comment on lines
+444
to
+445
| self.raise_order_implicit(*raises) | ||
| return |
Comment on lines
+442
to
+443
|
|
||
| if any(not(b.continuity(b.knots[0]) == -1) or b.periodic > -1 for b in self.bases): |
Comment on lines
+1483
to
+1486
| Qt[:,0,indices] = np.multiply(Pt[:,0,indices],np.reshape(alpha[indices],(1,1,k))) # (21) | ||
| for p in range(0,S): | ||
| indices = range(k-z[p],k) | ||
| Qt[:,beta[p]+p*m,indices] = np.multiply(Pt[:,beta[p],indices],np.reshape(alpha[indices],(1,1,z[p]))) # (22) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #108