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
[Part] Add scaleKnotsToBounds method to BSplineCurve #7385
Conversation
While thinking back on this, I don't think setBounds is a good name choice. |
I think setBounds is accurate given the signature. Only the first and last knots are given, and the ones in the middle appear to just be scaled to that range. However, the topic is different if there already exists a "setBounds" function for other curves (I see that there is a setRange() in some cases) that actually keeps the same parametrization but changes start and end params (effectively changing the shape of the curve). AFAICT a function like this wouldn't make sense for a spline because of it's piecewise nature. To further complicate the matter, there is a setKnots() function in OCCT that can specify a different sequence of knots. AFAIK that can change the shape of the spline. So to summarize: setBounds isn't inaccurate, but if a function with the exact same name doing different things exists for other curves, it should be renamed; and, alternative names you suggested can add it's own kind of ambiguity. If we have to rename I suggest something like "scaleKnotsToBounds()". |
scaleKnotsToBounds is both self-explaining and non-ambiguous. |
@tomate44 is there a reason you chose to make a merge commit rather than a rebase? |
@AjinkyaDahale Are you talking about Merge branch 'master' into BSC_setBounds ? |
@tomate44 not a trap by itself, but if this PR stays for longer there will be another "this branch is out of date", and then the update will add yet another such commit. At least in 2016-17 that was the case. A cleaner solution is to rebase. This will then rearrange the commits such that it looks as if you made directly on the current master. It can be achieved by clicking the dropdown next to that "update" button and clicking "rebase and update". |
and change BSplineSurface.setBounds() to use dedicated OCCT function
e15ca32
to
73241d4
Compare
@AjinkyaDahale Thanks for the hint. |
Yeah I don't use github for this either. Just some tools I'm myself used to (magit within emacs). |
Fixes the test failure: a783d5b |
and change the methods to use dedicated OCCT function
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the FreeCAD forum!
App
,Base
,Gui
or one of theMod
subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next onesgit pull --rebase upstream master
./bin/FreeCAD --run-test 0
Fixes typo in Draft Move command text
Draft: Fixed typos
issue #<id>
orfixes #<id>
where<id>
is the issue ID number from our Issues database in case a particular commit solves or is related to an existing issue. Ex:Draft: fix typos - fixes #4805
And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.20 Changelog Forum Thread.