Commit Graph

21937 Commits

Author SHA1 Message Date
wmayer
d2ff5eaebe Part: fix regression of visibility automation in Attachment dialog
If a body is in a Part container and a new primitive is created no preview is shown because the Part container is automatically made invisiible.
The user has to manually make the container visible but this is an error-prone procedure because the Attachment dialog reacts on user-selection and thus
unintended things can happen. So, this is a serious regression of usability.

The regression is caused by commit cd73df745124 but the commit log doesn't explain why the change was even needed.
So, this commit leaves the previous changes but re-adds the old check to filter out container objects.
2020-07-12 16:03:42 +02:00
Zheng, Lei
4dad08eff6 PartGui: avoid code duplication for handing TaskAttacher
A better fix for #0004188

Delay calling setPreviewDisplayMode() in ViewProviderPrimitive::setEdit
also fixed issue of not turning off preview mode if the user cancels
editing because there is already a task dialog active.
2020-07-12 16:03:42 +02:00
Zheng, Lei
147b00f2cb Part: fix TaskAttacher::visibilityAutomation()
Rename Python variable 'tv' to avoid potential conflict with others
(PS. I can't reproduce error caused by this. But there is no harm doing
it either).

Handle editing attachment through an App::Link.
2020-07-12 16:03:42 +02:00
wandererfan
862b2cdf83 [TD]makeCosmeticLine Y inversion 2020-07-12 09:04:59 -04:00
luz paz
ac76f16aa3 Fix Crowdin typos and various other typos/grammar [skip ci]
Found via codespell v2.0.dev0  
```
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-07-12 11:42:27 +02:00
Thomas Gimpel
0ba7dcd0f6 Gui: do not drop unhandled key events in *SpinBox::keyPressedEvent() handlers 2020-07-12 11:38:44 +02:00
Thomas Gimpel
85846b7e58 Gui: automatically activate the DlgExpressionInput dialog; fixes #4384 2020-07-11 20:02:06 +02:00
Cyril Waechter
b926149363 Fix comment in Quantity.cpp 2020-07-11 19:37:47 +02:00
wmayer
8cdb1a6cbc Py3: [skip ci] fix export of JSON file in Arch 2020-07-11 14:26:14 +02:00
Zheng, Lei
da4ee7e526 PartDesign: fix DressUp SupportTransform
Skip multiple consequtive DressUp features when SupportTransform is
enabled.
2020-07-11 13:03:44 +02:00
Zheng, Lei
a045f58a85 PartDesign: change feature DressUp behavior when used for pattern
Repurpose DressUp.SupportTransform property to define the following
behavior,

* When disabled (default), only the dressing will be used for patterning.

* When enabled, the additive/subtractive shape of the dressed base
  feature will be used for patterning. Any dressing that is not applied
  to the based feature will be ignored.

* If the dressing is applied to non-additive/subtractive feature, then
  only the dressing will be used for patterning.

New API FreatureAddSub::getAddSubShape() is added to account for the
fact that a dressing (e.g. a fillet) can be either additive or
subtractive, which means that a DressUP feature may contain both
additive and subtractive shapes.

FeatureTransformed is modified to perform both fusion and cut if
required.
2020-07-11 13:03:21 +02:00
Zheng, Lei
8b23d814f8 PartDesign: fix line ending in source code 2020-07-11 13:02:49 +02:00
Torsten Sadowski
b89b674a1d Fix for Bug #4372 2020-07-11 11:34:40 +02:00
Yorik van Havre
19db98ae54 Merge branch 'master' of github.com:FreeCAD/FreeCAD 2020-07-10 14:44:42 +02:00
Yorik van Havre
12dfc65e0f Draft: Add human figure to the grid if the BIM WB is installed 2020-07-10 14:44:24 +02:00
Bernd Hahnebach
69a14d5740 FEM: examples, improve example names shown to the user 2020-07-10 14:42:55 +02:00
mikeprice99
415f23227b Add timecode option for report view 2020-07-10 13:03:37 +02:00
wmayer
e89508355f Gui: [skip ci] fix warning when opening preferences dialog in debug mode
The warning is e.g.: QWindowsWindow::setGeometry: Unable to set geometry 570x454+1524+350 on QWidgetWindow/'Gui__Dialog__DlgPreferencesWindow
2020-07-10 12:53:29 +02:00
vocx-fc
9b8b20dd8a Draft: remove touch status in viewproviders of the Dimension objects
Remove the `touch` status, as the modifications only affect
the viewproviders, not the real properties.
2020-07-10 12:29:30 +02:00
vocx-fc
f24c97be53 Draft: clean up ViewProviderAngularDimension class
This class is also derived on `ViewProviderDimensionBase`.
It is used to measure the angle between two straight lines.

Various improvements in style, PEP8, spacing, docstrings.
In particular use more readable variable names.

The `updateData` method is modified to return immediately
if the `arc` attribute does not exist. This is better
to reduce the level of indentation of the code.
2020-07-10 12:29:30 +02:00
vocx-fc
3333e91f00 Draft: clean up ViewProviderLinearDimension class
This class handles linear dimensions of edges, or radial
dimensions of arcs and circles.

Various improvements in style, PEP8, spacing, docstrings.
In particular use more readable variable names.

The modules `Part` and `DraftGeomUtils` have been delayed
in import.

The `updataData` method is modified to return immediately
if the Proxy property modified is different from `Start`,
`End`, `Dimline` or `Direction`.
2020-07-10 12:29:30 +02:00
vocx-fc
bd9b78af2c Draft: clean up ViewProviderDimensionBase class
Use methods to set up the properties. As the dimension object has
16 properties, these properties are assigned using three methods
corresponding to text, units, and graphics properties.
2020-07-10 12:29:30 +02:00
vocx-fc
3c6fdca582 Draft: move units functions outside DraftGui.py
The functions `getDefaultUnit`, `makeFormatSpec`, `displayExternal`
are used to get the default unit schema for lengths and angles,
and display a string with a particular format.

They aren't used in `DraftGui.py`, but are used by the
viewprovider of the Dimension objects. Therefore, they are moved
into a separate module, so that they can be imported without
using the entire `DraftGui` module.
2020-07-10 12:29:30 +02:00
vocx-fc
96e3267f08 Draft: clean up ViewProviderLabel class
Various improvements in style, PEP8, spacing, docstrings.

Improve the methods to update the text, the arrow, and the frame
of the label.

Options to handle `Justification` and `LineSpacing` are added.
These can be handled just like with the `ViewProviderText` object,
as the internal text node is the same, a `SoAsciiText`.

Nevertheless, currently the leader line and the frame that are
drawn for the label don't consider the correction in position
for the `Justification` or `Linespacing` so the graphics
may be overlapped in certain situations.
2020-07-10 12:23:43 +02:00
vocx-fc
b1fade6f9e Draft: clean up ViewProviderText class
Various improvements in style, PEP8, spacing, docstrings.

The list of strings is set to empty before being assigned again.
This solves a problem of the text not being updated correctly.

In the past some `try-except` blocks were there to catch and
ignore certain exceptions that apparently were caused by a
race condition, where certain properties are not assigned
to the object before they are used. These errors
don't seem to occur in v0.19, so we removed the exception
handling. We leave comments mentioning the issue
in case it re-appears.

The `DisplayMode` is swapped, so now `'2D text'` means that the
text always faces the camera, and `'3D text'` means that the
text can be positioned in different orientations in the 3D space.
This is consistent with the `Draft Label` behavior.

A function `draftutils.gui_utils.migrate_text_display_mode`
is provided to help migrate older objects of type `Text`
or `DraftText` to the new display mode.
2020-07-10 12:23:43 +02:00
vocx-fc
0f30c8ba2b Draft: migrate DraftText type to Text 2020-07-10 12:23:43 +02:00
Bernd Hahnebach
5f88fa2ebb FEM: examples, rename material multiple two boxes 2020-07-10 08:41:13 +02:00
Bernd Hahnebach
8abfe38fb1 FEM: examples, code formating material multiple two boxes 2020-07-10 08:41:11 +02:00
Sudhanshu Dubey
fc89991203 FEM: unit tests, add test for multibody face analysis example 2020-07-10 08:41:09 +02:00
Sudhanshu Dubey
c6a92226f9 FEM: examples, added mutibody face analysis example 2020-07-10 08:41:05 +02:00
Sudhanshu Dubey
aa13a93dff FEM: unit tests, add test for multibody analysis example 2020-07-10 08:41:05 +02:00
Sudhanshu Dubey
a089d4e4da FEM: examples, add another multi material 2020-07-10 08:41:03 +02:00
Bernd Hahnebach
efc3abdbf7 FEM: examples, some code improvements 2020-07-09 21:35:20 +02:00
wmayer
901c24fec3 Gui: add comment 2020-07-09 19:59:24 +02:00
Zheng, Lei
f00a15b0ea Gui: disable COIN_AUTO_CACHING to work around coin3D bug 2020-07-09 19:57:48 +02:00
Bernd Hahnebach
bf98467c50 FEM: examples, remove z88 solver from not supported examples 2020-07-09 19:47:00 +02:00
Sudhanshu Dubey
0869621707 FEM: examples, solver name changed to work with new examplegui 2020-07-09 18:02:49 +02:00
WandererFan
8be9445138 [TD]Section line symbol rotation 2020-07-09 08:46:21 -04:00
Sudhanshu Dubey
44f46da701 FEM: cancel button changed to close button 2020-07-09 08:09:09 +02:00
Sudhanshu Dubey
21aefcbed6 FEM: examplegui modified to setup different solvers
... based on the selection by user
2020-07-09 08:08:54 +02:00
Bernd Hahnebach
630208e879 FEM: examples gui, code formating 2020-07-08 00:01:22 +02:00
Bernd Hahnebach
5cd12be51f FEM: examples gui, improve close and only enable button on selectig example 2020-07-07 22:02:16 +02:00
Sudhanshu Dubey
eed05c7db3 FEM: examples gui, improvemnts
OK button changed to Setup and buttons disabled by default
2020-07-07 22:02:07 +02:00
wandererfan
e0c80824de [TD]DPG spacing for oblique views 2020-07-07 15:26:20 -04:00
Bernd Hahnebach
2ee361df3d FEM: examples, add warning if wrong solver type is given to the setup method 2020-07-07 18:49:25 +02:00
Abdullah Tahiri
ab15149825 Sketcher: fix access to isPerformingTransaction on null pointer
===============================================================

Fixes this crash:
https://forum.freecadweb.org/viewtopic.php?f=3&t=48414#p414255
2020-07-07 18:09:55 +02:00
Bernd Hahnebach
8b82fdf7f5 FEM: elmer writer, equation elasticity, only write needed material values 2020-07-07 12:33:54 +02:00
Bernd Hahnebach
21f779b42a FEM: elmer writer, fix self weight 2020-07-07 12:33:45 +02:00
Bernd Hahnebach
275235f937 FEM: cmake, fix calculix unit test data install dir 2020-07-07 10:32:34 +02:00
vocx-fc
70617e2e85 Draft: set a space before the Link group
For some reason all `App::Link` properties are in a group that
starts with a space, so `' Link'`, not just `'Link'`.

This was changed in 9873eb0a74.
2020-07-07 10:15:14 +02:00