Commit Graph

1458 Commits

Author SHA1 Message Date
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
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
donovaly
400b25c0d0 [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
Yorik van Havre
078160ea70 TechDraw: Exposed GeomHatch functionality to Python in TechDraw.makeGeomHatch() 2021-02-02 17:49:44 +01:00
Aapo
4ea0784341 [TD] Dimensions: donovaly's minor fixes for TheoreticalExact dimensions. 2021-01-31 15:17:46 +01:00
Aapo
e802179cf4 [TD] Improve arbitrary tolerance and unit handling for Equal Tolerances. 2021-01-31 15:17:46 +01:00
Aapo
660710c26e [TD] Add under- and overtolerances for Dimension Task layout, fixes for Dimension tolerance refresh and behavior. 2021-01-31 15:17:46 +01:00
Aapo
a2f060e36e [TD] Fix degree sign processing for equilateral angular plusminus dimensions. 2021-01-31 15:17:46 +01:00
Aapo
d26b6542ca [TD] Fix regression in Dimensions: Setting arbitrary under tolerance was somehow lost. 2021-01-31 15:17:46 +01:00
Aapo
92846ad0f1 [TD] Avoid changing default open/save dir to templateDir when opening a Page template. 2021-01-28 14:54:59 +01:00
Yorik van Havre
c6088faca6 Merge pull request #4309 from donovaly/TD-Arch-pages
[TD] add Arch paper size templates
2021-01-25 13:13:59 +01:00
Yorik van Havre
ccf392cd2c Merge pull request #4313 from donovaly/TD-center-marks
[TD] show by default center marks
2021-01-25 12:15:26 +01:00
Chris Hennes
f440fa9dbd Add the standard-defined "xml" namespace if it is not specified
The XML standard stipulates:
The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. It MAY, but need not, be declared, and MUST NOT be bound to any other namespace name. Other prefixes MUST NOT be bound to this namespace name, and it MUST NOT be declared as the default namespace.

If the document does not explicitly include this namespace, it is added. This prevents errors due to the use of the namespace in some imported SVG files. In debug builds those errors emit warning messages, and in Windows debug builds those errors cause an abort() to be called.
2021-01-24 22:35:27 -06:00
donovaly
d8797ba0cb [TD] show by default center marks
as requested here: https://forum.freecadweb.org/viewtopic.php?f=35&t=54718#p470334
2021-01-25 04:29:45 +01:00
donovaly
2d2041e98c [TD] add Arch paper size Templates
thanks to the recently merged PR #4292 one can use custom page sizes such as the templates in https://wiki.freecadweb.org/Arch_templates

This PR add them to be directly provided by FC.
2021-01-25 02:58:41 +01:00
Yorik van Havre
c06cd3c546 Merge pull request #4291 from aapo-aapo/TD-US-MultiValueSchema-fix
[TD] Fix Dimension unit printing problem for US building units …
2021-01-21 13:32:48 +01:00
Yorik van Havre
d7038409bf Merge pull request #4292 from aapo-aapo/TD-MDIViewPage-papersizes
[TD] MDIViewPage: Add support for Qt5 automatic paper size handling …
2021-01-21 13:21:56 +01:00
donovaly
b5f57ed2f0 [TD] make pointers to the UI std::unique_ptr
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 TD dialogs that don't already use a unique_ptr.
2021-01-19 19:24:27 +01:00
Aapo
4d40ab0f49 [TD] MDIViewPage: Support printing/exporting arbitrary custom paper sizes for Qt5. 2021-01-19 11:03:24 +02:00
Aapo
d79fd9d6a9 [TD] MDIViewPage: Add support for Qt5 automatic paper size handling with many new paper sizes possible. 2021-01-19 00:49:57 +02:00
Aapo
1c02a2ae9f [TD] Fix Dimension unit printing problem for US building units and other multivalueschema. 2021-01-18 21:52:35 +02:00
donovaly
fc91b251ee [TD] add dialog to modify some dimension settings
also fix issue that tolerance could be set despite theoretically exact is true under some circumstances

also some wording improvements

also a minor fix to use 0.0 instead of DBL_MIN
2021-01-15 05:21:49 +01:00
donovaly
2b0a13f71d [TD] don't allow tolerances for exact values
as discussed here: https://forum.freecadweb.org/viewtopic.php?f=35&t=54218
when a value is theoretically exact it must not have a tolerance

This PR
* fixes this
* also fixes the bug that OverTolerance must not be negative if the tolerances are equal
2021-01-13 04:05:31 +01:00
Yorik van Havre
254c1bceef Merge pull request #4263 from donovaly/TD-tweaks
[TD] preferences entry and tolerance step size
2021-01-11 12:21:40 +01:00
donovaly
0c7c330fe1 [TD] show balloon dialog on double-clicking
when adding GD&T statements as described in https://wiki.freecadweb.org/TechDraw_Geometric_dimensioning_and_tolerancing
You will quickly get a lot of balloons and it is then very tiring to be forced to first select a balloon with a single-click in the drawing, then go to the model tree and there double-click to get the dialog.

This PR also removes unused includes from the dialog code.
2021-01-11 03:02:35 +01:00
donovaly
e8d76d49bf [TD] some fixes
- the setting "Standard and Style" only affects new dimensions, thus it must be italic

- fix bug that the Property 'LockPosition' appears for dimensions -> this is an option for views and thus must be hidden for dimensions

- since tolerances are in the vast majority fractions of a millimeter/inch, set its stepsize to 0.1
(I hope I did it right in handleChangedPropertyType.)

- fix inconsistent newlines in TaskBalloon.h

- improve wording for a heading
2021-01-10 00:29:34 +01:00
donovaly
714a716575 [TD] handle equal tolerances correctly
the common rule is that if a dimension has equal over- and undertolerance, they are output on the same line as the dimension concatenated using the ± character.

This PR does this.

Note that this is not just cosmetics, it is even standardized in the GD&T norms.

also:
* use one format specifier for tolerances since the norms don't allow a different format for the over- and the undertolerance
* some code optimizations like a self-explaining function name, remove unnecessary/outdated comments
2021-01-08 15:14:37 +01:00
Abdullah Tahiri
87c9f83bd6 Gui: Colorful/Greyable overlay status in icons
===============================================

Before this implementation, specific status via former mergeOverlayIcon() was greyed out
with the visibility.

With this commit, the developer has two options:

a) override mergeGreyableOverlayIcons, in which case the overlay will
be greyed out when the item is greyed out as per former mergeOverlayIcon()

b) override mergeColorfulOverlayIcons, in which case the overlay will
be superimposed after the icon is greyed out as it is the case for stardard
error and recompute flags.
2021-01-06 13:54:00 +01:00
Mateusz Skowroński
294a2ebc9d Fix Qt deprecation warnings. QPrinter::paperSize() and QPrinter::setPaperSize() are obsolete. 2021-01-04 13:40:58 +01:00
Mateusz Skowroński
712f6c1251 Fix Qt deprecation warnings. QPrinter::orientation() and QPrinter::setOrientation() are obsolete. 2021-01-03 15:08:10 +01:00
wmayer
50c3cbf005 TechDraw: [skip ci] restore TAB order of TaskBalloon dialog 2021-01-02 12:00:01 +01:00
donovaly
a9da6194a5 [TD] update balloon dialog
2 weeks ago the properties EndTypeScale and LineVisible were added but not to the dialog.

This PR adds them t the balloon dialog-

It also took the opportunity to cleanup the code:
- add missing tooltips
- uniform tooltips in App and Gui
- uniform the UI element names
2021-01-02 11:49:20 +01:00
Mateusz Skowroński
e6032b7d53 Fix Qt deprecation warnings. QPrinter::paperRect() and QPrinter::pageRect() are obsolete. 2021-01-02 10:39:16 +01:00
donovaly
82ec99dbc1 [TD] fix regression for balloon text separators
as reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=53664 the balloon text separation no longer works.

The regression was introduced by commit 05577c267 . The mistake thereby was that the textHeight is already handled before the separators and that rectangular balloons behave differently because of the separator feature.
2020-12-30 23:59:15 +01:00
donovaly
bd1f06cf72 [TD] cleanup preferences
as discussed here: https://forum.freecadweb.org/viewtopic.php?f=35&t=53680&p=461356#p461349

* change default tolerance scale to 0.8
* the tolerance scale is directly applied, thus it must have non-italic label
* move tolerance scale to "Dimensions" tab
* move Fuzz settings to "Advanced" tab
* move Conventions to General tab since e.g. the projection angle is an important general setting
* add a note for the label font that this is also used for dimensions and that it there only has an effect for new ones
* use more useful step size of 0.1 for some scaling spinboxes
* sort UI fields in the C++ code to avoid doubled or missing entries (there were 2 doubled entries)
* uniform width of all preferences dialogs
* better alignment for the HLR dialog
2020-12-30 20:22:27 +01:00
Aapo
079b8ff5c3 [TD] DrawViewDimension Tolerances, print zero tolerances without plus sign and decimals. 2020-12-30 18:49:59 +01:00
donovaly
30fcddae40 [TD] fix bug with angular and small values
* angular as reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=53473&start=10#p461507
* small values: since we convert to e.g. mm, we must then not output e.g. 'µm'
* also a code optimization, fix a typo, removal of a meanwhile misleading comment
2020-12-30 16:20:27 +01:00
wmayer
0f31c87cc9 Boost: [skip ci] Fix build warnings from deprecated Boost headers (v1.75) 2020-12-29 15:34:25 +01:00
Mateusz Skowroński
2559f2d29c Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
Yorik van Havre
5a322d75cb Merged crowdin translations 2020-12-23 15:13:05 +01:00
Yorik van Havre
5a974f824c Updated ts files 2020-12-23 14:51:04 +01:00
Yorik van Havre
a891c04229 Merge pull request #4175 from donovaly/TD-unit-dimension-fix
[TD] fix unit conversion for dimensions
2020-12-23 14:10:04 +01:00
Aapo
07211b0fb1 [TD] ShapeExtractor.cpp: Avoid processing infinite-sized shapes (Datum objects etc). 2020-12-22 17:46:19 +01:00
donovaly
7dea668381 [TD] fix unit conversion for dimensions
as reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=53473
my commit cbcf45a4b9 introduced a regression because now units are no longer converted when the unit is displayed.

This PR fixes this.
2020-12-21 01:27:41 +01:00
Aapo
8462fc1842 [TD] Balloon, fix Origin and scale refresh bugs, make Balloon scale change more reasonable per UI click. 2020-12-18 12:45:34 +01:00
Aapo
3038633069 [TD] Balloon, fix EndTypeScale refresh bug. 2020-12-18 12:45:34 +01:00
Aapo
f3bce14f29 [TD] Balloon, move property LineVisible to View tab and fix a refresh bug. 2020-12-18 12:45:34 +01:00
Aapo
b41cf98583 [TD] Balloon, change ordering of the data properties to more logical. 2020-12-18 12:45:34 +01:00
Aapo
97e3947948 [TD] Make Dimension Tolerances respect the Prefs formatSpec when creating a Dimension. 2020-12-17 17:30:29 +01:00
Yorik van Havre
0e556a082b Merge pull request #4121 from everlanes/TechDraw_Segfault
[TD] Check return value of getMDIViewPage() a second time
2020-12-14 12:43:28 +01:00