Commit Graph

2990 Commits

Author SHA1 Message Date
Benjamin Nauck
7c4ff290a8 Mod: Fix mistakes in type system class names 2025-02-10 18:33:00 +01:00
Chris Hennes
2745f43602 Merge pull request #17082 from benj5378/useTemplates
[TechDraw] Use templates
2025-02-10 11:17:26 -06:00
Chris Hennes
aa76a63abf Merge pull request #19420 from tritao/gui-selection-refactor
Gui: Selection code cleanups
2025-02-10 10:56:23 -06:00
Benjamin Bræstrup Sayoc
7bc9304a21 [TechDraw] Use templates instead of duplicate code: formatVector 2025-02-08 22:35:57 +01:00
Benjamin Bræstrup Sayoc
1d7e7c86a0 [TechDraw] Use templates instead of duplicate code: toGp 2025-02-08 22:35:57 +01:00
tritao
48f0f07176 Gui: Reorganize the navigation files into a top Navigation folder. 2025-02-05 20:21:00 -06:00
tritao
ae56e62049 Gui: Cleanup mystery comments around ResolveMode. 2025-02-05 13:11:05 +00:00
Chris Hennes
411c7c0961 TD: Migrate to using App::Application::getNameWithVersion 2025-02-03 12:05:16 -05:00
Pascal de Bruijn
f980fdaede Add proper PDF creator metadata 2025-02-03 12:05:16 -05:00
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Chris Hennes
5e9dd297fe Merge pull request #19232 from WandererFan/miscSmallFixes
[TD]minor fixes x3
2025-02-03 17:54:20 +01:00
wandererfan
d26812e048 [TD]fix crash on delete while dialog open (#18120) 2025-02-03 17:51:46 +01:00
Pascal de Bruijn
11c77e4099 TechDraw: Export with default filename (#19033)
* TechDraw: Export with default filename

* TechDraw: templates consistent drawing_number/revision_index
2025-02-03 11:34:14 -05:00
Max Wilfinger
45897379e6 Merge pull request #19097 from hyarion/refactor/template-based-is-derived-from
Simplify code by using BaseClass' isDerivedFrom<> and is<>
2025-01-27 20:40:08 +01:00
Benjamin Guest
9990408035 TechDraw: Fix dimension alignment issue.
Fixes issue #19121 "dimension numbers placed lower than normal".

Problem:

QGCustomText has a new method `alignmentRect` which can optionally return a
`tightBoundingRect` instead of the regular `boundingRect`. The
`alignmentRect` is used for laying out the `QGIDatumLabel`, however
QGraphicsItemGroup's `childrenBoundingRect` use the childrens'
`boundingRect` and knows nothing of `alignmentRect`. The result is an
improperly sized label and frame and miss alignment. Additionally
`childrenBoundingRect` calculations includes hidden views, so even though
the `m_tolTextOver` and `m_tolTextUnder` are hidden they still affect
the bounding rect size.

Solution:

1. Implement new method `QGIDatumLabel::tightBoundingRect` this
   calculates the bounding rect using the subview's
   `aligmentRect` if there is text in the custom text.
2. Use `tightBoundingRect` in place of `boundingRect` to for the drawing of
   arrows and the exact dim frames.
3. This PR acknowledges that there are some edge case fonts that while not
   clipped may not interface perfectly with arrows and the exact dimension
   frame.
4. Fix vertical alignment of `m_tolTextOver` / `m_tolTextUnder`
5. Incorporate PR Review comments
2025-01-27 20:39:41 +01:00
marcuspollio
40392c37c4 TechDraw: rename user-facing strings Arch to BIM 2025-01-27 17:58:45 +01:00
Dan Taylor
5535c1bd0b TechDraw: Fix finding outlines consisting of a single closed edge 2025-01-27 17:55:50 +01:00
Pascal de Bruijn
b95b500e5b TechDraw: fix editable/autofill scale in Templates 2025-01-27 17:50:18 +01:00
wandererfan
01f4e08f47 [TD]fix front view position in projection group (fix #19085) 2025-01-27 17:34:13 +01:00
Benjamin Nauck
cb4ee4737d Simplify logic using freecad_dynamic_cast 2025-01-27 16:08:19 +01:00
Benjamin Nauck
45c997f40a Manual changes to improve isDerivedFrom usage 2025-01-27 16:08:19 +01:00
Benjamin Nauck
dd6aa9f3c7 Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
wandererfan
85fcf8c1b8 [TD]fix cosmetic circle arc handling 2025-01-24 17:29:22 -05:00
wandererfan
d8227d0683 [TD]control svg scaling at object level 2025-01-24 16:34:18 -05:00
wandererfan
a1933ff64f [TD]allow showing units on individual dimensions 2025-01-24 13:04:00 -05:00
João Matos
8a384a2b70 CMake: Improve Import dependency check for TechDraw module. (#19036)
* CMake: Fix missing Import dependency check for TechDraw module.

* CMake/TechDraw: Conditionally use Import library.

* CMake: Fix missing dependency check for Module and PartDesign measure in TechDraw.
2025-01-19 13:33:16 -06:00
Yorik van Havre
fe60505c17 Translations (#18923)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-13 21:30:30 -06:00
Tobias Frost
7a5a3d1ffc spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06:00
WandererFan
e9c30cf370 [TD]Dimension font clipping (fix #11452) (#18771)
* [TD]separate alignment and rendering bounding rectangles

* [TD]use alignment rectangle (fix #11452)
2025-01-13 11:13:59 -06:00
Pascal de Bruijn
c4116daf99 TechDraw: Component Drawing as default document type (#18827)
Presumably Component Drawings are more common as opposed to Assembly Drawing's
therefore FreeCAD's default should reflect this.

find src/Mod/TechDraw/Templates -iname "*.svg" -exec sed -i 's#Assembly Drawing#Component Drawing#g' "{}" \;
2025-01-13 11:59:57 -05:00
Syres916
b86e1adb22 [Techdraw] Import SVG files with UTF-8 encoding (#18816)
* [Techdraw] Fix importing SVG files with UTF-8 encoding

* [Techdraw] fix Lint feedback
2025-01-06 18:32:56 +01:00
WandererFan
93aa3b312f [TD]Fix RichText parent in scene (fix #18283) (#18768)
* [TD]allow DrawViewAnno to be attached to another view

* [TD]allow image and spreadsheet attach to view

* [TD]ensure correct parent in scene

* [TD]refactor command helpers to separate file

- gathering the helpers in one place
- helper redundancy to be address in another change

* [TD]create symbol, spreadsheet, image with parent

* [TD]fix claimChildren for some views

- also includes many lint fixes
2025-01-06 18:11:25 +01:00
WandererFan
a3e49023d1 [TD]Symbol scaling (fix #14400) (#18757)
* [TD]add legacy/new svg scaling pref

* [TD]Change Svg scaling logic (fix 14400)
2025-01-06 18:02:37 +01:00
WandererFan
abb50a4daa [TD]Long and link dim refs (fix #13375) (#18641)
* [Meas]Changes for TD dimension refs for links

* [TD]App changes for dim refs to links

* [TD]Gui changes for dim refs to links

* [TD]fix 2 lint messages

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-23 17:36:22 -05:00
wandererfan
8e653ca7fb [TD]fix highlight style preference 2024-12-23 12:32:19 -05:00
WandererFan
300f3bca4c [TD]Section line and rotation fix 17831 (#18663)
* [TD]fix SectionLine colour (fix 17831 part 1)

* [TD]fix wrong rotation in Section task (fix 17831 part 2)
2024-12-23 11:03:31 -06:00
Ladislav Michl
2ea8a633ac Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
FEA-eng
970beb4457 Fix typos in TechDraw advanced preferences - tooltips (#18510) 2024-12-23 10:38:12 -06:00
luzpaz
7782fd6827 Trim lines ending with superfluous whitespace 2024-12-22 08:50:37 -05:00
Tobias Frost
0d628cb5fc Fix SPDX Identifier to match license 2024-12-20 12:05:44 -05:00
Ladislav Michl
2afdd58a88 TechDraw: Ensure tolerance font size is > 0 2024-12-16 12:23:51 -05:00
PaddleStroke
e657ce9473 TechDraw: Assembly exploded views : revert #17726 2024-12-16 11:22:26 -06:00
Chris Hennes
a88f30877c Update src/Mod/TechDraw/Gui/QGILeaderLine.cpp 2024-12-16 18:16:03 +01:00
wandererfan
3cadb489d9 [TD]allow weld symbol on rotated leader 2024-12-16 18:16:03 +01:00
wandererfan
a92acbd457 [TD]fix leader autohorizontal on rotated base view 2024-12-16 18:16:03 +01:00
WandererFan
fa327ec152 [TD]Fix transparent area in pdf (fix #18443) (#18507)
* [TD]fix transparent areas in pdf (#18443)

* [TD]restore use of PDF/A-1b format

- was not working in older versions of QPdfWriter
2024-12-16 10:47:08 -06:00
WandererFan
f12999724b [TD]respect locale for date autofill (#18132)
* [TD]respect locale for date autofill

* [TD]fix merge conflict

* Apply suggestions from code review

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-12-13 11:07:54 -06:00
wandererfan
0f6809f325 [TD]fix #18050 hidden line color 2024-12-09 17:39:54 +01:00
wandererfan
8f8bdd5c93 [TD]add shape validation tool for debugging 2024-12-09 17:37:33 +01:00
Kacper Donat
651cefde4d Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00