The reason for this behaviour is that root point (origin) and axes are not treated as fixed geometry. Every external geometry has negative ID which is at most GeoEnum::RefExt defined as -3 in the file src/Mod/Sketcher/App/SketchObject.cpp. Ids of root point and axes are also defined in this file with id -1 for root point and horizontal axis, and -2 for vertical axis. To fix the problem, GeoEnum::RefExt id was replaced by root point id in the condition checking for the largest id of fixed geometry.
The sketcher view provider doesn't need a transaction on double-click or otherwise shows a useless entry in the undo dialog which when undoing leads to weird behaviour
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.