Commit Graph

31122 Commits

Author SHA1 Message Date
Roy-043
2e02c6a944 Draft: ShapeString: use an actual font file as default, allow TTC files
* To help novice users supply an actual font file from the OS as the default for ShapeStringFontFile.
* The Draft code blocked the use of TTC font files. `Part.makeWireString()` can however handle them (although only the first font in the file can be used).

Additonally:
In a previous PR the bottom spacer was removed from the task panel. This PR brings it back as it is required in some cases. Without it  the "..." button of the file selector can become huge.
2025-05-05 18:15:47 +02:00
Furgo
be62ecc023 BIM: group 2D view creation commands 2025-05-05 18:10:18 +02:00
Roy-043
ffd99499fb Draft: fix dim unit override for Building US unit system
Fixes #21092.
2025-05-05 18:01:36 +02:00
tetektoza
7f6b3dcf70 Draft: Preserve direction vector upon Continue Mode for Dimension (#20974)
So, currently, if we use Vertical/Horizontal Dimension which is
constrained in one direction vector, upon `Continue`, the direction
vector is not being preserved.

The cause of that is that everytime we recall the command in Continue
Mode, we also call base class' `Activated` method, which in turn calls
`finish()` if we have already initialized an active Draft command. This
doesn't happen during first usage of the command, because this variable
is not yet populated, but upon second (and next) runs it is. In turn,
this causes to call `finish()`, and clean up the direction vector. So,
in essence, we are specifying the vector and cleaning it every
"Continue" run.

So, as a solution, just move the direction vector as an argument to
populate super class with it, and do that after super class' `Activated()`
call, so it won't get cleaned up in `finish()`.

Co-authored-by: Yorik van Havre <yorik@uncreated.net>
2025-05-05 17:58:54 +02:00
Roy-043
57da6ac140 BIM: close task panels on doc close
Fixes #17952.

This PR is a continuation of #20719.

It mainly involves adding `self.doc`. This new attribute is then also used in the rest of the modified classes. In some cases code was slightly reordered for consistency.

The `_finish_command_on_doc_close` function has been modifief to also handle `Gui.Snapper.ui.escape` and the code in gui_arcs.py has been updated accordingly.

Additionally:
Removed the `done` and `spacedone` variables in BimWall.py by tweaking the code.
2025-05-05 17:52:37 +02:00
Shai Seger
c90bb3cd9e [CAM Simulator] Auto resizing of simulator slider based on window size (#21027)
* [CAM Simulator] Auto resizing of simulator slider based on widow size. Replaces PR #20885.

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

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

* Add tooltips

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

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

* Add missing includes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-05 10:51:28 -05:00
sliptonic
205c556e69 Merge pull request #20591 from jalapenopuzzle/jalapenopuzzle/cam_snapmaker_machine_types
CAM: snapmaker improve support for different machine variants and toolheads
2025-05-05 10:47:07 -05:00
marcuspollio
953063ca09 BIM: add missing license (#20906)
* BIM: add missing license

* BIM: add SPDX License id to init.py

* Revert Dice3DS license
2025-05-05 17:45:38 +02:00
Chris Hennes
9b1467cef3 Merge pull request #20540 from 3x380V/cleanup-schemas-management
Simplify UnitsSchemas management
2025-05-05 10:43:27 -05:00
Max Wilfinger
3fcadd01f5 Set RoundedArcball as default orbit style.
Reorder status bar entries.
2025-05-05 10:33:33 -05:00
Chris Hennes
e4b301a048 Merge pull request #20449 from hyarion/refactor/cpp20-contains
Avoid using `count` and `std::find` where `contains` and `isEmpty` express intent better
2025-05-05 10:31:33 -05:00
sliptonic
37edce115e Merge pull request #20877 from knipknap/cam-postprocessor-errors
CAM: fix postprocessor errors
2025-05-05 10:03:50 -05:00
David Carter
2117d5aef1 Material: Database manager fixes (#21132)
* Remove duplicate code from previous merge

* Caatch potential unknoiwn exceptions
2025-05-05 10:22:50 +02:00
Chris Hennes
4dc4185319 Merge pull request #21051 from WandererFan/ComplexSectionCrash
[TD]Complex section crash (fix #20155)
2025-05-04 20:53:05 -05:00
David Carter
24df826865 Merge pull request #21046 from davesrocketshop/issue_13922_2
Update module dependencies to ensure that automated testing code is considered as well as direct dependencies. Update some automated tests to eliminate unwanted dependencies.
2025-05-04 17:02:50 -05:00
Benjamin Nauck
ae76f89759 Sketcher: Use contains instead of std::find 2025-05-03 22:22:10 +02:00
Benjamin Nauck
c70b649dff Spreadsheet: use isEmpty() instead of count() where possible 2025-05-03 22:22:10 +02:00
Benjamin Nauck
b9ee64792d Part: use empty() and isEmpty() instead of count() where possible 2025-05-03 22:22:10 +02:00
Benjamin Nauck
e69c372056 Material: use contains() and isEmpty() instead of count() where possible
# Conflicts:
#	src/Mod/Material/App/ModelLibrary.cpp
2025-05-03 22:22:10 +02:00
Benjamin Nauck
4bf7048534 Import: use contains() instead of count() where possible 2025-05-03 22:19:51 +02:00
Benjamin Nauck
dd2172e463 CAM: use contains() instead of count() where possible 2025-05-03 22:19:51 +02:00
marioalexis
2fdc7e91bc Fem: Use string format to round Elmer quantity values - fixes #20938 2025-05-01 20:23:19 -03:00
marioalexis
37b988ec00 Fem: Move code from Elmer electrostatic writer to proxy class 2025-05-01 20:23:18 -03:00
David Carter
ffb7ab779b Materials: External Module Support
The final PR for the external module feature that allows materials to
be stored in an external datastore, webservice, etc.

This includes the final material manager classes, and the UI support in
the form of commands and preference pages.
2025-04-29 19:06:16 -05:00
wandererfan
a925595232 [TD]Lint brushing 2025-04-29 09:22:11 -04:00
Ralf Habacker
21a5261345 BIM: Fix Python syntax error
Due to the use of an incorrect exponentiation operator the following
exception was triggered when changing attributes of a wave profile:

TypeError: Unsupported operand type(s) for ^: 'float' and 'float'

fixes #21048
2025-04-29 07:14:17 -05:00
Roy-043
56d75c2c06 Draft: store 3 ShapeString parameters and remove font from prefs (#21054)
* Draft: store 3 ShapeString parameters and remove font from prefs

With this PR 3 ShapeString parameters are stored:
* ShapeStringFontFile: this replaces the old FontFile parameter.
* ShapeStringHeight
* ShapeStringText

The ShapeStringFontFile is just the last selected font file and not exposed in the Preferences editor.

Additionally:
* Changed the label of the text input box from "String" to "Text".
* Changed the label of the point reset button to sentence case.

* Remove faulty docstring
2025-04-29 07:13:17 -05:00
Stefan Tröger
4479fd4d2d FEM: correct typos 2025-04-28 20:52:47 -05:00
wandererfan
ee2b3cae4e [TD]Add check for invalid section coordinate system 2025-04-28 19:15:58 -04:00
wandererfan
c33fe5f274 [TD]improve ComplexSection handling of bad section normal choice 2025-04-28 19:15:58 -04:00
Stefan Tröger
2c40c8291c FEM: Post task dialog opens transaction only if none is pending. Fixes item 4 in #20263 2025-04-28 18:45:05 +02:00
Stefan Tröger
95e3c08840 FEM: Add post pipeline for check analysis type. Fixes #20936 2025-04-28 18:45:05 +02:00
Stefan Tröger
c5c38a4a12 FEM: Ensure finite frame values only. Fixes #20933 2025-04-28 18:45:05 +02:00
Stefan Tröger
6cc83f470e FEM: Fix post object load of unsupported VTK data type 2025-04-28 18:45:05 +02:00
tetektoza
8d6547d519 BIM: Allow CurtainWall to have Window being assigned upon Remove/Add ops
Currently user has no possibility to insert Window to the host, if the
host is a Curtain Wall.

Solution is simple - just populate the array of acceptable hosts that
haven't been extended.

NOTE: Although this feels wrong, I've noted to change it as having some
kind of an internal flag allowing for add/remove for the host, since
extending this array looks like a really bad approach.
2025-04-28 18:20:16 +02:00
Graic
8d2cb99712 Gui: Added classic trackball orbit style (#20535)
* Gui: add classic trackball orbit

* Gui: add rounded arcball orbit
2025-04-28 11:12:53 -05:00
Ajinkya Dahale
350a416708 Sketcher: Avoid an unnecessary geometry update when trimming 2025-04-28 11:11:57 -05:00
Roy-043
ea6a30efba Draft: Add Global mode to ShapeString task panel
This PR adds the Global mode option to the ShapeString task panel.

Additionally:
* Rounding of coordinates caused by reading values from the task panel is avoided.
* Improved task panel layout: Height input above String input.
* Some code reformatting.
2025-04-28 17:57:41 +02:00
João Neves
0d38b2f7c5 Core: Fixed a bug where an empty document disappears (#20554)
* Core: Fixed a bug where an empty document disappears

Created a flag named autoCreated to distinguish an autoCreated
document created in the startup from a manually document.
Implemented a setter and a getter for this new flag.
Added a codition that verifies if a document is autoCreated
when opening another document to close it in the correct case.
Implemented unit tests for theses cases. Fixes #19868.

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

* Tests: Fix failing auto-created document tests

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

* Tests: moved created tests to the existing Document test framework.

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>

---------

Signed-off-by: João Neves <joao.antonio.neves@tecnico.ulisboa.pt>
2025-04-28 10:46:52 -05:00
Furgo
9c1e3d8bc5 BIM: BIM_TDView, add tooltip info on how to insert the view on a particular page (#20932)
* BIM: add tooltip info on how to insert the view on a particular page

* Fix typo

* BIM: split tooltip comment for better code readability

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

---------

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-04-28 17:46:09 +02:00
J-Dunn
28620363fd CAM: Remove comment (#20931)
* Update helix.py

* [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-04-28 10:39:57 -05:00
tarman3
b9ed43f222 CAM: Fix array warning 2 2025-04-28 10:38:24 -05:00
David Carter
a6ffcf63b6 Materials: Model Manager External Interface (#20825)
* Materials: Model Manager External Interface

Implement the ModelManagerExternal class for the external Materials
interface.

This is part of the ongoing merges of code to support external material
interfaces. In this PR the ModelManagerExternal class is implemented,
along with changes to supporting classes required for this class.

* Apply reviewer feedback
2025-04-28 10:29:04 -05:00
muezabdalla
56d3ca7b72 making the buttons of the temperature constrain expandable (#20894) 2025-04-28 10:11:40 -05:00
paul
ed85cd3a5d [ArchStairs] ArchSketch Support and Refactoring Phase 2 (#21025)
* [ArchStairs] ArchSketch Support and Refactoring Phase 2

Phase 2 Subsequent to https://github.com/FreeCAD/FreeCAD/pull/20069

FC Forum Discussion:-
https://forum.freecad.org/viewtopic.php?p=814274#p814274

ArchSketch Support, PropertySet, and Refactoring to enable more complex Stairs shape.

* [ArchStairs] ArchSketch Support and Refactoring Phase 2 - Typo fix

* [ArchStairs] ArchSketch Support and Refactoring Phase 2 - Clean up Tab
2025-04-28 10:04:40 +02:00
Roy-043
0d6a07728a BIM: Update working plane related code
Some code stemming from the old BIM external workbench still used `FreeCAD.DraftWorkingPlane`.
2025-04-28 10:01:35 +02:00
Luz Paz
4619ab1bff Misc: Fix various typos
Found via codespell
2025-04-27 19:32:19 -05:00
tetektoza
b138276a15 Core: Introduce PDF Import-Export dialog (#20860)
* Core: Introduce PDF Import-Export dialog

Currently, we only have hardcoded exporting to one pdf version, which
leads to (as in one of the below issues) to problems, such as
non-transparent layers, which are by default not supported in PDF/A-1b.

So, this patch adds an option to the user to select their preferred PDF
version by introducing new dialog under Import-Export in Preferences,
and allowing to update that version before exporting.

* Core: Add informational messages regarding selected PDF format

* Gui: Handle Qt < 6.8 unsupported PDF format

* Gui: Switch PDF export prefs dialog to use tr()

* Gui: Remove center alignment of PDF version description

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-04-27 19:31:34 -05:00
bofdahof
1155f0d752 Base: simplify UnitsSchemas management
Fixes: Maintaining schemas is difficult and error-prone

- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
2025-04-27 00:45:54 +02:00
Ladislav Michl
ef6f60510a Test: fix MaterialTestCases failing on unicode character output 2025-04-27 00:45:54 +02:00