Commit Graph

22847 Commits

Author SHA1 Message Date
Yorik van Havre
0b609773fe Arch: fixed placement of Space label on TD pages 2020-10-26 10:35:40 +01:00
Abdullah Tahiri
00a1aa6225 Part: Geometry - encapsulate construction access 2020-10-25 03:52:51 +01:00
Neinei0k
1a9dcdb3db Sketcher: Fix ticket #4399
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.
2020-10-25 02:27:06 +01:00
wmayer
d30661a189 Gui: [skip ci] move support of SpaceMouse Explorer to its own event handler function 2020-10-24 19:04:28 +02:00
TinkerGnome
bad65c52f4 handle button presses on "Spacemouse Enterprise" 2020-10-24 18:52:18 +02:00
wmayer
b4f17452fe Add list of all available 3Dconnexion devices 2020-10-24 18:52:03 +02:00
wmayer
46e44a0340 Gui: do not use event handling of SpaceMouse Plus XT for Enterprise model 2020-10-24 18:51:52 +02:00
wmayer
067b51b835 Gui: [skip ci] let view provider to decide to whether open a transaction on double-click
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
2020-10-24 15:37:04 +02:00
luz paz
a305b3b53f Sketcher: Capitalize opeCommand() text [skip-ci] 2020-10-24 12:26:35 +02:00
luz paz
8068a5307a Sketcher: Fix typos [skip-ci] 2020-10-24 12:26:35 +02:00
luz paz
27fc4d6c7e Fix various typos [skip-ci] 2020-10-24 12:25:46 +02:00
wmayer
cd0dfe1e87 App: [skip ci] fix printing warning for recursive calls of Document::_commitTransaction 2020-10-23 20:50:23 +02:00
wmayer
fbcf8dfa5d App: [skip ci] fix possible segmentation fault when performing a transaction after an undo 2020-10-23 19:47:33 +02:00
wmayer
13850707ef Sketcher: [skip ci] fix changing multiplicity of a spline for Windows builds if PCH is enabled 2020-10-23 13:43:42 +02:00
wmayer
b5d3ba129c Sketcher: [skip ci] fix crash when deleting a selected geometry directly with delGeometry() 2020-10-23 11:56:17 +02:00
wmayer
9b806f4ac9 Sketch: [skip ci] handle possible crashes when decreasing degree of a spline 2020-10-23 11:26:15 +02:00
wmayer
d532f8ef33 Sketcher: implement command to decrease degree of a B-spline 2020-10-23 00:36:41 +02:00
wmayer
4fbc693014 Part: [skip ci] add method to approximate a B-spline curve with a given max. degree 2020-10-23 00:06:31 +02:00
wmayer
09c72214e8 Sketcher: [skip ci] remove AutoTransaction from ViewProviderSketch::mouseButtonPressed because it breaks the open/commit transaction logic 2020-10-22 19:35:31 +02:00
wmayer
da46b9de3d Sketcher: [skip ci] remove superfluous transaction when start/finish editing a sketch 2020-10-22 19:35:20 +02:00
marioalexis
1aa371a819 Draft: Fix logical error in is_line function 2020-10-22 17:14:46 +02:00
wmayer
731f89ccbf Sketcher: [skip ci] do not create dialog on heap if not needed to improve exception-safety and reduce possible memory leaks 2020-10-22 16:01:22 +02:00
vocx-fc
ae33d9eb91 Part: update the Part_Thickness icon
This is the same as the `PartDesign_Thickness` but without
the red highlights in order to match the rest of the Part icons.
2020-10-22 15:12:59 +02:00
vocx-fc
3a31a36fae Draft: use new name of the icon Part_3D_object
It is defined in the Part Workbench. Before, it was called `Tree_Part`.
2020-10-22 15:11:45 +02:00
vocx-fc
fcc9a68f8e Arch: use new name of the icon Part_3D_object
It is defined in the Part Workbench. Before, it was called `Tree_Part`.
2020-10-22 15:11:45 +02:00
vocx-fc
f945b4c6ae Part: rename the basic Part 2D and 3D icons
The basic icons for the basic features are renamed,
`Tree_Part` to `Part_3D_object`, `Tree_Part2D` to `Part_2D_object`.
2020-10-22 15:11:45 +02:00
vocx-fc
19978b5e31 Sketcher: add BSplineDecreaseDegree although with an empty implementation
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.
2020-10-22 14:53:52 +02:00
vocx-fc
7cddeb0283 Sketcher: clean up line spacing for VirtualSpace command 2020-10-22 14:53:52 +02:00
vocx-fc
9936004fbc Sketcher: clean up the sketcher B-spline tooltips
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.
2020-10-22 14:53:52 +02:00
vocx-fc
3ce832896d Sketcher: clean up the sketcher tools tooltips
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.
2020-10-22 14:53:52 +02:00
wmayer
5d37581019 Sketcher: fix regression in CmdSketcherValidateSketch
Do not enable the command if another task dialog is still active
2020-10-22 14:53:52 +02:00
vocx-fc
b47a0a0a58 Sketcher: clean up general commands tooltips
* `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.
2020-10-22 14:53:52 +02:00
vocx-fc
ff5163cf75 Sketcher: add five tools to the Sketcher toolbar and reorder code
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.
2020-10-22 14:53:52 +02:00
Neinei0k
b1afdc8f61 Sketcher: Merged constraint selection fix.
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.
2020-10-22 13:52:31 +02:00
donovaly
d702536f3a [PD] more holes fixes
- 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)
2020-10-22 13:01:57 +02:00
wmayer
30455b5861 Part: [skip ci] use the correct icon for helix and sprial view providers 2020-10-22 12:43:39 +02:00
0penBrain
d13235c960 [Sketcher] Allow selection of 2 vertices for horizontal/vertical constraint in continuous mode
Fixes #4444
2020-10-21 17:22:53 +02:00
bitacovir
b22ab816c1 Add SVG icons for two Std commands
Two Std commands do not have icons for the FreeCAD UI (Menu Edit): Std DuplicateSelection, Std_Alignment.
2020-10-21 16:26:27 +02:00
luz paz
0b27eec4e2 Fix various typos
Found via `codespell v2.0.dev`  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-10-21 16:20:08 +02:00
jreinhardt
b56b9b4cbd Fix macro code processing
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)
2020-10-20 19:01:12 +02:00
donovaly
9985a5a883 [PD] fix thread UI bugs
- 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
2020-10-20 15:47:52 +02:00
Yorik van Havre
301f4fa42e TechDraw: Better tooltip for scale property 2020-10-20 14:50:23 +02:00
Yorik van Havre
265afea4a9 Arch: Added SectionColor property to Arch Materials 2020-10-20 14:43:33 +02:00
Yorik van Havre
49299e0ad2 Draft: allow to scale imageplanes 2020-10-20 13:31:40 +02:00
Yorik van Havre
eacf3a6b98 Arch: Enabled ellipse-based walls - fixes #3859 2020-10-20 13:13:54 +02:00
Yorik van Havre
0b89de1911 Start: Allow to display more than one custom folder on the start page 2020-10-20 12:03:27 +02:00
sliptonic
1039f57f49 Merge pull request #3975 from J-Dunn/master
[Path] Add files via upload
2020-10-19 09:53:54 -05:00
donovaly
025fd9dce9 [PD] initialize hole dialog properly
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.
2020-10-19 16:48:49 +02:00
wmayer
d60f75b3b0 App: [skip ci] fix PropertyEnumeration::setEnums to avoid to produce index values out of range 2020-10-19 16:09:57 +02:00
wmayer
db093ed0e0 PartDesign: [skip ci] some improvements in TaskHoleParameters
+ 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
2020-10-19 16:08:26 +02:00