Compare commits

..

328 Commits

Author SHA1 Message Date
Adrian Insaurralde Avalos 0c7935c755 Build: bump version suffix to rc2 2026-01-08 09:03:27 -03:00
jffmichi b9c11dc75b CAM: fix Radius Mill TipDiameter resetting
(cherry picked from commit ae8412468a)
2026-01-08 04:52:17 +01:00
Kacper Donat 99f27d4b9f CI: Limit backports to pixi only
(cherry picked from commit ad0ad85b77)
2026-01-08 00:02:32 +01:00
tetektoza 0b4e10ca4d Sketcher: Disable depth testing for constraint icons
Add `SoDepthBuffer` nodes around the constraint group to disable depth
testing for constraint icons. This ensures icons render on top of
geometry lines regardless of Z position, improving visibility and
selectability.

(cherry picked from commit b1fdf659d8)
2026-01-07 17:16:54 +01:00
tetektoza e5f717ba50 Gui: Render constraint text and arrowheads above geometry lines
Add Z offset for arrowheads and explicitly enable depth testing for
constraint lines in SoDatumLabel. This ensures constraint lines render
below geometry (respecting zConstr level) while text and arrowheads
render on top for better visibility and selection.

(cherry picked from commit 4aa4f2663e)
2026-01-07 17:16:54 +01:00
drwho495 b3f5a35ef7 TopoNaming: Improve ElementMapVersion definition. (#26691)
This change makes the program only mark an object's ElementMapVersion with the "1" prefix if the object has a hasher AND an element map.

(cherry picked from commit 9b64da827a)
2026-01-07 16:20:48 +01:00
PaddleStroke dae6cc2481 Sketcher: Fix text sometimes reversed when switching from one sketch edit to another.
Sometimes when user would switch from editing one sketch to edit to another sketch by double clicking on the new sketch, without living the previous sketch, it would then render the text of constraints backward. This was happening because the unsetEdit of the previous sketch was clearing the selection and adding the old sketch as selected. Then the new setEdit was failing to find the correct editing placement resulting in backward text.

(cherry picked from commit 450789e77b)
2026-01-06 21:39:25 +01:00
PaddleStroke 37b8ba683b Sketcher: Reverse #25478 and #26033
(cherry picked from commit 26723cf209)
2026-01-06 21:39:25 +01:00
Adrian Insaurralde Avalos 86f512e2c3 set BUILD_DYNAMIC_LINK_PYTHON=OFF for mac and linux release builds
fix regresion #25098

(cherry picked from commit ede7013f55)
2026-01-06 20:21:41 +01:00
WandererFan 2fdda0c4e0 TechDraw: Axo Dimension Fixes (#26445)
* [TD]fix dim text on wrong side of dim line

- this fixes the problem when the dimension line is +/- vertical

* [TD]Avoid use of CosmeticVertex for Axo Dimension

* [TD]fix CI warnings re unused variable

* Update DrawViewPyImp.cpp per review comments.

(cherry picked from commit cc707c98eb)
2026-01-06 20:17:39 +01:00
PaddleStroke 2468a26f01 Sketcher: Fix selection & zoom lag in large sketches (#26671)
* Sketcher: Fix selection & zoom lag in large sketches

* Update src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp

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

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
(cherry picked from commit 21f0d44320)
2026-01-06 19:21:44 +01:00
Yash Suthar f7761c5b14 Core: Fix premature merge of property in debug mode
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 9e22524e11)
2026-01-06 17:13:03 +01:00
PaddleStroke b56fba2ee6 Sketcher: Speed up large bulk Selection in edit (#26663)
* Sketcher: Speed up large bulk Selection in edit

* Update ViewProviderSketch.cpp

* Update src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
(cherry picked from commit 0fa707c523)
2026-01-06 16:58:26 +01:00
Roy-043 d80801c07c BIM: remove v1.1 Sill Height code (#26641)
(cherry picked from commit 530aba61db)
2026-01-06 11:46:55 +01:00
Billy Huddleston 728ae02651 CAM: Fix duplicate label issues with toolbits
Addresses problems caused by the "Allow duplicate object labels in one
document" option. Toolbit sub-objects now always get unique labels by
temporarily disabling this option during copy, preventing expression and
property binding errors. Also ensures tool controllers always use the
"TC: " prefix for consistency.

src/Mod/CAM/Path/Tool/shape/models/base.py:
- Temporarily disable DuplicateLabels during shape copy to enforce
unique labels

src/Mod/CAM/Path/Main/Gui/Job.py:
- Add "TC: " prefix to tool controller names when adding from the Job
panel

(cherry picked from commit 2a24a539e6)
2026-01-06 10:52:05 +01:00
wandererfan efbf8eafb7 [TD]prevent crash on cosmetic element delete
(cherry picked from commit dc0901839e)
2026-01-06 07:35:20 +01:00
Kacper Donat 1853a3b0a1 Sketcher: Use correct namespace for tr functions in DSH
The `lupdate` tool from Qt used to extract translations from files was
not in sync with what the macros defined in the code. The mismatch came
from two places:

1. The DrawSketchHandeler used non fully-qualified name for the
   context whereas lupdate assumed the FQN.
2. Deriving DrawSketchHandlers did not override the translate method
   context to their own class names while lupdate assumed that they do.

While it's not fully clear if what `lupdate` does here is correct
(it's a lot of assumptions) it's way easier to fix our metadata than
fight with lupdate.

(cherry picked from commit 2682d68809)
2026-01-06 05:00:26 +01:00
WandererFan 1d81ac4e2a Surface: Provide geometry to Measure module (#26479)
* [Surf]provide geometry to Measure

* [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>
(cherry picked from commit 7abdbe0ce0)
2026-01-05 23:17:12 +01:00
Captain 54b84ffa1b PD: fix gizmo direction when the calculated point lies outside the face (#26616)
* PD: fix gizmo direction when the calculated point lies outside the face

* [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>
(cherry picked from commit 2b97d553f9)
2026-01-05 18:10:48 +01:00
freecad-gh-actions-translation-bot ad2f530875 Update translations from Crowdin
(cherry picked from commit 2592406b35)
2026-01-05 13:18:43 +01:00
Kacper Donat 43696df1b1 PartDesign: Fix misplaced preview for patterns
Previous solution did not take into account supporting shape transform
which should now be handled correctly.

(cherry picked from commit f819011d81)
2026-01-05 12:16:50 +01:00
PaddleStroke b7e3bb1f7c Sketcher: Use DenseQR for small sketches to avoid SparseQR rank issues (#26559)
(cherry picked from commit c8106982de)
2026-01-04 20:18:19 -09:00
Roy-043 fc2ad996f4 Draft: fix regression in Pattern display (Refactor texture handling in view_base.py)
(cherry picked from commit 34441b8101)
2026-01-05 05:34:04 +01:00
Roy-043 ea9039cd30 Draft: fix regression in Pattern display (add find_coin_node_by_name function)
Adapted existing code attribution and added a new function to find a node by name.

(cherry picked from commit 21e7fa1e8b)
2026-01-05 05:34:04 +01:00
Billy Huddleston b16ec077ba CAM: Add 0.05 um to V-bit tip diameter to prevent invalid sketch constraints
This commit applies a simple fix to the V-bit tool definition, adding a
small offset (+0.05 um) to the tip diameter. This prevents the sketch
from generating invalid constraints due to a zero or near-zero tip size.

src/Mod/CAM/Path/Op/SurfaceSupport.py:
- Add +0.05 um to tip diameter calculation to avoid constraint errors in
sketches

(cherry picked from commit a7c9cbee9e)
2026-01-05 02:49:34 +01:00
Kacper Donat b98dfeef70 Gui: Migrate to new styles
Since some time we have new stylesheets based on style parameters. For
compatibility reasons however old stylesheets were left in the project -
this commit removes them by reapplying the theme if old stylesheet is
detected.

(cherry picked from commit c938645843)
2026-01-05 01:48:41 +01:00
tetektoza 4c844ca5f5 Gui: Add hidden anchor object to root for transparency (#26590)
* Gui: Add hidden anchor object to the root for transparency

Image planes with transparency failed to render correctly in empty scenes
because OpenInventor's two-pass transparency rendering requires at least
one opaque object to properly initialize the depth buffer.

The fix adds a zero-scaled cube with no material node (making it use
OpenGL's default opaque material) to each image plane's scene graph.
This hidden object:
- Acts as a depth buffer anchor for transparent rendering
- Is invisible (scaled to 0,0,0)
- Has negligible performance impact

This matches the workaround already used in the rotation center indicator
and resolves the issue where image transparency only worked when the
rotation center, grid, or other opaque objects were visible.

* Gui: Exclude hidden anchor from bounding box calculations

Prevents the hidden anchor from affecting "fit all" and other bounding box
operations by wrapping it in `SoSkipBoundingGroup`.

(cherry picked from commit 3f49f3f059)
2026-01-03 09:12:54 +01:00
Krrish777 6c8917d9c8 Fix: Update PartDesign Boolean dropdown immediately before recomputation
(cherry picked from commit d944df04e1)
2026-01-03 08:17:45 +01:00
PaddleStroke 48ddc33bd3 Part: Toposhape: fix regressions due to changes in getElementTypeAndIndex (#26596)
* Part: Toposhape: fix regressions due to changes in getElementTypeAndIndex

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

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

* Update TopoShape.cpp

* Update TopoShape.cpp

* Update TopoShape.cpp

* Update TopoShape.h

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 07756cc838)
2026-01-03 02:37:10 +01:00
chris 39750371ad partdesign: fix issue #25811 while not breaking #14720 topo naming
(cherry picked from commit 6df651b5c8)
2026-01-03 01:21:40 +01:00
tetektoza ab65ea8fe4 Part: Remove needPickedList mat override to prevent rendering artifact
The `needPickedList` check in `SoBrepFaceSet` was triggering
unnecessary material override processing that caused face clipping
artifacts when the "Picked object list" option was enabled in Selection
View. This check has been removed as the picked list functionality works
independently of the rendering path.

(cherry picked from commit c66aa58a60)
2026-01-02 23:43:48 +01:00
tetektoza f0930dbd83 Gui: Prevent whole-object highlight when picked list is enabled
Removed the logic that forced `onTop=1` when `needPickedList()` is true
in View3DInventorSelection. This was causing the entire object to be
highlighted instead of just the selected sub-element when the "Picked
object list" option was enabled.

(cherry picked from commit 4dcef14bd8)
2026-01-02 23:43:48 +01:00
PaddleStroke 3672610617 Sketcher: Fix snap to axis not working (#26558)
When snapping to an axis, snapToObject returns false because we should also be able to snap to grid at the same time. Recent changes made the end return to be the initial unmodified position. Breaking snap to axis

(cherry picked from commit 9f2b0f910b)
2026-01-02 23:34:11 +01:00
Max Wilfinger 322f1348e3 Merge pull request #26606 from FreeCAD/backport-26598-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Sketcher: Fix large sketch being laggy
2026-01-02 20:36:27 +01:00
PaddleStroke 3f24fca729 Sketcher: Fix large sketch being laggy (#26598)
* Sketcher: Remove old constraint positioning logic that was making sketcher laggy

* [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>
(cherry picked from commit be6be63764)
2026-01-02 15:37:15 +00:00
tetektoza 73f5f332fb Gui: Use encodeAttribute when escaping XML attributes for XHTML
(cherry picked from commit 57dd04f214)
2025-12-30 23:00:43 +01:00
tetektoza 11756c1cd4 Gui: Clean up XHTML meta tags per Nu validator feedback
- Change http-equiv="Content-Type" to simpler charset="utf-8"
- Remove unnecessary type="text/javascript" from script tag

(cherry picked from commit 38bb34ab85)
2025-12-30 23:00:43 +01:00
tetektoza 2249b8cdd6 Gui: DOCTYPE and structure improvements
Fix X3D standalone export (.x3d):
- Use proper X3D 3.3 DOCTYPE instead of XHTML DOCTYPE
- Remove problematic default namespace declaration
- Use xsd:noNamespaceSchemaLocation for better parser compatibility
- Remove invalid width/height attributes

Fix XHTML/X3DOM export (.xhtml):
- Wrap navigation buttons in <div> (required by XHTML Strict)
- Keep X3D elements unprefixed for X3DOM compatibility
- Add proper XHTML structure with XML declaration

(cherry picked from commit 2ae054e470)
2025-12-30 23:00:43 +01:00
tetektoza ed6bf31b77 Gui: Escape XML special characters in attributes for XHTML
Add escapeXmlAttribute() helper function to properly escape special
characters in XML attribute values:
- Double quotes (") --> &quot;
- Ampersands (&) --> &amp;
- Less-than (<) --> &lt;
- Greater-than (>) --> &gt;
- Single quotes (') --> &apos;

(cherry picked from commit fe7bceeb79)
2025-12-30 23:00:43 +01:00
tetektoza c269631319 Gui: Fix XHTML doc structure
- Add missing <title> element in <head> (required by XHTML Strict)
- Add <body> wrapper around content (required by XHTML)
- Add Content-Type meta tag for proper character encoding
- Fix indentation of buttons to be inside body element

(cherry picked from commit 679d4c2397)
2025-12-30 23:00:43 +01:00
tetektoza 43c88854d0 Part: Preserve child visibility when deleting compound copies (#26509)
* Part: Preserve child visibility when deleting compound copies

Currently, if we have a FC document two compounds, when one of them is a
copy of the other containing same children and we delete the copy
compound to keep the children, their visibility state changes.

The cause of that was a part of code in `onDelete()` method, which was
unconditionally calling `showViewProvider()` on every child object,
without checking if other compounds still claim those children or what
the current visibility should be.

So this patch adds parent-checking logic before changing visibility. The
visibility is only updated if the child is truly orphaned. So in the
scenario where we have the children referenced STILL by some compounds,
the visibility remains unchanged. It only changes when child has truly
no parents.

* Part: Use std::ranges::find for finding parent

(cherry picked from commit df25bd3cdb)
2025-12-30 22:07:35 +01:00
Kacper Donat 07f5b2362e Gui: Fix segfault in Safe Mode
This fixes segfault that was caused by changing settings in
FirstStartWidget that triggered change event on not fully intialized
StartView.

It is quick and dirty fix that just disables handling of the event
causing segfault until widget is fully ready. The correct solution would
be to remove the logic that changes settings from the widget (as it
should not be there) and instad move it to another place in pipeline.
This would be however much more work and segfault should be fixed ASAP.

(cherry picked from commit a0356796ac)
2025-12-30 19:41:49 +01:00
drwho495 b62a27ce6b TopoNaming: Enable migration code for 1.0.X -> 1.1 (#26538)
(cherry picked from commit e9ea3d0d25)
2025-12-30 15:45:30 +01:00
Roy-043 bab554670d BIM: fix component VerticalArea calculation (#26254)
(cherry picked from commit 0ced25c6dc)
2025-12-30 09:03:44 +01:00
theo-vt 8da1881389 Sketcher.scale: Scale label of modified constraints (#26442)
* Sketcher.scale: Scale label of modified constraints

* Sketcher.scale: Narrowing conversion on constraint index

(cherry picked from commit cc60502708)
2025-12-30 05:48:07 +01:00
Adrian Insaurralde Avalos 20623a7757 FEM: sanitize NAN format on frd import
depending on c runtime lib and possibly locale calculix may format NAN differently so we need to sanitize when importing the results

(cherry picked from commit 3dce4c831d)
2025-12-29 21:40:11 +01:00
Chris Hennes 1dbcd2f8df CI: Update backport Action to use new secret token
When using the default GitHub token, no further Actions are triggered, which means a backport PR is not checked against the normal CI runs, and it should be. This switches to using a token generated by the freecad-ci-runner GitHub account.

(cherry picked from commit bb8d4a8095)
2025-12-29 21:39:43 +01:00
Christoph Moench-Tegeder 2df9e6d0d5 add pybind11 include path in MeshPart CMakeLists
This could be a return of parts of commit d4feb51402
Without these, the rc1 build fails on FreeBSD with "pybind11/eigen.h not
found" - the layout of the pybind11 directories on the BSDs may differ
somewhat from your typical Linux distribution. But then, on Linux, this
additional include path will just point to an already-known location.

(cherry picked from commit 57b970f795)
2025-12-29 21:39:16 +01:00
Chris Hennes 99e25d353a Gui: Add explicit find_package for Qt6::GuiPrivate
(cherry picked from commit e858a13a5f)
2025-12-29 21:38:47 +01:00
Roy-043 0f8e601e78 BIM: prevent crash when switching BIM_View Render Mode
Fixes #24929.

Disabled animations in viewer to prevent crashes.

(cherry picked from commit 2292316f22)
2025-12-29 21:38:32 +01:00
Chris Hennes 2d3917c62f PD: Add case for when scripts set Midplane=False
(cherry picked from commit 8b9048a784)
2025-12-29 20:05:28 +01:00
Alfredo Monclus 7168aba55d PartDesign: fix transform removal causing an invalid base feature on the next solid if it was broken itself
(cherry picked from commit 24b9cdb4f9)
2025-12-29 18:50:56 +01:00
Adrian Insaurralde Avalos 730065a94c add freecad channel to pixi envs to use custom ifcopenshell and calculix package 2025-12-29 17:48:33 +01:00
Yash Suthar 5e9b228ce1 Fix : added empty link check to prevent null entry in document link map (#26406)
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit ee7d84bb03)
2025-12-29 17:44:16 +01:00
Rahul Paul e95b18012e [MOD] Fix premature evaluation and recursive updates in Image Plane Settings (#26390)
* Fixed image editor

* decoupled the chnage height and width fns

* final fixes

(cherry picked from commit 1002bcb398)
2025-12-29 17:44:04 +01:00
PaddleStroke e54f09e5e7 PartDesign: Fix upToFace not working with non-ASCII filenames (#26514)
* PartDesign: Fix upToFace not working with non-ASCII filenames

* Update TaskExtrudeParameters.cpp

(cherry picked from commit 20e45231c5)
2025-12-29 17:34:39 +01:00
freecad-gh-actions-translation-bot 737b6e27be Update translations from Crowdin
(cherry picked from commit 7fe10f7436)
2025-12-29 11:33:08 +01:00
Roy-043 c1d394802e BIM: fix transparency of curtain walls in BIMExample.FCStd
Curtain walls in the BIM example file did not have transparent glass panels.

(cherry picked from commit 776b2f2d5a)
2025-12-28 07:54:21 +01:00
Chris Hennes 2cf7cc761a PD: Modify tests to use SideType instead of Midplane
(cherry picked from commit a4bff812d7)
2025-12-27 19:30:13 +01:00
Chris Hennes 4a9f2ff24a PD: For Body get the color from the tip
Mostly affects STEP export.

(cherry picked from commit 51d2c88b02)
2025-12-27 19:30:04 +01:00
Chris Hennes 62181c7e74 Import: Revert recent STEP file object naming work
After discussion in several recent PR review meetings the Maintainer
team has decided to roll back some recent work on object naming in STEP
files. Inadequate automated testing has led to a situation where every
change made to address one bug introduces another someplace else. It
is difficult to determine which, if any, of these fixes represent an
appropriate path forward, versus fixing a symptom rather than the
underlying problem.

---

Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
This reverts commit 59715114f5.

Revert "core: fix various issues exporting step files, ie. #25540 #24962 #25567"
This reverts commit e226e9b06e.

Revert "export: step file preserve last feature when exporting step file, fix issue #25567"
This reverts commit 9c48c9a3e3.

Revert "core: preserve body name in step file when exporting part that contains body with feature, fixes #24962"
This reverts commit 246218b28b.

Revert "Import: STEP export preserve body names (#25042)"
This reverts commit f218c5f25c.

Revert "Import: Export tip when body is selected (#24678)"
This reverts commit 6fd6558040.

(cherry picked from commit 7da646754a)
2025-12-27 19:30:04 +01:00
horseDeveloper 90612b05a2 Fixing Leftover references from migration from freecadweb.org (#26163)
(cherry picked from commit 4892154faf)
2025-12-26 18:35:16 +01:00
Chris Hennes a896929f1e Tools: Add Surface to translations
(cherry picked from commit 2fbc36d472)
2025-12-25 21:50:26 +01:00
Krzysztof 39d2151eca Core: Extend completer popup list in 'Expression editor', fix size and position adjustment (#25242)
* Core: Fix completer popup adjustment after 'Tab' pressing
Completer popup in Expression Editor is now positioned and sized after pressing 'Tab'. This was missing when feature was added.

* Core: Extend completer popup list to up 20 elements or up to screen edge
Completer popup will now show up to 20 elements or will be limited to screen edge; if limited < 3 rows, popup will be displayed over cursor.

* Core: Fix completer wrapping on secondary screens

* Core: Fix completer positioning when includes long entries

* Core: Fix linter complaints

(cherry picked from commit 47d1913544)
2025-12-25 09:11:48 +01:00
captain0xff bffe90dce6 Gui: fix linear dragger increments when the multFactor is set
(cherry picked from commit 5cc05a1ab2)
2025-12-25 09:11:29 +01:00
Chris 3901c8f1de sketcher: fix issue #25992 keep snapped position when releasing mosue for updated sketch points (#26102)
* sketcher: fix issue #25992 keep snapped position when releasing mosue for updated sketch points

* Update src/Mod/Sketcher/Gui/ViewProviderSketch.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit eb61ee36a6)
2025-12-23 22:39:54 -06:00
Roy-043 1ab014c196 Draft: array task panels: add workaround for Building US unit system
Fixes #26276.

(cherry picked from commit 4fe0dff1bc)
2025-12-23 22:24:51 -06:00
Roy-043 05e26f3d03 BIM: fix AttributeError when snapping for window placement
(cherry picked from commit 5297493a65)
2025-12-23 22:24:44 -06:00
Rodrigo Olaya Moreno e99a06f402 Fix RGB rounding bug in material appearance editor (#26134)
* Fix RGB rounding bug in material appearance editor
* Update code to use color
* getColorHash no longer needs range

(cherry picked from commit 345a656125)
2025-12-23 22:02:47 -06:00
timpieces d5ac6a07e6 MacOS: Disable actions while file dialogs are open (#26169)
- Any action part of the application menu will trigger based on shortcut
  when a native file dialog is open
- Another way to fix this is to switch out the application menu, but
  afaict it requires writing native objective-c code. I think that's too
  much complexity just to get cmd+c/cmd+v in these file dialogs
- For now, just disable the actions so that select-all, rotate-left, etc
  don't trigger when pressed in these dialogs
- I've implemented an RAII wrapper to disable this. It should take
  pointers which should be fine because all of these dialog calls are
  blocking (so in principle nothing can change underneath).

I'm quite sure this won't have any adverse effects on other platforms,
but will need help from other developers to test in case.

(cherry picked from commit a2dabd42e0)
2025-12-23 09:23:52 -06:00
Roy-043 c9ca3d01e3 BIM: ifc_tools.py fix handling of IfcGridAxis
Fix errors found after this linter warning:
https://github.com/FreeCAD/FreeCAD/pull/26219/changes#diff-2f58fe8ffd31a6d9302296668f6280d27d696e1507b259cc42fde224ef10da0eL759

(cherry picked from commit d93da36b41)
2025-12-23 09:16:54 -06:00
PaddleStroke f3511baa7e Assembly: Fix deletion of joint references to bodies
(cherry picked from commit d15347d2ad)
2025-12-23 05:48:02 +01:00
timpieces 1c374c68fa MacOS: Block shortcuts from overriding text input (#14869)
- It seems that on MacOS (vs other platforms), shortcuts for items in
  the application menu are given 'ultimate' priority, and will even take
  precedence over text inputs
- There is a mechanism in QT (I believe designed with mac in mind) to
  try to 'block' these shortcuts and send it to the focus instead. It's
  'Shortcut Override': https://wiki.qt.io/ShortcutOverride
- Initially I was going to only apply this check when it's a Command
  that overrides a known line-editing shortcut, but I figure it's
  simpler to just always apply it when editing text. I can't really
  imagine a user wanting to use an application shortcut while editing
  text, but if there's some compelling use-case for this then let me know
  and I'll add a further filter.

I'm quite optimistic that this won't have any ill-effects on other
platforms, but I'll need help from others to test this.

(cherry picked from commit 4567d04547)
2025-12-23 05:47:47 +01:00
wandererfan e3e04387a5 [TD]fix handling of non-standard page sizes
(cherry picked from commit 35d4a849ef)
2025-12-22 20:32:58 +01:00
marbocub 3a405bbf6b Fix rotation expression errors in handleLegacyTangentPlaneOrientation() (#26058)
* Fix rotation expression handling

- Make added rotation angle unit the same as the original expression unit
- Keep rotated angle expressions within the accepted [-180, +180] range

(cherry picked from commit 244282f855)
2025-12-22 19:57:13 +01:00
wandererfan 38dd102f77 [TD]fix tearing of page edges
(cherry picked from commit 04e2d631bb)
2025-12-22 19:30:43 +01:00
Kacper Donat 6fd72e00cd PartDesign: Revolution - add FuseOrder
In older versions of FreeCAD the boolean order was base + result. After
TNP mitigation the order was changed to be result + base. For the
resulting shape that does not matter, but order of edges can differ if
arguments are in a different order.

This can impact refine algorithm which may pick other face as the base
one and result in a differnt shape after refining. This commit restores
previous order. For most files it should not make any difference, but it
may fix some older files.

To support all cases we introduce FuseOrder compatibility property that
will be set to FeatureFirst for files saved with 1.0 to preserve
behavior.

(cherry picked from commit 8c399e1fd0)
2025-12-22 19:30:33 +01:00
Roy-043 ea048829f7 Part: fix Part_EditAttachment unitless input error (#25923)
(cherry picked from commit 3a5f5d70ee)
2025-12-22 18:31:14 +01:00
Florian Foinant-Willig aca2eeb173 fix %r format spec
(cherry picked from commit 7b315e80a7)
2025-12-22 18:24:32 +01:00
Kacper Donat 01c42b34d9 Gui: Ensure that QuantitySpiBox handles expression properly
(cherry picked from commit febfd65e59)
2025-12-22 18:02:49 +01:00
PaddleStroke dbf87623b2 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>
(cherry picked from commit 3608c9f8c4)
2025-12-22 17:59:47 +01:00
Syres916 173734c902 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

(cherry picked from commit 9375f579f0)
2025-12-22 17:59:03 +01:00
Yash Suthar cfe36321d1 UI: Fix select all instances of an object in the tree
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 60bd277d7a)
2025-12-22 16:48:17 +01:00
chris 4e187e83bf partdesign: pd: fix for issue #25794
(cherry picked from commit 46066e1cca)
2025-12-22 15:47:46 +01:00
Chris 525ce8e056 Part Design: Add sketch sub element names for refs in revolutions (#26227)
* part design: partdesign: pd: fix regression issue #26223 add sketch sub element names for refs in revolutions

* refractor code to remove else blocks as every condition has a return statement, make lsp happy

(cherry picked from commit 452f9b2087)
2025-12-22 15:08:42 +01:00
Alfredo Monclus 1b678a2ec6 PartDesign: fix hole clearance not appearing in the taskpanel when switching type
(cherry picked from commit d9e0fd6251)
2025-12-22 14:59:14 +01:00
Alfredo Monclus 6e08c67a3b PartDesign: fix thread depth not shown in taskpanel
(cherry picked from commit 6729540a78)
2025-12-22 14:59:06 +01:00
Chris Hennes 5ae095a0a8 PD: Fix missing silent mode check in GetTopoShapeVerifiedFace
Also ensure that all calls to this method actually verify the result.

(cherry picked from commit 76bd68e672)
2025-12-22 14:36:58 +01:00
Kacper Donat d21f01ce3b Gui: Remove shortcuts for overlay toggles
Using these commands by mistake can result in broken interface and the
shortcuts are way too easy to hit by mistake. The feature is rarely (if
at all) used - so there is no need to have easy to hit shortcuts.

(cherry picked from commit 78a6891dae)
2025-12-22 13:22:05 +01:00
Kacper Donat dde6efaa2d PartDesign: Chamfer - migrate Size and Size2 for older files (#26137)
* PartDesign: Chamfer - migrate Size and Size2 for older files

* Apply suggestions from code review

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit 4d712f44c2)
2025-12-22 12:56:03 +01:00
freecad-gh-actions-translation-bot d495562e56 Update translations from Crowdin
(cherry picked from commit 8b7ec488f0)
2025-12-22 12:41:35 +01:00
Louis Gombert bd6dbbcf00 Part: clean mesh before adding triangulation in setupCoinGeometry
Calling BRepMesh_IncrementalMesh repeatedly would accumulate BRep_CurveRepresentation instances attached to the BRep_TEdges of the shape. We now clean added triangulations before adding a new one, which improves performance in the long run.

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
(cherry picked from commit 3601161d80)
2025-12-22 12:07:41 +01:00
Roy-043 b67b74181c BIM: fix deletion of BuildingPart in strict IFC mode (#26219)
* BIM: fix deletion of BuildingPart in strict IFC mode

Add `sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()` to `onDelete`.

* BIM: fix deletion of BuildingPart in strict IFC mode

Explicitly call `obj.ViewObject.Proxy.attach(obj.ViewObject)`.

* BIM: fix deletion of BuildingPart in strict IFC mode

In `ifc_vp_buildingpart` call `attach` from `ArchBuildingPart.ViewProviderBuildingPart`.

(cherry picked from commit 0af22943b2)
2025-12-21 22:15:58 -06:00
Chris 0c48516c57 Sketcher: Allow live preview of sketch placement (#26033)
along with unit tests

(cherry picked from commit 4cd81136b6)
2025-12-21 18:28:35 +01:00
Furgo ec3775291a BIM: Initialize SketchArch variable before use (#26336)
(cherry picked from commit 0193b1776d)
2025-12-21 10:42:31 +01:00
Furgo 3b83c90c3b BIM: fix lock removal of Sill property
(cherry picked from commit 69de78e22d)
2025-12-21 10:29:22 +01:00
Furgo 749f6cbc53 BIM: rename ArchWindow's Sill property to SillHeight and handle one-w… (#26277)
* BIM: rename ArchWindow's Sill property to SillHeight and handle one-way migration

* BIM: properly remove the locked "Sill" property

(cherry picked from commit bdea3d105f)
2025-12-21 08:48:53 +01:00
Louis Gombert 9e58942004 SVG export: improve performance (#26149)
* SVG export: use a set to match edges instead of a list

Lookup in edge list becomes O(1), significantly improving SVG export speed

* [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>
(cherry picked from commit cead907a57)
2025-12-21 08:48:38 +01:00
Chris Hennes 6c1bd0f21b Addon Manager: Update to 2025.12.19
Minor bug fixes and translation update.

(cherry picked from commit c423e8de08)
2025-12-20 06:58:52 +01:00
Christoph Moench-Tegeder 7310a88866 Include sys/sysctl.h on FreeBSD when using sysctl()
The ApplicationDirectories::findHomePath() on BSD uses sysctl()
to find the path to the running executable. On FreeBSD, we need
to include sys/sysctl.h for that - and as it is not included anywhere
else, add it to the includes directly in front of this function,
with a suitable ifdef.

(cherry picked from commit 4f4f4425aa)
2025-12-20 06:58:29 +01:00
Roy-043 d4f4691f1f Part: fix Part_EditAttachment nesting handling (#26298)
* Part: fix Part_EditAttachment nesting handling

Fixes #26264.

The previous 'fix' (#25887) did not consider that the object to-be-attached may not be in the global space.

The code in this PR has been tested on the forum:
https://forum.freecad.org/viewtopic.php?p=862968#p862968

* [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>
(cherry picked from commit 348eef644b)
2025-12-20 06:58:14 +01:00
VM4Dim 3b1bc25870 Gui: Fix non-Latin groupName (#26285)
(cherry picked from commit 7cd88534b5)
2025-12-20 06:57:21 +01:00
Kacper Donat 254ee35bc2 Gui: Wrap strings with QStringLiteral
(cherry picked from commit 87b257546f)
2025-12-20 00:20:36 +01:00
PaddleStroke 4e74fe97ed 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

(cherry picked from commit 893a9d19b6)
2025-12-19 13:55:31 +01:00
Yash Suthar 456534cce6 Part: added floating point fallback in PropertyLinks::_updateElementReference
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit dbd2bade1e)
2025-12-19 11:32:58 +01:00
chris e1201b35a1 sketcher: fixes issue #26167 no polygon distort when repositioning / constraining
(cherry picked from commit 22552848fd)
2025-12-19 11:32:43 +01:00
Kacper Donat c7489597bc Stylesheets: Fix separators appearance
(cherry picked from commit b5d60baa68)
2025-12-18 19:50:24 +01:00
PaddleStroke 76b1cb43cc Measure: getPlacement const (#26216)
* Measure: getPlacement const

* Update MeasureBase.h

* Update MeasureBase.cpp

* Update MeasureArea.h

* Update MeasureArea.cpp

* Update MeasureLength.h

* Update MeasurePosition.cpp

* Update MeasureLength.cpp

* Update MeasureRadius.cpp

* Update MeasurePosition.cpp

* Update MeasurePosition.h

* Update MeasureRadius.h

* Update MeasurePosition.h

(cherry picked from commit 0c1ef0c77f)
2025-12-18 15:46:57 +01:00
Chris Hennes 11d8e6a411 PartDesign: Compiler warning cleanup
(cherry picked from commit 0ba75a7573)
2025-12-18 10:40:24 +01:00
Chris Hennes d172914c5d TechDraw: Compiler warning cleanup
(cherry picked from commit c7c4c6f0cc)
2025-12-18 10:40:24 +01:00
Chris Hennes b33cadca1b Sketcher: Compiler warning cleanup
(cherry picked from commit 50f029edd4)
2025-12-18 10:40:24 +01:00
Chris Hennes 165e58a7b9 Measure: Compiler warning cleanup
(cherry picked from commit 36332bf9ca)
2025-12-18 10:40:24 +01:00
Chris Hennes fb807c5a62 Assembly: Compiler warning cleanup
(cherry picked from commit 04a9c1e7b0)
2025-12-18 10:40:24 +01:00
Chris Hennes 1a537852ae Gui: Compiler warning cleanup
(cherry picked from commit 0416a5bc0b)
2025-12-18 10:40:24 +01:00
Chris Hennes 0b370963e1 App: Compiler warning cleanup
(cherry picked from commit 55a55725eb)
2025-12-18 10:40:24 +01:00
freecad-gh-actions-translation-bot 3bf2c5a019 Update translations from Crowdin
(cherry picked from commit 6c6cff7322)
2025-12-18 05:49:49 +01:00
PaddleStroke 014851827c Assembly: Ball drag mode. (#26222)
(cherry picked from commit 8fd81d4109)
2025-12-16 21:00:04 +01:00
Saksham Malhotra 143e16bd44 PartDesign: move AllowCompound to Base property group (#26180)
(cherry picked from commit b7735044c4)
2025-12-16 07:46:13 +01:00
Chris Hennes 6b7262bba9 PD: Don't warn about Midplane on document load
(cherry picked from commit 3208b6de5f)
2025-12-16 05:52:44 +01:00
Chris Hennes ef5b86afa4 Gui: Correct UTF-8 support for property names
(cherry picked from commit 10ed34bd4c)
2025-12-16 05:52:24 +01:00
Roy-043 10680272e1 BIM: ArchReference: fix coin node handling
Fixes #25772.

(cherry picked from commit 2efd63614f)
2025-12-16 05:52:07 +01:00
Roy-043 17086d6ff2 BIM: ArchReference: handle transparency-alpha switch
The 'old' DiffuseColor comes in 2 flavors. In v0.21.2 it stores transparency values. In v1.0.2 and v1.1 it stores alpha values. The ArchReference code should handle both. DiffuseColor is still used by BuildingParts in v1.0.2 and v1.1.

The solution is a bit hacky: if 100% transparency occurs we assume we are actually dealing with alpha values.

(cherry picked from commit 1c8df498f3)
2025-12-15 21:23:25 +01:00
Chris Hennes d03d8589f3 PD: Correct is-datum-in-body check
(cherry picked from commit 5ba7f207ab)
2025-12-15 21:23:10 +01:00
Roy-043 0e490cae46 BIM: use optimalBoundingBox in getCutVolume
(cherry picked from commit 15bb0ee896)
2025-12-15 21:23:02 +01:00
drwho495 4559d078e4 Implement Fix
Switch from checking child tag to checking the materTag

(cherry picked from commit 88b5cde45f)
2025-12-15 20:42:10 +01:00
Roy-043 7c7cb1a783 Draft: make Draft_AnnotationStyleEditor dialog wider
Increase AnnotationStyleEditorWidth from 450 to 600 to mitigate #25983.

(cherry picked from commit e6e285315c)
2025-12-15 19:01:09 +01:00
Kacper Donat 5c8ba72158 Gui: Improve transform UI responsivness
This introduces much faster CenterOfMassProvider#supports method that
can be used as cheap pre-check to see if the object supplied could have
the center of mass and so delay the domputation to a moment where it is
actually needed.

(cherry picked from commit fc93004c89)
2025-12-15 17:40:12 +01:00
theo-vt 16bead131a Sketcher: Do not autoscale if there are blocked geometries
(cherry picked from commit 29eeab3624)
2025-12-15 17:40:00 +01:00
Ajinkya Dahale 3283b6e4e4 Sketcher: Only transfer angle to relevant segment on trim etc.
(cherry picked from commit 0800791a0f)
2025-12-15 17:39:50 +01:00
Ajinkya Dahale cf67fed6bc Sketcher: Handle angle constraint on sketchobject changes
Primarily trim, but also expected to affect split, extend etc.

(cherry picked from commit 78e5729520)
2025-12-15 17:39:50 +01:00
Kacper Donat 39c9bb67ef Gui: Respect both content size and minimum width for buttons
This is a hacky fix for https://github.com/FreeCAD/FreeCAD/issues/23607

Basically after widget is shown or polished we enforce it's minimum size to at
least cover the minimum size hint - something that QSS ignores if min-width is
specified.

(cherry picked from commit aefd2592a8)
2025-12-15 17:39:41 +01:00
chris b59533a94d fem: attempt to resolve issue #19798
(cherry picked from commit 3476562dd7)
2025-12-14 19:17:18 +01:00
Yash Suthar f16e9f69e5 Core: fix "Save Image" giving dark area as compare to viewport
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 8413922e52)
2025-12-14 14:51:01 +01:00
xtemp09 1387e274f2 [GUI] Rename Cancel ‘Close’ in Add Property dialog
(cherry picked from commit df6d148a85)
2025-12-13 15:20:31 +01:00
PaddleStroke 3090218976 Assembly: joint task: fix delete impossible of non-valid refs
(cherry picked from commit 9625a71d8d)
2025-12-12 11:11:10 +01:00
Roy-043 82f04f6303 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.

(cherry picked from commit 4b379c8e51)
2025-12-12 11:11:00 +01:00
Roy-043 56fab21375 Remove maxSnapFaces parameter from params.py
Removed 'maxSnapFaces' parameter from settings.

(cherry picked from commit e1d77cc771)
2025-12-12 11:11:00 +01:00
Alfredo Monclus 83b96c6c36 PardDesign: fix hole task thread combos not translating
(cherry picked from commit f92c8e126c)
2025-12-12 11:10:47 +01:00
Kacper Donat 29de8ace0e PartDesign: Recompute preview after forced recompute
This fixes some cases where Preview was stale and not recomputed after
changes done via code.

(cherry picked from commit c10f5d74d3)
2025-12-12 11:10:38 +01:00
PaddleStroke 3243f85145 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>
(cherry picked from commit 7a8135d863)
2025-12-11 14:46:48 +01:00
Kacper Donat 282768a5c8 Stylesheets: Fix toolbar button size change
(cherry picked from commit c12ca7b3ba)
2025-12-10 20:47:25 +01:00
Yash Suthar ac8ed20250 Link: Fixed Scale property behaviour when the object is moved
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit aed9b770f3)
2025-12-10 20:35:42 +01:00
Chris Hennes 8b257d701f PD: Add deprecation warning if Midplane is set
(cherry picked from commit 67948d60a2)
2025-12-10 19:46:26 +01:00
freecad-gh-actions-translation-bot 1f642f553b Update translations from Crowdin
(cherry picked from commit f7483a08b4)
2025-12-08 22:43:31 -06:00
wandererfan bfda3e194f [TD]guard against font size zero
(cherry picked from commit 475d46c3d0)
2025-12-09 05:25:53 +01:00
wandererfan f216df1126 [TD]convert transparency to alpha channel
(cherry picked from commit e2c5c643d8)
2025-12-09 05:25:53 +01:00
wandererfan 2e5a190149 [TD]add preference re alpha/transparency conversion
(cherry picked from commit 64f2c5388b)
2025-12-09 05:25:53 +01:00
wandererfan e83131ec20 [TD]fix CI fail on Win
(cherry picked from commit b1cbcbd238)
2025-12-08 19:42:53 +01:00
wandererfan 83a821c68e [TD]fix CosmeticVertex fail in script
(cherry picked from commit 3f10abe11b)
2025-12-08 19:42:53 +01:00
tetektoza 9b1e26cd87 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>
(cherry picked from commit 915b6f9901)
2025-12-07 14:30:01 +01:00
Ladislav Michl 7062b0511e Revert "[Base]retrieve unit text"
This reverts both pointless and broken commit c9fffa6789.

(cherry picked from commit 90086d3e31)
2025-12-06 11:03:24 +01:00
Ladislav Michl 9a70a2838a TechDraw: Refactor use of Unit Schema values
Quantity's getUserString already returns both factor and unitText.

(cherry picked from commit 3252aaf618)
2025-12-06 11:03:24 +01:00
Ladislav Michl e48a90dbde TechDraw: Fix MultiValueSchema formatting
Multi Value schemas cannot be forced to use Format::FORMATTED.

(cherry picked from commit a509bc2ee9)
2025-12-06 11:03:24 +01:00
Adrian Insaurralde Avalos 234ddb951a Plot: protect matplotlib.pyplot import form PyQt6 too and remove lingering debug print
(cherry picked from commit fbb65a34fe)
2025-12-05 10:18:13 -06:00
PaddleStroke 685b90c38a Sketcher: Fix errors message when selecting circle seam point. (#25953)
(cherry picked from commit a49d106807)
2025-12-05 08:59:59 +01:00
Sebastian 1df4fe0ffd Match the string that gets sent to setCommand (#25964)
* Match the string that gets sent to setCommand

Correction of a not matching string that gets sent to setCommand. This results in a not translated menu item in the Sketcher menu.

* [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>
(cherry picked from commit 945ba15e18)
2025-12-05 08:59:51 +01:00
PaddleStroke 528a1f5c6e Sketcher: Offset: Fix failure if 2+ closed wires with different orientations (#25941)
(cherry picked from commit 67234e98b7)
2025-12-05 06:37:10 +01:00
marioalexis 1b90efd21b Fem: Fix undefined variable
(cherry picked from commit 9d5f6c82be)
2025-12-05 06:36:54 +01:00
PaddleStroke 0308a1b849 Sketcher: dimension tool, use VPSketch version of addSelection
(cherry picked from commit 0c34c93fe4)
2025-12-04 05:37:59 +01:00
PaddleStroke c6de3d88be Sketcher: Make VPSketch::addSelection public
(cherry picked from commit 1784be046f)
2025-12-04 05:37:59 +01:00
Adrian Insaurralde Avalos 9e59e48e80 WindowsInstaller: more robust automatic version info from freecadcmd
otherwise it broke if freecad had other unrelated output

(cherry picked from commit af48da0dbf)
2025-12-04 00:14:31 -03:00
PaddleStroke 7a161b2f9e Part: revert changes to ViewProviderExt::getDetails (#25912)
(cherry picked from commit 5f70c4390d)
2025-12-03 19:17:42 +01:00
Billy Huddleston 5e506d0b18 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.

(cherry picked from commit ab817f8dc5)
2025-12-03 19:07:01 +01:00
Roy-043 448613f3c4 Part: make Part_EditAttachment nesting aware (#25887)
(cherry picked from commit 4f4db09572)
2025-12-03 08:22:07 +01:00
PaddleStroke 76a23ec105 GUI: Fix broken build - splitbutton (#25892)
(cherry picked from commit 7c2dac1278)
2025-12-02 20:31:40 -06:00
PaddleStroke 92165ac37d Assembly CommandInsertNewPart : Make sure assembly file is saved (#25730)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit ac0685b841)
2025-12-02 06:19:18 +01:00
Frank Martinez 3922a674da Build: Fix some trivial warnings
(cherry picked from commit c057d0293a)
2025-12-02 05:06:58 +01:00
PaddleStroke 3dc4f11b2b Sketcher: fix new external always construction (#25733)
(cherry picked from commit 6ddb0165ff)
2025-12-01 22:06:49 -06:00
Roy-043 81956de275 Draft: fix X-axis reference for Draft_Arc_3Points
(cherry picked from commit 4eb110e861)
2025-12-02 05:06:35 +01:00
PaddleStroke 5763b1df60 Assembly: Fix selection during joint edition (#25687)
(cherry picked from commit b603630d1f)
2025-12-02 05:06:18 +01:00
Garfieldcmix 41a30467a5 Fix Export/Save Mesh incorrect error message
(cherry picked from commit 3aedb58e4b)
2025-12-02 05:06:03 +01:00
sliptonic b2e8b5c3e2 CAM: fixes bug with op creation/cancelation (#25800)
(cherry picked from commit db65e44bca)
2025-12-02 05:05:41 +01:00
Roy-043 b893924cbe 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>
(cherry picked from commit 5e90dc86fb)
2025-12-02 05:05:25 +01:00
Chris Hennes 3e8e2faf62 Utils: Don't save location of Python executable
(cherry picked from commit f366b0e2a7)
2025-12-01 20:54:15 -06:00
Syres916 feca3a8436 [TechDraw] QCheckBox fix compiling warning of stateChanged deprecation
(cherry picked from commit cb9c0ccd7f)
2025-12-01 15:03:57 -06:00
Roy-043 84a2662171 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

(cherry picked from commit 41c0621abb)
2025-12-01 21:15:30 +01:00
Roy-043 afbce0a6a2 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>
(cherry picked from commit 5155906848)
2025-12-01 19:22:59 +01:00
tetektoza b77c5da78b 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>
(cherry picked from commit 5f4fe75f5f)
2025-12-01 19:22:48 +01:00
Billy Huddleston de7c105a1a 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.

(cherry picked from commit 708717cee2)
2025-12-01 19:22:39 +01:00
Kacper Donat 6aa7f99e1e Gui: Use SplitButton for config migration modal
(cherry picked from commit 0de9ffc439)
2025-12-01 19:22:30 +01:00
Kacper Donat 522c2b116b Gui: Add SplitButton widget
This adds SplitButton widget that has one primary action and possibly
more secondary ones accessible via menu.

(cherry picked from commit c500408a6d)
2025-12-01 19:22:30 +01:00
Roy-043 e1128e3491 Convert asset path to string in filePath function
(cherry picked from commit 6a65b45242)
2025-12-01 19:22:21 +01:00
marbocub 9fcef20600 Sketcher: Fix error when first constraint is DistanceX/DistanceY to vertex (#25813)
(cherry picked from commit 8ea5075385)
2025-12-01 18:45:45 +01:00
Syres916 f72e3439af [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>
(cherry picked from commit 15c99ecdb2)
2025-12-01 18:03:48 +01:00
Syres916 135bd360f0 [Gui] Fix AxisLetterColor on opening Preferences and correct LightSources parameter group
Also remove workaround as stated in the comments just before 1.1.0 Release.

(cherry picked from commit 2be7bbf141)
2025-12-01 18:01:53 +01:00
Roy-043 2b5213863b 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`

(cherry picked from commit b865c4625d)
2025-12-01 17:54:29 +01:00
PaddleStroke 12438b1999 Part: Fix addSelection failing for links to body. (#25702)
(cherry picked from commit 6d48c51f4d)
2025-12-01 16:35:17 +01:00
PaddleStroke 7f785d64cb Core: Close partially opened document when doc is closed. (#25659)
(cherry picked from commit b249b9daeb)
2025-12-01 06:41:28 +01:00
Captain cdd6a0a719 PartDesign: fix symmetric mode of draggers in revolution/groove (#25656)
(cherry picked from commit a371231aea)
2025-11-30 23:11:37 -06:00
Chris Hennes b6f5216b70 Revert "GUI: fix "select all instances" (#25503)"
This reverts commit 70645e2f46.
2025-11-29 08:13:06 +01:00
Max Wilfinger 09127570d3 GUI: Update about image to 1.1 2025-11-28 17:28:39 +01:00
PaddleStroke 898c45cb95 Datums: Prevent 'doesn't contain feature with role' error on load
(cherry picked from commit 79f66b75f3)
2025-11-28 13:05:38 +01:00
Chris Hennes 9483062cbd Build: Fix punctuation in Windows installer (English only)
(cherry picked from commit 4e74031e06)
2025-11-28 06:49:54 +01:00
PaddleStroke d8f3bedbd9 TechDraw: DrawViewSpreadsheet do not create cyclic dependency
(cherry picked from commit eaee0f759a)
2025-11-28 06:38:10 +01:00
PaddleStroke 9c5a6ff782 PartDesign: Polar pattern: Accept negative angles (#25621)
(cherry picked from commit 5ae67ee2f9)
2025-11-27 18:13:55 -06:00
PaddleStroke 9ee1295842 Assembly: Enable negative distance for rackpinion and screw
(cherry picked from commit da717d4ca0)
2025-11-27 05:57:25 +01:00
PaddleStroke c5c336927d Assembly: CommandInsertLink: handle manual deletions (#25651)
(cherry picked from commit cf40007bd0)
2025-11-26 16:59:22 -06:00
Pieter Hijma 683fc7986c Gui: Fix refresh on boolean property toggle
(cherry picked from commit 63f739b2e4)
2025-11-26 15:41:05 -06:00
Chris Hennes 7b37c5612b Merge pull request #25709 from FreeCAD/backport-25580-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] PartDesign: Fix boolean positioning
2025-11-26 14:41:49 -06:00
Kacper Donat c7e3fbe738 PartDesign: Bake in geometry transform after boolean
This bakes in transform into geometry after boolean to ensure that
regardless of parameters the result of boolean operation is the same.

(cherry picked from commit 527b2de560)
2025-11-26 20:38:27 +00:00
Kacper Donat 386e375e1d Part: Add bakeInTransform method for TopoShape
This method can be used to bake in transform directly into geometry.
Normally the setTransform or setPlacement methods only store additional
positional data within the shape without changing the actual geometry.
So if we have some geometry placed at 0,0,0 and we want to have few
copies of that shape the goemetry stays intact but additional transform
is stored. This method can be used to alter the gometry and reset the
transform to identity. It helps with model stability, as not every
method correctly handles that additional transform metadata.

(cherry picked from commit 4cbf10f045)
2025-11-26 20:38:27 +00:00
Kacper Donat b526751f97 PartDesign: Simplify FeatureBoolean
This commit removes a ton of dead code from FeatureBoolean. It might
been ported here from the Link branch but it is not used and it is
confusing. The reason for having that code here is also not really
obvious so there is no reason to keep it.

(cherry picked from commit 1555f65075)
2025-11-26 20:38:27 +00:00
Chris 70645e2f46 GUI: fix "select all instances" (#25503)
(cherry picked from commit 6b60867368)
2025-11-26 14:21:19 -06:00
PaddleStroke 5ea6fa8eb9 Gui: Do not lose thumbnail when saving partially loaded doc (#25458)
(cherry picked from commit 46a847c857)
2025-11-26 14:00:58 -06:00
Eugene Zhukov 2d77ea2221 Change params variable to uppercase PARAMS (#25663)
Addresses #25565

(cherry picked from commit e270d63e5c)
2025-11-26 16:32:36 +01:00
Chris 56d6bbe4b6 PartDesign: Use c++ exception to prevent crash (#25671)
* part design: fix issue #25639 use c++ exception to prevent crash

* [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>
(cherry picked from commit 5382ca4bbb)
2025-11-26 16:32:06 +01:00
github-actions 2596ab8bcb Update translations from Crowdin
(cherry picked from commit 68cb0a3270)
2025-11-25 22:19:40 -06:00
Chris Hennes 53767601ea Measure: Translate measurement types 2025-11-25 14:53:08 -03:00
Frank Martinez 08dabacfed Build: Remove deprecated pylint option
(cherry picked from commit 863d77562d)
2025-11-25 13:56:58 -03:00
Frank Martinez 9b934a45db Build: Update pylint minimum python version to 3.10
(cherry picked from commit 2ef70f6094)
2025-11-25 13:56:58 -03:00
Louis Gombert a0a8d7760b CMake: fix parsing error in Sandbox/Gui
Introduced by commit 755229d

(cherry picked from commit 0fca304912)
2025-11-25 14:49:51 +01:00
paul 4962bbbffe [ArchWall] Fix Bug: Center-Align with Centered Multi-Material (#25572)
* [ArchWall] Fix Bug: Center-Align with Centered Multi-Material

Fix #25485

* [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>
(cherry picked from commit bcc30869b7)
2025-11-25 08:42:38 +01:00
Bas Ruigrok 7c6d70ab02 Gui: Simplify QObject::connect in openPopupMenu
Co-authored-by: xtemp09 <9303235+xtemp09@users.noreply.github.com>
(cherry picked from commit 6e5a318ceb)
2025-11-25 08:42:30 +01:00
Bas Ruigrok 30e94d0b3f Gui: Fix Gesture style context menu segfault
(cherry picked from commit dec0ea238a)
2025-11-25 08:42:30 +01:00
PaddleStroke 70c69bbebc Assembly: Bom: replace QtWidget by QtGui for Qt6
(cherry picked from commit 59f672eb94)
2025-11-25 08:42:18 +01:00
PaddleStroke 1cd0927a07 Assembly: Joint task: fix spinbox not being populated
(cherry picked from commit 629eff4a26)
2025-11-25 06:04:24 +01:00
Billy Huddleston e5b5fb38a4 CAM: Make CAM tests and serialization robust to locale-dependent decimal separators
Updated CAM unit tests and LinuxCNC serializer to handle decimal separators consistently, ensuring tests pass regardless of system locale. Assertions now compare FreeCAD.Units.Quantity objects directly or normalize decimal separators in strings. LinuxCNC serializer output is forced to use periods for decimals.

src/Mod/CAM/CAMTests/TestPathToolBitListWidget.py:
- Normalize decimal separators in tool description assertions for locale robustness.

src/Mod/CAM/CAMTests/TestPathToolBitPropertyEditorWidget.py:
- Use FreeCAD.Units.Quantity for direct quantity comparisons in property editor tests.

src/Mod/CAM/CAMTests/TestPathToolBitSerializer.py:
- Compare deserialized and serialized quantities using FreeCAD.Units.Quantity for consistency.

src/Mod/CAM/CAMTests/TestPathToolShapeClasses.py:
- Compare parameter values and units directly instead of relying on string formatting.

src/Mod/CAM/Path/Tool/library/serializers/linuxcnc.py:
- Force period as decimal separator in LinuxCNC serializer output to avoid locale issues.

(cherry picked from commit 9cab1f8f52)
2025-11-25 06:03:46 +01:00
FEA-eng e55305fb25 FEM: add new cyclic symm centrif example
(cherry picked from commit d2f082c7bc)
2025-11-25 06:03:29 +01:00
Furgo be96c07587 Assembly: Prevent zero-length line creation in ExplodedView
Safeguards the generation of explosion trail lines to avoid creating
invalid geometry.

Previously, if a part displacement was zero (or effectively zero),
`Part.LineSegment` would attempt to create a line with identical start
and end points, causing OpenCascade to throw a `Part.OCCError`. This
resulted in failures during document restoration and recomputes.

This commit introduces a `_createSafeLine` helper method that checks the
distance against a `1e-7` (near-zero) tolerance before attempting to
generate the shape.

(cherry picked from commit 2763bb962f)
2025-11-24 23:08:54 -03:00
Furgo b5dee9832f App: Handle uncleared Python exceptions during object restoration
When a Python-based object throws an exception during the restoration
process (e.g. inside `onDocumentRestored`), the error is caught by a
generic `catch(...)` block in `Document::afterRestore`.

Previously, this block swallowed the C++ exception wrapper but failed to
clear the underlying Python error state. Leaving the interpreter in this
"dirty" state caused a segmentation fault or `SystemError` later in the
loading process when C++ attempted to interact with the Python API
(specifically in `App::Application::setActiveDocument`).

This commit adds a check for `PyErr_Occurred()` inside the catch block.
If an error is detected, the traceback is printed to the console for
debugging, and `PyErr_Clear()` is called to reset the interpreter state,
allowing the application to continue loading the document without
crashing.

(cherry picked from commit b571889ab5)
2025-11-24 23:08:54 -03:00
PaddleStroke 69f6f9e4b0 Assembly: Joint task: Fix sel gate not being cleared if doc closed
(cherry picked from commit 8b1dce3437)
2025-11-24 23:06:43 -03:00
Chris Hennes 9c24507531 Gui: Switch to defusedxml for document recovery
(cherry picked from commit 4536a54f8f)
2025-11-24 22:45:07 -03:00
Adrian Insaurralde Avalos ada3b7c97e CI: improve release workflow
adapt weekly build workflow to do normal releases too, rename accordingly
skip macos singning setup if certificate not available (useful to run on forks)
add missing dmgbuild dependency for badge icons on macos
build windows installer in workflow, add needed dependencies to pixi.toml
reorganize packaging scripts that can be useful outside rattler-build too
do some cleanup
add .gitignore to rattler-build
Properly configure appimage updating depending on release type and upload zsync file

(cherry picked from commit 46f3cf2f19)
2025-11-24 21:32:52 +01:00
Adrián Insaurralde Avalos bc5b7d66c1 WindowsInstaller: multiple improvements and fixes
move windowsinstaller to /package
update artwork
adapt to conda builds
make msvc redist directory optional
automate version information definition
use relative directories for file locations definitions
improve/update readme
partially update Delete.bat for qt6 libpack
add .gitignore
update signing.bat and add hashing command

WindowsInstaller: use --safe-mode in freecadcmd commands [skip ci]

WindowsInstaller: make windows 8 the minimum version [skip ci]

WindowsInstaller: allow configuring some values via command line

windows installer update for qt6 build

(cherry picked from commit d466ba037b)
2025-11-24 21:32:52 +01:00
Adrian Insaurralde Avalos 9931e01be7 CI: specify environment for fedora-daily workflow
otherwise it doesn't have access to the secrets it needs

(cherry picked from commit a847a794c4)
2025-11-24 21:32:52 +01:00
pre-commit-ci[bot] 7176a5c3bb [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 59715114f5)
2025-11-24 19:19:09 +01:00
chris ac39784aac core: fix various issues exporting step files, ie. #25540 #24962 #25567
(cherry picked from commit e226e9b06e)
2025-11-24 19:19:09 +01:00
chris da432a77af export: step file preserve last feature when exporting step file, fix issue #25567
(cherry picked from commit 9c48c9a3e3)
2025-11-24 19:19:09 +01:00
chris e6e0d03034 core: preserve body name in step file when exporting part that contains body with feature, fixes #24962
(cherry picked from commit 246218b28b)
2025-11-24 19:19:09 +01:00
PaddleStroke c5387aba66 Sketcher: External Face: decide between defining and construction (#25390)
(cherry picked from commit 74aafcee75)
2025-11-24 19:18:59 +01:00
Syres916 1d739f9773 [Gui] Reduce separator from 2px to 1px
(cherry picked from commit fc6a39658a)
2025-11-24 19:18:46 +01:00
Syres916 7c0c421401 [Gui] increase contrast of menu separators and down arrows in comboboxes
(cherry picked from commit cda9a107aa)
2025-11-24 19:18:46 +01:00
Kacper Donat 45c5b33db5 PartDesign: Use true tool positions for boolean preview
This fixes positioning of some previews for booleans that were misplaced
after #24750 was merged. It restores previous code that was correct for
most cases. The reason for some previews being misaligned is described
in the #25578 - the preview actually shows how the result should be but
due to some shortcuts taken in code the result is incorrect.

(cherry picked from commit 88543612e4)
2025-11-24 19:18:40 +01:00
tarman3 501f29a247 CAM: Engrave - Fix #22380 - duplicates 2025-11-24 18:37:13 +01:00
chris 57a1ac5812 part design: reimp feature to move datum objects using modal / dialogue box from right click menu in model tab
(cherry picked from commit 0fc96a1a6f)
2025-11-24 18:37:07 +01:00
marioalexis 680ccc0ecf Fem: Improve VTK import/export preference page
(cherry picked from commit 2457715d84)
2025-11-24 18:26:53 +01:00
pre-commit-ci[bot] 7a7cba5587 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit ada21269aa)
2025-11-24 18:26:53 +01:00
Chris Hennes c90f7d67df FEM: Add missing translation in InOutVTK
(cherry picked from commit 128dec534a)
2025-11-24 18:26:53 +01:00
marioalexis 402032c230 Fem: Improve Gmsh preference page implementation
(cherry picked from commit 7d218b3f9b)
2025-11-24 18:12:56 +01:00
Chris Hennes 4ba4d1b848 FEM: Translate log verbosity settings
(cherry picked from commit 16eb18abb2)
2025-11-24 18:12:56 +01:00
sliptonic 024e904c9a Merge pull request #25554 from tarman3/1-1_leadinout_overtravel6
CAM: 1.1 - LeadInOut - Fix regression after #24829
2025-11-24 11:00:24 -06:00
Kacper Donat 74879b6738 Attacher: Reduce unnecessary rotation around normal for midpoint
(cherry picked from commit 3e356491e2)
2025-11-24 17:48:21 +01:00
PaddleStroke e76fdd82dc Sketcher: Prevent bad coincidences (#25304)
(cherry picked from commit e38154474a)
2025-11-24 17:48:14 +01:00
pjcreath a7486c6fa9 Sketcher: prevent undo/redo crash when selected geometry goes away.
Fixes #25497

(cherry picked from commit efb10e1b28)
2025-11-24 17:32:32 +01:00
pjcreath 4a331340fe Sketcher: prevent crash on undo/redo while dragging.
Fixes #25500

(cherry picked from commit 16aff10544)
2025-11-24 16:00:22 +01:00
xtemp09 e3d0fe6bb6 [GUI] Handle ampersand in windowTitle
(cherry picked from commit eb0c980c1d)
2025-11-24 15:19:44 +01:00
Syres916 8c36c5390a [Gui] Fix string coding on selection changed
(cherry picked from commit a10fbf2e8c)
2025-11-24 08:00:33 +01:00
Syres916 2ed6528d61 [Part] Fix string encoding for document name and object name
(cherry picked from commit 76071ffbeb)
2025-11-24 08:00:33 +01:00
Syres916 1c54777405 [Gui] Fix string encoding for document name
(cherry picked from commit 83c01fae68)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] 4cd7fdc2df [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 6d8c5bd2f9)
2025-11-24 08:00:33 +01:00
Syres916 c637b532f1 [Gui] Fix string encoding for preselect, select and deselect
(cherry picked from commit eb08fe2a78)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] d5da0227ee [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 23df7e4cad)
2025-11-24 08:00:33 +01:00
Syres916 3446b933cb [Gui] Fix string encoding for document, object and subojects
(cherry picked from commit d19ab48231)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] 6f999f8885 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 78bb40c419)
2025-11-24 08:00:33 +01:00
Syres916 95c547bd5a [PartDesign] Fix string encoding for document name and face reference
(cherry picked from commit 1e30362dd4)
2025-11-24 08:00:33 +01:00
Syres916 7aed77aaec [Gui] Fix string encoding for document name
(cherry picked from commit 61db439744)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] aa02543896 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 4c8d140373)
2025-11-24 08:00:33 +01:00
Syres916 a6da44aa03 [Gui] Fix string encoding document name and object name
(cherry picked from commit fcd487e0ad)
2025-11-24 08:00:33 +01:00
Syres916 c8f629b8b4 [Gui] Fix incorrect document name when updating PropertyLink
(cherry picked from commit 093a070439)
2025-11-24 08:00:33 +01:00
chris b71344c07b sketcher: fix issue #13852 resolve issue with state not updating constraint text
(cherry picked from commit d806b4e5f3)
2025-11-24 06:11:50 +01:00
PaddleStroke 8e73bddec1 Sketcher: Rotate: Fix line length ignored (#25434)
(cherry picked from commit 1d30d079b0)
2025-11-24 06:11:21 +01:00
Roy-043 aa010759d3 Draft: fix number_length for imperial dimensions (#25369)
* The number_length function did not take imperial dimensions into account. For `9" + 7/8"` it would return 1.
* In ArchRoof reference number_length function from DraftGui.py to avoid duplicate code.

(cherry picked from commit 98240a6de5)
2025-11-24 06:11:04 +01:00
FEA-eng 383a51075c FEM: Add Thick Pipe Internal Pressure 2D example (#25191)
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
(cherry picked from commit 44bf1c35d6)
2025-11-24 06:10:44 +01:00
PaddleStroke aeb6fca064 Assembly: BOM: fix subassembly
(cherry picked from commit 40e4eb8770)
2025-11-24 06:10:22 +01:00
Chris 32bfee0ada Sketcher: allow grid snapping while hovering mouse over axis (#25226)
(cherry picked from commit 72d021108f)
2025-11-24 06:10:06 +01:00
Billy Huddleston cb4d6b9cb7 CAM: Ensure Chipload is restored and displayed with user-preferred units
Fixes an issue where Chipload and similar mixin-defined properties were added to
the schema but not reliably restored, because parameter restoration did not always
apply them to the toolbit object. This change ensures Chipload is restored from saved
data and displayed using the user's preferred unit schema, even when no document
is open. This update also ensures the toolbit editor respects the user’s unit schema
preference during editing, even outside an open document.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Restore Chipload (and other parameters) to toolbit.obj if the property exists.

src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Set units schema to user preference when opening the toolbit editor, so Chipload and other values display correctly.

(cherry picked from commit 4432575243)
2025-11-23 20:40:39 +01:00
sliptonic d2a99e83f7 Merge pull request #25573 from FreeCAD/backport-22738-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] CAM: Pocket BSplineSurface
2025-11-23 12:41:17 -06:00
sliptonic 78df9dd937 Merge pull request #25575 from FreeCAD/backport-25106-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] [CAM] Offer automatic migration of tools in (old) custom working directory to the new tool system
2025-11-23 12:40:58 -06:00
David Kaufman 0b92c77685 Hopefully placate CodeQL
(cherry picked from commit 767ee484ba)
2025-11-23 18:34:06 +00:00
David Kaufman b73a2cca0d migrate silently, no prompts
(cherry picked from commit f22d0e2292)
2025-11-23 18:34:06 +00:00
David Kaufman 205d024b74 remove unused import
(cherry picked from commit e2b4ea58b8)
2025-11-23 18:34:06 +00:00
David Kaufman fc317b16b0 automatically offer migration for tool libraries in custom working dir
(cherry picked from commit 21319f95d2)
2025-11-23 18:34:06 +00:00
David Kaufman 3b80c25339 [CAM] bugfix tools not imported properly during library import
(cherry picked from commit bb9ae3540e)
2025-11-23 18:34:06 +00:00
pre-commit-ci[bot] ccd3e778ff [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-23 18:06:12 +00:00
tarman3 7bf96e2ef0 CAM: LeadInOut - Fix regression after #24829 2025-11-23 20:02:15 +02:00
tarman3 387c3be2bf CAM: Pocket BSplineSurface
(cherry picked from commit 889dc7059c)
2025-11-23 18:02:10 +00:00
sliptonic 2c775840da Merge pull request #25403 from Connor9220/backport-24829-to-releases/FreeCAD-1-1
CAM: LeadInOut - Fix overtravel
2025-11-23 11:46:45 -06:00
sliptonic 14d93d24fb Merge pull request #25438 from Connor9220/FixBullnoseToolBit
CAM: Introduce unified ToolBit parameter migration logic for Bullnose tools
2025-11-23 11:39:34 -06:00
Andrew Burks c7b3353414 #25474 Added read-only warnings when saving documents (#25532)
* #25474 Added read-only warnings when saving documents

Block saving a file and notify user if windows is unable to save to the file for any reason, or the read-only attribute is checked. Also check std::filesystem::perms for write permission and other checks in FileInfo::isWritable(), although it doesn't seem to matter on windows.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit bad2989b7b)
2025-11-23 07:24:49 +01:00
Adrian Insaurralde Avalos a469c45a2d pixi: enable building reverse engineering
(cherry picked from commit 3ab8dbe194)
2025-11-21 16:54:37 -06:00
Roy-043 4e6bb3f524 BIM: fix handling of BIM_Sketch view properties (#25339)
* BIM: fix handling of BIM_Sketch view properties

The handling of the sketch view properties was not correct:
* AutoColor was not set to `False`.
* PointSize was missing.
* PointColor was not set to the DefaultShapeVertexColor preference.
* Grid values were never applied. Sketches do not have a GridSnap property and gridSize is not the correct Draft preference.
* Sketch grid snap is a global setting that affects all sketches, the code should not change that setting IMO.

* Remove trailing white space

(cherry picked from commit 63c9b176e2)
2025-11-21 11:40:34 +01:00
Logstor ba5652e046 Removed sys in 'from os import sys, path'
(cherry picked from commit e802aa1821)
2025-11-21 08:47:32 +01:00
Jacob Oursland 40cd4fe772 Enable Reverse Engineering WB.
The Reverse Engineering WB was temporarily disabled as it didn't support Qt6.As it now supports Qt6,
it is time to re-enable the WB.

(cherry picked from commit f48db1f855)
2025-11-21 08:08:55 +01:00
Adrian Insaurralde Avalos 5f68507f6d set 1.1.0rc1 version in packaging files 2025-11-20 23:14:04 -03:00
PaddleStroke ae864aedb4 Assembly: Make the 'ground first part' dialog closable
(cherry picked from commit 2266a42009)
2025-11-20 07:58:52 +01:00
Chris Hennes d4f2c904f8 Gui: Translate 'Don't show me again'
(cherry picked from commit deab0abf8e)
2025-11-20 07:57:37 +01:00
Kacper Donat 2ff62e9727 Gui: Fix stylesheet loading order
For some platforms due to event loop and timer triggering being not
deterministic stylesheets could be loaded before style parameters were
fully loaded. This caused warnings about style parameters to appear
potentially confusing users.

This commit changes the stylesheet loading to happen much earlier in the
process so the stylesheet is applied before theme preselection has
chance to happen.

(cherry picked from commit 8995f43a15)
2025-11-19 20:18:03 +01:00
Kacper Donat 302fbc6765 Gui: Save defaults layout after first launch
(cherry picked from commit d1a8f99509)
2025-11-19 18:41:30 +01:00
PaddleStroke 456bc178c6 Assembly: Fix joint on Body-LCS not working
(cherry picked from commit 1cf6f5f3a6)
2025-11-19 14:09:37 +01:00
PaddleStroke 66ed85bb19 Assembly/TechDraw: Fix exploded view views (#25426)
(cherry picked from commit be7d41dea7)
2025-11-18 15:59:27 -06:00
pre-commit-ci[bot] cd2e26bbea [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-18 20:20:45 +00:00
Billy Huddleston 6058a47f58 Cleanup for 1.1 2025-11-18 15:17:45 -05:00
PaddleStroke 092ae3f8ea Assembly: Fix crash on moving unconnected parts
(cherry picked from commit 2a8d648ad3)
2025-11-18 20:28:06 +01:00
Billy Huddleston 3971ce2bf7 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-11-18 13:38:39 -05:00
Chris 69498be228 Part: fix splitting of a split that is a container / group (#25293)
(cherry picked from commit 3f42824ffa)
2025-11-18 19:22:57 +01:00
tetektoza 08cceec9cf Gui: Use UTF-8 string instead of UTF-16 for Reset in Expression Editor
Currently `ExpLineEdit::apply()` passes `QString::constData()` to a
printf-style format string with %s. `QString::constData() returns a
const QChar* (UTF-16, 2 bytes per char), but %s expects a const char*
(UTF-8/ASCII with 1 byte per char).

This results in a string being interpreted as in "Container":
Byte 0: 'C'
Byte 1: 0x00 (high byte of UTF-16 'C', which gets interpreted as null
terminator)

So this patch uses proper conversion to null-terminated C-String before
passing it further.

(cherry picked from commit ca1528e2a9)
2025-11-18 17:51:51 +01:00
tetektoza 3c6cdb17e0 Gui: Differentiate completion activation modes in Expression Editor
Currently if user tries to press TAB during Expression Editor, it
inserts both the entry and its first subentry. Also, if user browses the
dropdown with arrows keys, it inserts it's values.

Root cause of that is the regression made in latest changes to chaining
completion logic which is triggered for all completion modes including
TAB, which already has its own refresh mechanism. Also,
ExpressionTextEdit connected both activated (Enter/click) and highlight
signals to the same slot, resulting in arrow key navigation inserting
completions.

So, this adds separate slots for ExpressionTextEdit to differentiate
completion modes. And also updates tab handling to pass
ActivationMode::Highlighted to prevent double chaining.

(cherry picked from commit 3f6a0ee78b)
2025-11-18 17:51:51 +01:00
PaddleStroke 15de64e30b Sketcher: ConstraintList: prevent N transaction on box selection (#25254)
(cherry picked from commit 6f90c5ea61)
2025-11-18 09:18:59 -06:00
captain0xff d936ba474c PartDesign: fix the interactive controls for revolution/groove
(cherry picked from commit 5d387ae014)
2025-11-18 16:11:54 +01:00
Billy Huddleston b44af1f768 CAM: Fix crash when Path panel widgets are deleted
Prevent RuntimeError by safely handling missing or deleted geometry import
widgets in Path operation panels. This ensures the UI update code does not
fail if the underlying C++ objects are destroyed, improving stability when
panels are closed or the UI changes.

src/Mod/CAM/Path/Op/Base.py:
- Wrap geometry import widget access in try/except to avoid crashes
- Add error handling for panel widget deletion scenarios

(cherry picked from commit 900d5ae255)
2025-11-18 14:12:09 +01:00
Chris Hennes f308fb92a3 Gui: Fix context of translation strings
(cherry picked from commit 0aec9c3b21)
2025-11-18 14:11:52 +01:00
Gaël Écorchard 98a1dd2f14 Remove functions that require Kuka files (#24984)
(cherry picked from commit c77e1d840c)
2025-11-18 14:11:42 +01:00
Chris Hennes 0887aa188b Gui: Add translation to 'No style sheet'
(cherry picked from commit 0a73f53990)
2025-11-18 14:11:31 +01:00
PaddleStroke 9a4cedf1a4 Assembly: Sub-assembly: fix support for Part-wb objects (#25279)
* Assembly: Sub-assembly: fix support for Part-wb objects

* [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>
(cherry picked from commit 551ab85076)
2025-11-18 11:05:47 +01:00
tarman3 894e1d9ae2 CAM: Engrave - Fix #9114 - Unable to engrave an arc
(cherry picked from commit a514cfdf4b)
2025-11-18 11:04:48 +01:00
PaddleStroke 37f014998c Sketcher: Remove transaction from TaskSketcherConstraints::doSetVisible (#25255)
* Sketcher: Remove transaction from TaskSketcherConstraints::doSetVisible

* [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>
(cherry picked from commit 33d1d80555)
2025-11-18 11:04:42 +01:00
chris 1d21e56ee1 sketcher wb: fix issue #25076, resolve grid snapping placement
(cherry picked from commit 1ec1f1506e)
2025-11-18 11:04:32 +01:00
PaddleStroke c43b615301 Assembly: Insert link: Handle partially loaded documents (#25275)
(cherry picked from commit 10cc4dea16)
2025-11-18 09:05:59 +01:00
Chris 125d3b65c7 Import: STEP export preserve body names (#25042)
(cherry picked from commit f218c5f25c)
2025-11-18 08:14:09 +01:00
pre-commit-ci[bot] 9946819e9f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-18 05:38:37 +01:00
Chris Hennes 06d55d50ce Build: Add network-failure fault tolerance to macOS signing (#25265)
(cherry picked from commit e0c5c89bd9)
2025-11-18 05:38:37 +01:00
pre-commit-ci[bot] 1678981185 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-17 20:23:55 +00:00
tarman3 4e2d2e3206 CAM: LeadInOut - Fix overtravel
(cherry picked from commit 2e3a4d541c)
2025-11-17 15:15:04 -05:00
David Carter 3fc8528692 Materials: Assigning material without appearance
Assigning a material without an appearance reset the appearance to the
default appearance.

There were two main problems. One was the comparison function for
App::Material objects. It would return false when the UUID or MatType
values were different although there are many circumstances where this
could be true and the appearance be the same. It also incorrectly
compared the imagePath.

The second problem was the logic for detecting if an object has already
been assigned an appearance by assigning a material or manually setting
the appearance. If assigned a material, the appearance should update but
not if it has been set manually. This logic has been corrected.

(cherry picked from commit f4e78e3163)
2025-11-17 18:32:15 +01:00
Chris Hennes 6508023e95 CI: Update macOS Intel target version in workflow
GitHub is deprecating macOS 13 runners -- the only remaining Intel runner is now macOS 15, and it is scheduled for retirement in 2027, at which point we will no longer be able to provide Intel weeklies.

(cherry picked from commit 50392855bf)
2025-11-17 18:07:17 +01:00
Chris Hennes ce6d9f361a Core: Convert transparency to alpha (#24891)
* Core: Convert transparency to alpha

Create new `Base::getVersion()` function for extracting a program
version enumeration given a version string.

Convert transparency to alpha value for old project files.

* Base/App: Address review comments

---------

Co-authored-by: wmayer <wmayer@freecad.org>
(cherry picked from commit 4d0c35dd2d)
2025-11-17 17:18:42 +01:00
Florian Foinant-Willig 95fe960485 TechDraw: fix "%.0w" format spec (#25367)
(cherry picked from commit 526f7f2550)
2025-11-17 06:41:03 +01:00
Connor9220 49d4375f70 Fix carriage returns in the Migrator Dialog Title. (#25379)
(cherry picked from commit 11eba3f25c)
2025-11-16 22:53:36 -06:00
Jiří Pinkava b0ffa6728c Tests: Fix value for Imperial pressure tests
The decimal was (wrongly) cahnged in 5379378626

(cherry picked from commit 5fc650b2ff)
2025-11-16 22:48:42 -06:00
PaddleStroke 38fccbacf6 TaskAttacher: Remove 'reset edit' causing trouble to assembly (#25277)
(cherry picked from commit 5da1e3d899)
2025-11-15 17:33:43 +01:00
theo-vt a8ba9b82a5 Sketcher: Proceed to chamfer/fillet on a vertex if there are more than 2 lines but only two non-construction lines
(cherry picked from commit 15d9e14851)
2025-11-15 10:09:45 -06:00
theo-vt 647877384a Sketcher.planegcs: solve reference constraints with lower priority (#25318)
(cherry picked from commit d4bfa82161)
2025-11-15 10:08:53 -06:00
Pieter Hijma a60b4698be Doc: Improve the documentation of transactions (#21494)
(cherry picked from commit 0083364dbe)
2025-11-15 08:03:16 +01:00
Roy-043 1a7fa655f3 Core: workaround for Building US unit system bug (#25288)
* Core: workaround for Building US unit system bug

Fixes #11345

This workaround should hopefully fix the Building US unit system bug at the level of the InputField code. This is the most feasible solution given that we are currently in the v1.1 feature freeze.

I use the word "hopefully" because I have not compiled and tested the code. But replacing `+` with `--` works in Python examples.

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

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

* Fix typo in comment

* [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>
(cherry picked from commit c422404020)
2025-11-15 06:24:11 +01:00
tarman3 6d023afaac CAM: DressupArray - Fix python import
(cherry picked from commit b0a79a6f2c)
2025-11-14 19:33:48 +01:00
Furgo 4642fecba3 Define DlgScale task panel's tab order (#25300)
* Define DlgScale task panel's tab order

To improve keyboard navigation.

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

* [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>
(cherry picked from commit 93868d54b7)
2025-11-14 19:33:16 +01:00
Stephan T. Lavavej 2ae9f89982 Avoid using non-Standard std::locale::empty() for MSVC
(cherry picked from commit 9e6509a3a4)
2025-11-14 19:32:50 +01:00
Chris Hennes a6ec30a8fc Build: Change package version suffix from 'dev' to 'rc1' 2025-11-13 08:53:47 -06:00
1300 changed files with 111811 additions and 102952 deletions
@@ -1,92 +0,0 @@
name: Report a Problem
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
labels: ["Status: Needs triage","Status: Needs confirmation"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this problem report! Please [search](https://github.com/FreeCAD/FreeCAD/issues) if a similar issue already exists and check out [how to report issues](https://github.com/FreeCAD/FreeCAD?tab=readme-ov-file#reporting-issues). By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md).
- type: dropdown
id: wb
attributes:
label: Workbench affected?
options:
- Assembly
- BIM
- CAM
- Core (App, Gui,...)
- Draft
- FEM
- Material
- Measurement
- Mesh
- Part
- Part Design
- Sketcher
- Spreadsheet
- TechDraw
- Other (specify in description)
- type: textarea
id: description
attributes:
label: Problem description
description: Describe the problem and how it impacts user experience, workflow, maintainability or performance. You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first.
placeholder: Describe your problem briefly.
validations:
required: true
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to reproduce
description: If the problem appears to be a bug with the current functionality, provide a test case or recipe that reliably reproduces the issue. Ideally [record a macro](https://wiki.freecad.org/Std_DlgMacroRecord) and attach it. Please also add an example file as ZIP.
placeholder: |
Drag an example file as ZIP into this textbox to attach it.
Steps to reproduce the behavior:
1. Open my example file
2. Go to '...'
3. Click on '...'
validations:
required: true
- type: textarea
id: expected_behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen when following the provided steps above.
placeholder: What is the expected behavior?
validations:
required: true
- type: textarea
id: actual_behavior
attributes:
label: Actual behavior
description: A clear and concise description of what actually happens. If applicable, add screenshots to help explain the problem.
placeholder: What is actually happening? You can add screenshorts or videos by dragging them into this textbox.
validations:
required: true
- type: textarea
id: dev_version
attributes:
label: Development version About Info (in Safe Mode)
description: Download the latest weekly [development release](https://github.com/FreeCAD/FreeCAD/releases) and try reproducing the issue in safe mode (Help → Restart in Safe Mode). Use the [About FreeCAD](https://wiki.freecad.org/About) dialog to copy your full version information and paste it here.
placeholder: |
1. Download the latest weekly development version (link above).
2. Make sure to run in Safe Mode (Help -> Restart in Safe Mode) to exclude interference from 3rd party addons.
3. If the issue is still reproducible, open the About FreeCAD dialog and copy the full version info here.
render: shell
validations:
required: true
- type: textarea
id: good_version
attributes:
label: Last known good version (optional)
description: If this is a regression, paste the [About FreeCAD](https://wiki.freecad.org/About) info from the last known working version.
placeholder: If the problem did not exist in a previous version, paste the About FreeCAD info from that version here.
render: shell
+73
View File
@@ -0,0 +1,73 @@
name: Report a Problem
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
labels: ["Status: Needs triage","Status: Needs confirmation"]
body:
- type: checkboxes
id: existing_issue
attributes:
label: Is there an existing issue for this?
description: Please [search](https://github.com/FreeCAD/FreeCAD/issues) to see if a similar issue already exists for the problem you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: description
attributes:
label: Problem description
description: Describe the problem and how it impacts user experience, workflow, maintainability or speed of the code. If the problem appears to be a bug with the current functionality, provide as test case or recipe that reproduces the error. Ideally record a macro and attach it.
placeholder: Description of the problem
validations:
required: true
- type: textarea
id: full_version
attributes:
label: Full version info
description: Please use the About FreeCAD dialog to copy your full version information and paste it here. Try reproducing the issue by restarting FreeCAD in safe mode too.
render: shell
validations:
required: true
- type: dropdown
id: wb
attributes:
label: Subproject(s) affected?
options:
- Addon Manager
- Assembly
- BIM
- CAM
- Core
- Draft
- Expressions
- FEM
- File formats
- Material
- Measurement
- Mesh
- OpenSCAD
- Part
- PartDesign
- Project Tools & Websites
- Sketcher
- Spreadsheet
- TechDraw
- Other (specify in description)
- type: textarea
id: anything_else
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
If there is a discussion about the problem on the forum, provide link(s) here.
You can upload or copy your macro here to speed up the diagnosis and debugging.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
+1 -1
View File
@@ -58,7 +58,7 @@ jobs:
logdir: /tmp/log/
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+12 -2
View File
@@ -26,14 +26,21 @@
name: FreeCAD master CI
on: [workflow_dispatch, push, pull_request, merge_group]
on:
workflow_dispatch: ~
push:
branches:
- main
- releases/**
pull_request: ~
merge_group: ~
concurrency:
group: FC-CI-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Prepare:
uses: ./.github/workflows/sub_prepare.yml
with:
@@ -47,18 +54,21 @@ jobs:
Ubuntu:
needs: [Prepare]
if: "!startsWith(github.ref, 'refs/heads/backport-')"
uses: ./.github/workflows/sub_buildUbuntu.yml
with:
artifactBasename: Ubuntu-${{ github.run_id }}
Windows:
needs: [Prepare]
if: "!startsWith(github.ref, 'refs/heads/backport-')"
uses: ./.github/workflows/sub_buildWindows.yml
with:
artifactBasename: Windows-${{ github.run_id }}
Lint:
needs: [Prepare]
if: "!startsWith(github.ref, 'refs/heads/backport-')"
uses: ./.github/workflows/sub_lint.yml
with:
artifactBasename: Lint-${{ github.run_id }}
@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+3 -1
View File
@@ -29,12 +29,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ secrets.GH_TOKEN_FOR_CI_RUNNERS }}
- name: Create backport pull requests
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
with:
# Inputs documented here: https://github.com/korthout/backport-action?tab=readme-ov-file#inputs
github_token: ${{ github.token }}
github_token: ${{ secrets.GH_TOKEN_FOR_CI_RUNNERS }}
github_workspace: ${{ github.workspace }}
# permit PRs with merge commits to be backported
+2 -2
View File
@@ -16,7 +16,7 @@ jobs:
build_tag: ${{ steps.get_tag.outputs.build_tag }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -79,7 +79,7 @@ jobs:
environment: weekly-build
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1 -1
View File
@@ -64,7 +64,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1 -1
View File
@@ -68,7 +68,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+2 -2
View File
@@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: 'Checkout Repository'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4
+1 -9
View File
@@ -10,8 +10,6 @@ jobs:
trigger-copr-build:
environment: fedora-daily
env:
copr_login: ${{ secrets.COPR_LOGIN }}
copr_username: ${{ secrets.COPR_USERNAME }}
copr_token: ${{ secrets.COPR_TOKEN }}
runs-on: ubuntu-latest
container: quay.io/packit/packit
@@ -19,13 +17,7 @@ jobs:
- name: setup copr token
run: |
mkdir -p ~/.config
echo \
"[copr-cli]
login = $copr_login
username = $copr_username
token = $copr_token
copr_url = https://copr.fedorainfracloud.org
" > ~/.config/copr
echo "$copr_token" > ~/.config/copr
- name: checkout sources
uses: actions/checkout@v4
with:
@@ -13,7 +13,6 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_FOR_CROWDIN_SYNC }}
- name: Install Qt ≥ 6.8
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
@@ -46,8 +45,8 @@ jobs:
- name: Commit changes
run: |
git config --global user.name "freecad-gh-actions-translation-bot"
git config --global user.email "freecad-gh-actions-translation-bot@github.com"
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add src
git commit -m "Update translations from Crowdin" || echo "No changes to commit"
@@ -57,12 +56,12 @@ jobs:
git push origin update-crowdin-translations --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
with:
branch: update-crowdin-translations
title: "Update translations from Crowdin"
body: "Automatic Crowdin update."
token: ${{ secrets.GH_TOKEN_FOR_CROWDIN_SYNC }}
labels: "translations, automated"
delete-branch: true
add-paths: |
src
+2 -2
View File
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -35,7 +35,7 @@ jobs:
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@55bb0b704982057a101ab7515fb72b2293927c8a # v3.25.4
uses: github/issue-metrics@637a24e71b78bc10881e61972b19ea9ff736e14a # v3.25.2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:FreeCAD/FreeCAD is:issue created:${{ env.last_month }}'
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -13,7 +13,6 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0
ref: releases/FreeCAD-1-1
- name: Install Qt ≥ 6.8
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1 -1
View File
@@ -75,7 +75,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1 -1
View File
@@ -77,7 +77,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1 -1
View File
@@ -66,7 +66,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1 -1
View File
@@ -198,7 +198,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1 -1
View File
@@ -81,7 +81,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+2 -2
View File
@@ -54,7 +54,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -62,7 +62,7 @@ jobs:
run: |
mkdir -p ${{ env.artifactsDownloadDir }}
- name: Download artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
path: ${{ env.artifactsDownloadDir }}
- name: Save input data to file
+2 -2
View File
@@ -51,9 +51,9 @@ endif()
project(FreeCAD)
set(PACKAGE_VERSION_MAJOR "1")
set(PACKAGE_VERSION_MINOR "2")
set(PACKAGE_VERSION_MINOR "1")
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
set(PACKAGE_VERSION_SUFFIX "rc2") # either "dev" for development snapshot or "" (empty string)
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
Binary file not shown.
+3 -2
View File
@@ -5,7 +5,7 @@
\pard\nowidctlpar\hyphpar0\sa140\sl276\slmult1\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\b\fs28 Third-party libraries licenses\b0\fs24\par
\pard\nowidctlpar\hyphpar0\sa140\sl276\slmult1\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\fs18 The different libraries used in FreeCAD and their respective licenses are described on the\line\fs24{\field{\*\fldinst{HYPERLINK "https://www.freecadweb.org/wiki/Third_Party_Libraries" }}{\fldrslt{\cf2\ul\fs18 Third Party Libraries wiki page}}}\cf0\ulnone\f0\fs18 .\fs24\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\fs18 The different libraries used in FreeCAD and their respective licenses are described on the\line\fs24{\field{\*\fldinst{HYPERLINK "https://www.freecad.org/wiki/Third_Party_Libraries" }}{\fldrslt{\cf2\ul\fs18 Third Party Libraries wiki page}}}\cf0\ulnone\f0\fs18 .\fs24\par
\par
\pard\noline\nowidctlpar\hyphpar0\sa283\fs12\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\b\fs18 GNU LIBRARY GENERAL PUBLIC LICENSE\b0\fs24\par
@@ -81,4 +81,5 @@
\pard\nowidctlpar\hyphpar0\sb240\sa180\sl276\slmult1\b\fs24 3D Mouse Support\b0\par
\pard\nowidctlpar\hyphpar0\sb180\sa180\sl276\slmult1\fs18 Development tools and related technology provided under license from 3Dconnexion.(c) 1992 - 2012 3Dconnexion. All rights reserved\fs12\par
}
+1 -5
View File
@@ -34,11 +34,7 @@ These typically need to be modified for each FreeCAD release
#--------------------------------
# get version info from freecadcmd
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"import datetime; print(f'!define COPYRIGHT_YEAR {datetime.date.today().year}')$\">${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_MAJOR \$\"{App.Version()[0]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_MINOR \$\"{App.Version()[1]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_PATCH \$\"{App.Version()[2]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_REVISION \$\"{App.Version()[3].split()[0]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode $\"${__FILEDIR__}\write_version_nsh.py$\"" = 0
!include "${__FILEDIR__}\version.nsh"
!delfile "${__FILEDIR__}\version.nsh"
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# this script is meant to be called by nsis installer scripts, it gets version information
# from freecad and writes version.nsh file in the directory the script is located at
import FreeCAD
import datetime
import os
filepath=os.path.join(os.path.dirname(os.path.abspath(__file__)),"version.nsh")
v=FreeCAD.Version()
content=f'''\
!define COPYRIGHT_YEAR {datetime.date.today().year}
!define APP_VERSION_MAJOR "{v[0]}"
!define APP_VERSION_MINOR "{v[1]}"
!define APP_VERSION_PATCH "{v[2]}"
!define APP_VERSION_REVISION "{v[3].split()[0]}"
'''
with open(filepath, "w", encoding="utf-8") as file:
file.writelines(content)
+2 -2
View File
@@ -16,7 +16,7 @@
Name: freecad
Epoch: 1
Version: 1.1.0~dev
Version: 1.1.0~rc2
Release: 1%{?dist}
Summary: A general purpose 3D CAD modeler
@@ -44,7 +44,7 @@ Source0: freecad-sources.tar.gz
# Utilities
BuildRequires: cmake gcc-c++ gettext doxygen swig graphviz gcc-gfortran desktop-file-utils tbb-devel ninja-build strace
%if %{with tests}
BuildRequires: xorg-x11-server-Xvfb python3-typing-extensions
BuildRequires: xorg-x11-server-Xvfb python3-typing-extensions
%if %{without bundled_gtest}
BuildRequires: gtest-devel gmock-devel
%endif
+1
View File
@@ -37,6 +37,7 @@ cmake \
-D OCC_LIBRARY_DIR:FILEPATH="$PREFIX/lib" \
-D Python_EXECUTABLE:FILEPATH="$PYTHON" \
-D Python3_EXECUTABLE:FILEPATH="$PYTHON" \
-D BUILD_DYNAMIC_LINK_PYTHON:BOOL=OFF \
-B build \
-S .
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -1,14 +1,15 @@
[workspace]
channels = [
"https://prefix.dev/pixi-build-backends",
"https://prefix.dev/conda-forge",
"freecad",
"conda-forge",
]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64", "win-64"]
preview = ["pixi-build"]
[package]
name = "freecad"
version = "1.1.0dev"
version = "1.1.0rc2"
homepage = "https://freecad.org"
repository = "https://github.com/FreeCAD/FreeCAD"
description = "FreeCAD"
+1 -1
View File
@@ -1,5 +1,5 @@
context:
version: "1.1.0dev"
version: "1.1.0rc2"
package:
name: freecad
+7724 -7061
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -3,7 +3,7 @@ name = "FreeCAD"
version = "1.0.0"
description = "pixi instructions for FreeCAD"
authors = ["looooo <sppedflyer@gmail.com>"]
channels = ["conda-forge"]
channels = ["freecad", "conda-forge"]
platforms = [ "linux-64", "linux-aarch64", "osx-64", "osx-arm64", "win-64" ]
requires-pixi = ">=0.48"
@@ -145,7 +145,7 @@ sed = "*"
sed = "*"
[target.win-64.dependencies]
pthreads-win32 = "*"
winpthreads-devel = "*"
[pypi-dependencies]
freecad-stubs = "*"
+3
View File
@@ -630,6 +630,9 @@ fs::path ApplicationDirectories::findHomePath(const char* sCall)
#include <cstdio>
#include <cstdlib>
#include <sys/param.h>
#if defined(__FreeBSD__)
#include <sys/sysctl.h>
#endif
fs::path ApplicationDirectories::findHomePath(const char* sCall)
{
+37 -56
View File
@@ -1,34 +1,38 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.PyObjectBase import PyObjectBase
from typing import List
class ApplicationDirectories(PyObjectBase):
"""
Provides access to the directory versioning methods of its C++ counterpart.
App.ApplicationDirectories class.
These are all static methods, so no instance is needed. The main methods of
For the time being this class only provides access to the directory versioning methods of its
C++ counterpart. These are all static methods, so no instance is needed. The main methods of
this class are migrateAllPaths(), usingCurrentVersionConfig(), and versionStringForPath().
Author: Chris Hennes (chennes@pioneerlibrarysystem.org)
Licence: LGPL-2.1-or-later
DeveloperDocu: ApplicationDirectories
"""
@staticmethod
def usingCurrentVersionConfig(path: str, /) -> bool:
def usingCurrentVersionConfig(path:str) -> bool:
"""
Determine if a given config path is for the current version of the program.
usingCurrentVersionConfig(path)
Args:
path: The path to check.
Determine if a given config path is for the current version of the program
path : the path to check
"""
...
@staticmethod
def migrateAllPaths(paths: list[str], /) -> None:
def migrateAllPaths(paths: List[str]) -> None:
"""
Migrate a set of versionable configuration directories from the given paths to a new version.
migrateAllPaths(paths)
The new version's directories cannot exist yet, and the old ones *must* exist.
Migrate a set of versionable configuration directories from the given paths to a new
version. The new version's directories cannot exist yet, and the old ones *must* exist.
If the old paths are themselves versioned, then the new paths will be placed at the same
level in the directory structure (e.g., they will be siblings of each entry in paths).
If paths are NOT versioned, the new (versioned) copies will be placed *inside* the
@@ -37,9 +41,6 @@ class ApplicationDirectories(PyObjectBase):
If the list contains the same path multiple times, the duplicates are ignored, so it is safe
to pass the same path multiple times.
Args:
paths: List of paths to migrate from.
Examples:
Running FreeCAD 1.1, /usr/share/FreeCAD/Config/ -> /usr/share/FreeCAD/Config/v1-1/
Running FreeCAD 1.1, /usr/share/FreeCAD/Config/v1-1 -> raises exception, path exists
@@ -48,80 +49,60 @@ class ApplicationDirectories(PyObjectBase):
...
@staticmethod
def versionStringForPath(major: int, minor: int, /) -> str:
def versionStringForPath(major:int, minor:int) -> str:
"""
Given a major and minor version number, return the name for a versioned subdirectory.
versionStringForPath(major, minor) -> str
Args:
major: Major version number.
minor: Minor version number.
Returns:
A string that can be used as the name for a versioned subdirectory.
Only returns the version string, not the full path.
Given a major and minor version number, return a string that can be used as the name for a
versioned subdirectory. Only returns the version string, not the full path.
"""
...
@staticmethod
def isVersionedPath(startingPath: str, /) -> bool:
def isVersionedPath(startingPath:str) -> bool:
"""
Determine if a given path is versioned.
isVersionedPath(startingPath) -> bool
That is, if its last component contains something that this class would have
created as a versioned subdirectory).
Args:
startingPath: The path to check.
Returns:
True for any path that the *current* version of FreeCAD would recognize as versioned,
and False for either something that is not versioned, or something that is versioned
but for a later version of FreeCAD.
Determine if a given path is versioned (that is, if its last component contains
something that this class would have created as a versioned subdirectory). Returns true
for any path that the *current* version of FreeCAD would recognized as versioned, and false
for either something that is not versioned, or something that is versioned but for a later
version of FreeCAD.
"""
...
@staticmethod
def mostRecentAvailableConfigVersion(startingPath: str, /) -> str:
def mostRecentAvailableConfigVersion(startingPath:str) -> str:
"""
mostRecentAvailableConfigVersion(startingPath) -> str
Given a base path that is expected to contain versioned subdirectories, locate the
directory name (*not* the path, only the final component, the version string itself)
corresponding to the most recent version of the software, up to and including the current
running version, but NOT exceeding it -- any *later* version whose directories exist
in the path is ignored. See also mostRecentConfigFromBase().
Args:
startingPath: The path to check.
Returns:
Most recent available dir name (not path).
"""
...
@staticmethod
def mostRecentConfigFromBase(startingPath: str, /) -> str:
def mostRecentConfigFromBase(startingPath: str) -> str:
"""
mostRecentConfigFromBase(startingPath) -> str
Given a base path that is expected to contained versioned subdirectories, locate the
directory corresponding to the most recent version of the software, up to and including
the current version, but NOT exceeding it. Returns the complete path, not just the final
component. See also mostRecentAvailableConfigVersion().
Args:
startingPath: The base path to check.
Returns:
Most recent available full path (not just dir name).
"""
...
@staticmethod
def migrateConfig(oldPath: str, newPath: str, /) -> None:
def migrateConfig(oldPath: str, newPath: str) -> None:
"""
migrateConfig(oldPath, newPath) -> None
A utility method to copy all files and directories from oldPath to newPath, handling the
case where newPath might itself be a subdirectory of oldPath (and *not* attempting that
otherwise-recursive copy).
Args:
oldPath: Path from.
newPath: Path to.
"""
...
+2 -2
View File
@@ -199,12 +199,12 @@ const std::string& ComplexGeoData::elementMapPrefix()
std::string ComplexGeoData::getElementMapVersion() const
{
return "4";
return "5";
}
bool ComplexGeoData::checkElementMapVersion(const char* ver) const
{
return !boost::equals(ver, "3") && !boost::equals(ver, "4") && !boost::starts_with(ver, "3.");
return !boost::ends_with(ver, "5");
}
size_t ComplexGeoData::getElementMapSize(bool flush) const
+1 -1
View File
@@ -279,7 +279,7 @@ public:
return _elementMap->setElementName(element, name, masterTag, sid, overwrite);
}
bool hasElementMap()
bool hasElementMap() const
{
return _elementMap != nullptr;
}
+38 -47
View File
@@ -1,16 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Persistence import Persistence
from Base.BoundBox import BoundBox
from Base.BoundBox import BoundBox as BoundBoxPy
from Base.Vector import Vector
from Base.Placement import Placement
from Base.Placement import Placement as PlacementPy
from Base.Rotation import Rotation
from Base.Matrix import Matrix
from StringHasher import StringHasher
from typing import Any, Final
from typing import Any, Final, List, Dict
@export(
@@ -19,94 +15,89 @@ from typing import Any, Final
)
class ComplexGeoData(Persistence):
"""
Father of all complex geometric data types.
Data.ComplexGeoData class.
Author: Juergen Riegel (Juergen.Riegel@web.de)
Licence: LGPL
UserDocu: Father of all complex geometric data types
"""
@constmethod
def getElementTypes(self) -> list[str]:
def getElementTypes(self) -> List[str]:
"""
Return a list of element types present in the complex geometric data.
Return a list of element types present in the complex geometric data
"""
...
@constmethod
def countSubElements(self) -> int:
"""
Return the number of elements of a type.
Return the number of elements of a type
"""
...
@constmethod
def getFacesFromSubElement(self, ) -> tuple[list[Vector], list[tuple[int, int, int]]]:
def getFacesFromSubElement(self) -> Any:
"""
Return vertexes and faces from a sub-element.
Return vertexes and faces from a sub-element
"""
...
@constmethod
def getLinesFromSubElement(self, ) -> tuple[list[Vector], list[tuple[int, int]]]:
def getLinesFromSubElement(self) -> Any:
"""
Return vertexes and lines from a sub-element.
Return vertexes and lines from a sub-element
"""
...
@constmethod
def getPoints(self) -> tuple[list[Vector], list[Vector]]:
def getPoints(self) -> Any:
"""
Return a tuple of points and normals with a given accuracy
"""
...
@constmethod
def getLines(self) -> tuple[list[Vector], list[tuple[int, int]]]:
def getLines(self) -> Any:
"""
Return a tuple of points and lines with a given accuracy
"""
...
@constmethod
def getFaces(self) -> tuple[list[Vector], list[tuple[int, int, int]]]:
def getFaces(self) -> Any:
"""
Return a tuple of points and triangles with a given accuracy
"""
...
def applyTranslation(self, translation: Vector, /) -> None:
def applyTranslation(self, translation: Vector) -> None:
"""
Apply an additional translation to the placement
"""
...
def applyRotation(self, rotation: Rotation, /) -> None:
def applyRotation(self, rotation: Rotation) -> None:
"""
Apply an additional rotation to the placement
"""
...
def transformGeometry(self, transformation: Matrix, /) -> None:
def transformGeometry(self, transformation: Matrix) -> None:
"""
Apply a transformation to the underlying geometry
"""
...
def setElementName(
self,
*,
element: str,
name: str = None,
postfix: str = None,
overwrite: bool = False,
sid: Any = None,
) -> None:
def setElementName(self, *, element: str, name: str = None, postfix: str = None, overwrite: bool = False, sid: Any = None) -> None:
"""
Set an element name.
setElementName(element,name=None,postfix=None,overwrite=False,sid=None), Set an element name
Args:
element : the original element name, e.g. Edge1, Vertex2
name : the new name for the element, None to remove the mapping
postfix : postfix of the name that will not be hashed
overwrite: if true, it will overwrite exiting name
sid : to hash the name any way you want, provide your own string id(s) in this parameter
element : the original element name, e.g. Edge1, Vertex2
name : the new name for the element, None to remove the mapping
postfix : postfix of the name that will not be hashed
overwrite: if true, it will overwrite exiting name
sid : to hash the name any way you want, provide your own string id(s) in this parameter
An element can have multiple mapped names. However, a name can only be mapped
to one element
@@ -114,33 +105,33 @@ class ComplexGeoData(Persistence):
...
@constmethod
def getElementName(self, name: str, direction: int = 0, /) -> str:
def getElementName(self, name: str, direction: int = 0) -> Any:
"""
Return a mapped element name or reverse.
getElementName(name,direction=0) - Return a mapped element name or reverse
"""
...
@constmethod
def getElementIndexedName(self, name: str, /) -> str | tuple[str, list[int]]:
def getElementIndexedName(self, name: str) -> Any:
"""
Return the indexed element name.
getElementIndexedName(name) - Return the indexed element name
"""
...
@constmethod
def getElementMappedName(self, name: str, /) -> str | tuple[str, list[int]]:
def getElementMappedName(self, name: str) -> Any:
"""
Return the mapped element name
getElementMappedName(name) - Return the mapped element name
"""
...
BoundBox: Final[BoundBox] = ...
BoundBox: Final[BoundBoxPy] = ...
"""Get the bounding box (BoundBox) of the complex geometric data."""
CenterOfGravity: Final[Vector] = ...
"""Get the center of gravity"""
Placement: Placement = ...
Placement: PlacementPy = ...
"""Get the current transformation of the object as placement"""
Tag: int = 0
@@ -152,10 +143,10 @@ class ComplexGeoData(Persistence):
ElementMapSize: Final[int] = 0
"""Get the current element map size"""
ElementMap: dict[str, str] = {}
ElementMap: Dict[Any, Any] = {}
"""Get/Set a dict of element mapping"""
ElementReverseMap: Final[dict[str, str | list[str]]] = {}
ElementReverseMap: Final[Dict[Any, Any]] = {}
"""Get a dict of element reverse mapping"""
ElementMapVersion: Final[str] = ""
+82 -123
View File
@@ -1,15 +1,13 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from PropertyContainer import PropertyContainer
from DocumentObject import DocumentObject
from typing import Final, Sequence
from typing import Final, List, Tuple, Sequence
class Document(PropertyContainer):
"""
This is the Document class.
This is a Document class
Author: Juergen Riegel (FreeCAD@juergen-riegel.net)
Licence: LGPL
"""
DependencyGraph: Final[str] = ""
@@ -18,16 +16,16 @@ class Document(PropertyContainer):
ActiveObject: Final[DocumentObject] = None
"""The last created object in this document"""
Objects: Final[list[DocumentObject]] = []
Objects: Final[List[DocumentObject]] = []
"""The list of objects in this document"""
TopologicalSortedObjects: Final[list[DocumentObject]] = []
TopologicalSortedObjects: Final[List[DocumentObject]] = []
"""The list of objects in this document in topological sorted order"""
RootObjects: Final[list[DocumentObject]] = []
RootObjects: Final[List[DocumentObject]] = []
"""The list of root objects in this document"""
RootObjectsIgnoreLinks: Final[list[DocumentObject]] = []
RootObjectsIgnoreLinks: Final[List[DocumentObject]] = []
"""The list of root objects in this document ignoring references from links."""
UndoMode: int = 0
@@ -42,10 +40,10 @@ class Document(PropertyContainer):
RedoCount: Final[int] = 0
"""Number of possible Redos"""
UndoNames: Final[list[str]] = []
UndoNames: Final[List[str]] = []
"""A list of Undo names"""
RedoNames: Final[list[str]] = []
RedoNames: Final[List[str]] = []
"""A List of Redo names"""
Name: Final[str] = ""
@@ -57,10 +55,10 @@ class Document(PropertyContainer):
HasPendingTransaction: Final[bool] = False
"""Check if there is a pending transaction"""
InList: Final[list[Document]] = []
InList: Final[List["Document"]] = []
"""A list of all documents that link to this document."""
OutList: Final[list[Document]] = []
OutList: Final[List["Document"]] = []
"""A list of all documents that this document links to."""
Restoring: Final[bool] = False
@@ -86,25 +84,25 @@ class Document(PropertyContainer):
def save(self) -> None:
"""
Save the document to disk.
Save the document to disk
"""
...
def saveAs(self, path: str, /) -> None:
def saveAs(self) -> None:
"""
Save the document under a new name to disk.
Save the document under a new name to disk
"""
...
def saveCopy(self, path: str, /) -> None:
def saveCopy(self) -> None:
"""
Save a copy of the document under a new name to disk.
Save a copy of the document under a new name to disk
"""
...
def load(self, path: str, /) -> None:
def load(self) -> None:
"""
Load the document from the given path.
Load the document from the given path
"""
...
@@ -133,40 +131,37 @@ class Document(PropertyContainer):
"""
...
def getUniqueObjectName(self, objName: str, /) -> str:
def getUniqueObjectName(self, objName: str) -> str:
"""
getUniqueObjectName(objName) -> objName
Return the same name, or the name made unique, for Example Box -> Box002 if there are conflicting name
already in the document.
Args:
objName: Object name candidate.
Returns:
Unique object name based on objName.
ObjName : str
Object name.
"""
...
def mergeProject(self, path: str, /) -> None:
def mergeProject(self) -> None:
"""
Merges this document with another project file.
Merges this document with another project file
"""
...
def exportGraphviz(self, path: str = None, /) -> str | None:
def exportGraphviz(self) -> None:
"""
Export the dependencies of the objects as graph.
If path is passed, graph is written to it. if not a string is returned.
Export the dependencies of the objects as graph
"""
...
def openTransaction(self, name: str, /) -> None:
def openTransaction(self, name: str) -> None:
"""
Open a new Undo/Redo transaction.
openTransaction(name) - Open a new Undo/Redo transaction.
This function no long creates a new transaction, but calls
FreeCAD.setActiveTransaction(name) instead, which will auto creates a
transaction with the given name when any change happened in any opened document.
transaction with the given name when any change happed in any opened document.
If more than one document is changed, all newly created transactions will have
the same internal ID and will be undo/redo together.
"""
@@ -186,6 +181,7 @@ class Document(PropertyContainer):
def addObject(
self,
*,
type: str,
name: str = None,
objProxy: object = None,
@@ -194,22 +190,24 @@ class Document(PropertyContainer):
viewType: str = None,
) -> DocumentObject:
"""
Add an object to document.
addObject(type, name=None, objProxy=None, viewProxy=None, attach=False, viewType=None)
Args:
type: the type of the document object to create.
name: the optional name of the new object.
objProxy: the Python binding object to attach to the new document object.
viewProxy: the Python binding object to attach the view provider of this object.
attach: if True, then bind the document object first before adding to the document
to allow Python code to override view provider type. Once bound, and before adding to
the document, it will try to call Python binding object's attach(obj) method.
viewType: override the view provider type directly, only effective when attach is False.
Add an object to document
type (String): the type of the document object to create.
name (String): the optional name of the new object.
objProxy (Object): the Python binding object to attach to the new document object.
viewProxy (Object): the Python binding object to attach the view provider of this object.
attach (Boolean): if True, then bind the document object first before adding to the document
to allow Python code to override view provider type. Once bound, and before adding to
the document, it will try to call Python binding object's attach(obj) method.
viewType (String): override the view provider type directly, only effective when attach is False.
"""
...
def addProperty(
self,
*,
type: str,
name: str,
group: str = "",
@@ -218,37 +216,22 @@ class Document(PropertyContainer):
read_only: bool = False,
hidden: bool = False,
locked: bool = False,
enum_vals: list[str] | None = None,
) -> Document:
) -> "Document":
"""
Add a generic property.
Args:
type: The type of the property to add.
name: The name of the property.
group: The group to which the property belongs. Defaults to "".
doc: The documentation string for the property. Defaults to "".
attr: Attribute flags for the property. Defaults to 0.
read_only: Whether the property is read-only. Defaults to False.
hidden: Whether the property is hidden. Defaults to False.
locked: Whether the property is locked. Defaults to False.
Returns:
The document instance with the added property.
addProperty(type: string, name: string, group="", doc="", attr=0, read_only=False, hidden=False, locked=False) -- Add a generic property.
"""
...
def removeProperty(self, name: str, /) -> None:
def removeProperty(self, string: str) -> None:
"""
Remove a generic property.
removeProperty(string) -- Remove a generic property.
Note, you can only remove user-defined properties but not built-in ones.
"""
...
def removeObject(self, name: str, /) -> None:
def removeObject(self) -> None:
"""
Remove an object from the document.
Remove an object from the document
"""
...
@@ -258,39 +241,34 @@ class Document(PropertyContainer):
*,
recursive: bool = False,
return_all: bool = False,
) -> tuple[DocumentObject, ...]:
) -> Tuple[DocumentObject, ...]:
"""
copyObject(object, recursive=False, return_all=False)
Copy an object or objects from another document to this document.
Args:
object: can either be a single object or sequence of objects
recursive: if True, also recursively copies internal objects
return_all: if True, returns all copied objects, or else return only the copied
object corresponding to the input objects.
object: can either be a single object or sequence of objects
recursive: if True, also recursively copies internal objects
return_all: if True, returns all copied objects, or else return only the copied
object corresponding to the input objects.
"""
...
def moveObject(
self,
object: DocumentObject,
with_dependencies: bool = False,
/,
self, object: DocumentObject, with_dependencies: bool = False
) -> DocumentObject:
"""
moveObject(object, bool with_dependencies = False)
Transfers an object from another document to this document.
Args:
object: can either a single object or sequence of objects
with_dependencies: if True, all internal dependent objects are copied too.
object: can either a single object or sequence of objects
with_dependencies: if True, all internal dependent objects are copied too.
"""
...
def importLinks(
self,
object: DocumentObject = None,
/,
) -> tuple[DocumentObject, ...]:
def importLinks(self, object: DocumentObject = None) -> Tuple[DocumentObject, ...]:
"""
importLinks(object|[object...])
Import any externally linked object given a list of objects in
this document. Any link type properties of the input objects
will be automatically reassigned to the imported object
@@ -324,7 +302,7 @@ class Document(PropertyContainer):
"""
...
def setClosable(self, closable: bool, /) -> None:
def setClosable(self, closable: bool) -> None:
"""
Set a flag that allows or forbids to close a document
"""
@@ -336,7 +314,7 @@ class Document(PropertyContainer):
"""
...
def setAutoCreated(self, autoCreated: bool, /) -> None:
def setAutoCreated(self, autoCreated: bool) -> None:
"""
Set a flag that indicates if a document is autoCreated
"""
@@ -348,15 +326,9 @@ class Document(PropertyContainer):
"""
...
def recompute(
self,
objs: Sequence[DocumentObject] = None,
force: bool = False,
check_cycle: bool = False,
/,
) -> int:
def recompute(self, objs: Sequence[DocumentObject] = None) -> int:
"""
Recompute the document and returns the amount of recomputed features.
recompute(objs=None): Recompute the document and returns the amount of recomputed features
"""
...
@@ -378,55 +350,41 @@ class Document(PropertyContainer):
"""
...
def getObject(self, name: str, /) -> DocumentObject:
def getObject(self, name: str) -> DocumentObject:
"""
Return the object with the given name
"""
...
def getObjectsByLabel(self, label: str, /) -> list[DocumentObject]:
def getObjectsByLabel(self, label: str) -> List[DocumentObject]:
"""
Return the objects with the given label name.
NOTE: It's possible that several objects have the same label name.
"""
...
def findObjects(
self,
Type: str = None,
Name: str = None,
Label: str = None,
) -> list[DocumentObject]:
self, *, Type: str = None, Name: str = None, Label: str = None
) -> List[DocumentObject]:
"""
findObjects([Type=string], [Name=string], [Label=string]) -> list
Return a list of objects that match the specified type, name or label.
Name and label support regular expressions. All parameters are optional.
Args:
Type: Type of the feature.
Name: Name
Label: Label
"""
...
def getLinksTo(
self,
obj: DocumentObject,
options: int = 0,
maxCount: int = 0,
/,
) -> tuple[DocumentObject, ...]:
self, obj: DocumentObject, options: int = 0, maxCount: int = 0
) -> Tuple[DocumentObject, ...]:
"""
Return objects linked to 'obj'
getLinksTo(obj, options=0, maxCount=0): return objects linked to 'obj'
Args:
options: 1: recursive, 2: check link array. Options can combine.
maxCount: to limit the number of links returned.
options: 1: recursive, 2: check link array. Options can combine.
maxCount: to limit the number of links returned
"""
...
def supportedTypes(self) -> list[str]:
def supportedTypes(self) -> List[str]:
"""
A list of supported types of objects
"""
@@ -438,11 +396,12 @@ class Document(PropertyContainer):
"""
...
def getDependentDocuments(self, sort: bool = True, /) -> list[DocumentObject]:
def getDependentDocuments(self, sort: bool = True) -> List[DocumentObject]:
"""
getDependentDocuments(sort=True)
Returns a list of documents that this document directly or indirectly links to including itself.
Args:
sort: whether to topologically sort the return list
sort: whether to topologically sort the return list
"""
...
+52
View File
@@ -30,6 +30,7 @@
#include <Base/Console.h>
#include <Base/Matrix.h>
#include <Base/Placement.h>
#include <Base/Tools.h>
#include <Base/Writer.h>
@@ -1615,3 +1616,54 @@ void DocumentObject::onPropertyStatusChanged(const Property& prop, unsigned long
getDocument()->signalChangePropertyEditor(*getDocument(), prop);
}
}
Base::Placement DocumentObject::getPlacementOf(const std::string& sub, DocumentObject* targetObj)
{
Base::Placement plc;
auto* propPlacement = freecad_cast<App::PropertyPlacement*>(getPropertyByName("Placement"));
if (propPlacement) {
// If the object has no placement (like a Group), plc stays identity so we can proceed.
plc = propPlacement->getValue();
}
std::vector<std::string> names = Base::Tools::splitSubName(sub);
if (names.empty() || this == targetObj) {
return plc;
}
DocumentObject* subObj = getDocument()->getObject(names.front().c_str());
if (!subObj) {
return plc;
}
std::vector<std::string> newNames(names.begin() + 1, names.end());
std::string newSub = Base::Tools::joinList(newNames, ".");
return plc * subObj->getPlacementOf(newSub, targetObj);
}
Base::Placement DocumentObject::getPlacement() const
{
Base::Placement plc;
if (auto* prop = getPlacementProperty()) {
plc = prop->getValue();
}
return plc;
}
App::PropertyPlacement* DocumentObject::getPlacementProperty() const
{
if (auto linkExtension = getExtensionByType<App::LinkBaseExtension>(true)) {
if (auto linkPlacementProp = linkExtension->getLinkPlacementProperty()) {
return linkPlacementProp;
}
return linkExtension->getPlacementProperty();
}
return getPropertyByName<App::PropertyPlacement>("Placement");
}
+13
View File
@@ -27,9 +27,11 @@
#include <App/TransactionalObject.h>
#include <App/PropertyExpressionEngine.h>
#include <App/PropertyGeo.h>
#include <App/PropertyLinks.h>
#include <App/PropertyStandard.h>
#include <Base/SmartPtrPy.h>
#include <Base/Placement.h>
#include <bitset>
#include <unordered_map>
@@ -708,6 +710,17 @@ public:
/// Check if the subname reference ends with hidden marker.
static const char* hasHiddenMarker(const char* subname);
/* Find the placement of a target object as seen from this.
If no targetObj given, the last object found in the subname is used as target.
*/
virtual Base::Placement getPlacementOf(const std::string& sub, DocumentObject* targetObj = nullptr);
/* Returns the Placement property value if any.*/
virtual Base::Placement getPlacement() const;
/* Returns the Placement property to use if any*/
virtual App::PropertyPlacement* getPlacementProperty() const;
protected:
/// recompute only this object
virtual App::DocumentObjectExecReturn* recompute();
+40 -29
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import constmethod
from Base.Matrix import Matrix
from Document import Document
@@ -67,6 +63,7 @@ class DocumentObject(ExtensionContainer):
def addProperty(
self,
*,
type: str,
name: str,
group: str = "",
@@ -75,16 +72,16 @@ class DocumentObject(ExtensionContainer):
read_only: bool = False,
hidden: bool = False,
locked: bool = False,
enum_vals: list = [],
enum_vals: list = []
) -> "DocumentObject":
"""
Add a generic property.
addProperty(type: string, name: string, group="", doc="", attr=0, read_only=False, hidden=False, locked = False, enum_vals=[]) -- Add a generic property.
"""
...
def removeProperty(self, string: str, /) -> None:
def removeProperty(self, string: str) -> None:
"""
Remove a generic property.
removeProperty(string) -- Remove a generic property.
Note, you can only remove user-defined properties but not built-in ones.
"""
@@ -114,28 +111,28 @@ class DocumentObject(ExtensionContainer):
"""
...
def setExpression(self, name: str, expression: str, /) -> None:
def setExpression(self, name: str, expression: str) -> None:
"""
Register an expression for a property
"""
...
def clearExpression(self, name: str, /) -> None:
def clearExpression(self, name: str) -> None:
"""
Clear the expression for a property
"""
...
@classmethod
def evalExpression(cls, expression: str, /) -> Any:
def evalExpression(cls, expression: str) -> Any:
"""
Evaluate an expression
"""
...
def recompute(self, recursive: bool = False, /) -> None:
def recompute(self, recursive: bool = False) -> None:
"""
Recomputes this object
recompute(recursive=False): Recomputes this object
"""
...
@@ -158,14 +155,16 @@ class DocumentObject(ExtensionContainer):
def getSubObject(
self,
subname: Union[str, List[str], Tuple[str, ...]],
*,
subname: Union[str, List[str], Tuple[str, ...]],
retType: int = 0,
matrix: Matrix = None,
transform: bool = True,
depth: int = 0,
) -> Any:
"""
getSubObject(subname, retType=0, matrix=None, transform=True, depth=0)
* subname(string|list|tuple): dot separated string or sequence of strings
referencing subobject.
@@ -192,15 +191,17 @@ class DocumentObject(ExtensionContainer):
"""
...
def getSubObjectList(self, subname: str, /) -> list:
def getSubObjectList(self, subname: str) -> list:
"""
getSubObjectList(subname)
Return a list of objects referenced by a given subname including this object
"""
...
def getSubObjects(self, reason: int = 0, /) -> list:
def getSubObjects(self, reason: int = 0) -> list:
"""
Return subname reference of all sub-objects
getSubObjects(reason=0): Return subname reference of all sub-objects
"""
...
@@ -213,6 +214,7 @@ class DocumentObject(ExtensionContainer):
depth: int = 0,
) -> Any:
"""
getLinkedObject(recursive=True, matrix=None, transform=True, depth=0)
Returns the linked object if there is one, or else return itself
* recursive: whether to recursively resolve the links
@@ -227,16 +229,16 @@ class DocumentObject(ExtensionContainer):
"""
...
def setElementVisible(self, element: str, visible: bool, /) -> int:
def setElementVisible(self, element: str, visible: bool) -> int:
"""
Set the visibility of a child element
setElementVisible(element,visible): Set the visibility of a child element
Return -1 if element visibility is not supported, 0 if element not found, 1 if success
"""
...
def isElementVisible(self, element: str, /) -> int:
def isElementVisible(self, element: str) -> int:
"""
Check if a child element is visible
isElementVisible(element): Check if a child element is visible
Return -1 if element visibility is not supported or element not found, 0 if invisible, or else 1
"""
...
@@ -281,9 +283,9 @@ class DocumentObject(ExtensionContainer):
...
@constmethod
def resolve(self, subname: str, /) -> tuple:
def resolve(self, subname: str) -> tuple:
"""
resolve the sub object
resolve(subname) -- resolve the sub object
Returns a tuple (subobj,parent,elementName,subElement), where 'subobj' is the
last object referenced in 'subname', and 'parent' is the direct parent of
@@ -294,9 +296,9 @@ class DocumentObject(ExtensionContainer):
...
@constmethod
def resolveSubElement(self, subname: str, append: bool, type: int, /) -> tuple:
def resolveSubElement(self, subname: str, append: bool, type: int) -> tuple:
"""
resolve both new and old style sub element
resolveSubElement(subname,append,type) -- resolve both new and old style sub element
subname: subname reference containing object hierarchy
append: Whether to append object hierarchy prefix inside subname to returned element name
@@ -306,22 +308,31 @@ class DocumentObject(ExtensionContainer):
"""
...
def adjustRelativeLinks(self, parent: DocumentObject, recursive: bool = True, /) -> bool:
def adjustRelativeLinks(self, parent: DocumentObject, recursive: bool = True) -> bool:
"""
auto correct potential cyclic dependencies
adjustRelativeLinks(parent,recursive=True) -- auto correct potential cyclic dependencies
"""
...
@constmethod
def getElementMapVersion(self, property_name: str, /) -> str:
def getElementMapVersion(self, property_name: str) -> str:
"""
return element map version of a given geometry property
getElementMapVersion(property_name): return element map version of a given geometry property
"""
...
@constmethod
def isAttachedToDocument(self) -> bool:
"""
isAttachedToDocument() -> bool
Return true if the object is part of a document, false otherwise.
"""
...
def getPlacementOf(self, subname: str, target: DocumentObject = None, /) -> Any:
"""
Return the placement of the sub-object relative to the link object.
getPlacementOf(subname, [targetObj]) -> Base.Placement
"""
...
-5
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Extension import Extension
@@ -11,5 +7,4 @@ class DocumentObjectExtension(Extension):
Author: Stefan Troeger (stefantroeger@gmx.net)
Licence: LGPL
"""
...
-5
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from DocumentObject import DocumentObject
@@ -11,5 +7,4 @@ class DocumentObjectGroup(DocumentObject):
Author: Werner Mayer (wmayer@users.sourceforge.net)
Licence: LGPL
"""
...
+30
View File
@@ -23,6 +23,7 @@
#include <Base/GeometryPyCXX.h>
#include <Base/MatrixPy.h>
#include <Base/PlacementPy.h>
#include <Base/PyWrapParseTupleAndKeywords.h>
#include "DocumentObject.h"
@@ -1003,3 +1004,32 @@ void DocumentObjectPy::setNoTouch(Py::Boolean value)
{
getDocumentObjectPtr()->setStatus(ObjectStatus::NoTouch, value.isTrue());
}
PyObject* DocumentObjectPy::getPlacementOf(PyObject* args)
{
char* subname;
PyObject* target = Py_None; // Initialize to None
if (!PyArg_ParseTuple(args, "s|O", &subname, &target)) {
return nullptr;
}
App::DocumentObject* targetObj = nullptr;
// Check if a target was provided and is not None
if (target && target != Py_None) {
// Now perform the type check manually
if (!PyObject_TypeCheck(target, &DocumentObjectPy::Type)) {
PyErr_SetString(PyExc_TypeError, "Target argument must be a DocumentObject or None");
return nullptr;
}
targetObj = static_cast<DocumentObjectPy*>(target)->getDocumentObjectPtr();
}
PY_TRY
{
Base::Placement p = getDocumentObjectPtr()->getPlacementOf(subname, targetObj);
return new Base::PlacementPy(new Base::Placement(p));
}
PY_CATCH
}
+5 -1
View File
@@ -1192,7 +1192,11 @@ void ElementMap::addChildElements(long masterTag, const std::vector<MappedChildE
// do child mapping only if the child element count >= 5
const int threshold {5};
if ((child.count >= threshold && child.tag != 0) || !child.elementMap) {
// skip encoding only when masterTag=0, child.tag=0, and count is exactly at threshold
bool skipEncoding = (masterTag == 0 && child.tag == 0 && child.count == threshold && child.elementMap);
if ((child.count >= threshold && !skipEncoding) || !child.elementMap) {
encodeElementName(child.indexedName[0],
tmp,
ss,
-4
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from typing import Final, Any
from Base.PyObjectBase import PyObjectBase
+2 -6
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from PropertyContainer import PropertyContainer
@@ -17,14 +13,14 @@ class ExtensionContainer(PropertyContainer):
Licence: LGPL
"""
def addExtension(self, identifier: str, /) -> None:
def addExtension(self, identifier: str) -> None:
"""
Adds an extension to the object. Requires the string identifier for the python extension as argument
"""
...
@constmethod
def hasExtension(self, identifier: str, /) -> bool:
def hasExtension(self, identifier: str) -> bool:
"""
Returns if this object has the specified extension
"""
+98
View File
@@ -25,6 +25,7 @@
#include <App/DocumentObjectPy.h>
#include <Base/Interpreter.h>
#include <Base/MatrixPy.h>
#include <Base/PlacementPy.h>
#include <Base/Tools.h>
#include "FeaturePython.h"
@@ -632,6 +633,103 @@ bool FeaturePythonImp::editProperty(const char* name)
return false;
}
FeaturePythonImp::ValueT FeaturePythonImp::isLink() const
{
_FC_PY_CALL_CHECK(isLink, return (NotImplemented));
Base::PyGILStateLocker lock;
try {
Py::Tuple args(1);
args.setItem(0, Py::Object(object->getPyObject(), true));
Py::Boolean ok(Base::pyCall(py_isLink.ptr(), args.ptr()));
return ok ? Accepted : Rejected;
}
catch (Py::Exception&) {
if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) {
PyErr_Clear();
return NotImplemented;
}
Base::PyException e; // extract the Python error text
e.reportException();
return Rejected;
}
}
FeaturePythonImp::ValueT FeaturePythonImp::isLinkGroup() const
{
_FC_PY_CALL_CHECK(isLinkGroup, return (NotImplemented));
Base::PyGILStateLocker lock;
try {
Py::Tuple args(1);
args.setItem(0, Py::Object(object->getPyObject(), true));
Py::Boolean ok(Base::pyCall(py_isLinkGroup.ptr(), args.ptr()));
return ok ? Accepted : Rejected;
}
catch (Py::Exception&) {
if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) {
PyErr_Clear();
return NotImplemented;
}
Base::PyException e; // extract the Python error text
e.reportException();
return Rejected;
}
}
bool FeaturePythonImp::getPlacementOf(
Base::Placement& ret,
const char* subname,
App::DocumentObject* target
) const
{
FC_PY_CALL_CHECK(getPlacementOf); // Standard macro check
Base::PyGILStateLocker lock;
try {
Py::Tuple args(3);
// Arg 0: The object itself
args.setItem(0, Py::Object(object->getPyObject(), true));
// Arg 1: The subname string
args.setItem(1, Py::String(subname ? subname : ""));
// Arg 2: The target object (or None)
if (target) {
args.setItem(2, Py::Object(target->getPyObject(), true));
}
else {
args.setItem(2, Py::None());
}
// Call the Python method
Py::Object res(Base::pyCall(py_getPlacementOf.ptr(), args.ptr()));
// Check if Python returned None (implies "use base implementation")
if (res.isNone()) {
return false;
}
// Check return type
if (!PyObject_TypeCheck(res.ptr(), &Base::PlacementPy::Type)) {
throw Py::TypeError("getPlacementOf expects a Base.Placement object return");
}
// Convert Python object back to C++ Placement
ret = *static_cast<Base::PlacementPy*>(res.ptr())->getPlacementPtr();
return true;
}
catch (Py::Exception&) {
if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) {
PyErr_Clear();
return false;
}
Base::PyException e;
e.reportException();
return false;
}
}
// ---------------------------------------------------------
namespace App
+44 -1
View File
@@ -91,6 +91,11 @@ public:
bool editProperty(const char* propName);
ValueT isLink() const;
ValueT isLinkGroup() const;
bool getPlacementOf(Base::Placement& ret, const char* subname, App::DocumentObject* target) const;
private:
App::DocumentObject* object;
bool has__object__ {false};
@@ -114,7 +119,10 @@ private:
FC_PY_ELEMENT(hasChildElement) \
FC_PY_ELEMENT(isElementVisible) \
FC_PY_ELEMENT(setElementVisible) \
FC_PY_ELEMENT(editProperty)
FC_PY_ELEMENT(editProperty) \
FC_PY_ELEMENT(isLink) \
FC_PY_ELEMENT(isLinkGroup) \
FC_PY_ELEMENT(getPlacementOf)
#define FC_PY_ELEMENT_DEFINE(_name) Py::Object py_##_name;
@@ -349,6 +357,41 @@ public:
}
}
bool isLink() const override
{
switch (imp->isLink()) {
case FeaturePythonImp::Accepted:
return true;
case FeaturePythonImp::Rejected:
return false;
default:
return FeatureT::isLink();
}
}
bool isLinkGroup() const override
{
switch (imp->isLinkGroup()) {
case FeaturePythonImp::Accepted:
return true;
case FeaturePythonImp::Rejected:
return false;
default:
return FeatureT::isLinkGroup();
}
}
Base::Placement getPlacementOf(const std::string& sub, DocumentObject* targetObj = nullptr) override
{
Base::Placement ret;
// Try to call the python implementation first
if (imp->getPlacementOf(ret, sub.c_str(), targetObj)) {
return ret;
}
// Fallback to C++ implementation
return FeatureT::getPlacementOf(sub, targetObj);
}
PyObject* getPyObject() override
{
if (FeatureT::PythonObject.is(Py::_None())) {
+2 -33
View File
@@ -316,42 +316,11 @@ Base::Placement GeoFeature::getGlobalPlacement(App::DocumentObject* targetObj,
App::DocumentObject* rootObj,
const std::string& sub)
{
if (!targetObj || !rootObj) {
if (!rootObj) {
return Base::Placement();
}
std::vector<std::string> names = Base::Tools::splitSubName(sub);
App::Document* doc = rootObj->getDocument();
Base::Placement plc = getPlacementFromProp(rootObj, "Placement");
if (targetObj == rootObj) {
return plc;
}
if (rootObj->isLink()) {
// Update doc in case its an external link.
doc = rootObj->getLinkedObject()->getDocument();
}
for (auto& name : names) {
App::DocumentObject* obj = doc->getObject(name.c_str());
if (!obj) {
return Base::Placement();
}
plc = plc * getPlacementFromProp(obj, "Placement");
if (obj == targetObj) {
return plc;
}
if (obj->isLink()) {
// Update doc in case its an external link.
doc = obj->getLinkedObject()->getDocument();
}
}
// If targetObj has not been found there's a problem
return Base::Placement();
return rootObj->getPlacementOf(sub, targetObj);
}
Base::Placement GeoFeature::getGlobalPlacement(App::DocumentObject* targetObj,
+15 -14
View File
@@ -1,9 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from DocumentObject import DocumentObject
from Base.Placement import Placement
from Base import Placement
from typing import Any, Final, Optional
@@ -23,6 +19,8 @@ class GeoFeature(DocumentObject):
def getPaths(self) -> Any:
"""
getPaths()
Returns all possible paths to the root of the document.
Note: Not implemented.
"""
@@ -30,6 +28,7 @@ class GeoFeature(DocumentObject):
def getGlobalPlacement(self) -> Placement:
"""
getGlobalPlacement() -> Base.Placement
Deprecated: This function does not handle Links correctly. Use getGlobalPlacementOf instead.
Returns the placement of the object in the global coordinate space, respecting all stacked
@@ -40,18 +39,16 @@ class GeoFeature(DocumentObject):
...
@staticmethod
def getGlobalPlacementOf(targetObj: Any, rootObj: Any, subname: str, /) -> Placement:
def getGlobalPlacementOf(targetObj: Any, rootObj: Any, subname: str) -> Placement:
"""
Examples:
obj = "part1"
sub = "linkToPart2.LinkToBody.Pad.face1"
getGlobalPlacementOf(targetObj, rootObj, subname) -> Base.Placement
Selection example: obj = "part1" sub = "linkToPart2.LinkToBody.Pad.face1"
Global placement of Pad in this context:
getGlobalPlacementOf(pad, part1, "linkToPart2.LinkToBody.Pad.face1")
Global placement of Pad in this context :
getGlobalPlacementOf(pad, part1, "linkToPart2.LinkToBody.Pad.face1")
Global placement of linkToPart2 in this context:
getGlobalPlacementOf(linkToPart2, part1, "linkToPart2.LinkToBody.Pad.face1")
Global placement of linkToPart2 in this context :
getGlobalPlacementOf(linkToPart2, part1, "linkToPart2.LinkToBody.Pad.face1")
Returns the placement of the object in the global coordinate space, respecting all stacked
relationships.
@@ -60,6 +57,8 @@ class GeoFeature(DocumentObject):
def getPropertyNameOfGeometry(self) -> Optional[str]:
"""
getPropertyNameOfGeometry() -> str or None
Returns the property name of the actual geometry.
For example for a Part feature it returns the value 'Shape', for a mesh feature the value
'Mesh' and so on.
@@ -69,6 +68,8 @@ class GeoFeature(DocumentObject):
def getPropertyOfGeometry(self) -> Optional[Any]:
"""
getPropertyOfGeometry() -> object or None
Returns the property of the actual geometry.
For example for a Part feature it returns its Shape property, for a Mesh feature its
Mesh property and so on.
-5
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from GroupExtension import GroupExtension
@@ -11,5 +7,4 @@ class GeoFeatureGroupExtension(GroupExtension):
Licence: LGPL
This class handles placeable group of document objects
"""
...
+15 -15
View File
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from DocumentObjectExtension import DocumentObjectExtension
from typing import Any, List
@export(Include="App/DocumentObjectGroup.h", )
@export(
Include="App/DocumentObjectGroup.h",
)
class GroupExtension(DocumentObjectExtension):
"""
Extension class which allows grouping of document objects
@@ -15,37 +13,37 @@ class GroupExtension(DocumentObjectExtension):
Licence: LGPL
"""
def newObject(self, type: str, name: str, /) -> Any:
def newObject(self, type: str, name: str) -> Any:
"""
Create and add an object with given type and name to the group
"""
...
def addObject(self, obj: Any, /) -> List[Any]:
def addObject(self, obj: Any) -> List[Any]:
"""
Add an object to the group. Returns all objects that have been added.
"""
...
def addObjects(self, objects: List[Any], /) -> List[Any]:
def addObjects(self, objects: List[Any]) -> List[Any]:
"""
Adds multiple objects to the group. Expects a list and returns all objects that have been added.
"""
...
def setObjects(self, objects: List[Any], /) -> List[Any]:
def setObjects(self, objects: List[Any]) -> List[Any]:
"""
Sets the objects of the group. Expects a list and returns all objects that are now in the group.
"""
...
def removeObject(self, obj: Any, /) -> List[Any]:
def removeObject(self, obj: Any) -> List[Any]:
"""
Remove an object from the group and returns all objects that have been removed.
"""
...
def removeObjects(self, objects: List[Any], /) -> List[Any]:
def removeObjects(self, objects: List[Any]) -> List[Any]:
"""
Remove multiple objects from the group. Expects a list and returns all objects that have been removed.
"""
@@ -57,28 +55,30 @@ class GroupExtension(DocumentObjectExtension):
"""
...
def getObject(self, name: str, /) -> Any:
def getObject(self, name: str) -> Any:
"""
Return the object with the given name
"""
...
def getObjectsOfType(self, typename: str, /) -> List[Any]:
def getObjectsOfType(self, typename: str) -> List[Any]:
"""
Returns all object in the group of given type
@param typename The Freecad type identifier
"""
...
def hasObject(self, obj: Any, recursive: bool = False, /) -> bool:
def hasObject(self, obj: Any, recursive: bool = False) -> bool:
"""
hasObject(obj, recursive=false)
Checks if the group has a given object
@param obj the object to check for.
@param recursive if true check also if the obj is child of some sub group (default is false).
"""
...
def allowObject(self, obj: Any, /) -> bool:
def allowObject(self, obj: Any) -> bool:
"""
Returns true if obj is allowed in the group extension.
"""
+100 -4
View File
@@ -325,11 +325,8 @@ void LinkBaseExtension::setProperty(int idx, Property* prop)
if (!prop) {
propName = "<null>";
}
else if (prop->getContainer()) {
propName = prop->getName();
}
else {
propName = extensionGetPropertyName(prop);
propName = prop->getName();
}
if (!Property::isValidName(propName)) {
propName = "?";
@@ -2635,6 +2632,76 @@ bool Link::canLinkProperties() const
return true;
}
Base::Placement Link::getPlacementOf(const std::string& sub, DocumentObject* targetObj)
{
if (isLinkGroup() && _getShowElementValue()) {
// In this case we have child document objects, the subname can be used.
// and in this case the Link itself acts as a normal DocumentObject
return DocumentObject::getPlacementOf(sub, targetObj);
}
Base::Placement plc;
auto* propPlacement = dynamic_cast<App::PropertyPlacement*>(getPropertyByName("Placement"));
if (!propPlacement) {
return plc;
}
plc = propPlacement->getValue();
std::vector<std::string> names = Base::Tools::splitSubName(sub);
if (names.empty() || this == targetObj || !getLinkedObject()) {
return plc;
}
Document* doc = getLinkedObject()->getDocument();
if (isLinkGroup()) {
// !ShowElement, so there are no objects.
// The subname looks like : '1.pad.face3' or '1.face3'
// So names.front() is supposed to be an integer. If not something is wrong.
int i = -1;
try {
i = std::stoi(names.front());
}
catch (...) { // Conversion failed (not an integer)
return plc;
}
std::vector<Base::Placement> plcs = PlacementList.getValues();
if (plcs.size() <= static_cast<size_t>(i)) {
return plc;
}
plc = plc * plcs[i];
// now that we handled the non-existing LinkElement, we can remove this subname and continue.
if (names.size() < 2) { // Subname was just "1", we are done.
return plc;
}
DocumentObject* subObj = doc->getObject(names[1].c_str());
if (!subObj) {
return plc;
}
std::vector<std::string> newNames(names.begin() + 2, names.end());
std::string newSub = Base::Tools::joinList(newNames, ".");
return plc * subObj->getPlacementOf(newSub, targetObj);
}
// case of a normal link
DocumentObject* subObj = doc->getObject(names.front().c_str());
if (!subObj) {
return plc;
}
std::vector<std::string> newNames(names.begin() + 1, names.end());
std::string newSub = Base::Tools::joinList(newNames, ".");
return plc * subObj->getPlacementOf(newSub, targetObj);
}
bool Link::isLink() const
{
return ElementCount.getValue() == 0;
@@ -2701,6 +2768,35 @@ App::Link* LinkElement::getLinkGroup() const
return nullptr;
}
Base::Placement LinkElement::getPlacementOf(const std::string& sub, DocumentObject* targetObj)
{
Base::Placement plc;
auto* propPlacement = dynamic_cast<App::PropertyPlacement*>(getPropertyByName("Placement"));
if (!propPlacement) {
return plc;
}
plc = propPlacement->getValue();
std::vector<std::string> names = Base::Tools::splitSubName(sub);
if (names.empty() || this == targetObj || !getLinkedObject()) {
return plc;
}
Document* doc = getLinkedObject()->getDocument();
DocumentObject* subObj = doc->getObject(names.front().c_str());
if (!subObj) {
return plc;
}
std::vector<std::string> newNames(names.begin() + 1, names.end());
std::string newSub = Base::Tools::joinList(newNames, ".");
return plc * subObj->getPlacementOf(newSub, targetObj);
}
//////////////////////////////////////////////////////////////////////////////////////////
namespace App
+4
View File
@@ -664,6 +664,8 @@ public:
bool canLinkProperties() const override;
Base::Placement getPlacementOf(const std::string& sub, DocumentObject* targetObj = nullptr) override;
bool isLink() const override;
bool isLinkGroup() const override;
@@ -718,6 +720,8 @@ public:
bool isLink() const override;
App::Link* getLinkGroup() const;
Base::Placement getPlacementOf(const std::string& sub, DocumentObject* targetObj = nullptr) override;
};
using LinkElementPython = App::FeaturePythonT<LinkElement>;
+39 -40
View File
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from DocumentObjectExtension import DocumentObjectExtension
from typing import Any, Final, List, Tuple, Optional, Union, overload
@export(Include="App/Link.h", )
@export(
Include="App/Link.h",
)
class LinkBaseExtension(DocumentObjectExtension):
"""
Link extension base class
@@ -18,18 +16,15 @@ class LinkBaseExtension(DocumentObjectExtension):
LinkedChildren: Final[List[Any]] = []
"""Return a flattened (in case grouped by plain group) list of linked children"""
def configLinkProperty(self, *args, **kwargs) -> Any:
def configLinkProperty(self, **kwargs) -> Any:
"""
Examples:
Called with default names:
configLinkProperty(prop1, prop2, ..., propN)
Called with custom names:
configLinkProperty(prop1=val1, prop2=val2, ..., propN=valN)
configLinkProperty(key=val,...): property configuration
configLinkProperty(key,...): property configuration with default name
This method is here to implement what I called Property Design
This methode is here to implement what I called Property Design
Pattern. The extension operates on a predefined set of properties,
but it relies on the extended object to supply the actual property by
calling this method. You can choose a sub set of functionality of
calling this methode. You can choose a sub set of functionality of
this extension by supplying only some of the supported properties.
The 'key' are names used to refer to properties supported by this
@@ -46,48 +41,48 @@ class LinkBaseExtension(DocumentObjectExtension):
"""
...
def getLinkExtProperty(self, name: str, /) -> Any:
def getLinkExtProperty(self, name: str) -> Any:
"""
return the property value by its predefined name
getLinkExtProperty(name): return the property value by its predefined name
"""
...
def getLinkExtPropertyName(self, name: str, /) -> str:
def getLinkExtPropertyName(self, name: str) -> str:
"""
lookup the property name by its predefined name
getLinkExtPropertyName(name): lookup the property name by its predefined name
"""
...
@overload
def getLinkPropertyInfo(self, /) -> tuple[tuple[str, str, str]]:
def getLinkPropertyInfo(self) -> tuple:
...
@overload
def getLinkPropertyInfo(self, index: int, /) -> tuple[str, str, str]:
def getLinkPropertyInfo(self, index: int) -> tuple:
...
@overload
def getLinkPropertyInfo(self, name: str, /) -> tuple[str, str]:
def getLinkPropertyInfo(self, name: str) -> tuple:
...
def getLinkPropertyInfo(self, arg: Any = None, /) -> tuple:
def getLinkPropertyInfo(self, arg: Any = None) -> tuple:
"""
Overloads:
(): return (name,type,doc) for all supported properties.
(index): return (name,type,doc) of a specific property
(name): return (type,doc) of a specific property
getLinkPropertyInfo(): return a tuple of (name,type,doc) for all supported properties.
getLinkPropertyInfo(index): return (name,type,doc) of a specific property
getLinkPropertyInfo(name): return (type,doc) of a specific property
"""
...
def setLink(
self,
obj: Any,
subName: Optional[str] = None,
subElements: Optional[Union[str, Tuple[str, ...]]] = None,
/,
) -> None:
def setLink(self, obj: Any, subName: Optional[str] = None, subElements: Optional[Union[str, Tuple[str, ...]]] = None) -> None:
"""
Called with only obj, set link object, otherwise set link element of a link group.
setLink(obj,subName=None,subElements=None): Set link object.
setLink([obj,...]),
setLink([(obj,subName,subElements),...]),
setLink({index:obj,...}),
setLink({index:(obj,subName,subElements),...}): set link element of a link group.
obj (DocumentObject): the object to link to. If this is None, then the link is cleared
@@ -97,23 +92,27 @@ class LinkBaseExtension(DocumentObjectExtension):
"""
...
def cacheChildLabel(self, enable: bool = True, /) -> None:
def cacheChildLabel(self, enable: bool = True) -> None:
"""
enable/disable child label cache
cacheChildLabel(enable=True): enable/disable child label cache
The cache is not updated on child label change for performance reason. You must
call this function on any child label change
"""
...
def flattenSubname(self, subname: str, /) -> str:
def flattenSubname(self, subname: str) -> str:
"""
flattenSubname(subname) -> string
Return a flattened subname in case it references an object inside a linked plain group
"""
...
def expandSubname(self, subname: str, /) -> str:
def expandSubname(self, subname: str) -> str:
"""
expandSubname(subname) -> string
Return an expanded subname in case it references an object inside a linked plain group
"""
...
+9 -7
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, class_declarations
from Base.PyObjectBase import PyObjectBase
from typing import Any, overload
@@ -11,9 +7,11 @@ from typing import Any, overload
Constructor=True,
Delete=True,
)
@class_declarations("""public:
@class_declarations(
"""public:
static Base::Color toColor(PyObject* value);
""")
"""
)
class Material(PyObjectBase):
"""
App.Material class.
@@ -23,7 +21,11 @@ class Material(PyObjectBase):
UserDocu: This is the Material class
"""
def set(self, string: str, /) -> None:
@overload
def __init__(self, *args: Any, **kwargs: Any) -> None:
...
def set(self, string: str) -> None:
"""
Set(string) -- Set the material.
+7 -7
View File
@@ -1,18 +1,14 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, no_args
from Base.PyObjectBase import PyObjectBase
from typing import List, Tuple, TypeAlias
MeasureType: TypeAlias = object
MeasureType: TypeAlias = object
@export(
Constructor=False,
Delete=True,
)
)
class MeasureManager(PyObjectBase):
"""
MeasureManager class.
@@ -25,8 +21,10 @@ class MeasureManager(PyObjectBase):
"""
@staticmethod
def addMeasureType(id: str, label: str, measureType: MeasureType, /) -> None:
def addMeasureType(id: str, label: str, measureType: MeasureType) -> None:
"""
addMeasureType(id, label, measureType) -> None
Add a new measure type.
id : str
@@ -42,6 +40,8 @@ class MeasureManager(PyObjectBase):
@no_args
def getMeasureTypes() -> List[Tuple[str, str, MeasureType]]:
"""
getMeasureTypes() -> List[(id, label, pythonMeasureType)]
Returns a list of all registered measure types.
"""
...
+77 -35
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, class_declarations
from Base.PyObjectBase import PyObjectBase
from typing import Any, List, Dict, overload, Optional
@@ -12,7 +8,7 @@ from typing import Any, List, Dict, overload, Optional
Delete=True,
NumberProtocol=False,
RichCompare=False,
)
)
@class_declarations(
"""public:
MetadataPy(const Metadata & pla, PyTypeObject *T = &Type)
@@ -53,20 +49,16 @@ class Metadata(PyObjectBase):
"""
@overload
def __init__(self) -> None:
...
def __init__(self) -> None: ...
@overload
def __init__(self, metadata: "Metadata") -> None:
...
def __init__(self, metadata: "Metadata") -> None: ...
@overload
def __init__(self, file: str) -> None:
...
def __init__(self, file: str) -> None: ...
@overload
def __init__(self, bytes: bytes) -> None:
...
def __init__(self, bytes: bytes) -> None: ...
Name: str = ""
"""String representing the name of this item."""
@@ -191,6 +183,8 @@ class Metadata(PyObjectBase):
def getLastSupportedFreeCADVersion(self) -> Optional[str]:
"""
getLastSupportedFreeCADVersion() -> str or None
Search through all content package items, and determine if a maximum supported
version of FreeCAD is set.
Returns None if no maximum version is set, or if *any* content item fails to
@@ -201,6 +195,8 @@ class Metadata(PyObjectBase):
def getFirstSupportedFreeCADVersion(self) -> Optional[str]:
"""
getFirstSupportedFreeCADVersion() -> str or None
Search through all content package items, and determine if a minimum supported
version of FreeCAD is set.
Returns 0.0 if no minimum version is set, or if *any* content item fails to
@@ -212,6 +208,8 @@ class Metadata(PyObjectBase):
def supportsCurrentFreeCAD(self) -> bool:
"""
supportsCurrentFreeCAD() -> bool
Returns False if this metadata object directly indicates that it does not
support the current version of FreeCAD, or True if it makes no indication, or
specifically indicates that it does support the current version. Does not
@@ -219,8 +217,10 @@ class Metadata(PyObjectBase):
"""
...
def getGenericMetadata(self, name: str, /) -> List[Any]:
def getGenericMetadata(self, name: str) -> List[Any]:
"""
getGenericMetadata(name) -> list
Get the list of GenericMetadata objects with key 'name'.
Generic metadata objects are Python objects with a string 'contents' and a
dictionary of strings, 'attributes'. They represent unrecognized simple XML tags
@@ -228,44 +228,58 @@ class Metadata(PyObjectBase):
"""
...
def addContentItem(self, content_type: str, metadata: "Metadata", /) -> None:
def addContentItem(self, content_type: str, metadata: "Metadata") -> None:
"""
addContentItem(content_type,metadata)
Add a new content item of type 'content_type' with metadata 'metadata'.
"""
...
def removeContentItem(self, content_type: str, name: str, /) -> None:
def removeContentItem(self, content_type: str, name: str) -> None:
"""
removeContentItem(content_type,name)
Remove the content item of type 'content_type' with name 'name'.
"""
...
def addMaintainer(self, name: str, email: str, /) -> None:
def addMaintainer(self, name: str, email: str) -> None:
"""
addMaintainer(name, email)
Add a new Maintainer.
"""
...
def removeMaintainer(self, name: str, email: str, /) -> None:
def removeMaintainer(self, name: str, email: str) -> None:
"""
removeMaintainer(name, email)
Remove the Maintainer.
"""
...
def addLicense(self, short_code: str, path: str, /) -> None:
def addLicense(self, short_code: str, path: str) -> None:
"""
addLicense(short_code,path)
Add a new License.
"""
...
def removeLicense(self, short_code: str, /) -> None:
def removeLicense(self, short_code: str) -> None:
"""
removeLicense(short_code)
Remove the License.
"""
...
def addUrl(self, url_type: str, url: str, branch: str, /) -> None:
def addUrl(self, url_type: str, url: str, branch: str) -> None:
"""
addUrl(url_type,url,branch)
Add a new Url or type 'url_type' (which should be one of 'repository', 'readme',
'bugtracker', 'documentation', or 'webpage') If type is 'repository' you
@@ -274,90 +288,118 @@ class Metadata(PyObjectBase):
"""
...
def removeUrl(self, url_type: str, url: str, /) -> None:
def removeUrl(self, url_type: str, url: str) -> None:
"""
removeUrl(url_type,url)
Remove the Url.
"""
...
def addAuthor(self, name: str, email: str, /) -> None:
def addAuthor(self, name: str, email: str) -> None:
"""
addAuthor(name, email)
Add a new Author with name 'name', and optionally email 'email'.
"""
...
def removeAuthor(self, name: str, email: str, /) -> None:
def removeAuthor(self, name: str, email: str) -> None:
"""
removeAuthor(name, email)
Remove the Author.
"""
...
def addDepend(self, name: str, kind: str, optional: bool, /) -> None:
def addDepend(self, name: str, kind: str, optional: bool) -> None:
"""
addDepend(name, kind, optional)
Add a new Dependency on package 'name' of kind 'kind' (optional, one of 'auto' (the default),
'internal', 'addon', or 'python').
"""
...
def removeDepend(self, name: str, kind: str, /) -> None:
def removeDepend(self, name: str, kind: str) -> None:
"""
removeDepend(name, kind)
Remove the Dependency on package 'name' of kind 'kind' (optional - if unspecified any
matching name is removed).
"""
...
def addConflict(self, name: str, kind: str, /) -> None:
def addConflict(self, name: str, kind: str) -> None:
"""
addConflict(name, kind)
Add a new Conflict. See documentation for addDepend().
"""
...
def removeConflict(self, name: str, kind: str, /) -> None:
def removeConflict(self, name: str, kind: str) -> None:
"""
removeConflict(name, kind)
Remove the Conflict. See documentation for removeDepend().
"""
...
def addReplace(self, name: str, /) -> None:
def addReplace(self, name: str) -> None:
"""
addReplace(name)
Add a new Replace.
"""
...
def removeReplace(self, name: str, /) -> None:
def removeReplace(self, name: str) -> None:
"""
removeReplace(name)
Remove the Replace.
"""
...
def addTag(self, tag: str, /) -> None:
def addTag(self, tag: str) -> None:
"""
addTag(tag)
Add a new Tag.
"""
...
def removeTag(self, tag: str, /) -> None:
def removeTag(self, tag: str) -> None:
"""
removeTag(tag)
Remove the Tag.
"""
...
def addFile(self, filename: str, /) -> None:
def addFile(self, filename: str) -> None:
"""
addFile(filename)
Add a new File.
"""
...
def removeFile(self, filename: str, /) -> None:
def removeFile(self, filename: str) -> None:
"""
removeFile(filename)
Remove the File.
"""
...
def write(self, filename: str, /) -> None:
def write(self, filename: str) -> None:
"""
write(filename)
Write the metadata to the given file as XML data.
"""
...
-5
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from GeoFeatureGroupExtension import GeoFeatureGroupExtension
@@ -11,5 +7,4 @@ class OriginGroupExtension(GeoFeatureGroupExtension):
Licence: LGPL
This class handles placable group of document objects with an Origin
"""
...
-5
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from GeoFeature import GeoFeature
@@ -11,5 +7,4 @@ class Part(GeoFeature):
Licence: LGPL
This class handles document objects in Part
"""
...
+52 -20
View File
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.Persistence import Persistence
from typing import Any, Final, Union, List, Optional
@export(DisableNotify=True, )
@export(
DisableNotify=True,
)
class PropertyContainer(Persistence):
"""
App.PropertyContainer class.
@@ -16,8 +14,10 @@ class PropertyContainer(Persistence):
PropertiesList: Final[list] = []
"""A list of all property names."""
def getPropertyByName(self, name: str, checkOwner: int = 0, /) -> Any:
def getPropertyByName(self, name: str, checkOwner: int = 0) -> Any:
"""
getPropertyByName(name, checkOwner=0) -> object or Tuple
Returns the value of a named property. Note that the returned property may not
always belong to this container (e.g. from a linked object).
@@ -30,8 +30,10 @@ class PropertyContainer(Persistence):
"""
...
def getPropertyTouchList(self, name: str, /) -> tuple:
def getPropertyTouchList(self, name: str) -> tuple:
"""
getPropertyTouchList(name) -> tuple
Returns a list of index of touched values for list type properties.
name : str
@@ -39,8 +41,10 @@ class PropertyContainer(Persistence):
"""
...
def getTypeOfProperty(self, name: str, /) -> list:
def getTypeOfProperty(self, name: str) -> list:
"""
getTypeOfProperty(name) -> list
Returns the type of a named property. This can be a list conformed by elements in
(Hidden, NoRecompute, NoPersist, Output, ReadOnly, Transient).
@@ -49,8 +53,10 @@ class PropertyContainer(Persistence):
"""
...
def getTypeIdOfProperty(self, name: str, /) -> str:
def getTypeIdOfProperty(self, name: str) -> str:
"""
getTypeIdOfProperty(name) -> str
Returns the C++ class name of a named property.
name : str
@@ -58,8 +64,10 @@ class PropertyContainer(Persistence):
"""
...
def setEditorMode(self, name: str, type: Union[int, List[str]], /) -> None:
def setEditorMode(self, name: str, type: Union[int, List[str]]) -> None:
"""
setEditorMode(name, type) -> None
Set the behaviour of the property in the property editor.
name : str
@@ -71,8 +79,10 @@ class PropertyContainer(Persistence):
"""
...
def getEditorMode(self, name: str, /) -> list:
def getEditorMode(self, name: str) -> list:
"""
getEditorMode(name) -> list
Get the behaviour of the property in the property editor.
It returns a list of strings with the current mode. If the list is empty there are no
special restrictions.
@@ -85,8 +95,10 @@ class PropertyContainer(Persistence):
"""
...
def getGroupOfProperty(self, name: str, /) -> str:
def getGroupOfProperty(self, name: str) -> str:
"""
getGroupOfProperty(name) -> str
Returns the name of the group which the property belongs to in this class.
The properties are sorted in different named groups for convenience.
@@ -95,8 +107,10 @@ class PropertyContainer(Persistence):
"""
...
def setGroupOfProperty(self, name: str, group: str, /) -> None:
def setGroupOfProperty(self, name: str, group: str) -> None:
"""
setGroupOfProperty(name, group) -> None
Set the name of the group of a dynamic property.
name : str
@@ -106,8 +120,12 @@ class PropertyContainer(Persistence):
"""
...
def setPropertyStatus(self, name: str, val: Union[int, str, List[Union[str, int]]], /) -> None:
def setPropertyStatus(
self, name: str, val: Union[int, str, List[Union[str, int]]]
) -> None:
"""
setPropertyStatus(name, val) -> None
Set property status.
name : str
@@ -118,8 +136,10 @@ class PropertyContainer(Persistence):
"""
...
def getPropertyStatus(self, name: str = "", /) -> list:
def getPropertyStatus(self, name: str = "") -> list:
"""
getPropertyStatus(name='') -> list
Get property status.
name : str
@@ -127,8 +147,10 @@ class PropertyContainer(Persistence):
"""
...
def getDocumentationOfProperty(self, name: str, /) -> str:
def getDocumentationOfProperty(self, name: str) -> str:
"""
getDocumentationOfProperty(name) -> str
Returns the documentation string of the property of this class.
name : str
@@ -136,8 +158,10 @@ class PropertyContainer(Persistence):
"""
...
def setDocumentationOfProperty(self, name: str, docstring: str, /) -> None:
def setDocumentationOfProperty(self, name: str, docstring: str) -> None:
"""
setDocumentationOfProperty(name, docstring) -> None
Set the documentation string of a dynamic property of this class.
name : str
@@ -147,8 +171,10 @@ class PropertyContainer(Persistence):
"""
...
def getEnumerationsOfProperty(self, name: str, /) -> Optional[list]:
def getEnumerationsOfProperty(self, name: str) -> Optional[list]:
"""
getEnumerationsOfProperty(name) -> list or None
Return all enumeration strings of the property of this class or None if not a
PropertyEnumeration.
@@ -160,6 +186,8 @@ class PropertyContainer(Persistence):
@constmethod
def dumpPropertyContent(self, Property: str, *, Compression: int = 3) -> bytearray:
"""
dumpPropertyContent(Property, Compression=3) -> bytearray
Dumps the content of the property, both the XML representation and the additional
data files required, into a byte representation.
@@ -170,8 +198,10 @@ class PropertyContainer(Persistence):
"""
...
def restorePropertyContent(self, name: str, obj: object, /) -> None:
def restorePropertyContent(self, name: str, obj: object) -> None:
"""
restorePropertyContent(name, obj) -> None
Restore the content of the object from a byte representation as stored by `dumpPropertyContent`.
It could be restored from any Python object implementing the buffer protocol.
@@ -183,8 +213,10 @@ class PropertyContainer(Persistence):
...
@constmethod
def renameProperty(self, oldName: str, newName: str, /) -> None:
def renameProperty(self, oldName: str, newName: str) -> None:
"""
renameProperty(oldName, newName) -> None
Rename a property.
oldName : str
+1 -1
View File
@@ -1300,7 +1300,7 @@ std::string PropertyComplexGeoData::getElementMapVersion(bool) const
}
auto owner = freecad_cast<DocumentObject*>(getContainer());
std::ostringstream ss;
if (owner && owner->getDocument() && owner->getDocument()->getStringHasher() == data->Hasher) {
if (owner && owner->getDocument() && data->hasElementMap() && data->getElementMapSize() && owner->getDocument()->getStringHasher() == data->Hasher) {
ss << "1.";
}
else {
+6 -2
View File
@@ -472,7 +472,11 @@ bool PropertyLinkBase::_updateElementReference(DocumentObject* feature,
// to version change, i.e. 'reverse', try search by geometry first
const char* oldElement = Data::findElementName(shadow.oldName.c_str());
if (!Data::hasMissingElement(oldElement)) {
const auto& names = geo->searchElementCache(oldElement);
auto names = geo->searchElementCache(oldElement);
if (names.empty()) {
// try floating point tolerance
names = geo->searchElementCache(oldElement, Data::SearchOptions());
}
if (names.size()) {
missing = false;
std::string newsub(subname, strlen(subname) - strlen(element));
@@ -4546,7 +4550,7 @@ PropertyXLink::getDocumentInList(App::Document* doc)
{
std::map<App::Document*, std::set<App::Document*>> ret;
for (auto& v : _DocInfoMap) {
if (!v.second->pcDoc || (doc && doc != v.second->pcDoc)) {
if (!v.second->pcDoc || (doc && doc != v.second->pcDoc) || v.second->links.empty()) {
continue;
}
auto& docs = ret[v.second->pcDoc];
+7 -7
View File
@@ -43,37 +43,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Вось X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Вось Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Вось Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Плоскасць XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Плоскасць XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Плоскасць YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Пачатак каардынат</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ L'usuari hauria de fer clic al botó Actualitza a la barra d'eines principal.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Eix X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Eix Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Eix Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Pla XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Pla XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Pla YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origen</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ Poté by měl uživatel kliknout na tlačítko "Refresh" na hlavním panelu nás
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>osa X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>osa Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>osa Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>rovina XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>rovina XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>rovina YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Počátek</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ Man bør derefter klikke på Opdater knappen i hovedværktøjslinjen.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-akse</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-akse</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-akse</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-plan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-plan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-plan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origo</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ Der Benutzer sollte dann auf die Schaltfläche Aktualisieren in der Haupt-Symbol
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-Achse</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-Achse</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-Achse</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-Ebene</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-Ebene</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-Ebene</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Ursprung</translation>
</message>
+30 -31
View File
@@ -7,8 +7,7 @@
<location filename="../../Link.cpp" line="131"/>
<source>Stores the last user choice of whether to apply CopyOnChange setup to all links
that reference the same configurable object</source>
<translation>Αποθηκεύει την τελευταία επιλογή χρήστη για το αν θα εφαρμοστεί η ρύθμιση CopyOnChange σε όλους τους συνδέσμους
που αναφέρονται στο ίδιο διαμορφώσιμο αντικείμενο(App11)</translation>
<translation>Αποθηκεύει την τελευταία επιλογή του χρήστη για το αν θα εφαρμοστεί η ρύθμιση CopyOnChange σε όλους τους συνδέσμους που αναφέρονται στο ίδιο διαμορφώσιμο αντικείμενο</translation>
</message>
</context>
<context>
@@ -16,7 +15,7 @@ that reference the same configurable object</source>
<message>
<location filename="../../Application.cpp" line="458"/>
<source>Unnamed</source>
<translation>Ανώνυμο(App19)</translation>
<translation>Χωρίς όνομα</translation>
</message>
</context>
<context>
@@ -24,7 +23,7 @@ that reference the same configurable object</source>
<message>
<location filename="../../OriginGroupExtension.cpp" line="161"/>
<source>Origin</source>
<translation>Σημείο Τομής Αξόνων(App27)</translation>
<translation>Αρχή Αξόνων</translation>
</message>
</context>
<context>
@@ -44,39 +43,39 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Άξονας X(App49)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<source>Y-axis</source>
<translation>Άξονας Υ(App54)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<source>Z-axis</source>
<translation>Άξονας Ζ(App59)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<source>XY-plane</source>
<translation>XY-Κάτοψη(App65)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<source>XZ-plane</source>
<translation>XZ-Πρόσοψη(App69)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<source>YZ-plane</source>
<translation>YZ-Πλάγια όψη(App74)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Άξονας Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Άξονας Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Επίπεδο XY (Κάτοψη)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Επίπεδο XZ (Πρόσοψη)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Επίπεδο YZ (Πλάγια όψη)</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Σημείο Τομής Αξόνων</translation>
<translation>Αρχή Αξόνων</translation>
</message>
</context>
</TS>
+14 -16
View File
@@ -4,17 +4,16 @@
<context>
<name>LinkParams</name>
<message>
<location filename="../../Link.cpp" line="135"/>
<location filename="../../Link.cpp" line="131"/>
<source>Stores the last user choice of whether to apply CopyOnChange setup to all links
that reference the same configurable object</source>
<translation>Almacena la última opción de usuario de si aplicar la configuración de CopyOnChange a todos los enlaces
que hacen referencia al mismo objeto configurable</translation>
<translation>Almacena la última opción de usuario de si aplicar la configuración de CopyOnChange a todos los enlaces que hacen referencia al mismo objeto configurable</translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="457"/>
<location filename="../../Application.cpp" line="458"/>
<source>Unnamed</source>
<translation>Sin nombre</translation>
</message>
@@ -22,7 +21,7 @@ que hacen referencia al mismo objeto configurable</translation>
<context>
<name>App::OriginGroupExtension</name>
<message>
<location filename="../../OriginGroupExtension.cpp" line="162"/>
<location filename="../../OriginGroupExtension.cpp" line="161"/>
<source>Origin</source>
<translation>Origen de Coordenadas</translation>
</message>
@@ -30,52 +29,51 @@ que hacen referencia al mismo objeto configurable</translation>
<context>
<name>Notifications</name>
<message>
<location filename="../../Document.cpp" line="1112"/>
<location filename="../../Document.cpp" line="1110"/>
<source>
It is recommended that the user right-click the root of the document and select Mark to recompute.
The user should then click the Refresh button in the main toolbar.
</source>
<translation>
Es recomendado que el usuario haga clic derecho en la raíz del documento y seleccione la opción de "Marcar para recalcular".
El usuario deberá hacer clic en el botón de actualizar en la barra de herramientas.
Es recomendable que el usuario haga clic derecho sobre el origen del documento y seleccione Marcar para recalcular.
El usuario debe luego hacer clic en el botón Refrescar en la barra de herramientas principal.
</translation>
</message>
</context>
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="250"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Eje X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="251"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Eje Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="252"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Eje Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="253"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Plano XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="254"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Plano XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="255"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Plano YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="256"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origen de Coordenadas</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ El usuario deberá hacer clic en el botón de actualizar en la barra de herramie
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Eje X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Eje Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Eje Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Plano XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Plano XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Plano YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origen de coordenadas</translation>
</message>
+7 -7
View File
@@ -41,37 +41,37 @@ Erabiltzaileak orduan, Refresh button sakatu beharko du tresna-barra nagusian.</
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X ardatza</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y ardatza</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z ardatza</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY planoa</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ planoa</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ planoa</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Jatorria</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ Käyttäjän pitäisi sen jälkeen klikata Päivitä-painiketta päätyökaluriv
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-akseli</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-akseli</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-akseli</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-taso</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-taso</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-taso</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origo</translation>
</message>
+9 -8
View File
@@ -7,7 +7,8 @@
<location filename="../../Link.cpp" line="131"/>
<source>Stores the last user choice of whether to apply CopyOnChange setup to all links
that reference the same configurable object</source>
<translation>Enregistre le dernier choix de l'utilisateur concernant la configuration de CopyOnChange sur tous les liens qui font référence au même objet configurable.</translation>
<translation>Enregistre le dernier choix de l'utilisateur concernant la configuration de CopyOnChange sur tous les liens qui font référence au
même objet configurable.</translation>
</message>
</context>
<context>
@@ -41,37 +42,37 @@ L'utilisateur doit ensuite cliquer sur le bouton "Rafraîchir" dans la barre d'o
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Axe X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Axe Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Axe Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Plan XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Plan XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Plan YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origine</translation>
</message>
+7 -7
View File
@@ -42,37 +42,37 @@ Korisnik zatim treba kliknuti gumb Osvježi u glavnoj alatnoj traci.</translatio
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-os</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-os</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-os</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-ravnina</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-ravnina</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-ravnina</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Ishodište</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ A felhasználónak ezután a fő eszköztáron a Frissítés gombra kell kattint
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-tengely</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-tengely</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-tengely</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY sík</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ sík</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ sík</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Kezdőpont</translation>
</message>
+7 -7
View File
@@ -42,37 +42,37 @@ L'utente dovrebbe quindi cliccare il pulsante Aggiorna nella barra degli strumen
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Superiore</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Frontale</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Destro</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>O</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X軸</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y軸</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z軸</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation></translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X </translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y </translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z </translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation> </translation>
</message>
+27 -27
View File
@@ -42,38 +42,38 @@ The user should then click the Refresh button in the main toolbar.
</context>
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<source>X-axis</source>
<translation>X축</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<source>Y-axis</source>
<translation>Y축</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<source>Z-axis</source>
<translation>Z축</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<source>XY-plane</source>
<translation>XY평면</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<source>XZ-plane</source>
<translation>XZ평면</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<source>YZ-plane</source>
<translation>YZ평면</translation>
<source>X-axis</source>
<translation>X-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation></translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ Het is aanbevolen dat de gebruiker met de rechter muis knop de hoofdmap van het
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-as</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-as</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-as</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-vlak</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-vlak</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-vlak</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Oorsprong</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ Użytkownik powinien następnie kliknąć przycisk Odśwież na głównym pasku
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation> X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation> Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation> Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Płaszczyzna XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Płaszczyzna XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Płaszczyzna YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Odniesienie położenia</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ O usuário deve então clicar no botão Atualizar na barra de ferramentas princi
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Eixo-X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Eixo-Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Eixo-Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Plano-XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Plano-XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Plano-YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origem</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ Utilizatorul ar trebui ca după să apese pe butonul Reîmprospătare din bara d
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Axa X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Axa Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Axa Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Planul XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Planul XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Planul YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origine</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Ось X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Ось Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Ось Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Плоскость XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Плоскость XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Плоскость YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Начало координат</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ Nato naj v glavni orodni vrstici klikne gumb "Osveži".
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Os X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Os Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Os Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>Ravnina XY</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>Ravnina XZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>Ravnina YZ</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Izhodišče</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ Zatim korisnik treba da klikne na dugme Osveži koje se nalzi na glavnoj paleti
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-osa</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-osa</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-osa</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY ravan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ ravan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ ravan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Koordinatni početak</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-оса</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-оса</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-оса</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY раван</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ раван</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ раван</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Координатни почетак</translation>
</message>
+7 -7
View File
@@ -44,37 +44,37 @@ Användaren bör sedan klicka på knappen Uppdatera i huvudverktygsfältet.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X-axel</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y-axel</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z-axel</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-plan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-plan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-plan</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Origo</translation>
</message>
+10 -11
View File
@@ -7,7 +7,7 @@
<location filename="../../Link.cpp" line="131"/>
<source>Stores the last user choice of whether to apply CopyOnChange setup to all links
that reference the same configurable object</source>
<translation>Aynı yapılandırılabilir nesneye başvuran tüm bağlantılara CopyOnChange kurulumunun uygulanıp uygulanmayacağına ilişkin son kullanıcı seçimini depolar</translation>
<translation>Aynı yapılandırılabilir nesneye başvuran tüm bağlantılara CopyOnChange kurulumunun uygulanıp uygulanmayacağına ilişkin son kullanıcı seçimini saklar</translation>
</message>
</context>
<context>
@@ -23,7 +23,7 @@ that reference the same configurable object</source>
<message>
<location filename="../../OriginGroupExtension.cpp" line="161"/>
<source>Origin</source>
<translation>Orijin</translation>
<translation>Orjin</translation>
</message>
</context>
<context>
@@ -35,45 +35,44 @@ It is recommended that the user right-click the root of the document and select
The user should then click the Refresh button in the main toolbar.
</source>
<translation>
Kullanıcının belgenin köküne sağ tıklaması ve Yeniden hesaplamak için imleyi seçmesi önerilir.
Kullanıcı daha sonra ana araç çubuğundaki Yenile düğmesine tıklamalıdır.
Kullanıcının belgenin kök dizinine sağ tıklayıp "Yeniden hesaplamak için işaretle" seçeneğini seçmesi önerilir. Ardından kullanıcı ana araç çubuğundaki "Yenile" düğmesine tıklamalıdır.
</translation>
</message>
</context>
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X ekseni</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y ekseni</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z ekseni</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY düzlemi</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ düzlemi</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ düzlemi</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Orijin</translation>
</message>
+7 -7
View File
@@ -41,37 +41,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>Вісь X</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Вісь Y</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Вісь Z</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY-площина</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ-площина</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ-площина</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation>Початок координат</translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X轴</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y轴</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z轴</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation></translation>
</message>
+7 -7
View File
@@ -43,37 +43,37 @@ The user should then click the Refresh button in the main toolbar.
<context>
<name>App::LocalCoordinateSystem</name>
<message>
<location filename="../../Datums.cpp" line="260"/>
<location filename="../../Datums.cpp" line="265"/>
<source>X-axis</source>
<translation>X軸</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="261"/>
<location filename="../../Datums.cpp" line="266"/>
<source>Y-axis</source>
<translation>Y軸</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="262"/>
<location filename="../../Datums.cpp" line="267"/>
<source>Z-axis</source>
<translation>Z軸</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="263"/>
<location filename="../../Datums.cpp" line="268"/>
<source>XY-plane</source>
<translation>XY平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="264"/>
<location filename="../../Datums.cpp" line="269"/>
<source>XZ-plane</source>
<translation>XZ平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="265"/>
<location filename="../../Datums.cpp" line="270"/>
<source>YZ-plane</source>
<translation>YZ平面</translation>
</message>
<message>
<location filename="../../Datums.cpp" line="266"/>
<location filename="../../Datums.cpp" line="271"/>
<source>Origin</source>
<translation></translation>
</message>
+5
View File
@@ -27,4 +27,9 @@ std::optional<Base::Vector3d>
App::NullCenterOfMass::ofDocumentObject([[maybe_unused]] DocumentObject* object) const
{
return std::nullopt;
}
bool App::NullCenterOfMass::supports(DocumentObject* /*object*/) const
{
return false;
}
+2
View File
@@ -55,6 +55,7 @@ class CenterOfMassProvider
public:
virtual ~CenterOfMassProvider() = default;
virtual bool supports(DocumentObject* object) const = 0;
virtual std::optional<Base::Vector3d> ofDocumentObject(DocumentObject* object) const = 0;
};
@@ -66,6 +67,7 @@ class NullCenterOfMass final : public CenterOfMassProvider
{
public:
std::optional<Base::Vector3d> ofDocumentObject(DocumentObject* object) const override;
bool supports(DocumentObject* object) const override;
};
}
+11 -11
View File
@@ -1,7 +1,3 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.BaseClass import BaseClass
from typing import Any, Final, overload, Dict
@@ -20,15 +16,13 @@ class StringHasher(BaseClass):
"""
@overload
def getID(self, txt: str, base64: bool = False, /) -> Any:
def __init__(self, *args: Any, **kwargs: Any) -> None:
...
@overload
def getID(self, id: int, base64: bool = False, /) -> Any:
...
def getID(self, arg: Any, base64: bool = False, /) -> Any:
def getID(self, arg: Any, base64: bool = False) -> Any:
"""
getID(txt|id, base64=False) -> StringID
If the input is text, return a StringID object that is unique within this hasher. This
StringID object is reference counted. The hasher may only save hash ID's that are used.
@@ -39,8 +33,14 @@ class StringHasher(BaseClass):
"""
...
@overload
def getID(self, txt: str, base64: bool = False) -> Any: ...
@overload
def getID(self, id: int, base64: bool = False) -> Any: ...
@constmethod
def isSame(self, other: "StringHasher", /) -> bool:
def isSame(self, other: "StringHasher") -> bool:
"""
Check if two hasher are the same
"""

Some files were not shown because too many files have changed in this diff Show More