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

Bezier Extraction issues #406

Closed
jzwar opened this issue Apr 9, 2024 · 4 comments
Closed

Bezier Extraction issues #406

jzwar opened this issue Apr 9, 2024 · 4 comments
Assignees

Comments

@jzwar
Copy link
Collaborator

jzwar commented Apr 9, 2024

Following test fails:

import splinepy as sp
import numpy as np


test = sp.BSpline(
    degrees=[0, 0],
    control_points=[
        [0], [1], [2], [3],
    ],
    knot_vectors=[[0, .5, 1], [0, .5, 1]]
)

for i, patch in enumerate(test.extract.beziers()):
    if not np.allclose(test.cps[i], patch.cps[0]):
        print(f"{i}")

2,3

@j042 , ideas?

@jzwar jzwar assigned j042 and jzwar Apr 9, 2024
@jzwar
Copy link
Collaborator Author

jzwar commented Apr 9, 2024

test.knot_insertion_matrix(beziers=True) -> Segfault

@jzwar
Copy link
Collaborator Author

jzwar commented Apr 9, 2024

Pretty sure the problem is in this
line

Bezier extraction assumes C^0, but 0th order is C^-1

Is this something we want fixed, or just warning? Bezier could also be special case (as Bezier extraction just results in cps[i]

@jzwar
Copy link
Collaborator Author

jzwar commented Apr 10, 2024

Has been fixed for bezier extraction, however, there is still a bug in the bezier extraction matrices, pushed it to new issue #409

@jzwar jzwar mentioned this issue Apr 10, 2024
3 tasks
j042 pushed a commit that referenced this issue Apr 11, 2024
j042 pushed a commit that referenced this issue Apr 11, 2024
@j042
Copy link
Member

j042 commented Apr 17, 2024

Thanks for the fix!

@j042 j042 closed this as completed Apr 17, 2024
markriegler pushed a commit that referenced this issue Aug 6, 2024
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

No branches or pull requests

2 participants