Commit Graph

22906 Commits

Author SHA1 Message Date
Zheng, Lei
c5ce992786 App: fix Link extensionGetPropertyByName()
Do not query linked object if the owner object has property with the
given name.
2021-02-07 14:49:49 +01:00
luz paz
3423e72679 LGTM: remove redundant variable assignment
ref: ddeaa48851/files/src/Mod/Spreadsheet/App/Spreadsheet_legacy.py (x687bc63f783c60bd):1
2021-02-07 13:42:55 +01:00
Chris Hennes
7d5a1d7e5d Remove catch block for plain C strings
LGTM complains about this construct leaking memory. Commit 13927b2465
eliminated the parts of FreeCAD that throw those strings. This commit
eliminates the catch block.
2021-02-07 13:41:42 +01:00
wmayer
4719bb703d Mesh: [skip ci] fix MeshPy::trim 2021-02-07 13:12:23 +01:00
Zheng, Lei
db9525e7d7 Mesh: minor change to exporter based on suggestion 2021-02-06 17:13:36 +01:00
Zheng, Lei
ea61253c67 Mesh: refactor mesh exporter for better support of Link 2021-02-06 17:13:36 +01:00
wmayer
13927b2465 [skip ci] Do not throw plain C string as exception 2021-02-06 15:52:21 +01:00
David Osterberg
3e2780a511 PartDesign: Fix sign error in Helix 2021-02-06 08:22:37 +01:00
Abdullah Tahiri
727dc9fa9e Sketcher: Fix wrong diameter reference constraint value when blocked
====================================================================

Fixes:
https://forum.freecadweb.org/viewtopic.php?p=474276#p474276
2021-02-06 06:22:30 +01:00
Aapo
9318c4c1f2 [TD] ShapeExtractor.cpp: Fix linked View source bug, link targets were translated but not scaled in TD. 2021-02-05 22:41:09 +01:00
David Osterberg
692900d085 PartDesign: fix regression in Helix 2021-02-05 20:55:34 +01:00
Aapo
75dee2ff7d [TD] Fix XSource handling of sub-objects of links to another document(s) in TD Views. 2021-02-05 19:19:24 +01:00
David Osterberg
8efbe8861f PartDesign: [Helix] Fix helix starting point bug 2021-02-05 19:17:00 +01:00
donovaly
2ac84872ec [PD] make pointers to the UI std::unique_ptr
Same as PR #4293, just for PartDesign

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 PartDesign dialogs that don't already use a unique_ptr.
2021-02-05 18:01:57 +01:00
sliptonic
a544951dcd Merge pull request #4333 from Russ4262/remove_feature_expand_profile
[Path] Remove `Expand Profile` feature from Profile op
2021-02-05 10:47:43 -06:00
wmayer
99c686f061 Part: [skip ci] fix -Wreorder 2021-02-05 17:26:47 +01:00
donovaly
603cbdbfd5 [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
65656f6d22 [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
9c3c562f7b Surface: re-implement closed() in TaskFilling 2021-02-05 16:37:00 +01:00
wmayer
1e7929ba59 Gui: add virtual method 'closed' to TaskDialog that is called when deleting a dialog 2021-02-05 16:36:19 +01:00
Chris Hennes
9c9244dfb3 Guard against segfaults due to out-of-order dialog deletion 2021-02-05 15:38:24 +01:00
Yorik van Havre
aa52a3f55c 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
21dc72ed10 [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
7560a35ea0 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
4cdef79531 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
47137ea465 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
d5b68febbb 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
13e2f93bae 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
bd8a3c5021 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
d9e7ee46e6 Draft: Fix bug in getCubicDimensions function 2021-02-04 22:57:31 +05:30
wmayer
656c4919bc Qt4: [skip ci] fix build failure 2021-02-04 15:31:06 +01:00
Chris Hennes
e3f8847450 Conformed to FreeCAD coding conventions 2021-02-04 15:17:43 +01:00
Chris Hennes
dc09810e98 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
48fca8c2bc 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
wmayer
5903ff4426 FEM: add basic support of Nastran-95 2021-02-04 13:56:15 +01:00
ceanwang
3ad8367b5e Changed comment for free format CTETRA element 2021-02-04 13:25:13 +01:00
ceanwang
172d2d8a27 Added readNastran95() 2021-02-04 13:25:13 +01:00
ceanwang
67ee247c0c Added readNastran95() 2021-02-04 13:25:13 +01:00
David Osterberg
59ec3cb141 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
7999536858 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
ce7b57a08f 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
28c66fc501 [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
6db7737547 Sketcher: Group tests in different directories 2021-02-04 08:10:28 +01:00
j
7b9d9fdcdb Sketcher: new fillet UI command 2021-02-04 08:10:28 +01:00
j
9fc31dfa22 Sketcher: new Fillet - icon 2021-02-04 08:10:28 +01:00
j
46feeb11f6 Sketch: new fillet Python support 2021-02-04 08:10:28 +01:00
j
f6f43b6fe4 Sketcher: Constraint documentation 2021-02-04 08:10:28 +01:00
j
86992f8086 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
cc6099b7ef Merge pull request #4262 from Schildkroet/adaptive_improve
[PATH] Adaptive improve helix entry
2021-02-03 19:02:38 -06:00
luz paz
ccbc13ee82 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