Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sketcher: Unit independent pole weight for B-Splines (Weight constraint)
======================================================================== Until now BSpline poles were circles relying on physical length units. This lead to several problems: - While the BSpline weight follows the circle size, weights do not have length units, but are adimensinal - As representation of the BSpline depends on the physical size of the circle, the numerical value to be set to a pole circle differs from the numerical value of the weight. The present commit: 1. Separates pole circle representation (physical size), from the numerical value used in the radius constraint, so that the value in the constraint is the weight, the value representation is a factor of the weight value (in this commit is getScaleFactor(), but this will change in the next commit). Dragging accounts for this scale factor too. 2. While Radius constraint button is used to constraint a B-Spline weight as before, this creates a Weight constraint, which is a new type of constraint. This is done so that the value is truly adimensional and is so presented in all kind of editors that rely on the units indicated by the constraint. It is obviously also shown as adimensional (thus without units), in the 3D view and in the datum dialogs. 3. Because the circle of the pole of a B-Spline is not a geometric circle, but a graphical representation of the pole and how it affects the corresponding B-Spline, constraint creation commands are limited so that no point on object, tangent, perpendicular or SnellLaw constraints can be created on a B-Spline weight circle. This is also the case for the Diameter constraint, which won't accept the circle. Equality constraints work either on only circles or only weights, but not on a mixture of them. Bonus: This commit fixes a bug in master, that using the select equality constraint then click in two geometric elements mode, you could make a circle equal to an ellipse resulting in malformed solver constraints.
- Loading branch information
1 parent
8080e8d
commit 95c1a26
Showing
11 changed files
with
444 additions
and
85 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
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
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
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
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
Oops, something went wrong.