Commit Graph

40015 Commits

Author SHA1 Message Date
Roy-043
1422981b93 Draft: remove faulty code from importDXF.py
The Group property of the 'new' layer object is not an attribute of its Proxy.
2025-01-27 21:01:50 +01:00
Max Wilfinger
5925c7a560 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
4f56102978 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
Alfredo Monclus
6ce57a58e0 refactor: taskpanel ui on linux 2025-01-27 18:06:22 +01:00
phaseloop
503e5dd091 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
c16f04fdc8 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
mwganson
2694dc85cf [VectorListEditor] Set precision to 12 digits when copying table data 2025-01-27 18:00:41 +01:00
marcuspollio
d72124f86a TechDraw: rename user-facing strings Arch to BIM 2025-01-27 17:58:45 +01:00
Dan Taylor
3ac01778f7 TechDraw: Fix finding outlines consisting of a single closed edge 2025-01-27 17:55:50 +01:00
Stan Tomlinson
b7dc993ebe 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
tritao
28f18ded85 Gui: Fix invalid scene graph mutation in EditableDatumLabel.
`EditableDatumLabel` uses `activate`/`deactivate` methods for showing or
hiding its widgets in the scene.

However, `activate`/`deactivate` methods can end up being called as part
of a scene graph / Coin action (`SoAction`) handler, in the context of
`SoFCUnifiedSelection`, and this ended up in a Coin warning and eventual
crash due to the scene graph being manipulated (nodes being removed),
which Coin has checks for in debug mode:

```
Coin error in SoGroup::removeChild(): tried to remove non-existent child
0x5555579c5290 (Annotation)
```

Fix this issue by using a `SoSwitch` node instead and by controling the
child visibility using it instead.
2025-01-27 17:51:40 +01:00
Pascal de Bruijn
f29cc727a7 TechDraw: fix editable/autofill scale in Templates 2025-01-27 17:50:18 +01:00
MisterMaker
f9616e93e7 [stylesheets] Gathering of stylesheet fixes (#18929)
* this is a workaround to remove caps

pelase ignore this hackery

* And now the caps are gone

* a bunch of small tweaks and fixes.

* Update FreeCAD Light.qss

updated menubar color light theme

* updated the buttons a tiny bit

* Fix for to short buttons.

Couldn't test it since my macro window is broken.

Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>

* qspinbox disabled tweaks.

* Update FreeCAD Dark.qss

Tweaked the buttons a bit so they are more in line with the light theme.

* Update FreeCAD Dark.qss

small tweaks

* reversed the spreadsheet headers gradient for dark

* Update light with undo arrows position

Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>

* Update undo buttons arrow position dark

Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>

* added an offset to qcombobox

* removed the fix since it ruined every Qcombobox.

* Tabs update more clean less gradients.

* Update DlgMacroExecuteImp.cpp

fixing conflicts

* Update DlgMacroExecuteImp.cpp

* Delete DlgMacroExecuteImp.cpp

* Create DlgMacroExecuteImp.cpp

* Revert "Create DlgMacroExecuteImp.cpp"

This reverts commit 8de8f7506177d773bb356fd0e22a66466c25b668.

* Revert "Delete DlgMacroExecuteImp.cpp"

This reverts commit 41315f31abdad79afd4b696ee15c603de3e4a6a1.

* Revert "Update DlgMacroExecuteImp.cpp"

This reverts commit aa792291684e2d674f6961c641c8e2f8b9af12c8.

* Revert "Update DlgMacroExecuteImp.cpp"

This reverts commit e8376a8fdf11d7fd014f2c46f189afdca42833ce.

* Delete src/Gui/DlgMacroExecuteImp.cpp

* Update DlgMacroExecuteImp.cpp

finally realized what was going on lol

---------

Co-authored-by: Syres916 <46537884+Syres916@users.noreply.github.com>
2025-01-27 17:49:20 +01:00
Jonas Bähr
91a95369f2 Main: Avoid Popups in Console Mode
When in console mode, some messages from CLI interaction still resulted
in popup dialogs, e.g. the response from `--help` or `--version`. This
is becasue those information are communicated via exceptions and those
exceptions prevented the console mode from being properly set.
By using a scope guard the console mode flag is now evaluated in all
cases. The code to display those messages got refactored into dedicated
methods which now also take care of console mode.
2025-01-27 17:47:16 +01:00
marioalexis
864fcf996a Material: Add mapping and sequence protocols to MaterialPy object 2025-01-27 17:45:21 +01:00
marioalexis
90ed7ea793 App: Set PropertyMap using Python objects with mapping protocol 2025-01-27 17:45:21 +01:00
dzid26
3a24e87492 Gui: show tooltips when window is not focused 2025-01-27 17:43:57 +01:00
Dan Taylor
187635aa43 Make adaptive toolpaths use actual stock outline instead of bounding box 2025-01-27 17:42:50 +01:00
Shai Seger
4d3fc9a700 [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
65daa70c6b 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
44a1e8de4d [TD]fix front view position in projection group (fix #19085) 2025-01-27 17:34:13 +01:00
Benjamin Nauck
5410123f0d Simplify logic using freecad_dynamic_cast 2025-01-27 16:08:19 +01:00
Benjamin Nauck
97bf3c5e33 Manual changes to improve isDerivedFrom usage 2025-01-27 16:08:19 +01:00
Benjamin Nauck
02c8bfff69 Add constraints to templates in BaseClass using static_asserts 2025-01-27 16:08:18 +01:00
Benjamin Nauck
6f535f19fb 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
6a3eb2ab49 Use is<T>() when possible 2025-01-27 16:08:18 +01:00
Benjamin Nauck
02aa90f6c7 Export subclasses of Part::Feature 2025-01-27 16:08:18 +01:00
Paul Lee
27732fdf50 [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
33816bd82b Improve decoration of walls, floors and ceilings. Improve creation of floor's slab 2025-01-27 14:25:51 +01:00
Roy-043
ed38742d54 Merge pull request #19245 from Roy-043/PrefPacks-Add-spreadsheet-colors-to-classic-theme
PrefPacks: Add spreadsheet colors to classic theme
2025-01-27 09:52:37 +01:00
jffmichi
6e361b8bd1 Sketcher: fix seg-fault on loading sketch with redundant constraints 2025-01-26 06:46:34 -06:00
Tim
0db1a2e034 [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
Roy-043
feaf59bb8d PrefPacks: Add spreadsheet colors to classic theme
Fixes #17984.
2025-01-25 21:30:27 +01:00
Andrea
87ed2bb6dc Clean importCSG.py
Clean code
Update importCSG.py
2025-01-25 05:35:43 -06:00
tritao
4c93a14fea Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
Chris Hennes
06143dcb15 Merge pull request #17000 from pskowronskiTDx/tdx-mac
Enabling 3Dconnexion NavLib integration for MacOS
2025-01-24 08:09:29 -06:00
xtemp09
96f7a2804e Fix arrow navigation in TreeWidget
Closes #10488. This commit removes the code fragment that "swallowed"
the key press events.
2025-01-24 06:51:52 -06:00
Ulices
83a04d2582 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
9bbdbd198b Draft: DraftGui.py fix displayPoint
Fixes #18744.
2025-01-23 11:44:26 +01:00
Ulices
99df928459 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
f24d24c9ac Fem: return from Python setEdit methods 2025-01-22 08:13:08 -06:00
pre-commit-ci[bot]
c0f6a0a871 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-clang-format: 57e96cfddb3b0e0e11df353f5124cfd8e930a802 → f9a52e87b6cdcb01b0a62b8611d9ba9f2dad0067](57e96cfddb...f9a52e87b6)
2025-01-22 06:21:55 -06:00
Benjamin Bræstrup Sayoc
d0acb9f483 [Gui] Make autocompletion global
Now auto complete is in all TextEdit objects. Fixes #12850
2025-01-22 06:12:43 -06:00
Roy-043
322b354fe8 Added is not None checks
Also added two local variables in BimLayers.py.
2025-01-22 10:41:11 +01:00
Roy-043
713db4bc5e 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
fd34f14fc3 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
7241f01c36 BIM: Fix BIM Schedule
Fixes #18934.
2025-01-22 10:07:35 +01:00
Roy-043
58a7b2ff28 Draft: updates related to transparency to alpha change 2025-01-22 10:04:47 +01:00
Roy-043
3c3cf74cb0 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
João Matos
e697eddd06 CMake: Allow using symlinks for installed files. (#19043)
* CMake: Allow using symlinks for installed files.
2025-01-21 11:35:53 -06:00