Commit Graph

31510 Commits

Author SHA1 Message Date
theo-vt
353c4eca55 Sketcher: Sketch autoscale (#21084)
* Working scale prototype

* Call viewAll to fit geometries in the viewport post-scaling

* Exclude angle dimensions

* Scale the viewport rather than calling viewAll

* Scale dimension annotation along geometries

* Early return when counting more than one dimensional constraint

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

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

* Disable sketch autoscale if there are external geometries in the sketch

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

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

* Add a setting to disable the feature _ and eventually parametrize

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

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

* Check for objects in the viewport in the sketch's ancestry to decide wheter or not to autoscale

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

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

* More consistent camera scaling

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

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

* Check for visual indicator in the whole document

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

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

* Find visible items in nested assemblies

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

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

* Check visual elements in assemblies nested in assemblies

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

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

* Set the dimension even if the scaling fails

* Allow constraints that interact with the origin axis/root

* Remove unused variable

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

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

* Misc fixes from review

* [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-06-09 18:31:44 +02:00
wmayer
017f2c8842 Helper function to get preferred delete key depending on platform 2025-06-09 18:10:52 +02:00
Tomas Mudrunka
2c3b56547b Add 3.175mm milling bit to default tool library as it's extremely common bit size 2025-06-09 12:06:36 -04:00
Chris Hennes
772a19e4f2 Merge pull request #21813 from maxwxyz/siemens-nx-navigation
Navigation: Add Siemens NX style
2025-06-09 12:03:31 -04:00
João Matos
967ebfd29c Material: Fix unused parameters warnings. (#21584)
Just another round of compiler warnings fixes for material code.
2025-06-09 10:53:43 -05:00
Ralf Habacker
719ee20ba4 Partial homogenization of FEM dialogs for constraints (#21538)
* FEM: Add context menu entry for clearing the reference list in constraints

See #6085

* FEM: Add 'Remove' button to python based dialogs for adding geometry references

See #6085
2025-06-09 10:51:36 -05:00
wandererfan
a46d84aa2e [TD]fix dim reference repair 2025-06-09 11:49:25 -04:00
WandererFan
4989af13e6 [TD]Cosmetic vertex tag save/restore fail (fix #21069) (#21374)
* [TD]fix tag handling on Save/Restore

* [TD]fix linter messages

* [TD]remove c-style cast x4

* [TD]do not write VertexTag element in Vertex::Save
2025-06-09 17:48:00 +02:00
Ralf Habacker
e14c45d9a0 BIM: Add top level group when importing obj file into active document
When importing an obj file into an existing document,
the imported objects are now stored below a new group
object in order to improve the structure and avoid
flooding the top level with imported objects.

Fixup for #21349
2025-06-09 17:36:45 +02:00
tetektoza
29ca81b64f Draft: Introduce 1-axis mode for ortho array (#21602)
* Draft: Introduce 1-axis mode for ortho array

As the title says - the 1 axis mode allows to switch between all of the
axises mode and allows to modify only 1 axis at the time that user can
select with the checkbox.

* Draft: Rename to Linear Mode and remove redundant comments

* Draft: Display only one interval for the selected axis

* Draft: Cache selected variables in user.cfg - axis mode, intervals, etc...

* Draft: Make sure the checkboxes in OrthoArray are exclusively selected

* Draft: Apply review comments

Changed a couple of things according to review:
* linear mode is now being used as default during first startup (it
  wasn't before)
* applied Roy's comments about coding style, etc.
* grouped everything into separate QGroupBox which is dedicated for
  Linear Mode and has it's own labels, although spinboxes are shared so
  during mode switch we reparent them now
* removed Orthogonal Array's icon
* in the QGroup applied naming suggested in the review, X Intervals ->
  interval, etc.
* changed to radio buttons since we want exclusivity in selection
2025-06-09 17:33:51 +02:00
Syres916
a38689b6fb [Start] add Tooltip to show full path when the ShortCustomFolder is true 2025-06-08 22:11:05 +02:00
Samuel Abels
5d6ec97ce1 CAM: Remove unwanted transparency from shape icons 2025-06-08 21:15:18 +02:00
Chris Hennes
4f7ce9270c Addon Manager: Update to latest main
Fixes problem with installer
2025-06-08 18:03:43 +02:00
Kacper Donat
593e946639 Merge pull request #21825 from maxwxyz/surface-blend-curve
Surface: Task dialog for blend curve
2025-06-08 16:21:01 +02:00
Syres916
0622e5014f [Start] show the actual custom folder name...
...instead of 'Custom Folder'
2025-06-08 16:19:19 +02:00
tetektoza
6664907bd5 Sketcher: Allow user to reset OVP state using backspace key
Currently if user tries to reset OVP, they can only do that by entering
"0" for example, and then the parameters will get unset in
unsetOnViewParameter. But that will only happen if user types a value
that's under confusion point (typically 1e^-7). In my opinion, it would
be cool to reset that state if user deletes all content in the label, to
allow them to specify coordinates with mouse once again.

Also, this patch fixes a regression with backspace, where deleting stuff
from OVP was working on unix systems, but seems like on Windows it
doesn't pass the check.
2025-06-08 15:00:58 +02:00
longrackslabs
8a58d225c8 - Refactor Point tool hint implementation with direct return (trival) pattern 2025-06-08 02:31:19 +02:00
Max Wilfinger
23f29e3aa8 Fix linter warnings 2025-06-07 21:10:01 +02:00
wmayer
680ba751b3 Surface: Fix transaction support of BlendCurvePanel and bind widgets to properties 2025-06-06 16:11:00 +02:00
wmayer
327222f780 Surface: Add task panel for blending curve 2025-06-06 16:10:47 +02:00
Max Wilfinger
d9a0b6909a Renaming Gui::SiemensNXStyle to Gui::SiemensNXNavigationStyle for consistency 2025-06-06 15:32:05 +02:00
Max Wilfinger
fc5b5fd9c6 Added UI for Siemens NX navigation style.
Ordered navigation styles alphabetically.
2025-06-06 15:26:18 +02:00
Roy-043
c567b75fa9 BIM: Roof add tolerance to parallel check (#21814)
Fixes #21796.
2025-06-06 11:39:57 +02:00
Roy-043
c9a434377a Draft: fix focus behavior if Length has default focus and axis constraint is used
Fixes #21774.

The X, Y or Z input should have priority is an axis constraint is used.
2025-06-06 10:21:17 +02:00
Chris Hennes
493817a775 Merge pull request #21785 from 3x380V/sheet_fixes
Sheet: random fixes
2025-06-05 10:16:32 -05:00
Samuel
39e79cee58 CAM: fix default asset directory (#21775) 2025-06-05 08:20:19 -05:00
Luz Paz
5c219bea41 Sketcher: fix typo in source comment
Found via codespell
2025-06-05 14:39:32 +02:00
Furgo
de37c5157a BIM: Arch, docstring and linter fixes (#21763)
- Fix docstring markup, improve types
- Fix max length to 100 chars on comments
- Wrap all code to 100 chars max
- Add deprecation notice
2025-06-05 14:02:25 +02:00
paul
f6bba5d58e [ArchWindow] Bug-fix Changing Sill _&_ SketchArch Support Sill Property (#21726)
* [ArchWindow] Bug-fix Changing Sill _&_ SketchArch Support Sill Property

1.  Bug found in https://github.com/FreeCAD/FreeCAD/pull/21005 (Allow changing Sill parameter)

self.baseSill
self.basePos :
- need to be restored as 'initial' settings in onDocumentRestored() as corresponding codes in onChanged() does upon object creation

2.  ArchWindow with SketchArch add-on to support above 'Allow changing Sill paramemeter' feature
- Update to ArchWindow following groundworks in https://github.com/FreeCAD/FreeCAD/pull/21568/

* [ArchWindow] Bug-fix Changing Sill _&_ SketchArch Support Sill Property (rev)
2025-06-05 14:01:06 +02:00
wmayer
b38c8867d0 Sheet: Further cleanup in Sheet class
With PR 21445 an unused function has been removed. But the underlying
class member isn't used anywhere else and can be removed as well.
2025-06-05 10:15:58 +02:00
wmayer
513260d29d Sheet: Improve handling of unsupported formulas
With the example file of issue 20299 the parser stops with an exception
and reads in the formulas only partially. This PR doesn't fix the issue
but avoids to raise an exception so that as much as possible will be
read in. For unsupported formulas a suitable message is printed with
the content of the cell.
2025-06-05 10:15:28 +02:00
wmayer
a46f79aa68 Sheet: Fix crash in Cell::setContent
This fixes issue 14697
2025-06-05 10:15:24 +02:00
wmayer
c215bd7be9 Sheet: Fix reading xlsx files
for the specs of the XLSX file format see:
https://jkp-ads.com/articles/excel2007fileformat00.aspx or
https://www.data2type.de/xml-xslt-xslfo/spreadsheetml/xlsx-format

In order to find the correct sheet file one has to first read-in
xl/_rels/workbook.xml.rels and save the relations of Id and Target.
The file xl/workbook.xml contains a list of sheet elements where for
each element the attribute 'r:id' is set. This attribute can be used
to look up for the actual data file.

This fixes issue 19757
2025-06-05 10:14:42 +02:00
wmayer
0c4fb60225 Sheet: Disable zooming
With PR 16130 the zooming capability was added to spreadsheet view.

The SheetTableView is added to a QGraphicsScene of a QGraphicsView
that provides the method scale(). However, this causes some problems
with header of the table view and makes resizing columns or rows
very unintuitive.

A correctly working table view is probably more important than the
possibility to zoom in or out and that's why the latter will be
disabled.

This fixes issue 19863
2025-06-05 10:14:03 +02:00
Gonzalo
bcfda35b42 Avoid error importing spreadsheet with deleted sheet (#19757)
This fix was proposed by pageeddie on https://github.com/FreeCAD/FreeCAD/issues/19757
2025-06-04 21:54:31 -05:00
Roy-043
cfdb99fb60 BIM: improve unit handling in Arch_Roof task panel (#21773)
* BIM: improve unit handling in Arch_Roof task panel

Fixes #21137.
Improvement for #21175.

units are now kept when a cell receives the focus.

Additionally:
* The first and last column have been made read-only.
* Some columns have been widened.
* The text in the task panel has been reordered to match the order of the columns.

* _RoofTaskPanel_Delegate class only if Gui is up

* typo
2025-06-04 21:25:33 -05:00
Andrea
85b7e0a498 update addonManager submodule to main 2025-06-04 21:17:13 -05:00
David Carter
657da35e6b Materials: Set array quantity format (#21647)
* Materials: Set array quantity format

When setting quantity formats, the default format is not actually the
default. Instead fixed format is, which causes issues for very small
and very large values. This was fixed for C++ but arrays created in
Python were not setting the format correctly.

* Apply suggestions from code review

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-06-04 16:27:37 +00:00
Benjamin Nauck
7105a2332e Merge pull request #21147 from 3x380V/units
Units rework II
2025-06-04 15:58:00 +02:00
Ryan Kembrey
9d8952627c Fem: Fix typo in VTK module warning: 'then' -> 'than' (#21752)
Co-authored-by: Ryan Kembrey <ryan.kembrey@student.uts>
2025-06-04 07:22:20 +02:00
PaddleStroke
9d48371ab4 Sketcher: Fix #21646 (#21739) 2025-06-04 06:13:44 +02:00
Chris Hennes
272c3034b4 Merge pull request #21659 from 3x380V/gui_fixes
Gui: random fixes
2025-06-03 19:23:21 -05:00
sliptonic
7f6af23acb Cam: Add Ondsel SVG post processor (#21743)
* Ondsel SVG post processor

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

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

* Update src/Mod/CAM/Path/Post/scripts/svg_post.py

* Update src/Mod/CAM/Path/Post/scripts/svg_post.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-06-03 21:37:20 +00:00
Alfredo Monclus
69f3dae845 PD: hole change the task panel threaded and model thread checkboxes into a combo/dropdown (#21664)
* PD: hole change threaded and modeled to combo in taskpanel

* Gui: Property editor apply review suggestions
2025-06-03 21:14:52 +02:00
sliptonic
434dc61e9d Merge pull request #21569 from tarman3/vcarve
CAM: Vcarve - fix zStart
2025-06-03 08:44:42 -05:00
Furgo
94a4639bc3 BIM: ignore FreeCAD groups for IFC export, controlled by a user preference (#21583)
* Add .db extension to git ignore list

* BIM: new feature - add ignore groups option on IFC exports

* BIM: create generic get_architectural_contents function
2025-06-03 11:19:07 +02:00
theo-vt
9a80921d74 Sketcher: Fix scaling down ellipses and arcs of ellipses (#21718)
* Reorder ellipse major/minor radius assignment when scaling down

* [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-06-03 11:16:56 +02:00
paul
93b53af0d1 [BimWindow] ArchWindow/MakeWindow Normal Default Auto & SketchArch Support Sill Property (#21568)
https://github.com/FreeCAD/FreeCAD/pull/21261
Historically, the normal of a Window object was deduced by the orientation of the Base Sketch and hardcoded in the Normal property.
Now with the new AutoNormalReversed property/flag (above PR), set True as default, the auto Normal previously in opposite direction to is now consistent with that previously hardcoded.
With the normal set to 'auto', window object would not suffer weird shape if the Base Sketch is rotated by some reason.
The Normal property is set to  'auto' (0,0,0) default following the above PR.

https://github.com/FreeCAD/FreeCAD/pull/21005
BIM: Allow changing Sill parameter in Properties for Window #21005
Ground work is added to support Window augmented by SketchArch Parametric Placement feature (PR to ArchWindow.py to be submitted separately)
2025-06-03 11:15:18 +02:00
Brad Eric Hollister
4dff82f7a3 proposed fix for https://https://github.com/FreeCAD/FreeCAD/issues/20856github.com/FreeCAD/FreeCAD/issues/20856. NOTE: AddonManager and Telemetry addon ui files are in separate repos 2025-06-03 09:37:22 +02:00
Ladislav Michl
f8d2789a43 Base: Units: introduce unit one
Dimensionless quantities have all exponents equal to zero.
Such quantities are simply numbers. The associated unit is
the unit one, symbol 1, although this is rarely explicitly
written.

See chapter 2.3.3 Dimensions of quantities, The International
System of Units, 9th edition.
2025-06-03 09:31:38 +02:00