Commit Graph

33441 Commits

Author SHA1 Message Date
Billy Huddleston
ad17e39d45 CAM: Refactor stock used as boundary to be distinct from regular stock
This commit makes boundary stock objects distinct from regular stock by
setting a boundary flag and label, and prevents editing of boundary
objects in the job view provider.

src/Mod/CAM/Path/Dressup/Boundary.py:
- Add promoteStockToBoundary method, set boundary properties, handle
missing stock/shape

src/Mod/CAM/Path/Main/Gui/Job.py:
- Block editing for objects flagged as boundary stock
2025-12-04 12:43:43 -05:00
Billy Huddleston
ca051b7ade CAM: Add annotations support to Command constructor and Python bindings
This commit introduces support for passing an 'annotations' dictionary
to the Command class constructor and its Python bindings. The annotations
dictionary can contain string or numeric values for each key, allowing for
richer metadata on CAM commands. Each annotation must be provided as a
key-value pair within a dictionary.

Examples:

cmd = Command("G1", {"X": 10.0, "Y": 5.0}, {"note": "Rapid move"})

cmd = Command("G2", {"X": 20.0, "Y": 15.0}, {"priority": 1})

cmd = Command("G3", {"X": 30.0, "Y": 25.0}, {"note": "Arc move", "speed": 1500})

cmd = Command("G0", {"X": 0.0, "Y": 0.0}, {})

cmd = Command("G0", {"X": 0.0, "Y": 0.0})

cmd = Command("G1", {"X": 10.0, "Y": 5.0}, annotations={"note": "Rapid move"})

src/Mod/CAM/App/Command.cpp:
- Added new Command constructor accepting annotations

src/Mod/CAM/App/Command.h:
- Declared new Command constructor with annotations parameter

src/Mod/CAM/App/Command.pyi:
- Updated docstring to describe annotations argument

src/Mod/CAM/App/CommandPyImp.cpp:
- Extended Python init to parse and set annotations dictionary
2025-12-03 15:44:18 -05:00
Chris Hennes
42656afbed Merge pull request #25920 from PaddleStroke/patch-840798
Sketcher: Fix warning when using dimension tool
2025-12-03 13:09:40 -06:00
PaddleStroke
daf8790884 Part: revert changes to ViewProviderExt::getDetails (#25912) 2025-12-03 12:12:27 -06:00
Ladislav Michl
53b724c40e TechDraw: Refactor use of Unit Schema values
Quantity's getUserString already returns both factor and unitText.
2025-12-03 17:43:53 +01:00
Ladislav Michl
57977bbdaf TechDraw: Fix MultiValueSchema formatting
Multi Value schemas cannot be forced to use Format::FORMATTED.
2025-12-03 17:17:58 +01:00
PaddleStroke
ddfea2c9e5 Sketcher: dimension tool, use VPSketch version of addSelection 2025-12-03 15:30:44 +01:00
PaddleStroke
54377a71b4 Sketcher: Make VPSketch::addSelection public 2025-12-03 15:29:01 +01:00
Billy Huddleston
07a564f23b CAM: Fix job assignment and model/stock initialization in ObjectOp
This PR fixes a bug introduced with PR #25800
It updates the ObjectOp class to correctly assign the job, model,
and stock properties from the parentJob object. Previously, only
PathUtils.addToJob was called, which did not set these attributes directly.

This change ensures that when creating a new operation, the job, model,
and stock fields are properly initialized from the parent job. This
fixes issues where operations did not inherit the correct job context,
leading to missing or incorrect references to the model and stock, and
potential errors in downstream processing.
2025-12-03 00:23:23 -05:00
Roy-043
867309b0d4 Part: make Part_EditAttachment nesting aware (#25887) 2025-12-02 22:44:55 -06:00
sliptonic
01e7a56a56 CAM: Suppress rendering of first rapids (#25440) 2025-12-02 12:20:07 -06:00
PaddleStroke
7758a719b0 Assembly CommandInsertNewPart : Make sure assembly file is saved (#25730)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-12-02 04:30:20 +00:00
PaddleStroke
018981eeec Sketcher: fix new external always construction (#25733) 2025-12-01 21:49:24 -06:00
Frank Martinez
5b4df90f24 Build: Fix some trivial warnings 2025-12-01 20:57:09 -06:00
Billy Huddleston
769a83b3ca CAM: Introduce unified ToolBit parameter migration logic for Bullnose tools
- Added new migration system to handle legacy parameter conversion for ToolBit assets and objects.
- Implemented ParameterAccessor abstraction for consistent access to dicts and FreeCAD objects.
- Centralized migration logic for CornerRadius from TorusRadius or FlatRadius/Diameter, restricted to Bullnose shape-type.
- Updated asset and object initialization to use migration logic and filter Bullnose parameters.

src/Mod/CAM/Path/Tool/camassets.py:
- Integrate new migration logic for ToolBit assets using ParameterAccessor and migrate_parameters.
- Ensure shape-type is set before parameter migration; only write changes if migration occurred.

src/Mod/CAM/Path/Tool/toolbit/migration.py:
- Add ParameterAccessor class and migrate_parameters function for unified migration.
- Handle legacy parameter conversion for Bullnose tools.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Apply migration logic to ToolBit objects on restore.
- Filter Bullnose parameters to remove FlatRadius after migration.

src/Mod/CAM/Path/Tool/shape/models/bullnose.py:
- Add filter_parameters method to remove FlatRadius for Bullnose.

src/Mod/CAM/Path/Op/SurfaceSupport.py:
- Derive FlatRadius from CornerRadius and Diameter if both are present.

src/Mod/CAM/Path/Op/Surface.py:
- Remove obsolete setOclCutter method.
2025-12-01 11:30:00 -06:00
Roy-043
0dcd2507bd Draft: fix X-axis reference for Draft_Arc_3Points 2025-12-01 17:01:31 +00:00
PaddleStroke
f6c5dc82f9 Assembly: Fix selection during joint edition (#25687) 2025-12-01 17:01:19 +00:00
Garfieldcmix
869b94d44c Fix Export/Save Mesh incorrect error message 2025-12-01 11:00:40 -06:00
sliptonic
84c2ac1c23 CAM: fixes bug with op creation/cancelation (#25800) 2025-12-01 10:59:49 -06:00
Syres916
80e95fb35b [TechDraw] QCheckBox fix compiling warning of stateChanged deprecation 2025-12-01 10:59:25 -06:00
Roy-043
20146a63a3 BIM: BIM_Material: only assign material object to component (#25823)
* Add MoveWithHost check for material assignment

* [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-01 16:59:13 +00:00
Roy-043
411da914b7 BIM: add parameter for BIM_Sketch view props (#25778)
* Add BIM parameters to param_dict

Add BIM parameters to param_dict for future use.

* BIM: add parameter for BIMSketch view props
2025-12-01 16:58:43 +00:00
Roy-043
20c51f6874 BIM: fix Arch_Reference update on doc restored (#25777)
* BIM: fix Arch_Reference update on doc restored

Fixes: #24943

* [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-01 16:58:01 +00:00
tetektoza
64d25752d4 Sketcher: Use constraint index instead of geoId as key in expr storage
`SketcherTransformationExpressionHelper` was using `geoId` as the map
key for storing expressions during geometry transformations. This is
incorrect since single geometry may have multiple constraints with
different expressions.

So, using `geoId` as the key causes `std::map` overwrites, resulting in
only the last expression being preserved per geometry.

So this patch changes key to be a constraint index, and adds
`ConstraintExpressionInfo` struct to store both expression and `geoId`.

Co-authored-by: PaddleStroke <pierrelouis.boyer@gmail.com>
2025-12-01 10:57:40 -06:00
Billy Huddleston
81d5dd791e CAM: Turn off debugging in CAM Preferences
Debugging was left on by mistake. Also 'Setting asset path' log message was at info level. Changed to debug level.
2025-12-01 10:53:02 -06:00
Roy-043
747980e3e4 Convert asset path to string in filePath function 2025-12-01 10:51:16 -06:00
marbocub
c92886a228 Sketcher: Fix error when first constraint is DistanceX/DistanceY to vertex (#25813) 2025-12-01 10:50:31 -06:00
Syres916
292d5209a6 [TechDraw] Fixes for TaskFillTemplateFields finding Draft/Arch/Image views and keeping message boxes and dialogs on top (#25342)
* [TechDraw] fix dialog to be ontop, clear the keyLst and save mouse movement between messagebox and dialog

* [TechDraw] change from setWindowFlags to setWindowFlag

* [TechDraw] handle BIM and Draft as first available views...

.... also increase the possible scale values such as 5 : 2 or 7 : 3

* [TechDraw] fix 1:1 scale regression

* [TechDraw] remove unnecessary line of code

* TD: Simplify code

Address comments from review.

Co-authored-by: WandererFan <wandererfan@gmail.com>

* [TechDraw] enable use of Fraction for scale...

... conversion

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: WandererFan <wandererfan@gmail.com>
2025-12-01 10:45:02 -06:00
Roy-043
d1338df442 BIM: Fix duplicate vertices in Wavefront OBJ export
Fixes: #13151.

The vertices derived from a face's outerwire could contain duplicates.

Fixed by switching to:
`f.OuterWire.OrderedVertexes`
2025-12-01 16:28:14 +00:00
PaddleStroke
94043f779f Part: Fix addSelection failing for links to body. (#25702) 2025-12-01 09:34:08 -06:00
tarman3
7a402e0ef3 CAM: Slot - Remove .0 2025-12-01 09:32:01 +02:00
Captain
982d3dc729 PartDesign: fix symmetric mode of draggers in revolution/groove (#25656) 2025-11-30 23:03:31 -06:00
sliptonic
65904b2f1a Merge pull request #25273 from Thom-de-Jong/main
CAM: Exporting G-code can be canceled from the editor dialog
2025-11-30 14:04:22 -06:00
tarman3
78dd03c66a CAM: PathCommands - Remove pop message about loop error 2025-11-30 20:08:12 +02:00
tarman3
080ebb187a CAM: Path.Geom.cmdsForEdge() - add tolerance 2025-11-30 18:19:17 +02:00
sliptonic
12a2c4caec Merge pull request #25253 from tarman3/geom_usehelixforbspline
CAM: Path.Geom.cmdsForEdge() - remove useless 'useHelixForBSpline'
2025-11-30 09:59:03 -06:00
Thom de Jong
ec90f1fdf1 Merge remote-tracking branch 'upstream/HEAD' 2025-11-30 12:43:31 +01:00
Frank Martinez
d5445f04cb CAM: Fix pyi signature to match c++ 2025-11-30 00:56:44 -06:00
Chris Hennes
9cd4a2ec7d Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
sliptonic
1041fe38d1 Merge pull request #25553 from tarman3/leadinout_overtravel6
CAM: LeadInOut - Fix regression after #24829
2025-11-29 12:34:37 -06:00
Chris Hennes
bb84fe5cfe Merge pull request #25674 from WandererFan/DimensionColorSizeOldDocuments2
TechDraw: fix handling of alpha channel in old documents
2025-11-28 18:04:30 -06:00
Billy Huddleston
2a06a94e61 CAM: Add rigid Tapping back to legacy LinuxCNC postprocessor
This PR adds rigid tapping back to the legacy LinuxCNC postprocessor, which
was removed in commit cd1c29e3f23fde0a90980ffcf3e70406769f2d43 in PR 24771.

The changes include:
- Modifying the linuxcnc_legacy_post.py script to include logic for Rigid tapping
- Updating comments and documentation to reflect the addition of Rigid tapping
2025-11-28 18:30:28 -05:00
sliptonic
2957ee8018 [CAM] Reimplemented Mill facing operation (#24367) 2025-11-28 23:26:36 +00:00
tarman3
2041ae1b70 CAM: Path.Geom.cmdsForEdge() - remove useless 'useHelixForBSpline' 2025-11-28 20:13:24 +02:00
sliptonic
20076de9be Merge pull request #25205 from tarman3/isVertical
CAM: Path.Geom.isVertical() for BSpineSurface (simple face after scale)
2025-11-28 12:08:10 -06:00
sliptonic
b56a7864a6 Merge pull request #25635 from tarman3/oputil_1_linter
CAM: OpUtil - Fix linter errors
2025-11-28 12:03:06 -06:00
sliptonic
ab632d5e57 Merge pull request #25023 from sebastianohl/main
CAM: fixing drill handling, as KinetiNC does not implement G81 etc. correctly
2025-11-28 11:54:08 -06:00
sliptonic
2b45d86510 Merge pull request #25022 from s-ohl-ostfalia-de/main
CAM: adding cooling feature to Kinetic post processor
2025-11-28 11:52:29 -06:00
sliptonic
373797bcd4 Merge pull request #24807 from tarman3/inspect
CAM: Line numbers in Inspect window
2025-11-28 11:48:24 -06:00
sliptonic
6904cfafb3 Merge pull request #23862 from tarman3/gcode_editor_dialog
CAM: Show line numbers in export gcode dialog
2025-11-28 11:47:01 -06:00