Commit Graph

126 Commits

Author SHA1 Message Date
Wanderer Fan
3ba8359d33 [TD]fix artifact in PDF export 2022-04-07 08:46:11 -04:00
wmayer
e8f9c8a1d3 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Wanderer Fan
37014eb586 [TD]fix unit display to standards 2022-03-13 19:04:42 -04:00
Wanderer Fan
959061720f [TD]Allow override of dimension line angles 2022-01-27 09:42:49 -05:00
wmayer
5c4fcaef1d TD: [skip ci] Fix coverity warning
Coverity warnings fixed:

CID 316559 (#1 of 1): Uninitialized scalar variable (UNINIT)
3. uninit_use_in_call: Using uninitialized value we. Field we.idx is uninitialized when calling push_back

CID 316549 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member pageheight is not initialized in this constructor nor in any functions that it calls.

CID 186161 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member parent is not initialized in this constructor nor in any functions that it calls.

CID 305170 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking this->m_baseFeat suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

CID 186152 (#2 of 2): Uninitialized pointer field (UNINIT_CTOR)
3. uninit_member: Non-static class member m_mdi is not initialized in this constructor nor in any functions that it calls.

CID 192588 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)
pointless_expression
2021-02-21 16:30:30 +01:00
wmayer
9b145fc830 TD: fix undo/redo for dimension objects
* do not emit dragFinished() signal inside mousePressEvent as nothing has been done. This avoids to create an empty transaction and doesn't touch the document
* inside mouseReleaseEvent() check if the mouse has been moved and only if yes emit the signal
* improve error handling in mouseDoubleClickEvent
* in mouseDoubleClickEvent start to edit the view provider
2021-02-14 19:03:19 +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
5350a2c3d0 [TD] Fix degree sign processing for equilateral angular plusminus dimensions. 2021-01-31 15:17:46 +01: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
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
Aapo
514b41b1c2 [TD] GQIViedDimension.cpp, GQCustomText.cpp - Fix Dimension label unit positioning bug and too tight bounding rectangle. 2020-12-03 21:31:01 +01:00
aapo-aapo
3935ef8b8f @aapo-aapo @chennes [TD] Suggested minor improvements for DrawViewDimension.cpp and QGIViewDimension.cpp in Pull request review.
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2020-12-02 16:38:21 +01:00
Aapo
40bd4b806f [TD] Add tolerance format specifiers and arbitrary tolerances. 2020-12-02 16:38:21 +01:00
Aapo
eb22a14a3b [TD] Make tolerance labels use the same formatValue() conversion as dimension labels. Support MultiValueSchemas for tolerances, too. 2020-12-02 16:38:21 +01:00
Aapo
e7b4d9ed99 [TD] Refactor DrawViewDimension getFormatedValue() into two functions. 2020-12-02 16:38:21 +01:00
luz paz
89664642fb TD: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the TechDraw Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
Aapo
66d5bff409 [TD] Add comments and more transparent tolerance position adjustment calculation. 2020-12-01 14:37:39 +01:00
Aapo
08179e3ce3 [TD] Make dimension number graphical layout more compact by making boundingRect() tighter for dimension number labels. 2020-12-01 14:37:39 +01:00
wmayer
44e5713a03 TechDraw: [skip ci] fix several gcc/clang warnings
-Wunused-private-field
-Wmaybe-uninitialized
-Wunused-parameter
2020-09-11 15:10:58 +02:00
wandererfan
53255c63b8 [TD]remove extra space in Angular Dims 2020-08-29 11:13:35 -04:00
wandererfan
96d296adf8 [TD]change Angle Dim tolerance format 2020-08-22 08:56:57 -04:00
wandererfan
62a048fa33 [TD]Dim blocks selection of geometry 2020-07-28 15:09:40 -04:00
wandererfan
ed50ad1fc3 [TD]fix Dim selection fails to clear prev selection 2020-07-26 19:45:49 -04:00
wmayer
983939b32d Coverity: Uninitialized scalar/pointer field 2020-07-20 17:34:30 +02:00
wmayer
611fd4088a fixes #0004318: Compilation fails with Qt 5.15 beta with QPainterPath errors [skip ci] 2020-07-02 13:19:43 +02:00
wandererfan
a3029fec74 [TD]Centralize preference getters 2020-04-24 11:13:49 -04:00
donovaly
e16a452c3d [TD] fix order of arrow heads
see https://forum.freecadweb.org/viewtopic.php?f=35&t=44334#p378675
2020-03-21 09:44:07 -04:00
Tobias Ellinghaus
cfc04404b6 Fix label of angular dimensions
According to ISO 129-1 labels of angular dimensions may never be upside
down (that is also true for other labels but not relevant for this
commit).
2020-03-13 09:02:37 -04:00
donovaly
23bf029d66 [TD] fix arrow end None for dimensions
This was not merged from my PR to PR #3153

- also uniform the combobox appearance in the preferences
2020-03-13 09:01:06 -04:00
wandererfan
b5ea5ed31e [TD]fix crash on Dim delete
- adjust index/cache options to avoid "dirty" screen
  region errors.
- may be masking missing "prepareGeometryChange"
2020-03-06 13:56:38 -05:00
wandererfan
db97daf0e0 [TD]expose dimension arrow position to Python 2020-03-02 08:37:19 -05:00
WandererFan
599c586cfa [TD]fix compile error on Win re M_PI 2020-01-10 18:04:41 -05:00
wandererfan
4ac6415828 [TD]refix Dim select area problem 2020-01-08 15:07:28 -05:00
wandererfan
7580c05504 [TD]fix Dimension selection issues 2019-12-31 17:28:41 -05:00
wandererfan
6886621008 [TD]fix potential nullptr while restoring 2019-12-30 18:20:48 -05:00
wandererfan
9be2af54d3 [TD]improve presentation of tolerance text 2019-12-18 07:01:46 -05:00
wandererfan
ed6adae509 [TD]fix dim text for multi value schemas 2019-12-05 07:10:08 -05:00
wandererfan
4b55f53334 [TD]Fix Dimension prefix/suffix 2019-10-20 15:36:59 -04:00
wandererfan
b7c6b34c44 [TD]Fix duplicate Arbitrary dim text 2019-10-18 09:13:06 -04:00
wmayer
ea824a6d7f fix -Winconsistent-missing-override -Wunused-variable 2019-10-13 14:29:52 +02:00
wandererfan
b1e61bcae7 [TD]Improve tolerance formatting 2019-10-11 09:16:41 -04:00
wandererfan
b06a1470be [TD]Fix Dimension Color Regression
- still an issue where text looses select color if
  clicked while selected
2019-09-29 19:56:46 -04:00
Tomas Pavlicek
39518f8dff Complete remake of drawing dimensions 2019-09-25 15:20:14 +02:00
Tomas Pavlicek
b23243b1af TechDraw: Radius drawing refactored - ASME support 2019-08-21 19:27:12 -04:00
wandererfan
8f57a68f4e [TD]Allow Aligned & Uniform Conventions on Radius Dims 2019-08-10 19:41:03 -04:00
Tomas Pavlicek
1544c68a57 Enhance Radius dimension drawing 2019-08-10 19:41:03 -04:00
Tomas Pavlicek
068ef5b0a9 TechDraw: SVG export refactoring - Keep correct font sizes 2019-06-11 15:46:46 -04:00
wandererfan
4816755f42 Fix overlap of dimension selection area 2019-06-07 22:13:16 -04:00