Commit Graph

44641 Commits

Author SHA1 Message Date
sliptonic
32eb76e7db Merge pull request #25960 from Connor9220/FixBoundaryDressup
CAM: Refactor stock used as boundary to be distinct from regular stock
2025-12-12 12:39:16 -06:00
sliptonic
569e5e6a87 Merge pull request #25218 from tarman3/geom_tol
CAM: Path.Geom.cmdsForEdge() - add tolerance
2025-12-12 12:29:04 -06:00
sliptonic
2ccceb0062 Merge pull request #24297 from tarman3/simplecopy
CAM: SimpleCopy - Allow multiple selection
2025-12-12 12:23:35 -06:00
sliptonic
43076c1ed0 Merge pull request #25827 from tarman3/pathcommands_looperror
CAM: PathCommands - Remove pop message about loop error
2025-12-12 12:19:38 -06:00
sliptonic
34b294fcdf Merge pull request #25938 from Connor9220/AddAnnotationsToCommand
CAM: Add annotations support to Command constructor and Python bindings
2025-12-12 12:17:09 -06:00
sliptonic
7f7bdf2d04 Merge pull request #25786 from Connor9220/FixLinuxCNCPostprocesor
CAM: Add rigid Tapping back to legacy LinuxCNC postprocessor
2025-12-12 11:44:36 -06:00
sliptonic
3b33b50e2c Merge pull request #25783 from Connor9220/AddUnitsPerToolbit
CAM: Add Units (Metric/Imperial) property to ToolBit
2025-12-12 10:46:42 -06:00
sliptonic
e11dc88a05 Merge pull request #25850 from petterreinholdtsen/cam-fanuc-post-fixes
CAM: Get Fanuc post processor working and implement several improvements
2025-12-12 10:41:51 -06:00
sliptonic
6d12c507df Merge pull request #26008 from tarman3/editor_setText
CAM: CodeEditor - stub for setText()
2025-12-12 10:34:17 -06:00
luzpaz
b9e74f564b Fix typos
Fixes various documentation/source-comment typos
2025-12-12 13:59:38 +01:00
PaddleStroke
0a010b1300 Core: move getPlacementProperty to be more accessible (#26088)
* Core: move getPlacementProperty to be more accessible

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderDragger.h

* Update ViewProviderDragger.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderLink.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update DocumentObject.h
2025-12-12 11:59:03 +00:00
PaddleStroke
8b650e8146 Assembly: joint task: fix delete impossible of non-valid refs 2025-12-11 19:04:27 -06:00
Chris Hennes
7fff3c525e Merge pull request #26089 from Roy-043/Draft-fix-lag-when-snapping-to-face-intersections
Draft: fix lag when snapping to face intersections
2025-12-11 19:01:22 -06:00
Alfredo Monclus
b70fe3bea5 PardDesign: fix hole task thread combos not translating 2025-12-11 18:56:10 -06:00
Kacper Donat
0523480e93 PartDesign: Recompute preview after forced recompute
This fixes some cases where Preview was stale and not recomputed after
changes done via code.
2025-12-11 18:55:10 -06:00
Roy-043
894576d376 Draft: fix lag when snapping to face intersections
Fixes #25924.

The `snapToIntersection` function has been changed to an if-elif structure, and in case of face-edge intersection snap, only two sublements are checked. This ensures a reasonable speed, even if objects have many edges and faces. The change does mean you have to move the mouse over the correct face for it to be processed. But since face-edge intersection snap is new anyway, this is acceptable I think.
2025-12-11 17:32:44 +01:00
Roy-043
cb91ac7b4b Remove maxSnapFaces parameter from params.py
Removed 'maxSnapFaces' parameter from settings.
2025-12-11 17:22:30 +01:00
timpieces
a06fbe27b0 Add proper tooltips for Material properties #24434 (#25509) 2025-12-11 14:56:26 +00:00
Petter Reinholdtsen
38423d81c0 CAM: Made Fanuc post processor compatible with FreeCAD 1.1.
Use setPlainText() if available, otherwise use setText().
Workaround for a regression from #23862.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
0200f18414 CAM: Adjusted Fanuc post processor to move Z to tool change position before M6
A "G28 G91 Z0" is needed according to testing and page 195 (6-1-2 Procedure for ATC operation) in
<URL: https://www.milco.bg/source/Technical%20Service/Documentation%20Dahlih/MCV%20510_1250B%20Operation%20and%20maintenance%20manual%20V2_2.pdf >
to get the spindle into the correct position for a tool change.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
f936bb72a6 CAM: Added test of Fanuc post processor
Used TestMach3Mach4LegacyPost.py as the starting point with input from
other test scripts too.

The test demonstrate a fix for #25723, as the Fanuc post processor has not been not updated to the latest changes in
the Path module.

This is related to #24676, where thread tapping was added to LinuxCNC, but the equivalent code in the Fanuc
postprocessor were not adjusted to cope, and #25677 where it was observed that the Fanuc postprocessor was
broken in versions 0.20 and 1.0.

Added MockTool class to provide ShapeName to fanuc_post.py, used to
convert drill cycles to threading cycles if the tool has shapeid "tap".
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
22f0328c1c CAM: Made Fanuc post processor compatible with FreeCAD 1.0.
Several methods introduced 2025-05-04 are preferred, but the methods
available in version 1.0 are used as fallback sources
for active status and coolent enabled.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
a23f27bacd CAM: Switched Fanuc post processor to end program with M30, not M2.
The difference according to the documentation is that M30 will rewind
the paper tape while M2 will not.  The effect on a CNC from 1994 is
that M30 turn on the indicator light marking that the program has
completed, while M2 do not, and the light is wanted to know when
the machine is done.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
3e85623f4a CAM: Adjusted Fanuc post processor to use M05 consistently everywhere. 2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
4d2719ff97 CAM: Provide correct and more relevant header from Fanuc post processor
Fanuc only understand upper case letters, no point in providing the
file name in lower case letters.  The provided file name is always "-",
so drop it completely. The first comment is presented in the Fanuc user
interface, it should get more relevant content.

Dropped useless semicolon.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
8f36c8cd79 CAM: Avoid Z overtravel error on Fanuc tool changes
Enabling tool height compensation will cause the axis to move up
the length of the tool, which will cause a Z overtravel error when
the tool change take place close to the top of the machine.  To
counter this move, ask the machine to move its commanded position
down the length of the tool height, which in effect causes no upward
movement after the tool change.  The #4120 variable contain the
current tool number, and #2000 - #20XX contain the tool heights.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
fdd8e46c4d CAM: Avoid adding trailing space to all M6 lines.
The Fanuc post processor add a trailing space to all M6 lines.
This make it problematic to write test for the generated output,
when compiled with the automatic policy enforcer on github
removing trialing space from the expected output.  Avoid the
problem by removing the trailing space from the generated
output.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
6710ad6e9d CAM: Corrected Fanuc post processor M3 handling
The thread tapping implementation in the Fanuc post processor change
behaviour of M3, G81 and G82 when the tool ShapeID matches "tap".
but the code not not expect that the parse() method will be
called with two different classes as arguments.

Rewrite the M3 handling to handle ToolController arguments
instead of crashing with an AttributeError.

Issues:

Fixes #14016
Fixes #25723
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
14ff081eba CAM: Switch Fanuc post processor default for M6T0 to disable by default. 2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
5e55d55655 CAM: Made empty spindle at the end optional in Fanuc CAM post processing script
Some Fanuc machines do not understand the 'M6 T0' instructions in the
preamble.  Move it out of the preamble and controlled by a new
command line argument --no-end-spindle-empty for the machines
where running to cause a "Tool Number Alarm" and the program to crash
as tool zero is not a valid tool.

Fixes: #25677
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
4978c7369d CAM: Adjusted Fanuc post processing script to always start with a percent
The percent signal to the machine that a program follows, and is not
part of the header but a required part when uploading programs into
the machine.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
aff382e9d1 CAM: Adjusted Fanuc post processing script to not inherit behaviour between calls
Reset line number when using --line-numbers.  Restore all default values when a
command line argument is not used.

This helps the test scripts ensure that the arguments passed during one test is the only
one taking effect during this test.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen
28ae99501b CAM: Print "Show editor" status boolean as string, not integer
This get rid of a Python style warning and make the output easier
to understand.
2025-12-11 00:57:20 +01:00
PaddleStroke
eb25021f39 Core: Add getPlacementOf replacing previous getGlobalPlacement logic. (#26059)
* Core: Add getPlacementOf replacing previous getGlobalPlacement logic.

* Update src/App/DocumentObject.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update DocumentObject.cpp

* Fix error when called from python with targetObj == None

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-12-10 22:47:20 +01:00
Billy Huddleston
fa0ace289b CAM: Add Units (Metric/Imperial) property to ToolBit
This PR allows each Toolbit to have its own Units property (Metric/Imperial) for better unit management.

Short Summary:
- Adds a Units property (Metric/Imperial) to ToolBit objects for better unit management.
- Ensures ToolBit schema is set and restored properly in the editor and utilities.
- Updates formatting and property handling to respect the selected units.
- Improves the ToolBit editor widget to refresh and sync schema/UI when units change.
- Uses FreeCAD.Units.setSchema and getSchema to switch between unit schemas.

NOTE: Toolbit dimensions are read from JSON in their native units  (as specified by the Units property),
converted to metric for all internal calculations, and displayed in the UI using the
toolbit's selected units. This ensures both accurate internal computation and user-friendly
display, while storing the correct units in the JSON. This can cause some rounding differences
when switching units. Example: 2 mm becomes 0.0787 inches. If you save that as imperial and then
switch back to metric, it will show 1.9999 mm

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Add Units property to ToolBit and ensure it's set and synced with toolbit shape parameters.
- Update property creation and value formatting to use Units.

src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Use setToolBitSchema to set schema based on toolbit units.
- Add logic to refresh property editor widget when units change.
- Restore original schema on close.
- Improve docstrings and signal handling.

src/Mod/CAM/Path/Tool/toolbit/util.py:
- Add setToolBitSchema function for robust schema switching.
- Update format_value to use schema and units.
- Add docstrings and clarify formatting logic.

src/Mod/CAM/Path/Tool/library/ui/browser.py:
- Restore original schema after editing toolbit.

src/Mod/CAM/Path/Tool/library/ui/editor.py:
- Ensure correct schema is set for new toolbits.
2025-12-10 14:57:33 -05:00
Kacper Donat
a23ccfffff Stylesheets: Fix toolbar button size change 2025-12-10 20:15:34 +01:00
Yash Suthar
0e37f240de Link: Fixed Scale property behaviour when the object is moved
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-10 20:13:56 +01:00
Chris Hennes
8d0e0a4763 PD: Add deprecation warning if Midplane is set 2025-12-10 12:42:13 +01:00
sliptonic
89f61f8955 Merge pull request #26038 from jffmichi/cam_viewprovider_accidental_change
CAM: revert accidental icon name change from #25440
2025-12-09 07:53:17 -06:00
jffmichi
431f0408da CAM: revert accidental icon name change from #25440 2025-12-09 05:53:05 +01:00
freecad-gh-actions-translation-bot
97b9193d71 Update translations from Crowdin 2025-12-08 22:31:48 -06:00
Max Wilfinger
a6db860db2 Update stale issue and PR settings in workflow 2025-12-08 11:34:50 -06:00
PaddleStroke
78f115fd8a Part: TopoShape make getElementTypeAndIndex more robust (#25913)
* Part: TopoShape make getElementTypeAndIndex more robust
* Part: Add unit tests for new regex

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2025-12-08 11:24:13 -06:00
Chris Hennes
fb7df3a62d Merge pull request #25903 from WandererFan/CosVertexCrashInScript
TechDraw: Prevent crash on adding cosmetic feature before geometry created
2025-12-08 11:22:21 -06:00
Syres916
11a0ace103 Merge pull request #25809 from Syres916/HotFix_For_Win_and_Wayland_For_First_Run
[Gui] Hotfix for correcting main window position on first run and Safe Mode on Windows and Wayland
2025-12-08 11:18:58 -06:00
dependabot[bot]
b9eae45291 Bump peter-evans/create-pull-request from 7.0.9 to 7.0.11
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.9 to 7.0.11.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](84ae59a2cd...22a9089034)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 09:25:28 -06:00
tarman3
d6748dcc14 CAM: CodeEditor - stub for setText() 2025-12-07 20:23:14 +02:00
tetektoza
c7d39807df Gui: Fix preferences search popup positioning on Wayland (#25675)
* Gui: Fix preferences search popup positioning on Wayland

Change window flag from `Qt::Tool` to `Qt::ToolTip` to fix popup
appearing in center of screen and closing immediately on Wayland desktop
envs. `Qt::ToolTip` uses xdg_popup protocol which provides proper
positioning relative to parent window on Wayland.

* Gui: Initialize ok check flag to default in prefs

* Gui: Use ranged for loop where possible in prefs

* Gui: Remove unused variable in preferences controller

* Gui: Use const where possible in prefs search dialog

* Gui: Use static where possible in search prefs dialog

* Gui: Use braced initializer list when returning type in search prefs

* Gui: Use auto in search prefs dialog where possible

* Gui: Do not use else if after return in search prefs dialog

* [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-12-07 11:43:09 +01:00
wandererfan
b5e69c017e [TD]fix CI fail on Win 2025-12-05 18:33:16 -05:00
wandererfan
72f0d60e9e [TD]fix CosmeticVertex fail in script 2025-12-05 18:33:16 -05:00