Currently there's no option for selecting active working plane other
than selecting `DoubleClickActivates` property on a BIM Level.
So, this patch adds an additional button for the submenu that BIM Views
provides - to activate working plane of the selected item.
Some of the objects, like Column, or Beam do not contain `IFC
Attributes` if they are initially created.
As it turns out, they are not being created as we are checking for
`onDocRestoredDone` attribute, which is assigned in `onDocumentRestored`
function. Since users can usually just not restore a document, but just
play on a newly created document, this attribute won't be available,
thus we won't be going through whole `onChanged` logic which populates
`IFC Attributes`.
To preserve current functionality of this additional parameter and not
cause the previous errors to happen, this patch just changes from the
custom flag to globally available `Restoring` flag which tracks document
being restored more reliably.
Fixes#21179.
This PR uses the built-in solution to close the task panel.
I was not aware of this feature before. My 2 previous PRs related to the closing of task panels, #20719 and #21073, will (largely) have to be reverted/redone in favor of this solution.
The `aux.fake_function` is used in the Draft unit tests as a substitute for functions that, in most cases, do not yet exist. But in test_modification.py it would overwrite Draft.extrude leading to issues with BIM unit tests.
See:
https://github.com/FreeCAD/FreeCAD/pull/21134#issuecomment-2869178563
* [Mod] Draw remove
removed deprecated drawing module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [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>
* [FreeCAD-20111] Sketcher: Scaling of a sketch containing BSplines doesn't work
When we executing Scale cmd we don't will lose knots information from shape geometry and it cause the scaled spline build with issue knots and it lead solver gets compute issue.
1. Add string format function PythonConverter::makeArryString(const std::stringstream& ss) for processing the control pnts string, mults string and knots string.
2. Add mults and knots information for python obj to make BSplineCurvePy::buildFromPolesMultsKnots(Args...) initialized Geom_BSplineCurve correctly.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 1. fix typo
2. Add wights info to keep spline shape after convert from python object
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 1. remove static function makeArrayString() from PythonConverter
1. Add template function makeSplineInfoArrayString() to generate string for cleaner code.
2. change python string format as review suggestion
* use fmt format
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ciFixes#20111
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
As the title says - currently we just have a simple circle, so I thought
with some basic adjustments it's possible to add a cool tracker that
will possibly guide user better on what they are placing on the
viewport.
* Gui: HiDPI fixes for Sketcher
(cherry picked from commit f043fd7c5c8a6ea003811453165eee7d643f3779)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
(cherry picked from commit 42567ca9fcf2d6bab612715391a7b1911367f75d)
* Apply suggestions from code review
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
(cherry picked from commit 28b52086e9cceae0e095421985479c546df49e44)
* qreal to double
(cherry picked from commit 4434ef18affa082a88390c1e68274de42f7c181e)
* more qreal to double
(cherry picked from commit df15eb6200d4ceab730ca8cf25ab0a90efe1cf41)
* Restore previous code which converted label size to points. View scaling would result in text that is too big.
* Ensure scaled marker size is one of the supported sizes for CIRCLE_LINE otherwise it would default to 7 (or what was set to "MarkerSize" in hGrp)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Tim Ringenbach <tim.ringenbach@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
Improves handling and assignment of default units
When creating a material without specifying units, no units are
currently assigned. This commit will assign the default units when none are
given, or throw an error when incompatible units are given. In the
latter case, the units are set to the property defaults.
This commit also incidentally fixed an issue when saving the material that
resulted in accessing an uninitialized pointer.
Currently, if user selects `Site` object in the Model tree, and hides it
while having `Compass` property selected to `true` and then unhides it,
the Compass is not appearing even though the property still remains to
be true.
This is because for the `Compass` property itself and `Visibility`
property we're using two different object types. For `Compass` property
we're using View provider geometry object, whereas for the `Visibility`
property we're using `Part::Feature` object. Since `Part::Feature`
object doesn't have compass attribute and Compass directly under it,
we're never hitting the logic to show the compass.
So, this patch just changes the object type that is being passed to
`updateCompassVisibility` during change of `Visibility` property, to
match the same object type passed during change of `Compass` property.
* 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.