Repository navigation
Modeling Data - Geom_BezierSurface IsURational and IsVRational documentation matches the example - #1602
Open
gsdali wants to merge 1 commit into
Open
Modeling Data - Geom_BezierSurface IsURational and IsVRational documentation matches the example#1602gsdali wants to merge 1 commit into
gsdali wants to merge 1 commit into
Conversation
…ntation matches the example The text says IsURational returns False if the weights are identical in the U direction, but its own example matrix has weights 1.0, 0.5, 2.0 down a column (they vary along U and are identical along V) and returns False. The static Rational() compares Weights(I, J) with Weights(I, J + 1), so Urational is false exactly when every row of the weight matrix is constant, and Vrational is false exactly when every column is. Use the wording Geom_BSplineSurface already has for IsURational, and the matching one for IsVRational. Documentation only, no behaviour change, so no test.
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.
Pre-Submission Checks
.github/CONTRIBUTING.md.Group - Summaryformat.Problem / Motivation
Geom_BezierSurface.hxxsaysThe weights in that matrix are not identical in the U direction: they run 1.0, 0.5, 2.0 down a column. They are identical in the V direction. The prose and the example contradict each other, and the example is the one that matches the code.
IsVRationalhas the mirrored problem.Geom_BezierSurface.cxxsetsUrationalin the staticRational()frominside a loop over
Ithat walksJ, so it compares neighbours in the column index.Urationalis false exactly when every row of the weight matrix is constant, andVrationalis false exactly when every column is. Each flag names the axis opposite the one it compares along, which is easy to misread from the prose: a cylinder converted to aGeom_BSplineSurfacereports(IsURational, IsVRational) = (0, 1), which reads as an inverted conversion if the prose is taken literally.Geom_BSplineSurface.hxxalready says this correctly, with the same two example matrices ("Returns False if for each row of weights all the weights are identical."), so the two headers also disagree with each other.Proposed Solution
Give
IsURationalandIsVRationalofGeom_BezierSurfacethe wordingGeom_BSplineSurfacehas ("for each row of weights" and "for each column of weights"). The example matrices and the tolerance sentence are untouched. Documentation only: no code, no behaviour change, so no GTest is added.Validation
A probe linked against a local build of current
IR, four explicit 3 x 3 weight matrices on aGeom_BezierSurface:IsURationalIsVRationalIsURational)IsVRational)This is what the new wording says.
TKG3dwas rebuilt with the changed header (Release, macOS arm64, clang) with no warning.Checks performed:
TKG3dbuilds.)clang-format 18.1.8 with the repository
.clang-format, the license check and the include cleanup of the formatting job report no change, and the file contains no non-ASCII character.Review Notes
Comment-only change in one header, independent of the other open pull requests.