forked from solvespace/solvespace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NURBS: Improve calculation of tangents on degenerate NURBS patches
This avoids zero length normals. Sometimes NURBS patches have a "degenerate" (zero length/to a point) edge/side. For example lathed surfaces with a point on the lathe axis. In this case the tangent(s) on points "along" that "edge" become zero length. A normal `n` at a point (u.v) on a NURBS surface is calculated by calculating the tangents `tu` and `tv` at that point and taking the cross product. However when an edge is "degenerate" then `tv` (or possibly `tu`) becomes zero and `n` becomes zero. This causes a problems with NURBS booleans when the seams are in-plane with another surface. To solve this problem the tangent calculation is changed to shift `u` or `v` inwards if `tu` or `tv` is shorter than a threshold value. Fixes: solvespace#652 Alternative to: solvespace#736 solvespace#734
- Loading branch information
Showing
1 changed file
with
49 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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