Commit Graph

24301 Commits

Author SHA1 Message Date
Chris Hennes
4ebdff9d9c [Draft] Fix localize_vectors double definition
LGTM identified an instance where a function was defined twice: in this
case, one version was intended to take a list of items and the second
version just a single item. Because they share the same name and number
of arguments, the second definition overrode the first. This causes no
problems in the current code because the version that takes a list is
never used. However, for consistency with the analogous
"globalize_vectors" and "globalize_vector" functions, the "localize*"
versions are changed to match that pattern. All calls in are
converted to the singular use.
2021-03-01 09:36:21 -06:00
Chris Hennes
3e48fef002 [OpenSCAD] Add unit test framework to module
The OpenSCAD module did not have any unit tests. This commit adds the
basic framework (and two very simple tests). The framework is modeled
after the unit tests in the FEM module.
2021-03-01 15:21:18 +01:00
David Osterberg
1110f1198b PartDesign: Allow use of circle edge as axis in PolarPattern 2021-03-01 14:48:24 +01:00
David Osterberg
c862ec458c PartDesign: Allow use of circle edge as axis in ProfileBased 2021-03-01 14:48:24 +01:00
wmayer
9120d4a7d9 PD: [skip ci] PolarPattern: Support 1 occurrence
This is analogous to support 1 occurrence of the linear pattern feature: 74ea8353edc9
2021-03-01 13:58:02 +01:00
donovaly
88c6ed3d2d [PD] fix multi-transform View
- fixes bug 4581
  See the first issue reported here:
  https://forum.freecadweb.org/viewtopic.php?f=3&t=56093#p482553

- also fix issue that one could set 1 occurrence for polar patterns despite 2 are required at least

- also fix potential dereferencing null pointer (reported by MSVC)
2021-03-01 13:11:15 +01:00
Chris Hennes
d93567ce27 Add library versions to LibraryVersions.h 2021-02-28 20:45:34 -06:00
David Osterberg
beb85522e4 PartDesign: Hole. Address Donovaly bugs 7 and 8
bug 7: the update view checkbox should be enabled/disabled based on Model thread.
       the checked state should not change

bug 8: the Thread depth options should be disabled when Model thread is unchecked.
       because they don't do anything in the model it is confusing if they are enabled.
2021-02-28 20:13:14 +01:00
David Osterberg
10f922613b PartDesign: Hole: Always update view if modelthread is disabled
Also: Check the Update View checkbox and disable it, when turning off
model thread.
2021-02-28 20:13:14 +01:00
David Osterberg
99215a9f9f PartDesign: Hole: Turn off keyboard tracking on model thread spinboxex 2021-02-28 20:13:14 +01:00
David Osterberg
41724cd29b PartDesign: Hole: Rename Automatic Tapped (DIN76) and change default to Hole depth. 2021-02-28 20:13:14 +01:00
David Osterberg
d7ae53d597 PartDesign: [Hole] Add Entire Depth thread depth mode 2021-02-28 20:13:14 +01:00
David Osterberg
d94946781e PartDesign: Add true threads to Hole
- Thread runout according to DIN 76-1
- Through all length updated to be calculated based on bounding box
- New properties: ModelThread, ThreadDepthType, ThreadDepth,
                  UseCustomThreadClearance, CustomThreadClearance
- Rename Old but unused parameters related to thread modeling.
- Functionality exposed in UI
2021-02-28 20:13:14 +01:00
Chris Hennes
fd1c856afc [CMAKE] Add version info for MEDfile 2021-02-28 19:31:05 +01:00
Chris Hennes
113ef52708 [CMAKE] Cleanup version info for Python & XercesC 2021-02-28 19:27:48 +01:00
Chris Hennes
75a6ac4c8b [CMAKE] Add Coin3D version info
Modelled after the code for Eigen3, this adds a version check for Coin.
If pkg_config (or some other method) finds the version string, just
print that. If not, do a REGEX MATCH on the file in Coin's headers that
includes the version information. Note that in this case the beta
version information is excluded.
2021-02-28 19:27:26 +01:00
Chris Hennes
0332ba1e20 [Offline Docs] Fix static analysis issues
LGTM identified a number of minor issues (mostly unused imports) in the
offline docs code. This commit addresses those, plus tweaks some output
formatting to include missing spaces, makes a regex more rigorously safe
by escaping some periods, and updates the use of a get() function which
appears to have changed since it was first written.
2021-02-28 17:53:58 +01:00
Chris Hennes
62bfb44a0d [Tools] Fix static analyis issues
This commit addresses issues identified by LGTM for the various
independent (and mostly-independent) files in the Tools subdirectory.
The vast majority of the issues are trivial, and are things like unused
imports or catching BaseException. There was one true bug identified, a
global variable being changed in a function where it was not marked
global, but it only affected output quantity (the variable is named
"VERBOSE"). A couple of other issues identified variables that appear to
represent no-longer-existing options in the code. The options were left,
but a deprecation printout replaces the variable in the event the option
is provided.
2021-02-28 17:53:04 +01:00
luz paz
6f6c1deed7 Crowdin: Startpage - add whitespace to tooltip [skip ci] 2021-02-28 17:15:08 +01:00
luz paz
504cd1e7a5 Crowdin: Startpage: remove obsolete translation [skip ci] 2021-02-28 17:15:08 +01:00
luz paz
4e0fa6a736 Crowdin: StartPage - remove obsolete translation [skip ci]
Ticket 0004578  
ref: https://crowdin.com/translate/freecad/7254/en-en?filter=basic&value=0#6572932
2021-02-28 17:15:08 +01:00
wmayer
24b446c9f7 Sketcher: fixes #0004303: Three choices in a Sketcher menu each with the same Ctrl+Shift+E 'address' 2021-02-28 13:14:48 +01:00
wmayer
d6db4ee48f Image: fixes #0003959: Created image plane is not proportional to loaded image 2021-02-28 13:14:30 +01:00
wmayer
da4d9b64c0 Tux: fixes #0004565: Status bar text runs under Navigation Button 2021-02-28 13:14:05 +01:00
wmayer
88a2dc1c70 Gui: [skip ci] allow to unbind() an ExpressionBinding and automatically unbind it if the observed object has been deleted
For more details see: https://forum.freecadweb.org/viewtopic.php?f=8&t=56097
2021-02-28 12:37:50 +01:00
Chris Hennes
648ae39f50 Clean up various LGTM-flagged items
Static analysis showed some unused variables and imports, and running
the code in Python 3.9 revealed a few invalid escapes (previous versions
of Python silently "fixed" these, so the code change here will not
affect the results).
2021-02-27 18:23:15 +01:00
Chris Hennes
26ce308cf1 [DRAFT] Add call to super().__init__ where missing
Identified by LGTM. The toplevel superclass does initialize one data
member to an empty array, but this didn't appear to cause any problems.
2021-02-27 18:21:54 +01:00
Chris Hennes
1667c4d9f6 [Part] Fix signature of TempoVis dummy function
If the import of TempoVis fails, TaskAttachmentEditor creates s dummy
function to replace the real TempoVis function. That function's
signature did not match the real TempoVis. Caught by LGTM.
2021-02-27 18:21:05 +01:00
Chris Hennes
d5779d8c9b [PD] Fix minor static analysis issues in FCGear
LGTM has identified a number of minor issues with the FCGear Part Design
scripts. This commit addresses each of them, and also corrects two minor
spelling errors in the dialog. None of the errors or their fixes are
expected to result in changes to the functionality of the script.
2021-02-27 18:20:32 +01:00
David Osterberg
9d24f90dd7 PartDesign: Transformded. Align the "property category" of Refine with other PD commands 2021-02-27 18:19:14 +01:00
wmayer
7530e48935 Gui: [skip ci] fix memory leak in SelectionFilter 2021-02-27 18:17:52 +01:00
wmayer
c243741296 Gui: [skip ci] re-add removed Py_INCREF of module 2021-02-27 11:13:30 +01:00
wmayer
dd4dd204d0 App/Gui: fix memory leaks:
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
  to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
wmayer
6584c6e2ac App: [skip ci] AddressSanitizer: heap-use-after-free
When removing a dynamic property its myName member must be nullified as the memory has been de-allocated
2021-02-27 02:21:14 +01:00
wmayer
fdbd84ec39 FEM: [skip ci] fix crash in Constraint::getDirection 2021-02-26 08:11:16 +01:00
helaslo
71fe41988b [OpenSCAD] Fix colors not working correctly when polygons are extruded 2021-02-25 15:08:19 +01:00
Yorik van Havre
162d5c578f Merge branch 'master' of github.com:FreeCAD/FreeCAD 2021-02-25 13:30:09 +01:00
Yorik van Havre
fa85db61f9 Merged crowdin translations 2021-02-25 13:27:48 +01:00
Aapo
505ba2e42f [TD] DrawViewPart.cpp: Fix a crash when user sets the PropertyVector Direction to zero. 2021-02-25 12:40:59 +01:00
wmayer
3ad1d8fccc TD: [skip ci] implement DrawView::recompute to handle all OCC exception types 2021-02-25 12:39:50 +01:00
wmayer
88d49cd982 Gui: [skip ci] improve exception handling:
* handle all exceptions in Application::onLastWindowClosed because this method can be (indirectly)  called from ~BaseView and would otherwise trigger std::terminate()
* handle exceptions in PropertyEditor::closeTransaction() because when recomputing a document while closing it leaves the editor in a bad state
2021-02-25 12:23:13 +01:00
wmayer
2de6a80bb4 TD: [skip ci] explicitly nullify geometryObject in DrawViewPart::partExec to avoid to leave it a dangling pointer in case makeGeometryForShape raises an exception 2021-02-25 11:34:29 +01:00
luz paz
755f4cf1be Crowdin: removing obsolete strings from PartDesign.ts [skip ci]
Uncertain to why but lupdate is not removing obsolete strings from `PartDesign.ts`. This PR manually removes obsoletes strings from it.

ref:
https://crowdin.com/translate/freecad/564/en-de?filter=basic&value=0#6500474
https://crowdin.com/translate/freecad/564/en-en?filter=basic&value=0#6500475
2021-02-25 10:41:58 +01:00
wmayer
f36ba4c56e Crowdin: Gui: move whitespace out of translation string [skip ci] 2021-02-25 10:38:52 +01:00
luz paz
2f9ad32813 Crowdin: fix trailing whitespace [skip ci]
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6577470
2021-02-25 10:31:59 +01:00
luz paz
a522f4a240 Crowdin: Gui: fix user-facing typo in Document.cpp [skip ci]
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6584664
2021-02-25 10:31:33 +01:00
Aapo
e39ef22c1b [TD] Hotfix for Dimension label Arbitrary value regression in DrawViewDimension.cpp 2021-02-25 10:28:42 +01:00
wmayer
aa1eb6ea76 Gui: [skip ci] make Save logic of text document more intuitive 2021-02-25 10:17:51 +01:00
wmayer
46e46a1466 FEM: [skip ci] fixes #0004405: Using PartDesign axis / plane as direction for constraints 2021-02-24 23:59:10 +01:00
wmayer
ab04719372 FEM: [skip ci] support Line and Plane objects in Constraint::getDirection() 2021-02-24 23:53:15 +01:00