Commit Graph

152 Commits

Author SHA1 Message Date
Benjamin Bræstrup Sayoc
15fe52a04b [TechDraw] Simplify retrievement of user preferences
for all TechDraw files
2023-04-10 23:34:05 -04:00
wandererfan
20e44eba50 [TD]fix bad 3d dimensions
- mapToPage was left in place when converting to using
  projectPoint instead of projectToPlane.
2023-03-25 18:14:26 -04:00
wandererfan
85216bd127 [TD]Lint/Tidy/Review comments applied 2023-03-22 20:09:35 -04:00
wandererfan
b9fa9cb33e [TD]corrupt dim reference detect and correct 2023-03-22 20:09:35 -04:00
wandererfan
01641433c1 [TD]getters and setters for geometry
- make attributes private (or protected) and use
  getters and setters instead of accessing attributes
  directly.
2023-02-28 08:15:06 -05:00
Uwe
f8db7e9187 [TD] remove unused headers (#8155)
* [TD] remove unused headers

- also some sorting
- also improve readability by not using an abbreviation (we consistently don't abbreviate class names)
2023-01-09 14:55:22 +01:00
wandererfan
664b2560ad [TD]fix wrong calculation of 3d two edge angle 2023-01-07 16:32:03 -05:00
wandererfan
17554e29f1 [TD]fix issues reported by 3d dimension testers
- correct interpretation of True vs Projected

- handle long subelement names in references

- fix "too small" value condition

- better error messages for bad dimension geometry
2023-01-07 16:32:03 -05:00
wandererfan
1b547dff72 [TD]Refactor Dimensions for 3d upgrade
- separate validation, geometry and reference handling into
  individual files
- improve 3d reference geometry handling
- eliminate duplicate dim creation code

- add Dimension reference repair dialog

- Refactor formatting out of DrawViewDimension

- move dimension repaint control to ViewProvider
2023-01-07 16:32:03 -05:00
wandererfan
23dc64365b [TD]move makeAlignedPieces to separate thread
- correct ComplexSection rotation

- fix fail to load CS for some profiles and directions
2022-12-18 09:42:42 -05:00
wmayer
c38e522101 TD: replace QRegExp with QRegularExpression 2022-10-08 13:33:10 +02:00
Uwe
061bf91e84 [TD] DrawView*: remove unused includes - part 1
- also sort includes
- also additions to precompiled header
2022-10-07 01:08:38 +02:00
wandererfan
20f5db1ad1 [TD]fix extent dimension 2022-09-09 13:02:08 -04:00
wandererfan
acf17905ed [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
Wanderer Fan
74cdc6db61 [TD]code clean ups
- QtConcurrent include and CMake for Win

- include clean up dvp, dvs, dvd

- variable names and nested if clean up

- remove debug code
2022-08-18 09:34:32 -04:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Benjamin Bræstrup Sayoc
6ed38eeb99 [TechDraw] Improve readability of DrawViewDetail.cpp
[TechDraw] Improve readability of DrawViewDimension.cpp

[TechDraw] Improve readability of DrawViewDimExtent.cpp

[TechDraw] Improve readability of DrawViewDraft.cpp

[TechDraw] Improve readability of DrawViewImage.cpp

[TechDraw] Improve readability of DrawViewMulti.cpp
2022-07-20 16:44:26 -04:00
Uwe
31bc9f3913 [TD] remove some more superfluous nullptr checks 2022-07-20 02:53:48 +02:00
Uwe
93796e2d92 [TD] App: remove some superfluous nullptr checks 2022-07-19 02:03:50 +02:00
Wanderer Fan
866da5980c [TD]fix Dimension export to DXF 2022-06-30 08:50:07 -04:00
wmayer
a99be14233 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
7a2952abf7 [TD] fix compilation error 2022-03-14 01:13:56 +01:00
Wanderer Fan
244caf39cd [TD]fix unit display to standards 2022-03-13 19:04:42 -04:00
Wanderer Fan
12f0736189 [TD]fix 2 edge angle Dim special case 2022-03-12 08:55:35 -05:00
Wanderer Fan
0676c27443 [TD]fix Dim text on wrong side 2022-03-11 08:10:58 -05:00
Wanderer Fan
3c34abc0fa [TD]move format spec to dimension tab
- also make %.2w default format
2022-03-04 09:28:16 -05:00
Wanderer Fan
88004e8dc9 [TD]correct retrieval of dim text for DXF export 2022-02-11 16:24:35 -05:00
Wanderer Fan
4da3c21dcf [TD]Allow override of dimension line angles 2022-01-27 09:42:49 -05:00
Aapo
253817e3e9 [TD] Add new non-standard format specifier '%w' that truncates trailing zeros. 2022-01-21 11:24:44 -05:00
Wanderer Fan
e91cc8e329 [TD] avoid memory leaks by using shared_ptr
TD geometry objects are sometimes double deleted.  This
change uses shared_ptr instead of raw pointers to manage
deletions.
2022-01-07 13:34:20 -05:00
wmayer
c11d5df80a TD: replace usage of raw pointers of Vertex and Face with shared pointers.
This fixes issue 4741: Broken File After Using Landmark Dimension in TechDraw
2021-12-10 14:25:24 +01:00
Chris Hennes
cbdc2ac48e [TD] Remove deprecated Qt < 5.9 code 2021-04-02 12:02:54 +02:00
Benjamin Nauck
d358e13cd6 TechDraw: [skip ci] convert source files from iso-8859 to utf-8
All other source files are either plain ascii or utf-8, this converts
the last few to utf-8.
2021-03-25 18:02:12 +01:00
Aapo
51194d67d5 [TD] Hotfix for Dimension label Arbitrary value regression in DrawViewDimension.cpp 2021-02-25 10:28:42 +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
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
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
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
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
97e3947948 [TD] Make Dimension Tolerances respect the Prefs formatSpec when creating a Dimension. 2020-12-17 17:30:29 +01:00
donovaly
38734f4f86 [TD] treat dimensions the same way, no matter if with unit or not
fixes the issue reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=52545&start=40#p454483
2020-12-05 03:58:39 +01:00
Mark O'Donovan
bc3f90663e Remove unused variable in DrawViewDimension.cpp 2020-12-04 17:13:56 +01:00