Commit Graph

24030 Commits

Author SHA1 Message Date
Markus Lampert
ec2328bfaa Ensure base geometry is valid so if it isn't one can still edit the op and fix the base geometry. 2021-02-11 20:36:21 -08:00
David Osterberg
57fd294391 FEM: Improve Gmsh log, when Gmsh is not installed 2021-02-11 21:03:43 +01:00
Alex Young
32200b604d LGTM: Removes unused import in PathPropertyBagGui.py 2021-02-11 13:12:49 +01:00
Alex Young
ca2ecf4248 Path: Removes unused imports from PathToolBit.py
lgtm.com showed unused imports in PathToolBit.py.  This patch removes them.  The tests in TestPathApp still pass.
2021-02-11 13:10:52 +01:00
Chris Hennes
a0bbb173f4 LGTM: Remove unused Time() function
The ConsoleSingleton::Time() function is flagged by LGTM for using
two different unsafe time-related functions. It is not called anywhere
in the current codebase, and is not exposed in the Python API, so was
removed rather than being repaired.
2021-02-11 12:51:31 +01:00
donovaly
2834075d6a [PD] rename icons to match Wiki files
For the What#s this feature we need to have a uniform naming of the features and its icons. For some PD icons this is not the case and since we are in feature freeze, this is the right time to address this.
(I see the same is already done for Mesh.)
2021-02-11 12:47:25 +01:00
Chris Hennes
946e980d1a LGTM: Move seq->next out of loop control
LGTM points out that the construct use in the loop here "does
nothing" -- that is, it is a conditional whose result is never used.
It is apparently being used simply to ensure that the next() function is
called on each loop iteration, but because sequence may be null, it is
shoehorned into a trinary :? operator. To clarify the intent and ensure
that later readers (including LGTM) do not misunderstand it,
this code is broken out into a more standard conditional construct at
the end of each loop iteration.
2021-02-11 12:31:25 +01:00
bitacovir
cbc3fbd157 [UI] Replacement of 3 SVG icons for OpenSCAD commands 2021-02-11 12:07:09 +01:00
bitacovir
4130244329 Fix MeshPart icon names 2021-02-11 11:57:56 +01:00
Chris Hennes
ebc4cd6700 LGTM: Minor fixes to FreeCADApp.py
LGTM flagged several redundant imports, and was confused by the else
clause of one loop. This commit removes those imports, and because of
the loop's construction, removes the else entirely and lets the loop
fall through to the error state if it fails to find what it's looking
for.
2021-02-11 11:54:24 +01:00
Chris Hennes
3ef6e1c6d0 [OTHER] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
Chris Hennes
fe7e45a7de [DRAFT] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
Chris Hennes
8228d64ac4 [ARCH] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
Benjamin Nauck
10b08671ef Sketcher: Fix uninitialized scalar field in ctor
Fixes Coverity issue:
CID 316539 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member lastHasPartialRedundancies is not initialized in this constructor nor in any functions that it calls.
2021-02-11 11:48:19 +01:00
Abdullah Tahiri
0641e243e0 Sketcher: Bug fix / improve B-Spline knot support
=================================================

Knot position is not calculated by the solver, but by OCCT when updating the
b-spline to conform to given pole positions, as mandated by the solver. Before
this commit, all constraints driving and non-driving operating on the knots required
and extra solve (from advanced solver dialog, or from the Python console), or a recompute
to be recomputed.

This commit introduces transparently re-solving at Sketch.cpp level if B-Splines are present,
so that when the Sketcher mandated solve returns, the geometry is fully solved.
2021-02-10 18:53:52 +01:00
sliptonic
731ef48136 Merge pull request #4417 from Schildkroet/adaptive_improve
[0.19][PATH] Added onDocRestore method for adaptive op
2021-02-10 10:08:38 -06:00
Abdullah Tahiri
c59b9bd013 Sketcher: fix malformed constraint on nurbs conversion
======================================================

Coincident on midpoint cannot be supported by a bspline.

Fixes:
https://forum.freecadweb.org/viewtopic.php?p=476410#p476410
2021-02-10 06:41:16 +01:00
Chris Hennes
46a899c437 [Part] Coverity: dtors can't throw 2021-02-09 23:58:09 +01:00
Abdullah Tahiri
1e2f8e366f Sketcher: Fix geometry state synchronisation routine 2021-02-09 20:22:30 +01:00
UR-0
9f871a444b [FEM] Clipping plane: Fix handling of shapeless document objects 2021-02-09 20:20:49 +01:00
Chris Hennes
ea67e77e81 [PD] Add missing ctor variable init (Coverity)
The "angle" variable was not being initialized in any of the
constructors for the CutDimensionSet, and nothing was being initialized
by the default constructor. This commit adds angle as an optional final
argument to the parameterized constructors, defaulting to 0.0, and adds
default values to the default constructor using the first of each enum
and 0.0 for the angle. The default constructor is required elsewhere in
the code so cannot be trivially removed. Issue identified by Coverity.
2021-02-09 20:19:38 +01:00
luz paz
b76fe29412 Sketcher: Add 'Sketcher B-spline tools' to translation [skip ci]
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=34&t=55381  
and several whitespace fixes
2021-02-09 20:18:16 +01:00
bitacovir
ddcb7b73f4 Fix mesh icon names of 3 SVG files 2021-02-09 20:10:24 +01:00
luz paz
f45f218885 TechDraw: expose TechDraw_Decorate function tooltip to translation
Forum thread https://forum.freecadweb.org/viewtopic.php?f=34&t=55382
2021-02-09 20:09:36 +01:00
luz paz
bcf46a3351 TechDraw: Expose strings in Workbench.cpp to translators
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=34&t=55382
2021-02-09 20:09:36 +01:00
Chris Hennes
5d0cf1081e LGTM: Eliminate float-to-double overflow warning
LGTM complains if this calculation is done from inside the sqrt() call
because it sees the explicit cast to float and assumes that sqrt() is
intended to take a double. By adding an intermediate step it should be
clear to LGTM that the float version of sqrt is intended.
2021-02-09 20:01:13 +01:00
Chris Hennes
5269d10327 LGTM: Don't check PyCXX 2021-02-09 19:58:24 +01:00
Patrick Felixberger
136a625e4c [PATH] Added onDocRestore method for adaptive op 2021-02-09 18:41:07 +01:00
Yorik van Havre
bcb5c8786f merged crowdin translations 2021-02-09 16:12:18 +01:00
wmayer
7c708eeca3 Gui: [skip ci] add convenience function updateActions() to Application
Use updateActions() in ViewProvider::onChanged() to also trigger an update on pure view property changes
2021-02-09 15:21:17 +01:00
wmayer
53c5852ccb Mesh: [skip ci] use a more appropriate icons for cross sections 2021-02-09 13:29:13 +01:00
wmayer
f7e9ee74d6 MeshPart: [skip ci] use correct icon for Mesh cross-section dialog 2021-02-09 12:21:31 +01:00
Yorik van Havre
e5f00e4d57 Merge pull request #4402 from luzpaz/ArchSchedule
Arch: update tooltip reference to LibreOffice version within ArchSchedule
2021-02-09 12:06:58 +01:00
Stanislav Meduna
f92b8bf18e Adds 3DConnexion SpaceMouse Pro Button Map 2021-02-09 11:59:48 +01:00
bitacovir
2b5bc5d99d Fix mesh icon names of 9 SVG files 2021-02-09 11:57:41 +01:00
Abdullah Tahiri
36fdbc460a Sketcher: Geometry state synchronisation
========================================

The geometry state stored in the geometryFacade is modified following a mutable model
(without setting the Geometry property on Constraint change), in order to avoid coupling
the addition/removal of a constraint with a change of the Geometry Property.

This design decision however interferes with the ability of the Geometry property to restore
the correct geometry state upon redo/undo.

While such a situation is rare in the case of Internal Alignment geometry, because constraint
addition/removal is performed with the corresponding geometry addition/removal (within the same
transaction. That is not the case with the Block constraint (or another future general case where
the geometry state may be applied).

This commit leverages the synchronisation mechanism already in use for non-properties (e.g. external geometry or
vertex indices) to check and synchronise geometry state upon undo/redo and restore.

Bonus:
- addGeometryState is refactored to separate the checking logic from the setting logic.
2021-02-09 08:14:36 +01:00
Chris Hennes
41a40c1c31 [PD] Catch Python exceptions in dtors (Coverity)
In some PartDesign task dialogs, the destructors call functions that may
throw exceptions. If that occurs and the exception is uncaught, this
will ususally end up terminating the program. This commit adds try-catch
blocks around each instance of that (identified by Coverity) and handles
the Python exception in the normal reporting workflow.
2021-02-08 21:30:22 +01:00
luz paz
d00f1099f3 Arch: update tooltip ref. to LibreOffice version within ArchSchedule
Ref: https://crowdin.com/translate/freecad/6766/en-en?filter=basic&value=0#6576778
2021-02-08 12:56:53 -05:00
wmayer
5e00309368 Gui: [skip ci] add possibility to auto-expand items in property editor 2021-02-08 18:53:07 +01:00
sliptonic
15068d7dc6 Merge pull request #4383 from mlampert/feature/path-hide-ops-by-default
[Path]: Set operation Visibility to False, and turn it back on while editing.
2021-02-08 11:12:41 -06:00
Yorik van Havre
24e7e83ddd More required items in the github pull request template 2021-02-08 17:29:52 +01:00
sliptonic
911a3b8e1e Merge pull request #4253 from J-Dunn/master
[Path]: fix several minor bugs in arc slot ops
2021-02-08 09:44:30 -06:00
sliptonic
ec0cc86ead Merge pull request #4393 from mlampert/bugfix/issue-4557
[Path]: bugfix/issue 4557
2021-02-08 09:41:57 -06:00
bitacovir
73b8995c7b Fix mesh icons names of SVG files 2021-02-08 16:40:58 +01:00
Chris Hennes
15d4cac123 LGTM: Remove superfluous conditional 2021-02-08 16:39:40 +01:00
Yorik van Havre
298004a39c Updated master TS files 2021-02-08 16:35:41 +01:00
Yorik van Havre
97dcb24c80 Merge pull request #4341 from hyarion/feature-error-handling-get_svg
[0.19] [Draft] Add better error message in get_svg for direction
2021-02-08 16:08:18 +01:00
Yorik van Havre
4e3a269906 Merge pull request #4386 from marioalexis84/draft-clone
Draft: Fixes #0004113: When Clone is used in Draft/Scale, the cloned part placement is always set to origin whatever is the reference point
2021-02-08 16:07:35 +01:00
wmayer
91435c96f7 Gui: [skip ci] support undo/redo for view properties in editor 2021-02-08 13:22:14 +01:00
bitacovir
5323de3d0b [UI] Add SVG icon for Mesh SplitComponents 2021-02-08 10:53:18 +01:00