Currently there is a command to increase the degree of a B-spline
but the corresponding command to reduce the degree does not exist.
So this command is a placeholder for when the full implementation
is added in the future by somebody.
Also clean up linespacing and whitespaces to make the code more
readable. Extremely long lines are broken to be 80 to 100 characters
long when possible.
Also clean up linespacing and whitespaces to make the code more
readable. Extremely long lines are broken to be 80 to 100 characters
long when possible.
'DrawSketchHandlerCopy' and 'DrawSketchHandlerRectangularArray'
are de-indented so that they start at column 1.
* `MapOnSketch` is active only when there is a sketch available
in the document.
* `ReorientSketch` and `ValidateSketch` are active only when one,
and only one, sketch is selected.
* `MergeSketch` is active only when there is at least two sketches
selected.
* `MirrorSketch` is active only when there is at least one sketch selected.
Clean up the lines so they are not extremely long.
Add template specification for `SketcherAddWorkspaceSketchExtra`
for type `Gui::ToolBarItem` so that the following commands
are added to the toolbar as well as the Sketcher menu:
`ReorientSketch`, `ValidateSketch`, `MergeSketch`, `MirrorSketch`,
`StopOperation`.
Reorganize the order of the function declarations
so that they are in this order: Sketch actions (general),
geometries, constraints, tools, B-splines, and virtual space.
Add separators to the list of tools commands in the menu
so that it looks clearer.
Correct the header guard `#ifndef SKETCHER_WORKBENCH_H`.
Previously, it was using a guard `IMAGE_WORKBENCH_H`
seemingly copied from the Image Workbench.
When the sketch is not in XY plane, individual constraints from the merged constraint icon can't be selected. Constraint icon coordinates are given in sketcher coordinates. The function getCoordsOnSketchPlane projects vector in global coordinates to the sketch plane. So, it makes no sense to use sketcher coordinates with it. If the sketch is in the XY plane, then the global coordinates are the same as sketcher coordinates. The solution is to get global coordinates of the icon from the sketcher coordinates and use it to project icon to the screen.
- initialization: thread direction only sensible if there is a thread
- initialization: hole diameter can only be changed if there is no profile
- initialization: only enable allowed hole cut parameters
- also for the ISO profiles it is allowed to countersink/bore deeper/less deep
- UI file: add some tooltips (the other changes were done automatically by Qt's designer)
I believe this code is currently incorrect, as it makes references to code outside the "if code" block, where it can not be ensured that code is a string. Moving the code processing into this block avoids this issue.
I experienced a stuck Addon Manager, which was caused by an exception
```
File "/usr/share/freecad/Mod/AddonManager/addonmanager_macro.py", line ..., in fill_details_from_wiki
FreeCAD.Console.PrintWarning(translate("AddonsInstaller", "Unable to clean macro code: ") + code + '\n')
TypeError: can only concatenate str (not "list") to str
```
which is fixed by these changes.
OS: Ubuntu 20.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4.
Build type: Release
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
- initialization: if a threaded, the fit must not be enabled
- when changing the profile type setReadOnly for the fit and class according to if threaded or not
- when changing if threaded or not, setReadOnly accordingly for the fit and class
as described in https://forum.freecadweb.org/viewtopic.php?f=3&t=50611, the task dialog should just read out the parameters on initialization and not invoke automatically change actions.
This PR also fixes a bug that opening a document with a cheesehead hole leads to an error about an invalid index. The reason is that we access the hole cut type before we set its enums. Thus initialize the cut type with all possible enums since, if necessary, the reduced enum set will be set later on parsing the file.
+ do not rely on translated strings but set user data for the items of the combo box
+ do not use tr() to convert the C strings to QString of the hole feature, use QString::fromLatin1
+ do not use findText() twice for the same search but store the result
as mentioned in https://forum.freecadweb.org/viewtopic.php?f=13&t=47584&start=10#p433116
a typical use case is that one changes the hole type from e.g. ISO normal to ISO fine. The size should however be the same.
This PR enables this and also takes care for the thread class and cut type, see the attached screencast.
* Add new icon `MeshPart_CurveOnMesh`, which is the same as
the `Surface_CurveOnMesh` icon but in green color.
The surface icon is used in the Surface Workbench, while the MeshPart
version is currently not used.
* Make the tooltip of the command shorter; the longer instructions
are added in the `TaskCurveOnMesh` task panel.