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

Implement G2 continuity for some nodes #4847

Merged
merged 18 commits into from
Aug 31, 2024
Merged

Conversation

portnov
Copy link
Collaborator

@portnov portnov commented Dec 28, 2022

In scope:

  • Blend Curve
  • Fillet Curve
  • Blend Surface

Blend Curve node

C1 - Tangency mode. The curve itself is smooth, but the normal changes direction radically at the point of curve touching. This is because the curve changes the direction where it turns to, at these points.
Screenshot_20230103_003759

C1 - BiArc mode. Blending curve is made of two circular arcs, and the curvature comb clearly shows us where these two arcs begin and end - there are two segments of constant curvature. At touching points curve's curvature changes suddenly.
Screenshot_20230103_003820

C2 - Smooth Normals mode. C2 means continuous second derivative. Now normal does not change it's direction so suddenly as in "C1 - Tangency" mode. Nor does curvature value change suddenly. The curvature comb rim line is continuous. But you may notice that at touching points the rim line is not smooth, albeit continuous. Also, you can notice that C2 mode creates more "curvy" blending line, which goes farther from touching points, comparing to C1 modes. Informally speaking, C2 mode makes blending line preserve more inertia from the curves being blended.
Screenshot_20230103_003913

C3 - Smooth Curvature mode. C3 means continuous third derivative. Now not only curvature comb rim line is continuous, it is smooth. But now blending curve goes even farther from touching points compared to C1 and C2 modes, as it preserves even more inertia.
Screenshot_20230103_003949

G2 - Curvature mode. This means continuous curvature. Curvature comb rim line is continuous, but not smooth. In this sense, this mode is similar to "C2 - Smooth Normals" mode. But with G2 mode, the blending curve does not go so far from touching points as in C2 or C3 mode.
Screenshot_20230106_003253

Blend Surfaces node

G1 - Tangency mode (this is the mode which is currently used):

Screenshot_20230106_004018

G2 -Curvature mode:

Screenshot_20230106_004049

Comparison of G1 and G2 modes (this is the same shape which is used on pictures above, just with dotted matcap):
Screenshot_20230106_010305

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 marked this pull request as draft December 28, 2022 20:41
@portnov portnov force-pushed the curvature_tangency_modes branch 2 times, most recently from 88f1d9d to 847e536 Compare January 4, 2023 08:16
@portnov portnov force-pushed the curvature_tangency_modes branch from 6e9e02a to 44e75d0 Compare August 31, 2024 07:08
@portnov portnov force-pushed the curvature_tangency_modes branch from 8e59099 to 5791887 Compare August 31, 2024 07:10
@portnov portnov marked this pull request as ready for review August 31, 2024 07:56
@portnov portnov merged commit 6d74b66 into master Aug 31, 2024
2 checks passed
@portnov portnov deleted the curvature_tangency_modes branch August 31, 2024 08:01
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

Successfully merging this pull request may close these issues.

1 participant