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

Speed up evaluation of NURBS curves by use of subdivision into Bezier segments #4734

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

portnov
Copy link
Collaborator

@portnov portnov commented Nov 2, 2022

Evaluation of Bezier curves is much faster than evaluation of generic NURBS curves. But, any NURBS curve can be split up into list of Bezier segments.
For now, this is implemented for non-rational curves only.
And anyway this has to be extensively tested.

Screenshot_20221026_224701

Preflight checklist

Put an x letter in each brackets when you're done this item:

  • Code changes complete.
  • Code documentation complete.
  • Documentation for users complete (or not required, if user never sees these changes).
  • Manual testing done.
  • Unit-tests implemented.
  • Ready for merge.

@portnov portnov added the NURBS label Nov 2, 2022
@portnov portnov marked this pull request as draft November 2, 2022 16:58
@portnov
Copy link
Collaborator Author

portnov commented Nov 18, 2024

Why this is not merged yet:
This new implementation has much more efficient curve.evaluate_array() method, i.e. when we have one Curve object, we can calculate lots of points at once very quickly.
However, many NURBS algorithms, such as intersection of curves, require not evaluation of many points at once, but instead: 1) evaluation at one point; 2) control points manipulation primitives, such as "insert knot" or "split curve in two". And these primitives are slower in new implementation.

An idea how to proceed: for "Bezier In" and "NURBS Input" nodes, add possibility to use new implementation (add new item to "Implementation" parameter). So that if the user knows he has to calculate many points on the curve and not do more complex manipulations, he can use new implementation. Also maybe add new node "Convert NURBS Curve Implementation".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant