Commit Graph

3009 Commits

Author SHA1 Message Date
wandererfan
ae38fb51e2 [TD]lint removal 2025-02-23 09:14:23 -05:00
wandererfan
9ee3bd5629 {TD]Set Arrow end property at Dimension level. 2025-02-23 09:14:23 -05:00
Florian Foinant-Willig
e1e75082ed TechDraw: Add a format spec. to round a value 2025-02-17 12:18:26 -05:00
Benjamin Bræstrup Sayoc
e2446c4076 Remove magic number and hard type enums in DrawBrokenView.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-02-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
79fdfb2cad Remove magic number and hard type enums in CenterLine.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-02-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
f115ed4bb1 Remove magic numbers and hard type enums in DimensionFormatter.h.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-02-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
63d9806b86 Remove magic number and hard type enums in Geometry.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-02-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
5626a43ccd TechDraw: use QStringLiteral 2 2025-02-16 19:52:30 +01:00
Joao Matos
27ebc68a11 CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Andrea
de9bd5e1ce change MIN_boost_version
ubuntu version 20.04 is no longer supported.
The minimum boost version used for freecad is now 1.74 (ubuntu 22.04) https://launchpad.net/ubuntu/jammy/+package/libboost-system-dev
2025-02-15 13:33:32 -06:00
tritao
9636068460 Base: Move zipios library to 3rdParty folder. 2025-02-14 13:08:28 -06:00
Benjamin Bræstrup Sayoc
4473aa029f TechDraw: Set symbol dir
Fixes #19496
2025-02-14 10:27:53 -06:00
Chris Hennes
9fccfa115d TD: Add missing #include "PreCompiled.h" (#19547)
* TD: Add missing #include "PreCompiled.h"

* Update src/Mod/TechDraw/Gui/CommandAlign.cpp

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* TD: Add guards around QMessageBox include

---------

Co-authored-by: WandererFan <WandererFan@gmail.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-02-12 21:28:34 -06:00
Chris Hennes
a4901e2ccb Merge pull request #19142 from hyarion/refactor/add-template-addobject
Add new addObject<T>() function
2025-02-11 09:42:47 -06:00
Chris Hennes
1350dd6bd0 Merge pull request #19502 from benj5378/QStringLiteral
Use QStringLiteral
2025-02-11 07:34:12 -06:00
Benjamin Bræstrup Sayoc
4d9e4efc87 [TechDraw] Add ability to align points by rotating view
Fixes #7061
2025-02-10 19:31:39 -05:00
Benjamin Nauck
8cc98b9a88 Mod: Use new addObject<T>(...) that requires additional changes 2025-02-10 18:35:38 +01:00
Benjamin Nauck
a1c5767643 Mod: Use new addObject<T>(...) using regex 2025-02-10 18:35:38 +01:00
Benjamin Nauck
7c4ff290a8 Mod: Fix mistakes in type system class names 2025-02-10 18:33:00 +01:00
Benjamin Bræstrup Sayoc
835905f76e TechDraw: Use QStringLiteral 2025-02-10 18:32:44 +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