Commit Graph

23950 Commits

Author SHA1 Message Date
donovaly
09fd3dbffa [Part] make pointers to the UI std::unique_ptr
Same as PR #4293, just for Part

as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all Part dialogs that don't already use a unique_ptr.
2021-02-05 17:16:20 +01:00
donovaly
ade2857ba3 [Sketcher] make more pointers to the UI std::unique_ptr
addendum to PR #4362

(Same as PR #4293, just for Sketcher

as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all Sketcher dialogs that don't already use a unique_ptr.)
2021-02-05 17:14:24 +01:00
wmayer
bd587a8a45 Surface: re-implement closed() in TaskFilling 2021-02-05 16:37:00 +01:00
wmayer
8f65602cef Gui: add virtual method 'closed' to TaskDialog that is called when deleting a dialog 2021-02-05 16:36:19 +01:00
Chris Hennes
f5f1f476f1 Guard against segfaults due to out-of-order dialog deletion 2021-02-05 15:38:24 +01:00
Yorik van Havre
321fd7c840 Merge pull request #4215 from hyarion/feature-spreadsheet-equal-prefix-for-expressions
[Spreadsheet] Only evaluate cell values when prefixed with '='
2021-02-05 13:29:57 +01:00
donovaly
6f25fa6bb8 [TD] make more pointers to the UI std::unique_ptr
addendum to PR #4293

(as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for remaining TD dialogs that don't already use a unique_ptr.)
2021-02-05 13:24:21 +01:00
Chris Hennes
224a9186af Fix minor issues with Workbenches preference panel
This fixes three issues with the new Workbench Loader preferences panel reported by users:
* Some icons were not being properly scaled to the new 48x48 size
* Some text was being incorrectly cut off, despite fitting in the column
* The sort order of the workbenches was incorrect when external workbenches were added
2021-02-05 13:22:00 +01:00
Yorik van Havre
ff8e751f42 Merge pull request #4356 from luzpaz/LGTM-ArchPanel
[0.19][ARCH] Arch: Fix LGTM warning of missing param for translate() in ArchPanel.py
2021-02-05 13:19:00 +01:00
Yorik van Havre
ed82a9efe2 Merge pull request #4366 from amrit3701/bug_fix/draft_getCubicDimensions
Draft: Fix bug in getCubicDimensions function
2021-02-05 13:09:31 +01:00
Chris Hennes
249a5868d4 Add Workbench name as Tab item tooltip
In cases where the user's font is large or the Workbench name is long,
the new, narrower sidebar may not display the entire workbench name. To
address those cases, the tooltip for the element is now also set to the
workbench name. Thanks to Github user @marioalexis84 for the suggestion.
2021-02-04 19:40:31 +01:00
Chris Hennes
5730dac889 Fix bug due to early return
Github user @marioalexis84 found a bug that caused only the first page
of the most recently-added workbench to show. This refactors the
AddPage() static function to eliminate the early return statement that
was the cause of that bug.
2021-02-04 19:40:13 +01:00
Chris Hennes
be9b557dd6 Add pref window that loads unloaded workbenches
A new group is added to the Preferences window that explains why
some preferences may appear to be missing due to the workbench being
unloaded. It lists the unloaded workbenches, and offers to load them,
updating the preferences dialog as necessary.

This at least partially resolves issue #4474.
2021-02-04 19:38:57 +01:00
Amritpal Singh
7d5ce50fdd Draft: Fix bug in getCubicDimensions function 2021-02-04 22:57:31 +05:30
wmayer
4c7395cabc Qt4: [skip ci] fix build failure 2021-02-04 15:31:06 +01:00
Chris Hennes
279e3a5e03 Conformed to FreeCAD coding conventions 2021-02-04 15:17:43 +01:00
Chris Hennes
94ee26e61d Check for filename before selecting
Correct an error caught by @davidosterberg -- the non-native QFileDialog did
not behave as expected when not provided with a default filename, so that case
is now caught and the `selectFile()` call is bypassed.
2021-02-04 15:17:43 +01:00
Chris Hennes
3f40908241 Add default filename for exports
When exporting a single file, the filename defaults to the current FCStd
name plus a dash and the name of the object. If multiple objects are
selected, the default is the basename of the FCStd file. No extension is
added. This behavior is controllable via two hidden preferences,
BaseApp/Preferences/General/ExportDefaultFilenameSingle
BaseApp/Preferences/General/ExportDefaultFilenameMultiple

_Allow regeneration of default on new exports_

If an export has been done and it used the default filename, on the next
export regenerate the filename (potentially updating the selected object
name in that filename) instead of just defaulting to the last name.

_Search for extension in chosen filter first_

Originally the file dialog simply searched for the first available extension
in the overall filter list. This commit modifies it to first check the
selected extension, and only if that is empty to search the full filter
list. This section of code only runs if a default filename is set but
does not have an extension ("suffix" in Qt's terms).
2021-02-04 15:17:43 +01:00
luz paz
df6a14e7d1 Fix typo in previous commit dca2fb66c [skip ci]
Removed superfluous double-quote char. (dca2fb66c)
2021-02-04 15:12:51 +01:00
luz paz
20344638ce LGTM: exclude zipios++ and kdl (orocos) libraries from analysis
Ref: https://lgtm.com/help/lgtm/lgtm.yml-configuration-file
2021-02-04 14:04:07 +01:00
wmayer
d48718fd0d FEM: add basic support of Nastran-95 2021-02-04 13:56:15 +01:00
ceanwang
f34eff7946 Changed comment for free format CTETRA element 2021-02-04 13:25:13 +01:00
ceanwang
1549ccc2a0 Added readNastran95() 2021-02-04 13:25:13 +01:00
ceanwang
0166fcd535 Added readNastran95() 2021-02-04 13:25:13 +01:00
David Osterberg
cb2da22e86 PartDesign: New features AdditiveHelix and SubtractiveHelix
These features, based on the code for the Pipe class, allow the user
to simply create a helical sweep within PartDesign workbench.

Sample application is threads, springs, coils, augers, etc.

Also, remove needless requirement for positive cone angle on helixes.

Thanks to @bitacovir for helping with the icons
Thanks to @chennes for review
Thanks to @vosk for review
Thanks to @wwmayer for review

Enforce that links stay within scope for ProfileBased features
This also ensures that the Body itself is not used for creating features within
the body, causing a "Graph not a DAG" error.
2021-02-04 13:01:12 +01:00
Pierre LeMoine
67aee7cd21 Transform patterns can be created from multiple base features
The infrastructure/piping seems to have been in place for a long while.
Not tested for all variations of pattern transforms.
The major enabler was removing the `break`.
Some extra piping added to let the code at call-site decide if to select multiple features or not.
2021-02-04 11:58:47 +01:00
Greg V
3991a93d5a Sketcher: [skip ci] fix computing of hotspot of sketcher icons on Wayland
Restrict the hotspot multiplication on unix platforms to X11 (xcb platform)
2021-02-04 10:45:33 +01:00
donovaly
c88bee029b [Sketcher] make pointers to the UI std::unique_ptr
Same as PR #4293, just for Sketcher

as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all Sketcher dialogs that don't already use a unique_ptr.
2021-02-04 10:37:44 +01:00
j
140dcc3134 Sketcher: Group tests in different directories 2021-02-04 08:10:28 +01:00
j
c8d0ee8e54 Sketcher: new fillet UI command 2021-02-04 08:10:28 +01:00
j
038d5560a7 Sketcher: new Fillet - icon 2021-02-04 08:10:28 +01:00
j
92041a7376 Sketch: new fillet Python support 2021-02-04 08:10:28 +01:00
j
91881c8f89 Sketcher: Constraint documentation 2021-02-04 08:10:28 +01:00
j
7413a8a717 Sketcher: Preserve corner and constraints for sketch fillets
Currently the sketch fillet tool deletes any constraints associated with
the two lines to be filleted. By leaving a vertex at the intersection,
we can instead preserve most constraints in reasonable ways.

Sketch fillet horizontal and vertical point-to-point constraint support
Also better future compatibility for point constraints, and some minor tweaks.
2021-02-04 08:10:28 +01:00
sliptonic
fde9048778 Merge pull request #4262 from Schildkroet/adaptive_improve
[PATH] Adaptive improve helix entry
2021-02-03 19:02:38 -06:00
luz paz
19d0e1123f Draft: fix LGTM 'Testing for None should use the 'is' operator' alerrts
https://lgtm.com/projects/g/FreeCAD/FreeCAD/alerts/?mode=tree&ruleFocus=7900090
2021-02-03 21:58:47 +01:00
Benjamin Alterauge
19ad2e47bd Temporarily qt5 fixes for Apple Silicon need to disable the qtwebengine. That has to be considered in MacAppBundle. 2021-02-03 21:58:07 +01:00
wmayer
1efb1e344e Gui: [skip ci] restore tab order in selection settings page 2021-02-03 21:56:43 +01:00
Benjamin Nauck
67f21d663d Gui: Add support for selecting multiple objects without keyboard
Adds checkboxes to the document tree which makes it possible to
select multiple document objects on devices without physical keyboard.

These checkboxes are opt-in and can be enabled/disabled from:
Edit -> Preferences -> Display -> Navigation -> Selection

Forum thread for feature the request:
https://forum.freecadweb.org/viewtopic.php?f=34&t=53065

We need to iterate the tree to add/remove the selection boxes when
the enable-setting has been changed.

The size for the first column in the tree is adjusted to fit both
name and optional checkbox.
2021-02-03 21:51:56 +01:00
wmayer
78158a058b Gui: add preferences tab for selection 2021-02-03 18:06:55 +01:00
David Osterberg
c19341b866 PartDesign: Allow selection of sketch plane by double click in picker dialog
Thanks to @0penBrain for solving a tricky segmentation fault
2021-02-03 16:46:47 +01:00
luz paz
058e54a5b7 Arch: Fix LGTM warning of missing param for translate() in ArchPanel.py
Even though this is ignored per the docs[1], LGTM complains[2] about it. This commit adds the superfluous param. Note: there is precedent in ArchReference.py[3] and ArchWall.py[4].
 
 [1]https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Draft/draftutils/translate.py#L73-L78  
[2] 17db14c970/files/src/Mod/Arch/ArchPanel.py (L32)  
[3] 50f5c6ef9a/src/Mod/Arch/ArchReference.py (L39)  
[4] 50f5c6ef9a/src/Mod/Arch/ArchWall.py (L42)
2021-02-03 10:28:21 -05:00
donovaly
09385d9d00 fix issue reported by @chennes
also fix annoying variable naming - different variables representing different types should not have the same name

also update a comment according to depending PRs
2021-02-03 16:24:01 +01:00
donovaly
2a6d30da27 [PD] hole fix custom cut handling
This PR is based on PR #4344 and a spin-off of PR #4337. It fixes:

We have normed screw head cuts. These values can be overridden but we must store the info about the overriding. Why? - because when you have e.g. made a custom change to a normed countersink and then change to another countersink norm, you would either not get the values defined in the norm or you get these values but loose e.g. your depth settings
2021-02-03 16:23:28 +01:00
donovaly
c5fe2589d5 [PD] fix UTS clearance holes
This PR is based on PR #4343 and a spin-off of PR #4337. It fixes:

- the bug that we did not use the normed clearance hole diameters for UTS holes
- missing recompute when changing existing hole from Metric to UTS type
2021-02-03 16:19:24 +01:00
donovaly
19605200a1 [PD] hole dialog UI fixes
This PR is the first in a series of probably 3 PRs to fix known hole dialog bugs.

This one fixes:

- the .ui file issues
- readonly status issues of some widgets/properties (e.g. when the hole is through all, disable drill point settings)
- the bug that updateHoleCutParams() overwrote the previously correctly determined hole diameter
- just a trifle: change a function name to fit into the naming scheme
2021-02-03 16:14:36 +01:00
wmayer
d65937d338 Part: [skip ci] rename methods in TopoShape that override non-virtual functions of base class 2021-02-03 16:10:38 +01:00
donovaly
69f2f3b9e1 [PD] fix typo in iso7046.json
This mistake was introduced by me in commit 51c9640f
2021-02-03 15:08:30 +01:00
donovaly
8a3cc86d0c [TD] fix color change for dimensions
This PR fixes issue C reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=55008#p472939
- the changed color must also be applied to the dimension line and arrows
2021-02-03 14:11:44 +01:00
luz paz
d0d2581410 Fix various typos [skip ci]
Found via codespell v2.1.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,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,./build/doc/SourceDocu
```
2021-02-03 14:08:57 +01:00