Commit Graph

1456 Commits

Author SHA1 Message Date
donovaly
8a3cc86d0c [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
e947b9bb3b TechDraw: Exposed GeomHatch functionality to Python in TechDraw.makeGeomHatch() 2021-02-02 17:49:44 +01:00
Aapo
9f49b122f4 [TD] Dimensions: donovaly's minor fixes for TheoreticalExact dimensions. 2021-01-31 15:17:46 +01:00
Aapo
f362930664 [TD] Improve arbitrary tolerance and unit handling for Equal Tolerances. 2021-01-31 15:17:46 +01:00
Aapo
dbef970697 [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
5350a2c3d0 [TD] Fix degree sign processing for equilateral angular plusminus dimensions. 2021-01-31 15:17:46 +01:00
Aapo
e6ef62e711 [TD] Fix regression in Dimensions: Setting arbitrary under tolerance was somehow lost. 2021-01-31 15:17:46 +01:00
Aapo
212381dcf7 [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
f7c71fd072 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
31adf238e7 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
475f7049c5 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
9ec0cddfde [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
150d03d7fd [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
9de4841d0f 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
6ded863f7d 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
691eaa6e8f [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
ff18dec065 [TD] MDIViewPage: Support printing/exporting arbitrary custom paper sizes for Qt5. 2021-01-19 11:03:24 +02:00
Aapo
7339646638 [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
691051e1df [TD] Fix Dimension unit printing problem for US building units and other multivalueschema. 2021-01-18 21:52:35 +02:00
donovaly
1a296a4006 [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
81ff5a422f [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
c50796e009 Merge pull request #4263 from donovaly/TD-tweaks
[TD] preferences entry and tolerance step size
2021-01-11 12:21:40 +01:00
donovaly
699baa8477 [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
96eaff8e4e [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
2232b1d48e [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
4facab0936 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
9ee06a098a Fix Qt deprecation warnings. QPrinter::paperSize() and QPrinter::setPaperSize() are obsolete. 2021-01-04 13:40:58 +01:00
Mateusz Skowroński
5b4e76b834 Fix Qt deprecation warnings. QPrinter::orientation() and QPrinter::setOrientation() are obsolete. 2021-01-03 15:08:10 +01:00
wmayer
a9945500d8 TechDraw: [skip ci] restore TAB order of TaskBalloon dialog 2021-01-02 12:00:01 +01:00
donovaly
12c9aa00cf [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
2bfccf8146 Fix Qt deprecation warnings. QPrinter::paperRect() and QPrinter::pageRect() are obsolete. 2021-01-02 10:39:16 +01:00
donovaly
e54f4fc086 [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 76357b3fc . 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
4011e7f129 [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
e20a21a97d [TD] DrawViewDimension Tolerances, print zero tolerances without plus sign and decimals. 2020-12-30 18:49:59 +01:00
donovaly
665a1106f7 [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
eac4062b3f Boost: [skip ci] Fix build warnings from deprecated Boost headers (v1.75) 2020-12-29 15:34:25 +01:00
Mateusz Skowroński
98f63ba60f 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
22f7d5f3bc Merged crowdin translations 2020-12-23 15:13:05 +01:00
Yorik van Havre
16effcb2af Updated ts files 2020-12-23 14:51:04 +01:00
Yorik van Havre
107ac45ddd 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
5a25f91beb [TD] ShapeExtractor.cpp: Avoid processing infinite-sized shapes (Datum objects etc). 2020-12-22 17:46:19 +01:00
donovaly
9213dace6b [TD] fix unit conversion for dimensions
as reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=53473
my commit 957ce2f38787 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
5f497ab37a [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
d81e377546 [TD] Balloon, fix EndTypeScale refresh bug. 2020-12-18 12:45:34 +01:00
Aapo
294136e9bd [TD] Balloon, move property LineVisible to View tab and fix a refresh bug. 2020-12-18 12:45:34 +01:00
Aapo
7d260787b9 [TD] Balloon, change ordering of the data properties to more logical. 2020-12-18 12:45:34 +01:00
Aapo
2077709329 [TD] Make Dimension Tolerances respect the Prefs formatSpec when creating a Dimension. 2020-12-17 17:30:29 +01:00
Yorik van Havre
9c1c6f02ed 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
Yorik van Havre
bae52813df Merge pull request #4109 from donovaly/TD-dimensioning-fix
[TD] treat dimensions the same way, no matter if with unit or not
2020-12-14 12:08:46 +01:00
Yorik van Havre
8aa4e821c5 Merge pull request #4069 from aapo-aapo/TD-Balloon-improvements
[TD] TechDraw Balloon improvements with two new App::PropertyType properties
2020-12-14 11:56:08 +01:00