feat: add bezier_patch_join() for G1-continuous surface joining (#568)#1962
Open
junhinhow wants to merge 1 commit intoBelfrySCAD:masterfrom
Open
feat: add bezier_patch_join() for G1-continuous surface joining (#568)#1962junhinhow wants to merge 1 commit intoBelfrySCAD:masterfrom
junhinhow wants to merge 1 commit intoBelfrySCAD:masterfrom
Conversation
…rySCAD#568) Adds bezier_patch_join(patch1, edge1, patch2, edge2, tangent_len) to beziers.scad for creating smooth transition patches between existing patches. The function: - Extracts points and tangent vectors from specified edges (u0/u1/v0/v1) - Computes interior control points along tangent direction to ensure G1 (tangential) continuity at the junction - tangent_len parameter controls transition curvature (fraction of inter-edge distance, default 1/3) - Returns cubic patch (4 rows) compatible with bezier_vnf() Helper function _bpj_edge_data() extracts edge/tangent data from any side of a bezier patch. Full documentation with Synopsis, SynTags, Topics, Examples. Tests added covering: u/v edge joining, G0 continuity, valid VNF, variable tangent_len. Contributes to issue BelfrySCAD#568 (smooth 3D polygons) as a building block for smooth surface joining.
b7812fd to
ff459e6
Compare
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.
Summary
bezier_patch_join(patch1, edge1, patch2, edge2, tangent_len)function in beziers.scadtangent_lenparameter controls transition curvature (fraction of inter-edge distance)_bpj_edge_data()extracts edge points and tangent vectorsThis is a building block for the broader smooth 3D polygon goal discussed in #568 — enables programmatic joining of bezier surfaces with guaranteed smoothness.
Test plan
bezier_vnf()tangent_lenvalues produce different interior control pointsAddresses #568
🤖 Generated with Claude Code