Commit Graph

775 Commits

Author SHA1 Message Date
Wanderer Fan
cc770208ea [TD]migrate DrawingWB projection functions to TechDrawWB 2022-01-29 14:49:15 -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
edi271
c46a4f776b [TD] Move Circulation method to DrawUtil 2022-01-21 11:22:40 -05:00
Wanderer Fan
79f9fb6845 [TD]expose Page request paint method to Python 2022-01-11 09:36:48 -05:00
Wanderer Fan
3a7a12e436 [TD]improve handling of View in multiple Pages 2022-01-11 09:36:48 -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
luz paz
4f886b2b8c Fix various typos and refinements 2022-01-06 20:22:34 +01:00
Wanderer Fan
cec898c6b3 [TD]prevent touched but must be execute on DrawPage 2022-01-02 09:48:38 -05:00
wmayer
5fba9cecae TD: [skip ci] partially fix issue 0004765 2021-12-21 11:39:17 +01:00
wmayer
6ad156b6b7 TD: [skip ci] partially fix issue 0004765 2021-12-20 10:11:03 +01: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
Yorik van Havre
f3ccc6d660 Merge pull request #5023 from marioalexis84/gui-encoding
Gui:  Harmonize encoding/decoding between view, property editor and command line.
2021-10-14 12:24:49 +02:00
Chris Hennes
485be3acf8 Merge pull request #5082 from pavltom/Balloon_Updates
TechDraw - Balloon handling updates
2021-10-09 13:28:48 -05:00
wmayer
74639da997 OCCT: port FreeCAD sources to version 7.6
SMESH is not yet ported
Although FreeCAD code compiles with OCCT 7.6 it doesn't work at the moment
2021-10-09 13:49:02 +02:00
Tomas Pavlicek
c7cc7fa0fd TechDraw - Balloon updates 2021-10-03 13:43:53 +02:00
marioalexis
63d34c8e41 TechDraw: Fix Unicode and UTF-8 encoding character behavior 2021-09-23 21:21:24 -03:00
wmayer
e211b89cf8 port to MSYS2/clang 2021-09-19 19:49:44 +02:00
mwganson
dfe02d4099 [TechDraw] prevent crash where user duplicates page without also duplicating dependencies 2021-09-06 13:20:29 -05:00
wmayer
378dec720c Gui: fix -Winconsistent-missing-override, TD: fix -Wunused-parameter 2021-08-21 12:15:43 +02:00
Tomas Pavlicek
4edf18a630 TechDraw - Undo for Cosmetics Vertices and Lines 2021-08-11 10:07:02 +02:00
Uwe
f5aea33548 Update src/Mod/TechDraw/App/Cosmetic.cpp
Co-authored-by: 0penBrain <48731257+0penBrain@users.noreply.github.com>
2021-08-03 13:23:14 +02:00
donovaly
b817ade2a8 [TD] comment the new centerline behavior
add missing info to understand the new centerline behavior as introduced with commit b981f905
2021-08-03 13:23:14 +02:00
luz paz
eab17ddff5 Fix various typos 2021-07-31 09:46:50 +02:00
Tomas Pavlicek
be19f397f3 TechDraw - Add edge midpoint cosmetic vertex fix - added comments 2021-06-24 20:47:10 +02:00
Tomas Pavlicek
0fd02a4c11 TechDraw - Add edge midpoint cosmetic vertex fix 2021-06-21 15:20:52 +02:00
mapeze
60a75e5d24 Fix TechDraw View Spreadsheet with merged cells, 2 2021-05-21 17:26:13 +02:00
donovaly
b981f9056c [TD] fix centerline crashes and bugs
the PR fixes the following things:
- change the way centerlines between 2 lines are calculated. The current implementation leads to many bugs and even crashes (e.g. when the 2 selected lines are parallel ones of a square). There are different forum threads from the last 1.5 years.
The new endpoint line sorting is the one described here: https://forum.freecadweb.org/viewtopic.php?f=35&start=20&t=44255&sid=989a668890f954c13ef81e4a04ee6912#p501179

- as consequence the erroneous and misleading line end flipping can go and is removed (only used internally)

- when creating a new centerline, you see it immediately

- when creating a new or editing an existing centerline and press Cancel, the creation/editing is aborted

- fix crash when the 2 selected lines are bot horizontal and one tries to create a vertical centerline

- fix crash when changing the orientation  of an existing centerline and the result would be invalid

- cleanup the code a bit
2021-05-15 05:21:29 +02:00
wmayer
f5f3acc2a3 TD: remove some more deprecated Py2 code 2021-04-26 11:01:59 +02:00
wmayer
ae0a31542f TD: fix memory leaks in BaseGeom::baseFactory() and make code more readable 2021-04-23 17:05:13 +02:00
luz paz
1d60dbdc85 [TD] remove Py2 code from TD 2021-04-22 13:08:56 +02: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
7900a069c2 [TD] DrawViewPart.cpp: Fix a crash when user sets the PropertyVector Direction to zero. 2021-02-25 12:40:59 +01:00
wmayer
20bcce1544 TD: [skip ci] implement DrawView::recompute to handle all OCC exception types 2021-02-25 12:39:50 +01:00
wmayer
17a848dfe1 TD: [skip ci] explicitly nullify geometryObject in DrawViewPart::partExec to avoid to leave it a dangling pointer in case makeGeometryForShape raises an exception 2021-02-25 11:34:29 +01:00
Aapo
51194d67d5 [TD] Hotfix for Dimension label Arbitrary value regression in DrawViewDimension.cpp 2021-02-25 10:28:42 +01:00
wmayer
e728c3590e 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
vosk
542bf23cb0 [TD] - Fix geometry object leaking on every exec 2021-02-19 16:50:56 +01:00
Aapo
9318c4c1f2 [TD] ShapeExtractor.cpp: Fix linked View source bug, link targets were translated but not scaled in TD. 2021-02-05 22:41:09 +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
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
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