Commit Graph

45076 Commits

Author SHA1 Message Date
PaddleStroke
a9e545a227 PropertyEditor: Fix tab toggling bool (#26955) 2026-01-19 11:10:11 -06:00
Roy-043
ee4f856fc8 BIM: fix ArchReference Placement if whole file is used 2026-01-19 17:02:56 +00:00
Roy-043
b034b2adf3 Draft: fix DiscretizeEllipses preference inconsistency (#26953) 2026-01-19 10:51:19 -06:00
PaddleStroke
52608d3081 PartDesign: allow makeShellFromUpToFace to update extrusion direction
Updated makeShellFromUpToShape to accept the direction vector by reference.
This allows the method to reverse the direction internally if required
to successfully reach the target face, fixing cases where the extrusion
would otherwise fail or go the wrong way.

Note: While passing the direction as a non-const reference is a quick
fix for this regression, it is acknowledged as non-ideal and should
be considered for future refactoring.
2026-01-19 10:39:31 -06:00
Zheng, Lei
58d8515365 Part: Do not recompute visuals if shape did not change
This commit registers last rendered shape within the ViewProvider for
Part objects and short-circuits the visuals recomputed if shape did not
change.

Co-Authored-By: Kacper Donat <kadet1090@gmail.com>
2026-01-19 10:39:05 -06:00
Roy-043
fbb8e07e60 BIM: fix placement issue in BIM_View (#27015)
* BIM: fix placement issue in BIM_View

* BIM: fix placement issue in BIM_View
2026-01-19 16:30:04 +00:00
PaddleStroke
548c1ee638 PartDesign: enable LCS in 'Move after feature' 2026-01-19 16:21:50 +01:00
PaddleStroke
6d8953c3b0 Sketcher: Fix box selection regressions. And make addSelections Print to python (#26869) 2026-01-19 09:19:38 -06:00
Furgo
f159133737 BIM: add vertical area tests (#26874)
* BIM: Add tests for ArchComponent.AreaCalculator.isFaceVertical

* BIM: test new area calculation fallback case

* BIM: add test for composite complex surface vertical area calculation
2026-01-19 15:12:18 +01:00
freecad-gh-actions-translation-bot
ab40312ab0 Update translations from Crowdin 2026-01-19 08:10:24 +01:00
Max Wilfinger
979ff72de6 GitHub: Dispatch the diff-link updater immediately after the weekly release is created 2026-01-19 00:09:53 +01:00
Petter Reinholdtsen
bfe29875b2 Base: Removed unused private variable decimals to avoid lint issue.
The linter report 'private field 'decimals' is not used'.  The
getDecimals() method return pack.defDecimals, which was also
used to set the value of the decimals variable in the initializer,
so the decimals variable is redundant.
2026-01-18 20:29:51 +01:00
Syres916
9f2f9fd2d2 [Sketcher] Fix serious integer typo 2026-01-18 13:59:12 +01:00
PaddleStroke
257bf43bf7 Assembly: fix crash when measure active 2026-01-18 11:04:46 +01:00
Yash Suthar
72b13cd8fc App: Prevent addObjects from extracting children of nested groups (#26846)
* App: Prevent from extracting children of nested groups

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Update src/App/GeoFeatureGroupExtension.cpp

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-01-18 02:05:43 +00:00
Yash Suthar
afb1c35416 Sketcher: Fix external geometry creation from LCS (#26946)
* Sketcher: Fix external geometry creation from LCS

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Sketcher : Refactor used freecad_cast

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-18 00:21:45 +01:00
Syres916
e0f3e1e5d9 [Sketcher] set vertex size for new sketches to preference otherwise … (#26908)
* [Sketcher] set vertex size for new sketches to preference otherwise set to 4px

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2026-01-16 17:52:27 +00:00
Frank Martinez
c461a7a81f Remove unnecessary warnings during Mod scanning. 2026-01-15 11:06:26 -06:00
Max Wilfinger
5419d793f0 Merge pull request #25825 from Lgt2x/vtk-compatibility
SMESH: Patch for VTK 9.6 compatibility
2026-01-15 10:01:38 +01:00
Louis Gombert
cbb15dc453 Smesh: patch other VTK UG deprecations 2026-01-15 08:55:18 +01:00
Louis Gombert
b19cf715f0 smesh: update for VTK 9.6 Types array
UG::Types is now a vtkDataArray, that should be accessed through GetCellType
2026-01-15 08:55:18 +01:00
Louis Gombert
168c0bc530 smesh: update for VTK 9.4 polyhedron rework
Implement new compactGrid method based on the upstream smesh version. The compatibility layer was removed for VTK 9.6.
2026-01-15 08:55:18 +01:00
Louis Gombert
e21d98204e Remove usages of non thread-safe vtkUnstructuredGrid::GetFaceStream
This overload was deprecated in VTK 9.4 and removed in VTK 9.6. Replace with with the thread-safe version, that was already present in VTK 9.1
2026-01-15 08:55:18 +01:00
Louis Gombert
79892adfa7 Standardize VTK version check pre-processing directives
Check for the build date of the exact introduction of the feature instead of the next tagged version
2026-01-15 08:55:18 +01:00
Louis Gombert
c5a14ec998 Smesh: Remove the VTK_CELL_ARRAY_V2 compatibility define
This define was introduced in 9.0 for compatiblity with vtk 8.X, and removed for VTK 9.6. As we now support VTK>=9.1, it is not necessary to keep it.
2026-01-15 08:55:18 +01:00
Billy Huddleston
f5561f23a1 CAM: Fix Path.Machine.ui/editor install and packaging
Corrected CMakeLists.txt to ensure Path/Machine/ui/editor Python files
are installed and packaged properly. The previous variable name typo
prevented these files from being included in AppImage and install
targets, though local builds worked due to build directory copying.
This resolves missing module errors on some systems and in AppImage.

src/Mod/CAM/CMakeLists.txt:
- Fixed INSTALL command to use the correct
PathPythonMachineUiEditor_SRCS variable for Path/Machine/ui/editor
- Ensured all relevant Python files are included in both build and
install steps
2026-01-15 06:15:18 +01:00
tarman3
0059428f38 CAM: Drilling - Fix regression after #26584 (#26827)
* CAM: Drilling - Fix regression after #26584

* CAM: Linking generator - Fix machinestate handling

Fix linking generator for drilling

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

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

* Add remaining logic to terminate canned cycles appropriately (#2)

* sorted heights

* Refactor buildPostList

Introduces early tool prep to the buildpostables.
Allows emitting a T command early to give tool changer
time to index the tool before the M6 tool change command is emitted.

updates unit testing for this use case

Not implemented in postprocessors yet.

fix

* Helper and tests for terminating canned cycles

fix cycle termination

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

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

* CAM: setFeedRate now aware of drilling semantics (#3)

Remove retract plane property
machinestate properly handling z position

* next bugs (#4)

* setFeedRate now aware of drilling semantics
Remove retract plane property
machinestate properly handling z position

* unnecessary import.
Improved linking

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

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

* Fix rendering of canned cycles in G99 mode (#5)

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

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

* fix for collision  (#6)

* collision bug fix

* fix local variable

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

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

---------

Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-15 06:13:58 +01:00
Chris Hennes
f5bad2e6ef Merge pull request #26894 from furgo16/ci-ubuntu2404-with-kde-neon-qt6
CI: re-enable and upgrade native Ubuntu build to 24.04
2026-01-14 13:06:59 -06:00
paul
7720d75e4f [ArchWall] Fix: Better Info 0 Width Or 0 Height (#25878)
* [ArchWall] Fix: Better Info 0 Width Or 0 Height

Fix #25338

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

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

* [ArchWall] (Update) Fix: Better Info 0 Width Or 0 Height

Update - Following discussion at https://github.com/FreeCAD/FreeCAD/pull/25878

Fix #25338

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

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

* [ArchWall] (Update 2) Fix: Better Info 0 Width Or 0 Height

Update - Following discussion at #25878
Update 2 - Add translation

Fix #25338

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

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

* [ArchWall] (Update 3) Fix: Better Info 0 Width Or 0 Height
Update - Following discussion at #25878
Update 2 - Add translation
Update 3 - Follow comment on https://github.com/FreeCAD/FreeCAD/pull/25878#issuecomment-3724698834
         - Test of shape further relocated to after self.applyShape()

Fix #25338

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

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

* Improve warning message for ArchWall object

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-01-14 18:22:47 +00:00
Furgo
2d2ef387b1 CI: abandon PySide6 pip approach, try KDE Neon repos 2026-01-14 16:53:15 +01:00
Furgo
296979a86f CI: reenable Ubuntu native build 2026-01-14 16:53:15 +01:00
Furgo
e7aa3d931a CI: upgrade Ubuntu native build to 24.04 2026-01-14 16:53:15 +01:00
Roy-043
fe9f56ac97 Add AutoColor handling for sketches in gui_setstyle.py (#25781) 2026-01-14 15:53:31 +01:00
Furgo
710b7609d6 BIM: fix ArchWallGui tests (#26904) 2026-01-14 15:46:53 +01:00
Furgo
8a739ad5b7 BIM: provide better user information when a face horizontality or verticality cannot be determined (#26231)
* BIM: pinpoint failing face for ArchComponent.isVertical()

* BIM: pass face index when checking for verticality

* BIM: keep old comment

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-01-14 15:42:05 +01:00
PaddleStroke
d2a50fce9a Assembly: Fix error on open doc in insert tool 2026-01-13 23:48:50 +01:00
Chris Hennes
9c58e93f29 Merge pull request #26886 from AjinkyaDahale/sk-fix-symmetric-after-refactor-stage-5
Sketcher: fix `addSymmetric` after refactor stage 5
2026-01-13 15:23:43 -06:00
chris
0a2a1ca329 core: qt layout ui: ux/ui: fixes #26048 keep workbench selector visible 2026-01-13 13:51:47 -06:00
PaddleStroke
11de6743b0 Sketcher: Fix symmetry of slot redundancy false positive (#26604)
* Sketcher: Fix symmetry of slot redundancy false positive

Perturb symmetric geometries when using the 'create symmetric constraints' option to avoid numerical singularities in the solver (Jacobian Rank).
If geometry is "perfect", the solver cannot distinguish between the derivative of a Symmetry constraint and an Equal constraint, flagging one as redundant.
2026-01-13 13:48:41 -06:00
Furgo
e2ddf62467 BIM: implement baseless walls creation (#24595)
* BIM: Implement smart base removal for Walls

Previously, removing the Base object from an Arch Wall would cause the
wall to reset its position to the document origin and could lead to
unintended geometric changes for complex walls.

This commit introduces a "smart debasing" mechanism integrated into the
Component Task Panel's "Remove" button:

- For walls based on a single straight line, the operation now preserves
  the wall's global position and parametric `Length`, making it an
  independent object.
- For walls with complex bases (multi-segment, curved), a warning dialog
  is now presented to the user, explaining the consequences (shape
  alteration and position reset) before allowing the operation to
  proceed.

This is supported by new API functions `Arch.is_debasable()` and
`Arch.debaseWall()`, which contain the core logic for the feature.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/24453

* BIM: Move wall debasing logic into ArchWall proxy

The logic for handling the removal of a wall's base object was previously
implemented directly within the generic `ComponentTaskPanel` in
`ArchComponent.py`. This created a tight coupling, forcing the generic
component UI to have specific knowledge about the `ArchWall` type.

This commit refactors the implementation to follow a more object-oriented
and polymorphic design:

1.  A new overridable method, `handleComponentRemoval(subobject)`, has been
    added to the base `ArchComponent` proxy class. Its default implementation
    maintains the standard removal behavior.

2.  The `_Wall` proxy class in `ArchWall.py` now overrides this method. All
    wall-specific debasing logic, including the eligibility check and the
    user-facing warning dialog, now resides entirely within this override.

3.  The `ComponentTaskPanel.removeElement` method has been simplified. It is
    now a generic dispatcher that calls `handleComponentRemoval` on the
    proxy of the object being edited, with no specific knowledge of object types.

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

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

* BIM: Add interactive creation of baseless walls

Introduce a new workflow for creating Arch Walls without a dependency on
a baseline object (e.g., a Draft Line).

- The `Arch_Wall` command is enhanced with a "No baseline" mode, controlled
  by a new "Walls baseline" preference, allowing users to create
  placement-driven walls directly in the 3D view.
- The existing `debaseWall` function has been refactored for correctness
  and consistency with the new baseless wall geometry.

Co-authored-by: Yorik van Havre <yorik@uncreated.net>

* BIM: Refactor structure of the Arch Wall command

Refactor the `Arch_Wall` GUI command (`BimWall.py`) for improved
readability, maintainability, and architectural clarity.

- A `WallBaselineMode` Enum is introduced to replace the original
  integer values, making the code self-documenting.
- The monolithic `create_wall` method is broken down into smaller,
  single-responsibility helper functions for each creation mode.
- The `addDefault` method has been removed, with its logic
  integrated into the new structure.

* BIM: Add Draft Stretch support for baseless walls

This commit makes the new baseless Arch Walls graphically editable using
the `Draft_Stretch` tool.

- An API for stretching (`calc_endpoints` and `set_from_endpoints`)
  has been added to the `ArchWall` proxy.
- The `Draft_Stretch` tool is now aware of baseless walls and calls this
  new proxy API to perform the stretch operation, enabling users to
  stretch them.

Co-authored-by: Yorik van Havre <yorik@uncreated.net>

* [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

* BIM: address CodeQL warnings

* BIM: Fix wall alignment for GUI creation of baseless walls

Fixes an issue whereby creating a baseless wall from the GUI would
ignore the selected `Align` property, always resulting in a
center-aligned wall.

- The underlying geometry generation for baseless walls now correctly
  honors the `Align` property passed by the GUI and API.
- To ensure predictable behavior, the implementation uses the same
  geometric convention as walls built from a base object, making the
  `Align` property work uniformly for all wall types.
- This also corrects the behavior of the `Arch.makeWall` function for
  baseless walls.
- Update unit tests to test wall alignment.

* BIM: Refactor wall geometry generation for improved clarity and maintainability

Improves the internal logic for wall geometry creation, addressing CodeQL warnings and enhancing overall maintainability without changing external behavior.

- The `build_base_from_scratch` method is refactored to unify the separate logic paths for single- and multi-layer walls, reducing code duplication.
- A local helper function is introduced to create face geometry, for better modularity and readability.
- In the `_Wall.execute` method, the control flow that relied on implicit type checking is replaced with an explicit strategy pattern for fusing solids, making the logic more robust.
- Variable names are made more descriptive.
- A NumPy-style docstring is added to better document the function.

* Draft: fix stretching of rotated baseless walls

* BIM: add unit test for stretching baseless walls

* BIM: add regression tests for working-plane-relative coordinates and reuse of base sketches

* BIM: Fix baseless wall creation to respect the working plane

Corrects an issue where baseless walls were created using global
coordinates instead of being relative to the active Draft working plane.

The calculated local placement of the wall is now correctly transformed
into the global coordinate system by multiplying it with the working
plane's placement.

* BIM: Ensure unique baselines for subsequent wall creation

Fixes a bug where creating multiple walls with baselines would
incorrectly reuse the same underlying Sketch or Draft Line object.

The object retrieval logic after the `doCommand` call now correctly uses
`ActiveObject` to get a reliable reference to the new object instead of
relying on a hardcoded name.

* BIM: Make the wall's base object label translatable

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

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

* BIM: use singular for consistency with other labels

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Fix typo

* BIM: address reviewer's comments about improving object reference passing between Python and FreeCAD contexts, and functions

* BIM: remove defensive programming: the callback is only executed as a result of a user's GUI action

* BIM: use the params API to define WallBaseline parameter

* BIM: add Arch Wall tests for joining wall logic

* BIM: add joining logic

* BIM: re-add ArchSketch support

* BIM: re-add multimaterial support on wall creation

* BIM: address CodeQL warning, remove module duplication

* BIM: fix check for SketchArch module when creating sketch-based walls

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-01-13 09:30:37 +01:00
tetektoza
145947e6d7 Part: Fix Part_Extrude taper angle regression for internal faces (#26781)
* Part: Fix Part_Extrude taper angle regression for internal faces

The taper angle for holes (inner wires) in `Part_Extrude` was not being
negated after the toponaming refactor, causing internal faces to taper
in the wrong direction compared to v0.21.2.

The original makeDraft function correctly handled inner wires by:
- Negating taper for all inner wires in Part_Extrude
- Negating taper only for multi-edge inner wires in PartDesign
This logic was controlled via an isPartDesign function parameter.

When makeElementDraft was introduced for toponaming support, it was
designed to use innerTaperAngleFwd/innerTaperAngleRev fields that were
never ported from realthunder's branch. The cleanup (commit 709eab3018)
removed references to these non-existent fields, leaving makeElementDraft
with no inner wire taper handling at all.

So, this fix ports the makeDraft inner wire logic to makeElementDraft by
adding the flag, and counting wires and then triggering proper angle
flip depending on the flag/wire situation.

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-13 05:52:43 +00:00
PaddleStroke
9dc2ee91ff Gui: Fix broken build in DlgAddProperty.cpp (#26877)
* Gui: Fix broken build in DlgAddProperty.cpp

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-13 00:01:17 +00:00
PaddleStroke
847263fa5e PartDesign: Extrude: Fix upToShape document not recomputing correctly (#26696)
* PartDesign: Extrude: Fix dir for upToShape

* Update FeatureExtrude.h

* Update FeatureExtrude.h

* Update FeatureExtrude.cpp

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

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

* Update FeatureExtrude.cpp

* Update FeatureExtrude.h

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-12 23:07:47 +00:00
Ajinkya Dahale
8dedebcf3c Sketcher: Add new constraints after running addSymmetric
Missed during refactor
2026-01-13 03:32:15 +05:30
Ajinkya Dahale
87d9c67817 Sketcher: Use new constraint element access in add/getSymmetric 2026-01-13 03:32:15 +05:30
dependabot[bot]
4e0bac6386 Bump github/issue-metrics from 3.25.4 to 3.25.5
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.4 to 3.25.5.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](55bb0b7049...67526e7bd8)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-12 21:27:08 +01:00
Billy Huddleston
014a6e598a CAM: Add threshold for treating large-radius arcs as linear in simulator
Arc segments with extremely large radius compared to chord length can
cause floating-point precision issues in simulation. This change
introduces ARC_LINEARIZATION_THRESHOLD to treat such arcs as linear,
improving numerical stability in the simulator.

The following g-code was causing erractic behavior in the simulator due
to large-radius arcs:
```
G2 I88775.835760 J-1936991.545892 K0.000000 X102.063107 Y100.102815 Z12.700001
```

src/Mod/CAM/PathSimulator/AppGL/MillPathSegment.cpp:
- Added ARC_LINEARIZATION_THRESHOLD constant
- Updated arc motion detection to treat large-radius arcs as linear
- Improved handling of arc vs. linear segment classification
2026-01-12 10:52:06 -06:00
Gaël Écorchard
d73e399d10 pixi: Add qt6-wayland dependency on Linux
Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
2026-01-12 10:50:19 -06:00
Roy-043
2bcbc6fb3a Draft: fix constrain error if there is no new point (#26868)
* Add None check before constraining new_point

* [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>
2026-01-12 16:12:13 +01:00
Yash Suthar
7a99ccf5ff BIM : Preserve Spreadsheet structure (#26736)
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-12 16:09:56 +01:00