* 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.
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>
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.
* [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>
Update module dependencies to ensure that automated testing code is considered as well as direct dependencies. Update some automated tests to eliminate unwanted dependencies.
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.
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
* 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
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.
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.
* 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>
* 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>
* 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>
* 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
* [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
* 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>
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