Commit Graph

30421 Commits

Author SHA1 Message Date
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
phaseloop
dc33932555 CAM: Fix finishing pass (#17960)
* CAM: Fix finishing pass

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

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

* add finishing pass unit (by @baehr)

* [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-27 18:03:43 +01:00
Lawrence Woestman
77a05049d5 CAM: Fixed script-style postprocessors getting the wrong __name__
Also added a test that the __name__ of the postprocessor is correct
2025-01-27 18:02:26 +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
Stan Tomlinson
ef79d67510 improved checks in GUI/Jobs.py/claimChildren
eliminate some error messages when a Job is not fully loaded
  (or when not properly constructed via scripting)

TESTED ON V0.21 -- code hasn't changed since then
2025-01-27 17:52:16 +01:00
Pascal de Bruijn
b95b500e5b TechDraw: fix editable/autofill scale in Templates 2025-01-27 17:50:18 +01:00
marioalexis
ddf4421db1 Material: Add mapping and sequence protocols to MaterialPy object 2025-01-27 17:45:21 +01:00
Dan Taylor
b77d762f8b Make adaptive toolpaths use actual stock outline instead of bounding box 2025-01-27 17:42:50 +01:00
Shai Seger
4d1cedaa06 [CAM Simulator] Add ifdef to fix OpenGL compatibility on linux. issue #18707 (#18746)
* Add ifdef to fix compilation on linux. issue #18707

* remove multisample line altogether
2025-01-27 17:41:49 +01:00
CandL
eee51e5237 Addition of CAM postprocessor for the Masso controller (#18845)
* Mods to accommodate tool order in Gcode. Some controllers want T# M6 others want M6 T#. Masso wants T# M6.

Added file refactored_masso_g3_post.py (based on refactored_linuxcnc_post.py) and modified UtilsParse.py

* Added tests and additional comments

* Working on the testing framework

* Tried to make refactored linux and masso as compatable line by line to support fil diffing

* A space in the file name caused all sorts of grief ... Thanks Larry

* added files to , swapped tool order in testrefactored_masso

* Added note regarding how files are "clones" of one another

* Added space in comment line for consistent formatting.

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

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

* Updated formatting and comments

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-27 17:41: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
Benjamin Nauck
ae15d98fd3 Use is<T>() when possible 2025-01-27 16:08:18 +01:00
Benjamin Nauck
5e72f6e5e1 Export subclasses of Part::Feature 2025-01-27 16:08:18 +01:00
Paul Lee
d7f0ce2a97 [ArchWall] Fix Regression Single-edge Wall w/ Multi-Material
Forum Discussion
- https://forum.freecad.org/viewtopic.php?t=93610&start=10#p806296

Github Issues
- https://github.com/FreeCAD/FreeCAD/issues/19147#issuecomment-2607946858
2025-01-27 14:29:04 +01:00
Julien Masnada
da1e9a2e29 Improve decoration of walls, floors and ceilings. Improve creation of floor's slab 2025-01-27 14:25:51 +01:00
Joona
855bce62cd Initialize sketcher group command shortcuts
Set the first subcommand's shortcut as the group command's shortcut for all sketcher group commands.
2025-01-26 15:49:24 +02:00
Joona
d18a48ddb1 Updated tools to use group command class.
Updated rectangle, polygon and spline group commands to use group command class.
Added separator comments with tool names for better code organization.
2025-01-26 15:18:38 +02:00
jffmichi
ab311f1f9b Sketcher: fix seg-fault on loading sketch with redundant constraints 2025-01-26 06:46:34 -06:00
Tim
da43cb842b [AddonManager] Fix construct_git_url return urls with '.git'. (#19242)
* [AddonManager] Fix construct_git_url return urls with '.git'.
2025-01-26 06:45:14 -06:00
Joona
f9d6609687 Rearranged file for better logical grouping
Reorganized the functions in the file to improve logical grouping and readability.
No actual code changes were made—only the order of functions was adjusted.
2025-01-26 13:15:54 +02:00
Andrea
29ea277b3b Clean importCSG.py
Clean code
Update importCSG.py
2025-01-25 05:35:43 -06:00
Chris Hennes
b3818aa583 PD: Migrate onlyHasToRefine
This was a later addition that got missed when merging.
2025-01-25 04:25:41 -06:00
wandererfan
85fcf8c1b8 [TD]fix cosmetic circle arc handling 2025-01-24 17:29:22 -05:00
tritao
8aa50c4380 Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06: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
Chris Hennes
d621f59a88 Merge branch 'main' into bgbsww-toponamingAddFeatureRefine 2025-01-24 09:33:57 -06:00
pre-commit-ci[bot]
09bd285c1d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-01-24 15:45:43 +01:00
Benjamin Bræstrup Sayoc
38e4e5a62e [Sketcher] Make axis colors changeable 2025-01-24 15:45:43 +01:00
Ulices
9ae74916b6 AddonManager: open addon's location directory (#19209)
* AddonManager: open addon's location directory
* AddonManager: account for macros when setting addon location
2025-01-24 06:48:46 -06:00
Roy-043
076899205c Draft: DraftGui.py fix displayPoint
Fixes #18744.
2025-01-23 11:44:26 +01:00
Ulices
ee2f327a96 Add units to some spinboxes on preferences pages (#19143)
* Add units to some spinboxes on preferences pages
* Ensure units have a space, ex: " px"
* FEM: Don't mark units for translation
2025-01-22 09:05:49 -06:00
marioalexis
6db962e7e5 Fem: Rename enable/disable electromagnetic properties 2025-01-22 11:17:59 -03:00
marioalexis
67803b3bc1 Fem: Update electromagnetics boundary conditions 2025-01-22 11:17:59 -03:00
marioalexis
15c2f33fb8 Fem: Fix vector potential unit and use enumeration property for boundary condition 2025-01-22 11:17:59 -03:00
André Kapelrud
10ad2ec955 Fem: Add Neumann boundary condition for electrostatic potential 2025-01-22 11:17:59 -03:00
marioalexis
b990fb129e Fem: return from Python setEdit methods 2025-01-22 08:13:08 -06:00
Roy-043
44221711f8 Added is not None checks
Also added two local variables in BimLayers.py.
2025-01-22 10:41:11 +01:00
Roy-043
1b3f8aba8d Draft and BIM: Layer manager minor code improvements
The code should not add the LinePrintColor property. That should be done elsewhere.
2025-01-22 10:41:11 +01:00
JULIEN MASNADA
df1334fad4 SH3DImporter: Miscellaneous improvements (#19178)
* Fixed documentation and confusing variable name

* Prepare for joined wall fix

* Fixed invalid Part::Sweep on certain joined walls

* Calculate the Length in case of a curved segment

* Adding Arch::Space for each room, and group furnitures in these spaces

* Fixed baseboard import

* Add baseboard to Space and wall to Space.Boundaries

* Fixed space attribution when importing furniture as Arch::Equipment

* Adding site properties

* Allow creation of reference ground mesh

* Make sure get_space takes level into account

* Added sh3dCreateGroundMesh preferences

* Sensible ordering for import preferences

* Move furniture at least up to the floor upper facewq

* Avoid gap between floors. Adjusted wall height and furniture placement

* Preparing to allow model_rotation attribute in furniture

* Fixed tipo in model_rotation

* Make space upper face does exists

* Use Facebinder to paint walls. do not offset by floor thickness.

* Use Draft.make_facebinder()

* Workaround for issue #19172. Refreshing the list of Faces and removing the extra '?' character
2025-01-22 10:08:46 +01:00
Roy-043
3d6d2a4039 BIM: Fix BIM Schedule
Fixes #18934.
2025-01-22 10:07:35 +01:00
Roy-043
2ad98aa84b Draft: updates related to transparency to alpha change 2025-01-22 10:04:47 +01:00
Roy-043
dd4c462199 Draft: DraftGui.py fix updateSnapper and implement display_point_active
* The updateSnapper function did not work properly.
* Added display_point_active attribute to prevent the displayPoint function from triggering the changeXValue etc. functions. This would lead to a loss of accuracy as the rounded displayed values would be read from the inputboxes.
2025-01-22 10:03:36 +01:00
Beep6581
a1f5d36584 Auto scroll to constraint on click (#18859)
* Auto scroll to constraint on click

When clicking on a contrasint in Sketcher, that constraint is now
automatically scrolled to in the Constraints listview. If selecting
multiple constraints, the last one is scrolled to.
Closes #17361

* Check model() for nullptr

* scrollTo only on select, not de-select #18859
2025-01-21 11:33:51 -06:00
wmayer
98997c4d1e PD: Fix build failure 2025-01-21 09:34:30 -06:00
Roy-043
c9e0eceda3 Merge pull request #19166 from Roy-043/Draft-DraftGui.py-improve-some-tooltips
Draft: DraftGui.py improve some tooltips
2025-01-21 15:46:00 +01:00