Before 0aed23c (PR #19582), external geometry projection used a different algorithm and produced slightly different geometry for some kinds of projections (B-splines in particular). This adds a backwards-compatibility path that allows old files to continue to use the old algorithm, while using the new and improved algorithm with new files.
Commit a346c266 (PR #21794) was a major refactoring of the extrusion code, and one consequence of it was that the 'TwoLengths' extrusion was deprecated and replaced. The code that replaced it generated the same final geometry, but in the opposite direction, changing the face order and breaking the element names. This commit adds a backwards-compatibility branch to the file loading code that flips the direction of the inputs, so the final output matches the original.
* PD: Hole Thread texture
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: vp-texture remove logging
* refactor: vp-hole cleanup unused declaration
* refactor: vp-hole remove logging
* refactor: vp-hole use convertTo
* refactor: vp-hole use freecad_cast
* refactor: make unwrapsurface private
* fix: logic error with model-thread handling
* fix: modelthreadchanged issues
threaddepth doesnt depend on modeled or not so remove it
* fix: model thread getting disabled when it shouldnt
* revert: use base-0 poly triangulation
previously had issues, but all is good now
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Gui: fix quantity spinbox size not adapting to number of decimals
* Gui: fix quantity spinbox units getting cut (force max chars)
* Gui: editableDatumLabel remove hardcoded values
* fixes
* Gui: sketcher ovp auto adjust size
* Gui: ovp fix cursor jumping behind the unit
* Gui: Refactor changes to QuantitySpinBox
The QuantitySpinBox uses d-pointer (pimpl) to store its private data -
this commit ensures that all state is stored here and exposed via
getters and setters + qproperties.
* Gui: sketcher ovp fix cursor jumping after the unit
* Gui: allow quantitySpinBox to set max digits allowed
Useful for adjustable width in the Sketcher OVP
---------
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Sketcher: Fix: Arc of Hyperbola
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added minor grater than major radius support
* Fixed merge errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improved comments and added a confused points check for S1 and S2 distance.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added compile check for occ version and check before getting minor radius.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
OCC version check
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
When Part2DObject (e.g., Sketch) is created, it calls setAttacher() to
set up AttachEnginePlane. This updated the internal AttacherType property
but left the user-visible AttacherEngine enum at its default "Engine 3D".
Now setAttacher() also updates AttacherEngine for non-base attachers,
keeping the visible property in sync with the actual engine type.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Core: Fix freecad when Windows username has non ASCII characters
* Update ApplicationDirectories.cpp
* Tests: Add tests of pathToString/stringToPath
Validates the fix for non-ASCII characters in filesystem paths (e.g.
Windows usernames with umlauts). Includes Windows-specific tests that
verify pathToString produces UTF-8 from wide-string paths and that
the naive fs::path::string() does not. On Linux these functions are
effectively a no-op, so the tests themselves are only really useful
on Windows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Python interface to the setCamera() is using 's' format string, which
converts Unicode object to C string using 'utf-8' encoding. Reflect
that for QString conversion as well.
CAM: CircularHoleBase - Fix onDocumentRestored
Removed the expermental "Automatic TSP" sorting mode and ensured legacy
files are migrated to "Automatic". Start using C++ TSP sorting for
"Automatic" mode for better performance. Refactored natural sorting for
table columns, relocating the utility class for reuse and using a robust
sort key.
src/Mod/CAM/Path/Op/CircularHoleBase.py:
- Removed "Automatic TSP" from SortingMode options and logic
- Added migration logic for legacy "Automatic TSP" values
- Cleaned up redundant assignments
src/Mod/CAM/Path/Op/Gui/CircularHoleBase.py:
- Updated to use relocated NaturalSortTableWidgetItem for feature and
diameter columns
- Improved sorting behavior for mixed text/number columns
src/Mod/CAM/Path/Base/Gui/Util.py:
- Added NaturalSortTableWidgetItem using the existing natural_sort_key
for robust sorting
This update enhances the GUI with new sorting modes and manual reordering, and
adds migration logic to ensure robust property
src/Mod/CAM/Gui/Resources/panels/PageBaseHoleGeometryEdit.ui:
- Add Sorting mode combo box with "Automatic", "Automatic TSP", and "Manual" options
- Add UI improvements for hole sorting, selection, and filtering
src/Mod/CAM/Path/Op/CircularHoleBase.py:
- Add migration logic to ensure SortingMode property exists and is up to date
- Use sort_locations_tsp when SortingMode is "Automatic TSP"
src/Mod/CAM/Path/Op/Gui/CircularHoleBase.py:
- Add RowMoveTableWidget for manual row reordering in the GUI
- Update TaskPanelHoleGeometryPage to support new sorting modes and improved UI behavior
CAM: Add template dropdown below machine name in editor
Adds a template selection dropdown to the Machine Editor dialog,
positioned below the machine name field. Dropdown lists user and
built-in templates for new machines only. Adds MachineFactory
template discovery and ensures templates are copied to build directory.
src/Mod/CAM/CMakeLists.txt:
- Copy machine templates to build directory for runtime access
src/Mod/CAM/Machine/models/machine.py:
- Add MachineFactory.list_builtin_templates() for template discovery
- Use FreeCAD install path for built-in templates
src/Mod/CAM/Machine/ui/editor/machine_editor.py:
- Add template dropdown below name field for new machines
- Populate dropdown with user and built-in templates
- Update UI fields when template is selected
Major improvements to the GenericPlasma postprocessor with new dialog-based
mode selection and robust plasma cutting features.
New Features:
- Add pre_processing_dialog() for interactive mode selection
- Replace persistent mark_entry_only property with runtime dialog
- User-friendly choice between Normal Cutting and Mark Entry Points Only
- Enhanced torch control with pierce height movement
- Complete mark_entry_only implementation with proper marking sequence
- Improved error handling and state management
Technical Improvements:
- Add _reset_plasma_state() for clean per-operation tracking
- Fix Z direction detection with proper null checking
- Enhanced height extraction from StartDepth/FinalDepth/ClearanceHeight
- Better error handling with debug logging
- Graceful fallback when GUI not available
Bug Fixes:
- Fix torch control to move to pierce height before ignition
- Fix force_rapid_feeds to remove F parameters (revert from override)
- Fix state tracking initialization and null value handling
- Add proper state reset for each operationUses a dialog to set mark_only.
Co-authored-by: tarman3 <joice501790018@tutamail.com>
Clicking the eye icon on the constraints panel hides all constraints. This calls SketchObject::setVirtualSpace where the existing Constraint
objects will be replaced. However, the Constraint objects are also stored inside the member 'solvedSketch' but won't be replaced so that the
pointers there will become dangling.
If the user starts to drag the sketch the pointers are still dangling and cause a crash when calling 'solvedSketch.moveGeometries'.
The crash can be reproduced with:
1. Create a sketch
2. Add a single line
3. Set a length constraint
4. Make it a non-driving constraint
5. Hide it with the eye icon or by unticking the check box
6. Move the line
The same crash also occurs when calling the methods setLabelDistance() or setLabelPosition() from Python and then trying to move the sketch.
Solution:
To fix the problem add the lightweight method 'Sketch::updateConstraints' and call it inside SketchObject::setVirtualSpace to quickly update
the pointers after invalidating them.
This fixes issue 19566
Related to #25004
Updated the tooltips to point to correct pref pages.
Additionally:
* Minor text tweaks.
* Replaced "Gui::PrefColorButton" with "Gui::ColorButton".
* BIM: fix BuildingPart color issues including v1.0 regressions
Fixes#27136.
* [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>
Corrects logic so that the _shape_type is saved properly and not always
defaulted to the primary toolbit type. Ensures subclass/alias
information is preserved when saving toolbits.
src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Fix fallback logic for _shape_type to correctly save subclass/alias
when present
- Only default to primary type if _shape_type is missing or matches the
main class
src/Mod/CAM/Path/Tool/docobject/ui/docobject.py:
- Improve label formatting by handling underscores, hyphens, and extra
spaces
src/Mod/CAM/Path/Tool/toolbit/ui/typefilter.py:
- Simplify type filter mapping and display logic for toolbit subtypes
* [TD]fix 3d point object reference in dimension
* [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>
Add missing break after hiding rectangle points for a void bounding box,
preventing fall-through to CornerMin()/CornerMax() which would produce
undefined values.
Remove the openCommand() call in editDoubleClicked() since
EditTextDialog already manages its own command lifecycle. The redundant
outer command was never closed when the user cancelled the dialog.
Escape user-provided text and font path strings before inserting them
into the Python command string, preventing breakage or injection from
strings containing quotes or backslashes.
Replace the character-by-character positioning loop with HarfBuzz
text shaping. The old code used FT_Get_Kerning which only reads
legacy kern tables. HarfBuzz handles both GPOS kerning and legacy
kern tables, as well as ligatures and complex script shaping.
* Add status bar hints for modifier keys in Std_Measure
* Align status bar hints according to design guide
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update src/Mod/Measure/Gui/TaskMeasure.cpp
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
* Update src/Mod/Measure/Gui/TaskMeasure.cpp
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replace 'invert' with 'toggle' to improve readability
* Added missing namespace qualifier
* Fix MSVC list assignment errors with explicit std::list<InputHint>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix InputHint': undeclared identifier
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
* Assembly: add support for draft links
* Update AssemblyObject.cpp
* Update ViewProviderAssembly.cpp
* Update GeoFeature.cpp
* Update JointObject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
During conversion of some materials from the originals, in some cases authorship
was lost, or licensing mistaken. In addition, during their creation some files
had incorrect licenses applied. Files previously licensed LGPL-2.1.-or-later had
that license restored. Other files were re-licensed by agreement of their
author.
Co-Authored-By: David Carter <dcarter@davidcarter.ca>
Fixes#17661.
Fixes#27396.
In ArchSectionPlane.py the shape of BuildingParts was also processed. This resulted in duplicate geometry as BuildingParts inherit their shape from their (also processed) content.
This PR requires some testing, it should not be backported to v1.1.
* Fix Collada exporter skipping App::Link geometry
Resolve App::Link objects recursively during export so referenced
geometry is included in the .dae output while preserving link placement.
* Arch: Fix Collada export for App::Link objects
The Collada exporter skipped geometry for App::Link instances because
it only handled objects directly present in the document.
This change resolves Link objects using getLinkedObject() and exports
their referenced geometry while applying the placement of the exporting
instance.
The original App::Part expansion behavior is preserved.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Arch: fix placement handling for App::Link and primitives in Collada export
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* final change
* [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>
* Fix Linux SpaceMouse jerkiness: coalesce spnav events and batch camera updates
On Linux, pollSpacenav() posts every spnav motion event individually
(125-250Hz from spacenavd), each triggering a full scene redraw. Combined
with camera->orientation and camera->position each triggering separate
Coin3D notifications, this results in up to 500 redraws/sec.
Fix 1 - Event coalescing (GuiNativeEventLinux.cpp):
The drain loop now keeps only the latest motion state and posts once after
all pending events are consumed. SpaceMouse events are absolute deflection
(current puck position), not deltas, so the latest event always contains
the complete state.
Fix 2 - Batched camera updates (NavigationStyle.cpp):
Wrap camera property changes in enableNotify(false/true) + touch() so
Coin3D fires a single redraw instead of two per event.
Together this reduces redraws from ~500/sec to ~60/sec (display refresh),
eliminating the jerky navigation that Linux users experience with complex
models.
Fixes#25926
* Add per-axis deadzone filtering for Linux SpaceMouse
Each SpaceMouse axis has different sensitivity and noise characteristics.
A single global deadzone is too coarse — rotation axes may need different
thresholds than translation axes.
Read per-axis deadzone values from user.cfg (BaseApp/Spaceball/Motion)
using keys PanLRDeadzone, PanUDDeadzone, ZoomDeadzone, TiltDeadzone,
RollDeadzone, SpinDeadzone. Values default to 0 (no filtering).
Axis values below their individual threshold are zeroed before posting
the motion event, preventing unintended drift from sensor noise while
preserving intentional small movements.
This is the Linux equivalent of deadzone handling that NavLib provides
on Windows/macOS.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Use std::array for axisDeadzoneKeys to avoid magic number
Replace C-style array with std::array and use .size() instead of
hardcoded loop bound, as suggested in code review.
* Cache deadzone values with ParameterGrp Observer instead of polling
Replace per-event GetParameterGroupByPath + GetInt calls with a static
DeadzoneCache that loads values once and updates them via
ParameterGrp::ObserverType when user.cfg changes. Also use
static constexpr for the keys array and std::abs for readability.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Move DeadzoneCache from static local to member variable
Replace the static local DeadzoneCache in pollSpacenav() with a
std::unique_ptr<DeadzoneCache> member of GuiNativeEvent, initialized
in initSpaceball() after the spnav connection is established.
Forward-declare in the header to keep includes minimal.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Maik-0000FF <Maik-0000FF@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Base: Added Quantities for Optic/Chemical mechanics
* [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>
Remove the TestSketcherGui file entirely, it contained only commented
lines. Delete commented out debugging output. Remove other commented-out
code that didn't have any explanation or justification for leaving it
in.
This method aims to solve the problem of untranslatable description
strings on file types. Some, but not all, file format description
strings contain translatable elements. For example, some languages
may translate "FEM mesh formats". Many format descriptions include
the words "file," "format," or "mesh" -- these could potentially be
replaced with localized versions.
This commit prevents unhandled exceptions to be thrown in the Add
Property dialog. When the user provides a valid name, for example 'Abc'
and then an invalid name, for example 'Abc^', an exception is thrown
that is caught by Qt's notify which may lead to a crash. This is caused
by the fact that the editor is still bound to the old property that has
been removed. The main idea was to preserve values that were provided
by the user as long as possible, also when a property name changes.
This design goal tried to preserve the user provided value even if the
property name is not valid. Although the underlying property item is
explicitly unbound in that situation, the editor is not.
The solution is to also explicitly unbind the editor if there is an
editor that can have bindings. Unbinding an editor does not
automatically hide the f(x) symbol in the editor (leading to errors on
unbound editors), so this commit also adds a bit of logic to hide
the f(x) symbol when an editor is unbound.
The memory is allocated using new() with alignment requirements, and
should be deleted using the same alignment requirement. See
issue #27781 for the valgrind error.
* Sketcher: Fix crash on external deletion
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update SketchObject.pyi
* Update SketchObjectPyImp.cpp
* Update ViewProviderSketch.cpp
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update SketchObjectPyImp.cpp
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Sketcher: Fix last external not being removed from ref 27719
* Update SketchObject.cpp
* Update SketchObject.cpp
* Update SketchObject.h
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* rename fixMissingAxisInExternalGeo
* Update SketchObject.cpp
* Update SketchObjectPyImp.cpp
* [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>
* App: add PropertyListsT::removeIf()
For convenient list value filtering.
Co-authored-by: Zheng Lei <realthunder.dev@gmail.com>
* Update Property.h
* Update Property.h
* Assembly: Fix JCS position if assembly is transformed
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* redrawJointPlacement & showPreviewJCS Refactor to avoid duplicate code
* Assembly: JointObject: Simplify setJCSPosition
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
* Update JointObject.py
* Update src/Mod/Assembly/JointObject.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Adjusted G code output to include FreeCAD body and job information.
The first comment in the G code is shown on the machine controller,
and should contain useful information for operators to to identify
jobs. Fetch the body and job label using findParentJob and insert it
into the G code. For some reason the body and job information is not
available when called from TestFanucPost.py, so handle case where it
is undefined as earlier. This new use of findParentJob exposes error
in mock code used in code tests. This is fixed in a different pull
request to make this patch easily backportable to the 1.1 branch.
Fixed issues with Fanuc post processor discovered by lint. Made sure
global variables used are declared. This fixes issue updating the
postamble and preamble introduced in
ef794c31bd
Added docstrings, adjusted import statements and wrapped long line to
keep linter happy.
Reformatted code with black for consistent formatting.
Also reverted obsolete setText() workaround from commit
9c78ced00c now
that https://github.com/FreeCAD/FreeCAD/pull/26008 is merged.
* [ArchWall] Multi-Material width return to Width Property
Fix#27804
- BIM: Wall with MultiMaterial assigned reports wrong Width
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [ArchWall] Multi-Material width return to Width Property (rev.)
Fix#27804
- BIM: Wall with MultiMaterial assigned reports wrong Width
(rev.
Better algorithm - https://github.com/FreeCAD/FreeCAD/issues/27804#issuecomment-3986056788)
* [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>
* BIM: Fix placement jump when uncloning objects
The Unclone command incorrectly multiplied the parent's placement by the
clone's placement. Since Arch clones store absolute placement (not
relative to the parent), this resulted in a double transform.
This caused baseless walls to jump to a new position upon uncloning.
Standard base-backed walls often masked this bug because their local
placement is usually Identity (0,0,0), but they would also fail if moved
independently of their base.
This fix assigns the clone's current placement directly to the new
object, preserving its position.
Fixes https://github.com/FreeCAD/FreeCAD/issues/26929
* BIM: do placement assignment and recompute only once
Fixes#28013.
When creating a structure from a profile the code could ignore `self.bmode` (beam-mode) and create a beam even if the user selected the column option in the task panel.
Rounding errors due to the conversion of numerical values read from the input boxes triggered the bug (89mm -> 3.5" -> 88.89999999999999mm).
But beyond that, it is IMO not correct to disregard user input. If the column option is specified, a column should be created irrespective of the dimensions.
* added shortcut for save copy
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Ctrl+Alt+Shift+S to save a copy
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Parag Debnath <paragforwork@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
The current post processor fail completely for any operation because the
ShapeName attribute no longer exist. Changed code to look for attributes
present in FreeCAD 1.1 and master branch. Rewrote thread tapping code
to work with new tapping support. Switched thread tapping to use feed in
distance per minute (G94) instead of earlier distance per revolution to
avoid switching between mm/min and mm/rev for different operations.
Fixes#27814
* Changed Insert Component parts list to be collapsed by default
* only collapse large assemblies and only expand first child.
---------
Co-authored-by: Adam Spontarelli <adam@vector-space.org>
If a datum line is used as base shape then it causes a segmentation
fault because the shape is infinite that the CAD kernel fails with.
Solution:
Explicitly check beforehand if the shape is infinite or null.
This fixes issue 21429
Change Command::_assureWorkbench to check if the passed workbench is
disabled or not. If yes then do nothing.
This fixes issue 21477.
Hint: The method Application::activateWorkbench() is still able to
activate a disabled workbench
When pressing the Apply button the fem mesh feature is computed but still
marked as touched. When pressing the OK button it will be recomputed even
if nothing has changed. To avoid the superfluous recompute purge the
touched flag when the Apply button is pressed.
Matrix processing function eliminateNonZerosOverPivotInUpperTriangularMatrix tried to eliminate ALL non zero values in the upper triangle, even values under a small epsilon. This makes the routine take much more time than it should be. Not considering small values significantly speeds it up, ultimately increasing sketch constraint solving performance.
* Added disc measurements radius, diameter and area.
* [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>
At least for G73, the Z, Q and R parameters seem to be required.
Assuming drill related parameters are required for all drill
operations to err on the safe side.
Fixes#27413
* BIM: initial implementation of sliding door preset
* BIM: fix sliding door context menus
* BIM: limit travel distance
* BIM: increase preset indexes for icons
* BIM: update edit task panel to adapt to sliding doors
* BIM: make rotation/translation data exclusive or
* BIM: remove code duplication for Sliding and -Sliding doors
* BIM: refine travel distance clamping to expose handle
* BIM: make sliding direction independent of geometry direction
* BIM: remove non-visible 2D symbol for now
* BIM: make door leaf wire comment more precise
* BIM: use local coordinates when calculating the start/end points for the sliding track
This PR intruduces a way to dynamicly alias toolbits and adds subtype
for toolbits. Prior to this change, aliases were hardcoded in multiple
locations, making it difficult to maintain and extend. Now, aliases
and the newly subtypes are defined in a single JSON file, which is
loaded at runtime. This allows for easier management and addition of new
aliases or subtypes without modifying the codebase.
Updated the shape system to use a dict format for aliases and subtypes,
improved label formatting, and fixed normalization logic for toolbit
types. Enhanced dropdown display and editor logic to properly handle
subtypes and aliases, including special cases for consecutive capitals.
Users can add shape_aliases.json to the toolbit Shape dirctory allowing
theme to add/remove entries. Adding a "!" in front of a alias or a
subtime removes it from the list.
This PR also introduces the ability for the user to choose tools from
a libary or all tools when adding tools via the Job panel.
src/Mod/CAM/Path/Tool/docobject/ui/docobject.py:
- Added keep_case and preserve_consecutive_caps options to
_get_label_text for improved label formatting
src/Mod/CAM/Path/Tool/shape/__init__.py:
- Refactored alias/subtype loading to support new dict format
- Applied aliases and subtypes to shape classes
src/Mod/CAM/Path/Tool/shape/models/base.py:
- Added subtypes attribute to ToolBitShape
- Updated class lookup to support subtypes
src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Improved normalization logic for aliases and subtypes in
ToolBit.from_dict
src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Updated editor logic to use subtypes and aliases for dropdowns
- Improved read-only and editable state handling
src/Mod/CAM/Path/Tool/toolbit/ui/typefilter.py:
- Used _get_label_text for dropdown filter display with improved
formatting
src/Mod/CAM/Tools/Shape/shape_aliases.json:
- Converted to new dict format with separate aliases and subtypes
* [ArchWall] Fix Regression: sortSketchWidth only in addon
Regression was introduced when get_width() method uses ArchSketchObject.sortSketchWidth() function in below lines.
https://github.com/FreeCAD/FreeCAD/blob/468269b9a6ea58cd8b0f9d8579b711c530db83b2/src/Mod/BIM/ArchWall.py#L1668-L1673
if not lwidths:
if obj.OverrideWidth:
if obj.Base and obj.Base.isDerivedFrom("Sketcher::SketchObject"):
lwidths = ArchSketchObject.sortSketchWidth(
obj.Base, obj.OverrideWidth, obj.ArchSketchEdges
)
ArchSketchObject.sortSketchWidth() function is not in the FC core ArchSketchObject.py module and this results in error. This function would only exist when the external add-on is present and loaded.
Previously, a try/exception test was used; now hasattr() is used in this fix to test the presence of the required function before it is used.
* [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>
* Sketcher: OVP Fix tab not working when mouse move
* [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>
Use pimpl or move definitions to .cpp files in order to avoid including huge Boost headers in core FreeCAD headers. Due to boost inclusions in a few core headers, boost graph utilities, multi index and predicates headers were included in in a large portion of translation units, without them being actually required. This helps reduce build time of the project.
* BIM: regression test for child object stability during wall debasing
Introduces test_debase_wall_stationary_children to verify that objects
attached to a wall (via Additions or Hosts) retain their global position
when the wall's base is removed and its placement is recalculated.
* BIM: Fix wall debasing to maintain stationary child element positions
Corrects the placement propagation that occurred when Arch.debaseWall()
recalculated the Wall's Placement, causing connected children (Windows,
Additions) to shift their global coordinates.
The fix pins children by capturing their current global placements before
the wall's placement is updated, and immediately restoring those placements
after the wall's transformation is complete.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/27267
* Avoid confusing comment about wall placement in TestArchWall.py
---------
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
* BIM: extend ArchComponent test suite
Adds several unit tests to TestArchComponent.py to validate the
coordinate system logic and CSG behavior of generic Arch Components.
Included tests cover:
- Double-transformation/displacement bugs when using moved base objects.
- Correct alignment of CSG additions/subtractions in world space.
- Consistency of Vertical and Horizontal area calculations for
rotated components.
- Automatic geometry spreading (arraying) via the Axis property.
- Cleanup behavior ensuring the shape is cleared when the Base
link is removed.
* BIM: fix double displacement bug and area calculation in ArchComponent
Rewrites ArchComponent.Component.execute to resolve placement
conflicts between the Document Object and its internal TopoShape.
Changes:
- Reset base_shape.Placement to Identity immediately after copying
from the source. This strips inherited placements from the Base
object, ensuring the geometry is local before processing.
- Pass the object's placement to processSubShapes. This allows
additions and subtractions to be correctly localized to the
component's local origin.
- Replaces direct Shape assignment with self.applyShape(). This fixes
area calculations by ensuring the AreaCalculator receives the
correct placement context, and enables automatic geometry
spreading via the Axis property.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/24580
* BIM: Refine base validation in ArchComponent to prevent stale shapes
Updates the validation logic in ArchComponent.execute() to correctly
handle the removal of a base object.
Changes:
- The check on self.ensureBase(obj) now explicitly looks for
False. Because ensureBase returns None when no base is present,
the previous logic would return early and leave the old shape
behind.
- This change allows the method to fall through to the shape-clearing
logic, ensuring that unlinking a base object correctly removes its
geometry from the 3D view.
- Added a TODO note to ensureBase() regarding its undocumented
triple-state return (True, False, None) for future cleanup.
* Measurement: Fix: missing tr() wrapping causing build failure
* Swapped tr() with QLatin1String()
* [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>
* Ensure read only Booleans are shown using Disabled Text color
* Make the disabled text color a more significant contrast to enabled
* Ensure correct contrasting color for Axis letters versus background color for both Light and Dark themes
This fixes a difference between Main code and LS3 Code ported during TNP big merge. The Issue generates a crash if FreeCAD is compiled in Debug Mode: #27489.
Enables the user to change the unit of the measurement temporarily to convert to a different unit. This is useful when the user sometimes needs to get a dimension of the model in a different unit than the one it was designed in.
Sweep tests parse a string and translate it back, verifying identical
output. Values cover every threshold band at 10x increments plus a
scientific-notation value in each default band. Tests all 10 schemas.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a parsed value lands exactly at a threshold boundary (e.g. "1 S/m"
= 1e-9 at threshold 1e-9), floating point rounding could cause the
wrong unit to be selected. Shrink thresholds by a relative epsilon so
boundary values fall through to the next (more natural) unit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Corrects 12 bugs across Internal and MKS schemas where factors were
wrong, units were assigned to the wrong threshold positions, or
thresholds didn't align with natural unit boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Assembly: Isolate grounded objects on selection
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update ViewProviderAssembly.cpp
* Update ViewProviderAssembly.cpp
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Draft_Labels have a unique Placement implementation. A ghost preview therefore cannot be generated in the standard manner. This was missed in #18795 (my bad).
For the import/export use the transparency value of the material property.
Since v1.0 the alpha channel of the diffuse color is used for this but
when changing the transparency in the user interface this alpha channel
won't be adjusted and thus leads to unexpected results.
This fixes issue 18569
* Draft: Fix switchUi method bug
* [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>
Renamed several SVG text element IDs in tool shape files that did not
match the expected naming conventions used. This ensures that the tool
parameters are correctly recognized and utilized by the Tool library
editor.
src/Mod/CAM/Tools/Shape/bullnose.svg:
- Changed text element id from "torus_radius" to "corner_radius"
src/Mod/CAM/Tools/Shape/radius.svg:
- Changed text element id from "cutting_edge_height-7" to
"cutting_radius"
- Changed text element id from "diameter-9" to "tip_diameter"
src/Mod/CAM/Tools/Shape/svg_source/bullnose.svg:
- Changed text element id from "torus_radius" to "corner_radius"
src/Mod/CAM/Tools/Shape/svg_source/radius.svg:
- Changed text element id from "cutting_edge_height-7" to
"cutting_radius"
- Changed text element id from "diameter-9" to "tip_diameter"
Add arithmetic operators (+, -, *, /, unary -) to Value, enabling
element-wise operations on tuples and scalar broadcast with numerics.
Tuple addition/subtraction uses union semantics: named elements match
by name, unnamed elements match positionally, and unmatched elements
pass through. BinaryOp and UnaryOp now delegate to these Value operators.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add MemberAccess AST node and postfix `.member` parsing to support
extracting individual elements from tuple-valued parameters, e.g.
`@ButtonBorderThickness.left` or `@Grays.0`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move Numeric, Tuple, Value, valueTypeName, ArgumentParser, and ParamDef
into their own Value.h/.cpp files. ParameterManager.h now includes
Value.h and keeps only parameter sources and the manager itself.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds ArgumentParser class that resolves mixed positional and named
arguments against a declared function signature (Python-style).
Includes Tuple::get<T>(name) for type-checked access with
user-friendly error messages. Refactors lighten/darken/blend to use it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the separate argument parsing in parseFunctionCall() with a
call to parseTuple(), unifying the two comma-separated-expression
parsing paths. FunctionCall now stores a TupleLiteral instead of
a vector of expressions, and evaluates it into a Tuple value that
functions access via at()/find().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test cases cover unnamed, named, and mixed tuples, single named
elements, nested tuples, expressions and mixed types in elements,
toString roundtrip, Value::holds/get accessors, Tuple::at/find/size,
error handling, and backward compatibility of grouped expressions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add TupleLiteral AST node and parser support for tuple syntax using
parentheses with comma-separated elements: (val1, val2) for unnamed
tuples, (name: val1, val2) for named elements.
Disambiguation with grouped expressions in parseFactor():
- `(identifier:` lookahead → tuple
- expression followed by `,` → tuple
- expression followed by `)` → grouped expression (backward compatible)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a tuple value type to the StyleParameters system, allowing related
values to be grouped into a single parameter with optional named fields.
Tuple is stored inline in the Value variant. The circular dependency
(Value contains Tuple, Tuple elements contain Value) is broken by
storing element values as shared_ptr<const Value> inside Tuple::Element.
Generic holds<T>() and get<T>() template methods are added to Value
for uniform type-checked access to all variant alternatives.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Copper Alloys to Material-Metals
Added a set of Copper Alloys presented in Application Data Sheet
'cda144-8-mechanical-low-temperature.pdf, Nov1974'
Permission and Credit to the 'Copper Distributor's Association (CDA)'
These cards follow values for 295°K
Colours approximate values found by general search of images and
descriptions found on the internet and use FreeCAD's appearances.
* Add Copper Alloy general/generic information
This additional information appears as general info not affected by
anneal or cold drawn or aging factors.
Information found from pages C10200, C12200, C15000, C22000, C23000,
C44300, C46400, C51000, C61400, C64700, C65500, C70600, C71500, C95500
Also followed suggestions of adding tagging and description mentioned
in pull request.
* Add Copper Alloy source URL
Added the URL for the source Application Data Sheet
'cda144-8-mechanical-low-temperature.pdf, Nov1974'
This pdf is hosted by the 'Copper Distributor's Association (CDA)'
Here is the source URL for this pull request in case it's needed:
https://github.com/FreeCAD/FreeCAD/pull/25832
* Add Copper Alloy UltimateStrain for 102,122a,122b at 295°K
102=2.8%, 122a=39.7%, 122b=1.46%
* Add Copper Alloy UltimateStrain for remaining cards 150...955 at 295°K
105=4.13%, 220=41.5%, 230=40.4%, 443=82%, 464=31.8%, 510=3.6%, 614=27%
647=9.9%, 655=10.4%, 706=28.4%, 715=39.9%, 955=10.6%.
Removed spaces between IACS = nn%, so that it all stays on same line.
Added C95500 compressive MPa.
Added C64700 Si and IACS ranges.
Also looked at 'KindOfMaterial' for Steel and made similar edits based
on Table 2 info shown in brackets () to try keep a bit of consistency.
* Fix Ultimate Strain Description and Units
Ultimate Strain is the maximum stretch you can do to a material before it
gives up. This is associated with Ultimate Tensile Strength, which is the
maximum stress you can apply before the material starts to fail, elongate
and eventually fracture.
Units are of the type ΔL/L, such as, stretched 0.10in per 1.0in (10%), or
stretched 0.15mm per 1.0mm (15%). To avoid confusion, use 0.1 or 0.15 and
avoid using 10 as for 10% or 15 as with 15%, and just call it a fraction.
* Add Copper Alloy Elongation, Reduction of Area, Yield Strain, Toughness
Impact Charpy and Notch Tensile Strength are both considered as Toughness
There is currently no use for these in FreeCAD, but maybe a future use as
these are part of the Table 2 and better to add them now vs forget adding
them later. The Charpy test is a fast cost-effective standardized method,
and there are other more sophisticated impact tests that can be "better".
There are other tests than the notch tensile strength test, but it's also
a simple, fast, cost-effective method to create fracture toughness data.
While adding 'Elongation' and 'Reduction of Area' both these are referred
to as percentages (preferred over fraction), it seemed best to change the
'Ultimate Strain' to percentages too for consistency even though this has
was referred to as fraction or percentage when searching for definitions.
Added Yield Strain, probably not important now because the elastic region
is pretty small, but with smart metals that can do up to 5% bends then it
seems something worth adding it for that category of future metal alloys.
* Add Copper Alloy Isotropic, Linear, Toughness Temperature Arrays
* Add Copper Alloy Elastic & Toughness arrays and reduce model wordiness
Reduced wordiness of array models by cutting-out Metal and Temperature
as these are somewhat redundant words.
Added remaining ElasticProperties and PlasticTriaxialProperties.
* Add Copper Alloy Linear Elastic Temperature Arrays
Moved Elongation and ReductionOfArea after YieldStrain/Strength and added
FractureStrength so these are grouped together on the cards since they're
all related (Note: Material viewer resorts these alphabetically).
Linear Elastic arrays are set in the order of strain/strength for Tensile
then strain/strength for Yield, and then Elongation/FractureStrength, and
then ReductionOfArea.
Reviewed pdf again and corrected a few errors missed/made earlier.
- I'm not familiar with absolutely all usages of expressions - this is
intended more as a starting point to make it easy to add more
- The test captures *current* behaviour, please don't assume that
everything it tests is *correct* behaviour
Fix some weird quirks before adding new tests:
- The whole file has clang format off, this feels unnecessary, localize
it to where it's important
- Put the code inside a nested test namespace within the production
namespace, this is generally good practice rather than putting it in
the global namespace, and it means we don't have to explicitly namespace
methods that are directly under test
- Rename variables to camelCase, which afaict is closer to 'normal' in
freecad cpp
- Remove the usage of arrays. Maintaining manual array sizes is
annoying. Just use initializer lists here as they are all constants.
- I have *not* renamed the snake_case methods, as I feel that it
destroys too much of the git history for too little benefit
- Removes many/most of the copy().release() from the last commit
- Still some .release() in the simplify functions now
- It doesn't work to rename simplify and turn it into a protected
method, because it's called recursively within the tree
- We need copy().release() on many of these calls because nodes in the
tree call 'copy' explicitly. It's not really different to the code
that's there now, but it's not pretty either. Some of these will go
away in the upcoming commit
- Most of the usages of 'release' are temporary here, but a few will
likely need to stay. In these cases, the existing behaviour is
retained. To fix all usages, smart pointers would need to be used all
throughout the tree
- The freecad_cast looks awkward now. I haven't added a new version that
works with smart pointers because it's not clear what the right
ownership semantics would be. Make the caller be explicit for now.
- Start at ScanResult, as starting higher makes it easy to have memory
issues.
- There are multiple memory leaks (at least in tests, but possibly in
production code too) from using raw pointers in the public interface
here. Fix these before adding more tests.
- Starts at ScanResult
- The bison changes were applied manually, as I don't think that it's
pixified and running my local version showed many changes.
- I've chosen not to pimplify Expression, but only because it would be
such a significant change for not so much value.
This change was introduced in 80a35a8765 (#24617) and
reverted without explanation in 21a597a85e (#27202).
I assume it was reverted by mistake.
Note that for dynapath_4060_post.py, the original help text did not match the postamble,
illustrating the need to ensure the actual value matches the help text.
Do not directly pass getNameInDocument() to the ostream as this will
set the badbit in case it returns nullptr. As a result no further
output is written to the stream and leads to loss of data.
Instead the returned C string is stored in a local variable and in case
it's nullptr an empty string is passed to the ostream.
At the end of the function writeObjects() it's checked whether the
failbit or badbit is set. If yes an error message is printed and the
failbit or badbit are cleared.
This is supposed to fix the issue 18044.
In case this fix is not sufficient it can be also check for every
object inside writeObjectData()
* Do not raise an exception when saving a document and an object has
'freeze' status because this breaks the project file and may lead
to loss of data.
* Make 'freeze' state persistent
* When toggling 'freeze' status only work directly on the selection.
Do not use in-list or out-list of an object because this makes it
quite inflexible and leads to unpredictable behaviour.
This fixes issue with saving frozen files described in 18806.
This commit comments out javascript for doxygen that does not work
anymore or is unneeded in newer versions. The code is left in for later
attempts to revitalize this functionality, most notable the search
function.
* various bug fixes and updates
* [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>
* BIM: remove LibraryWebSearch option from BIM_Library as it required the Web WB
Removed the 'checkWebSearch' checkbox and updated tooltip text formatting.
* BIM: remove LibraryWebSearch option from BIM_Library as it required the Web WB
* Restore tooltip
* Assembly: Insert flexible assembly grounds the correct part
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Assembly: Migrate ObjectToGround to PropertyLinkGlobal to support assembly links
* Update JointObject.py
* Assembly: ViewProviderAssembly fix assembly link deletion issue
* Assembly: ViewProviderAssembly: make sure no duplicates in canDelete
* Assembly CommandInsertLink fix typo
* [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>
* BIM: add Wall options task box to ArchWall's edit task panel
* BIM: update Align property live on the task box
* BIM: make wall options cancellable
* BIM: make the Component task box actions reversible, in particular debasing a wall
* BIM: implement baseless walls creation (#24595)
* BIM: Implement smart base removal for Walls
Previously, removing the Base object from an Arch Wall would cause the
wall to reset its position to the document origin and could lead to
unintended geometric changes for complex walls.
This commit introduces a "smart debasing" mechanism integrated into the
Component Task Panel's "Remove" button:
- For walls based on a single straight line, the operation now preserves
the wall's global position and parametric `Length`, making it an
independent object.
- For walls with complex bases (multi-segment, curved), a warning dialog
is now presented to the user, explaining the consequences (shape
alteration and position reset) before allowing the operation to
proceed.
This is supported by new API functions `Arch.is_debasable()` and
`Arch.debaseWall()`, which contain the core logic for the feature.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/24453
* BIM: Move wall debasing logic into ArchWall proxy
The logic for handling the removal of a wall's base object was previously
implemented directly within the generic `ComponentTaskPanel` in
`ArchComponent.py`. This created a tight coupling, forcing the generic
component UI to have specific knowledge about the `ArchWall` type.
This commit refactors the implementation to follow a more object-oriented
and polymorphic design:
1. A new overridable method, `handleComponentRemoval(subobject)`, has been
added to the base `ArchComponent` proxy class. Its default implementation
maintains the standard removal behavior.
2. The `_Wall` proxy class in `ArchWall.py` now overrides this method. All
wall-specific debasing logic, including the eligibility check and the
user-facing warning dialog, now resides entirely within this override.
3. The `ComponentTaskPanel.removeElement` method has been simplified. It is
now a generic dispatcher that calls `handleComponentRemoval` on the
proxy of the object being edited, with no specific knowledge of object types.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* BIM: Add interactive creation of baseless walls
Introduce a new workflow for creating Arch Walls without a dependency on
a baseline object (e.g., a Draft Line).
- The `Arch_Wall` command is enhanced with a "No baseline" mode, controlled
by a new "Walls baseline" preference, allowing users to create
placement-driven walls directly in the 3D view.
- The existing `debaseWall` function has been refactored for correctness
and consistency with the new baseless wall geometry.
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
* BIM: Refactor structure of the Arch Wall command
Refactor the `Arch_Wall` GUI command (`BimWall.py`) for improved
readability, maintainability, and architectural clarity.
- A `WallBaselineMode` Enum is introduced to replace the original
integer values, making the code self-documenting.
- The monolithic `create_wall` method is broken down into smaller,
single-responsibility helper functions for each creation mode.
- The `addDefault` method has been removed, with its logic
integrated into the new structure.
* BIM: Add Draft Stretch support for baseless walls
This commit makes the new baseless Arch Walls graphically editable using
the `Draft_Stretch` tool.
- An API for stretching (`calc_endpoints` and `set_from_endpoints`)
has been added to the `ArchWall` proxy.
- The `Draft_Stretch` tool is now aware of baseless walls and calls this
new proxy API to perform the stretch operation, enabling users to
stretch them.
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* BIM: address CodeQL warnings
* BIM: Fix wall alignment for GUI creation of baseless walls
Fixes an issue whereby creating a baseless wall from the GUI would
ignore the selected `Align` property, always resulting in a
center-aligned wall.
- The underlying geometry generation for baseless walls now correctly
honors the `Align` property passed by the GUI and API.
- To ensure predictable behavior, the implementation uses the same
geometric convention as walls built from a base object, making the
`Align` property work uniformly for all wall types.
- This also corrects the behavior of the `Arch.makeWall` function for
baseless walls.
- Update unit tests to test wall alignment.
* BIM: Refactor wall geometry generation for improved clarity and maintainability
Improves the internal logic for wall geometry creation, addressing CodeQL warnings and enhancing overall maintainability without changing external behavior.
- The `build_base_from_scratch` method is refactored to unify the separate logic paths for single- and multi-layer walls, reducing code duplication.
- A local helper function is introduced to create face geometry, for better modularity and readability.
- In the `_Wall.execute` method, the control flow that relied on implicit type checking is replaced with an explicit strategy pattern for fusing solids, making the logic more robust.
- Variable names are made more descriptive.
- A NumPy-style docstring is added to better document the function.
* Draft: fix stretching of rotated baseless walls
* BIM: add unit test for stretching baseless walls
* BIM: add regression tests for working-plane-relative coordinates and reuse of base sketches
* BIM: Fix baseless wall creation to respect the working plane
Corrects an issue where baseless walls were created using global
coordinates instead of being relative to the active Draft working plane.
The calculated local placement of the wall is now correctly transformed
into the global coordinate system by multiplying it with the working
plane's placement.
* BIM: Ensure unique baselines for subsequent wall creation
Fixes a bug where creating multiple walls with baselines would
incorrectly reuse the same underlying Sketch or Draft Line object.
The object retrieval logic after the `doCommand` call now correctly uses
`ActiveObject` to get a reliable reference to the new object instead of
relying on a hardcoded name.
* BIM: Make the wall's base object label translatable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* BIM: use singular for consistency with other labels
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
* Fix typo
* BIM: address reviewer's comments about improving object reference passing between Python and FreeCAD contexts, and functions
* BIM: remove defensive programming: the callback is only executed as a result of a user's GUI action
* BIM: use the params API to define WallBaseline parameter
* BIM: add Arch Wall tests for joining wall logic
* BIM: add joining logic
* BIM: re-add ArchSketch support
* BIM: re-add multimaterial support on wall creation
* BIM: address CodeQL warning, remove module duplication
* BIM: fix check for SketchArch module when creating sketch-based walls
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
* CI: upgrade Ubuntu native build to 24.04
* CI: reenable Ubuntu native build
* CI: abandon PySide6 pip approach, try KDE Neon repos
* BIM: fix mistake in casting return value
* BIM: add wall label to better identify transaction in the Undo stack
* BIM: remove superfluous statement
* BIM: add explanatory comment about additional transaction pending flag
* BIM: Refactor Wall transaction logic to use explicit argument passing
This replaces the `Proxy.InTransaction` flag mechanism with a cleaner
transaction architecture based on explicit argument passing.
The motivation for managing the transaction mechanism is that
previously, removing a Wall's base object via the Task Panel triggered
`debaseWall`, which opened and committed its own transaction
immediately. This nested commit finalized the document state
prematurely, rendering the Task Panel's "Cancel" button ineffective.
The Task Panel now owns the transaction lifecycle for the editing
session. It propagates a `manage_transaction=False` flag down to the
logic layer, preventing nested transactions from committing prematurely.
Key changes:
- Arch.py: `debaseWall` now accepts `manage_transaction` (default True).
Setting it to False allows the Task Panel to disable the nested
transaction and include the debasing operation into its own
transaction context instead.
- ArchComponent.py:
- `ComponentTaskPanel` now manages the transaction lifecycle (Open in
init, Commit in accept, Abort in reject).
- `ComponentTaskPanel.removeElement` now passes
`manage_transaction=False` when calling the object's
`handleComponentRemoval` proxy method.
- Updated `Component.handleComponentRemoval` signature to accept the
`manage_transaction` argument.
- ArchWall.py:
- Updated `_Wall.handleComponentRemoval` to pass the
`manage_transaction` flag to `debaseWall`.
- Cleaned up `WallTaskPanel` by removing the deprecated
`InTransaction` logic and redundant overrides.
* BIM: provide immediate visual feedback on additions and subtractions
* BIM: remove low-level API transaction management
* BIM: Refactor transaction management in ComponentTaskPanel
The C++ GUI layer implicitly manages the transaction lifecycle when
entering and exiting edit mode.
Explicitly opening a transaction in init and committing in accept() is
redundant, as the backend establishes the transaction name and performs
the final commit during the resetEdit() cleanup phase.
The reject() method retains an explicit abortTransaction() call to
signal a rollback, which prevents the backend from committing session
changes by default.
Docstrings are added to clarify this implicit interaction between the
Python UI and the C++ document management logic.
* Wall Options in title case
* QtGui.QApplication.translate -> translate
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
* BIM: add test for horizontal area of tilted cylinders
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix typos and use makeComponent instead of makeStructure
* Change makeComponent back to makeStructure
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
The icon logic in _ViewProviderWall.getIcon previously switched to the
assembly icon for any wall without a Base that contained Additions. This
caused an unexpected icon change when a wall was debased, as it still
retains a parametric body defined by its Length property.
Update the logic to only show the assembly icon if the wall has no Base,
has Additions, and its Length is zero. This ensures that baseless walls
driven by their own dimensions maintain the standard wall icon.
* Base: Add TimeTracker
This adds TimeTracker utility that can be used to orchestrate code
with time measurements in an easy way and detect performance issues.
* Update src/Base/TimeInfo.h
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
When a child (e.g. a Wall) of an ArchBuildingPart (e.g. of a Level)
had both 'Move With Host' and 'Move Base' enabled, it failed to move
the base (e.g. Line) of the child, and only displaced the child
itself (effectively ignoring the 'Move Base' setting).
Example project structure:
Level
|
+- Wall ('Move With Host' = true, 'Move Base' = true)
|
+- (base of Wall) Line
Export mesh object names as 'name' attribute in 3MF files according to
the 3MF specification. This allows downstream tools to identify objects
by their original FreeCAD names.
Changes:
- Moved Exporter::xmlEscape() to Base XMLTools::escapeXml() for shared XML entity escaping
- Update Writer3MF::AddMesh() to accept and output object names with default "" where no attribute will be added
- Updated all codepaths leading to 3mf exports to include the object name
Since we are linking to boost anyway, use boost function for case
insensitive string compare. While there, make affected methods accept
std::string arguments, which simplifies code a bit.
It can happen that TransactionFactory::createTransaction() fails to create a transaction object because an unsuitable type is passed
(like BadType) and returns a null pointer.
The calling instances (Transaction::addObjectChange, Transaction::addObjectDel, Transaction::addObjectNew, Transaction::addOrRemoveProperty)
do not check for a null pointer and thus cause a segmentation fault by dereferencing it.
To fix the issue change the above methods to explicitly handle a null pointer.
This fixes issue 21095.
Note: In this case it's caused by the class ViewProviderFace which on purpose isn't added to the type system so that its type will be BadType.
If the property is added to a view provider then in debug mode this will
cause a crash while in release mode this will cause undefined behaviour
because of a static_cast.
To fix crashes remove the assert() and replace the static_cast with
freecad_cast.
Put the reading of each expression of an object into a try/catch block. This is to avoid that all expressions of an object may be lost.
This mitigates the issue 19866
- FileOptionsDialog is only used in the 'save screenshot / save image'
codepath, and currently it doesn't set a directory to it defaults to
process CWD, which is surely not what the user wants.
- The load image codepath uses a custom QFileDialog instead of the
helper code in FileDialog, there doesn't seem to be a great reason for
this, although the helper doesn't have support for mime types it seems.
- I haven't changed the dialogs to 'set/store' the working directory. I'm
not sure this is desired as this isn't a 'normal' save/load operation.
- It would be ideal to remove the FileOptionsDialog in future. The
extended functionality could be turned into a separate dialog which
opens before or after the file chooser. This would allow native dialogs
to be used and would unify the code paths for file selection.
- Further, it would be nice to just merge at least the load image into
the existing import/open option, and to put 'save image' next to
'export', but those changes may be much more time consuming.
For now I've kept it simple. Let's see what others think.
* Menu text "Align Horizontal/Vertical Chain Dimensions" to match "Align Oblique Chain Dimensions"
* Menu text "Centerline Between 2 Faces" is not correct.
* Update button text "Replace References With Current Selection" to title case
* Change task panel title from 'Add offset vertex' to 'Offset Vertex'
* Correct text casing for 'Pick points' button
* Correct text casing for 'Pick points' and 'Edit points'
* Fix capitalization of task panel section title
* Correct text case for 'Escape Picking' button
* Update texts for centerline buttons to match menu texts
This commit addresses two regressions in the MultiCommon feature:
1. Computation Logic: Fixed an issue where the common operation was
calculated as the intersection of the first shape with the union of
the rest (the default behavior of makeElementBoolean). It now
correctly computes the intersection of all shapes sequentially.
2. Compound Handling: Added logic to expand a single compound input
into its constituent shapes. Previously, a compound was treated
as a single entity, leading to incorrect intersection results.
To maintain backward compatibility, a hidden 'Behavior' property is
introduced. This ensures that documents created in FreeCAD 1.0, which
rely on the previous behavior, continue to render as originally
intended while new objects use the corrected logic.
* Part: Fix mirror() regression with non-identity Placement
The makeElementMirror() function incorrectly extracted and pre-multiplied
the shape's Location with the mirror transform. Since BRepBuilderAPI_Transform
already handles shapes with Location correctly, this resulted in the placement
being applied twice, producing incorrect results for shapes with non-identity
Placement.
Fixes#20834
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Part: Add regression test for mirror() with Placement
Adds testTopoShapeMirrorWithPlacement to verify that mirror() produces
identical results regardless of whether the shape is positioned via
direct coordinates or via Placement.
This test would have caught the bug fixed in the previous commit where
shapes with non-identity Placement produced incorrect mirror results.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix regression test for mirror with Placement
The test was incorrectly trying to create equivalent boxes using
different methods that don't actually produce the same geometry.
Part.makeBox with a direction vector is not equivalent to setting
a Placement with rotation.
Fixed to use the correct approach that demonstrates the actual bug:
- Method 1: Box with geometry at (0,30,0), identity Placement
- Method 2: Box with geometry at origin, moved via Placement
Both should produce identical mirror results, which they now do
with the makeElementMirror() fix.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Timothy Miller <theosib@zeromark.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Implement the methods Save() and Restore() for PropertyIntegerConstraint and PropertyFloatConstraint. Handle also the case of a user-defined ranges.
This fixes https://github.com/FreeCAD/FreeCAD/issues/24571.
Hint: For PropertyQuantityConstraint this is not doable because it doesn't support user-defined ranges
* cam: attempt to fix issue #26652 ie. fix issue with state of recompute button for tool bit
* add unit test for issue #26652
* run precommit
* relocate `purgeTouched()` call to end of `_update_visual_representation` function
* Assembly: Change Joint References to remove cyclic dependency.
* Update JointObject.py
* Update TestCore.py
* Update JointObject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update AssemblyUtils.cpp
* Update UtilsAssembly.py
* Update JointObject.py
* small fix for link groups
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* PartDesign: Add interactive gizmo for draft operation
* [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>
Cache object property list in expression completer, so it is not rebuilt for every requested index. This helps with performance when an object has a large number of properties.
* Added support for cylindrical surfaces
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed unnessecary sign
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Reverted change
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Make sure to use the active default values for preamble and postamble in the help text,
and provide the current default values as the default in the add_argument().
The only exception is uccnc_post.py, where the real default value depend on the use of
--no-comments, and sending the default argument to add_argument() would change behaviour.
This change was inspired by the changes done to fix (#20792) in
d84d9c9bd1.
Fix "Activating a body in a part in an assembly deactivates the assembly and activate the part"
Fix "A manually deactivated assembly is still restoring later"
* Gui: Fix property checkbox regression
* Update PropertyItemDelegate.cpp
* Gui: property checkbox: toggle with enter when it has focus
* [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>
Fixes#26965
`self.snapObjectIndex` should be increased if the object under the cursor is not 'snappable'. This is the same principle as is used in the `cycleSnapObject` function.
Updated makeShellFromUpToShape to accept the direction vector by reference.
This allows the method to reverse the direction internally if required
to successfully reach the target face, fixing cases where the extrusion
would otherwise fail or go the wrong way.
Note: While passing the direction as a non-const reference is a quick
fix for this regression, it is acknowledged as non-ideal and should
be considered for future refactoring.
This commit registers last rendered shape within the ViewProvider for
Part objects and short-circuits the visuals recomputed if shape did not
change.
Co-Authored-By: Kacper Donat <kadet1090@gmail.com>
* BIM: Add tests for ArchComponent.AreaCalculator.isFaceVertical
* BIM: test new area calculation fallback case
* BIM: add test for composite complex surface vertical area calculation
The linter report 'private field 'decimals' is not used'. The
getDecimals() method return pack.defDecimals, which was also
used to set the value of the decimals variable in the initializer,
so the decimals variable is redundant.
Introduced new toolbit and shape models for tapered ball nose tools,
including schema, summary, and integration into CMake and module
imports. Added corresponding SVG and FCStd files to resources.
Updated SVGs so end markers (arrows) render correctly in Qt by
converting markers to paths. Kept a source SVG with markers as
strokes (not paths) for future editing and updates.
Reworked the ToolBitEditor UI to display the toolbit to the right of the
toolbit properties, improving usability. Shrunk the overall height of
the editor window to better fit typical screen sizes.
src/Mod/CAM/CMakeLists.txt:
- Registered new taperedballnose toolbit and shape models and resources
- Added updated SVGs and source SVGs for marker compatibility
src/Mod/CAM/Path/Tool/shape/__init__.py:
- Imported ToolBitShapeTaperedBallNose and added to __all__
src/Mod/CAM/Path/Tool/shape/models/taperedballnose.py:
- Added ToolBitShapeTaperedBallNose class with schema and label
src/Mod/CAM/Path/Tool/toolbit/__init__.py:
- Imported ToolBitTaperedBallNose and added to __all__
src/Mod/CAM/Path/Tool/toolbit/models/taperedballnose.py:
- Added ToolBitTaperedBallNose class with summary and integration
Tools/Shape/taperedballnose.svg, Tools/Shape/taperedballnose.fcstd:
- Added new SVG and FCStd for tapered ball nose
- Updated SVGs for correct marker rendering in Qt
- Kept editable source SVGs with markers as strokes for future updates
d885ae35147 {doc} Update CHANGELOG for 3.3.0
9e7c0a25e4c {cmake} Update version to 3.3.0
8b668f19380 {doc} Update CHANGELOG
dcdda358b0f {doc} Add MicMac to README
5fb956155c7 Replace codecvt_utf8_utf16(deprecatred in C++17) with WIN32 API if C++>=17
a99cbb9ac82 {ci} Update actions/checkout to v5
23a37530095 {ci} Fix CI warnings
04a913cc35e {ci, doc} Fix clang -documentation warnings (#327)
7e3079b9a35 {ci} Make Windows CI working again (#325)
bab1d8b2350 {doc} Update CHANGELOG
git-subtree-dir: src/3rdParty/libE57Format
git-subtree-split: d885ae35147dabd0ad9f6a85e46538b27b1b701c
Corrected CMakeLists.txt to ensure Path/Machine/ui/editor Python files
are installed and packaged properly. The previous variable name typo
prevented these files from being included in AppImage and install
targets, though local builds worked due to build directory copying.
This resolves missing module errors on some systems and in AppImage.
src/Mod/CAM/CMakeLists.txt:
- Fixed INSTALL command to use the correct
PathPythonMachineUiEditor_SRCS variable for Path/Machine/ui/editor
- Ensured all relevant Python files are included in both build and
install steps
* CAM: Drilling - Fix regression after #26584
* CAM: Linking generator - Fix machinestate handling
Fix linking generator for drilling
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add remaining logic to terminate canned cycles appropriately (#2)
* sorted heights
* Refactor buildPostList
Introduces early tool prep to the buildpostables.
Allows emitting a T command early to give tool changer
time to index the tool before the M6 tool change command is emitted.
updates unit testing for this use case
Not implemented in postprocessors yet.
fix
* Helper and tests for terminating canned cycles
fix cycle termination
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* CAM: setFeedRate now aware of drilling semantics (#3)
Remove retract plane property
machinestate properly handling z position
* next bugs (#4)
* setFeedRate now aware of drilling semantics
Remove retract plane property
machinestate properly handling z position
* unnecessary import.
Improved linking
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix rendering of canned cycles in G99 mode (#5)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix for collision (#6)
* collision bug fix
* fix local variable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [ArchWall] Fix: Better Info 0 Width Or 0 Height
Fix#25338
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [ArchWall] (Update) Fix: Better Info 0 Width Or 0 Height
Update - Following discussion at https://github.com/FreeCAD/FreeCAD/pull/25878Fix#25338
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [ArchWall] (Update 2) Fix: Better Info 0 Width Or 0 Height
Update - Following discussion at #25878
Update 2 - Add translation
Fix#25338
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [ArchWall] (Update 3) Fix: Better Info 0 Width Or 0 Height
Update - Following discussion at #25878
Update 2 - Add translation
Update 3 - Follow comment on https://github.com/FreeCAD/FreeCAD/pull/25878#issuecomment-3724698834
- Test of shape further relocated to after self.applyShape()
Fix#25338
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improve warning message for ArchWall object
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
* Sketcher: Fix symmetry of slot redundancy false positive
Perturb symmetric geometries when using the 'create symmetric constraints' option to avoid numerical singularities in the solver (Jacobian Rank).
If geometry is "perfect", the solver cannot distinguish between the derivative of a Symmetry constraint and an Equal constraint, flagging one as redundant.
* BIM: Implement smart base removal for Walls
Previously, removing the Base object from an Arch Wall would cause the
wall to reset its position to the document origin and could lead to
unintended geometric changes for complex walls.
This commit introduces a "smart debasing" mechanism integrated into the
Component Task Panel's "Remove" button:
- For walls based on a single straight line, the operation now preserves
the wall's global position and parametric `Length`, making it an
independent object.
- For walls with complex bases (multi-segment, curved), a warning dialog
is now presented to the user, explaining the consequences (shape
alteration and position reset) before allowing the operation to
proceed.
This is supported by new API functions `Arch.is_debasable()` and
`Arch.debaseWall()`, which contain the core logic for the feature.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/24453
* BIM: Move wall debasing logic into ArchWall proxy
The logic for handling the removal of a wall's base object was previously
implemented directly within the generic `ComponentTaskPanel` in
`ArchComponent.py`. This created a tight coupling, forcing the generic
component UI to have specific knowledge about the `ArchWall` type.
This commit refactors the implementation to follow a more object-oriented
and polymorphic design:
1. A new overridable method, `handleComponentRemoval(subobject)`, has been
added to the base `ArchComponent` proxy class. Its default implementation
maintains the standard removal behavior.
2. The `_Wall` proxy class in `ArchWall.py` now overrides this method. All
wall-specific debasing logic, including the eligibility check and the
user-facing warning dialog, now resides entirely within this override.
3. The `ComponentTaskPanel.removeElement` method has been simplified. It is
now a generic dispatcher that calls `handleComponentRemoval` on the
proxy of the object being edited, with no specific knowledge of object types.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* BIM: Add interactive creation of baseless walls
Introduce a new workflow for creating Arch Walls without a dependency on
a baseline object (e.g., a Draft Line).
- The `Arch_Wall` command is enhanced with a "No baseline" mode, controlled
by a new "Walls baseline" preference, allowing users to create
placement-driven walls directly in the 3D view.
- The existing `debaseWall` function has been refactored for correctness
and consistency with the new baseless wall geometry.
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
* BIM: Refactor structure of the Arch Wall command
Refactor the `Arch_Wall` GUI command (`BimWall.py`) for improved
readability, maintainability, and architectural clarity.
- A `WallBaselineMode` Enum is introduced to replace the original
integer values, making the code self-documenting.
- The monolithic `create_wall` method is broken down into smaller,
single-responsibility helper functions for each creation mode.
- The `addDefault` method has been removed, with its logic
integrated into the new structure.
* BIM: Add Draft Stretch support for baseless walls
This commit makes the new baseless Arch Walls graphically editable using
the `Draft_Stretch` tool.
- An API for stretching (`calc_endpoints` and `set_from_endpoints`)
has been added to the `ArchWall` proxy.
- The `Draft_Stretch` tool is now aware of baseless walls and calls this
new proxy API to perform the stretch operation, enabling users to
stretch them.
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* BIM: address CodeQL warnings
* BIM: Fix wall alignment for GUI creation of baseless walls
Fixes an issue whereby creating a baseless wall from the GUI would
ignore the selected `Align` property, always resulting in a
center-aligned wall.
- The underlying geometry generation for baseless walls now correctly
honors the `Align` property passed by the GUI and API.
- To ensure predictable behavior, the implementation uses the same
geometric convention as walls built from a base object, making the
`Align` property work uniformly for all wall types.
- This also corrects the behavior of the `Arch.makeWall` function for
baseless walls.
- Update unit tests to test wall alignment.
* BIM: Refactor wall geometry generation for improved clarity and maintainability
Improves the internal logic for wall geometry creation, addressing CodeQL warnings and enhancing overall maintainability without changing external behavior.
- The `build_base_from_scratch` method is refactored to unify the separate logic paths for single- and multi-layer walls, reducing code duplication.
- A local helper function is introduced to create face geometry, for better modularity and readability.
- In the `_Wall.execute` method, the control flow that relied on implicit type checking is replaced with an explicit strategy pattern for fusing solids, making the logic more robust.
- Variable names are made more descriptive.
- A NumPy-style docstring is added to better document the function.
* Draft: fix stretching of rotated baseless walls
* BIM: add unit test for stretching baseless walls
* BIM: add regression tests for working-plane-relative coordinates and reuse of base sketches
* BIM: Fix baseless wall creation to respect the working plane
Corrects an issue where baseless walls were created using global
coordinates instead of being relative to the active Draft working plane.
The calculated local placement of the wall is now correctly transformed
into the global coordinate system by multiplying it with the working
plane's placement.
* BIM: Ensure unique baselines for subsequent wall creation
Fixes a bug where creating multiple walls with baselines would
incorrectly reuse the same underlying Sketch or Draft Line object.
The object retrieval logic after the `doCommand` call now correctly uses
`ActiveObject` to get a reliable reference to the new object instead of
relying on a hardcoded name.
* BIM: Make the wall's base object label translatable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* BIM: use singular for consistency with other labels
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
* Fix typo
* BIM: address reviewer's comments about improving object reference passing between Python and FreeCAD contexts, and functions
* BIM: remove defensive programming: the callback is only executed as a result of a user's GUI action
* BIM: use the params API to define WallBaseline parameter
* BIM: add Arch Wall tests for joining wall logic
* BIM: add joining logic
* BIM: re-add ArchSketch support
* BIM: re-add multimaterial support on wall creation
* BIM: address CodeQL warning, remove module duplication
* BIM: fix check for SketchArch module when creating sketch-based walls
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
* Part: Fix Part_Extrude taper angle regression for internal faces
The taper angle for holes (inner wires) in `Part_Extrude` was not being
negated after the toponaming refactor, causing internal faces to taper
in the wrong direction compared to v0.21.2.
The original makeDraft function correctly handled inner wires by:
- Negating taper for all inner wires in Part_Extrude
- Negating taper only for multi-edge inner wires in PartDesign
This logic was controlled via an isPartDesign function parameter.
When makeElementDraft was introduced for toponaming support, it was
designed to use innerTaperAngleFwd/innerTaperAngleRev fields that were
never ported from realthunder's branch. The cleanup (commit c31ebeeee6)
removed references to these non-existent fields, leaving makeElementDraft
with no inner wire taper handling at all.
So, this fix ports the makeDraft inner wire logic to makeElementDraft by
adding the flag, and counting wires and then triggering proper angle
flip depending on the flag/wire situation.
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Arc segments with extremely large radius compared to chord length can
cause floating-point precision issues in simulation. This change
introduces ARC_LINEARIZATION_THRESHOLD to treat such arcs as linear,
improving numerical stability in the simulator.
The following g-code was causing erractic behavior in the simulator due
to large-radius arcs:
```
G2 I88775.835760 J-1936991.545892 K0.000000 X102.063107 Y100.102815 Z12.700001
```
src/Mod/CAM/PathSimulator/AppGL/MillPathSegment.cpp:
- Added ARC_LINEARIZATION_THRESHOLD constant
- Updated arc motion detection to treat large-radius arcs as linear
- Improved handling of arc vs. linear segment classification
* Add None check before constraining new_point
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
App::DocumentObject had docstrings both in the cpp file and in the
header file. All documentation has been moved to the header file. In
cases where documentation existed in both the header and cpp file, the
documentation has been reconciled.
* Gui: Add common types to Add Property dialog
Add a preselection of commonly used types in the Add Property dialog.
The dialog supports now all properties that have an editor. This
doesn't necessarily mean that the editor is shown in the Add Property
dialog; some properties should not show their editor in the Add Property
dialog, such as vector and placement.
* Gui: Make Add Property dialog Qt 6 compatible
This change stops using a Qt 6.10 feature and makes it compatible with
all of Qt 6.
* Update src/Gui/Dialogs/DlgAddProperty.cpp
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* added a copy button which copies all the errors and traceback to clipboard
* removed unused variable
* removed space at end of Copy string
* copied text notification in status bar
* removed unwanted header
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Test: Address review comments
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This is followup for https://github.com/FreeCAD/FreeCAD/pull/26563 which
fixed previews for a given file but broke it for others.
This approach should be more robust as it is applied in the Feature
itself and not on view provider level which should give us more precise
control and per feature transform ability.
This commit introduces PreviewUpdateScheduler class that is responsible
to schedule the true recompute of the preview. View Providers (or other
components) can use this service to ask for the preview recompute to
happend at a time that is convinent for a program and that won't impact
performance.
The provided implementation uses Queued Connections in Qt to calculate
preview essentially on next run of the event loop. It allows business
logic in FreeCAD (like property propagation) to execute fully and then
recompute preview once. This greately reduces number of recompute calls
for previews.
- The initial commit to block shortcuts in text edit fields
(particularly for MacOS, where those shortcuts would activate FreeCAD
functionality rather than text edit functionality) made a wrong
assumption.
- It assumed that there were no text edit fields where we would want to
actually use application shortcuts. In retrospect, this was very
wrong, and I completely missed the macro editor.
- For now, it should be fine to change the field to only cover
'LineEdit'. I cannot imagine a case where you'd want to (e.g.) save
text/document from a LineEdit, but if anyone knows of one then please
let me know.
- This does mean there are some quirks. For example in the materials
editor, the description is a TextEdit field. Some text editing
shortcuts won't work in here now (similar to how they didn't before
the original commit that I made).
- I've since learned that freecad also has a text editor functionality,
I've tested that now Cmd+S works for save as it should.
Major refactor of the Machine Editor to use QTabWidget for section
navigation. Added tabbed spindle management with add/remove
functionality, split machine configuration into Output Options, G-Code
Blocks, and Processing Options tabs. Updated preferences UI to use tabs
instead of QToolBox.
src/Mod/CAM/Gui/Resources/preferences/PathJob.ui:
- Replace QToolBox with QTabWidget for preferences tabs
src/Mod/CAM/Path/Dressup/Gui/Preferences.py:
- Use QWidget with vertical layout instead of QToolBox for dressup
preferences
src/Mod/CAM/Path/Machine/ui/editor/machine_editor.py:
- Refactor to use QTabWidget for editor sections
- Implement tabbed spindle management with add/remove
- Split configuration into Output Options, G-Code Blocks, and Processing
Options tabs
- Update post processor selection logic
src/Mod/CAM/Path/Main/Gui/PreferencesJob.py:
- Update to use tabWidget instead of toolBox
src/Mod/CAM/Path/Tool/assets/ui/preferences.py:
- Use QWidget and direct layout instead of QToolBox for asset
preferences
This recompute seemed unnecessary, and caused slowdowns when opening the file and recomputing. This decreases the time necessary to both open and recompute files that use boolean operations, and should not change anything regarding preview computation when the dialog is open.
* Adding retract annotation to drilling commands
checkpoint
* [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>
* CAM: Dropped trailing percent from fanuc post processor output.
A trailing percent cause one Fanuc controller to hang when the program
is completed when drip feeding G code, and the minicom ascii upload
was unable to complete the upload.
Had to use emergecy stop to get the machine out of the hang.
* CAM: Adjust Fanuc post processor test to no longer expect trailing percent.
* Patch for DXF without CODE30 (Z for POINT)
Time to time I use DXF file from measurement microscope without Z for POINT.
This patch help me for download this files without errors.
* [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>
Removed explicit colons from all form labels.
Fixed lint warnings and replaced wildcard imports with explicit
imports for clarity and maintainability.
src/Mod/CAM/Path/Machine/ui/editor/machine_editor.py:
- Removed ':' from all form labels
- Fixed lint warnings (missing docstrings, empty except, etc.)
- Replaced wildcard imports with explicit imports
src/Mod/CAM/Path/Machine/models/__init__.py:
- Updated __all__ and imports for explicit API
src/Mod/CAM/Path/Tool/assets/ui/preferences.py:
- Updated imports to use package-level import
src/Mod/CAM/Path/Machine/models/machine.py:
- Added explanatory comments to empty except blocks
- Fixed duplicate variable assignment
- Added missing class docstrings
src/Mod/CAM/CAMTests/TestMachine.py:
- Fixed unused variable warning by using returned filepath
This PR introduces a machine object and a machine library, along with a
new machine editor dialog for creating and editing *.fcm machine asset
files. The editor is integrated into the CAM preferences panel, with new
Python modules for the dialog and minimal model validation. Machine
management (add, edit, delete) is now available in the CAM asset
preferences panel.
Key Features:
- Machines now have a type and units property. The machine type can be
used to distinguish between different classes of machines (e.g., mill,
lathe, laser).
- Machine units are stored internally and in the .fcm JSON file as
metric. Note: This differs from how toolbits work (which store units in
their native units)
- Support for 2-5 axis machines.
- Support for multiple spindles (up to 9)
- Processor defaults
- JSON Text Editor with basic validation and line numbers.
* Part: Fix orientation of internal shells of a solid
If a solid consists of multiple shells then it can happen that the
internal shells have incorrect orientation that leads to a broken solid.
This fixes issue https://github.com/FreeCAD/FreeCAD/issues/24994
* Part: Add method Feature::fixSolids
This method explicitly checks for solids with the error
'BRepCheck_EnclosedRegion' that means that internal shells of a solid
are wrong.
Using ShapeFix_Solid fixes the solid.
---------
Co-authored-by: wwmayer <wmayer@freecad.org>
* Gui: Handle exception in showValidExpression
If an exception is raised inside showValidExpression() because the
expression cannot be evaluated then handle the exception and show it as
invalid expression.
This fixes issue: https://github.com/FreeCAD/FreeCAD/issues/26501
---------
Co-authored-by: wwmayer <wmayer@freecad.org>
Currently, the selection batching optimization introduced in #26663
stores ElementItem/ConstraintItem pointers in a buffer to be processed
on the next event loop cycle via `QTimer::singleShot`.
When a constraint is applied,
`slotElementsChanged()/slotConstraintsChanged()`
rebuilds the list widget, destroying all items. However, the selection
buffer was not cleared, leaving dangling pointers. When
`processSelectionBuffer()`
executed, it attempted to call `QListWidget::row()` on deleted items,
causing a segmentation fault.
So, this patch fixes it by clearing `selectionBuffer` when the list is
rebuilt, since the buffered pointers are invalidated anyway.
This reverts commit 527b2de560.
The `bakeInTransform()` call uses `transformGeometry()` which converts
planar faces to BSplineSurfaces. This prevents the refine algorithm
(BRepBuilderAPI_RefineModel) from detecting and merging coplanar faces,
breaking the Refine option for Boolean operations.
This matches Part WB's Boolean behavior which does not use
`bakeInTransform()` and has working refine functionality.
Fixes the following issue:
```
Warning:
/Users/runner/work/FreeCAD/FreeCAD/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h:76:32:
warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated
[-Wdeprecated-pragma]
76 | std::atomic<bool> m_blocked = ATOMIC_VAR_INIT(false);
| ^
```
* Sketcher: Support Bezier and Offset curves as external geometry
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Sketcher: Fix adding projection of external arc of circle
In processEdge() it's checked if first and last point of the projected arc of circle are almost equal. If yes then a full circle
is assumed but this conclusion is not necessarily correct because it's still possible that the external arc of circle is very
short. The better criterion is to check the parameter range of the arc of circle.
See also: https://github.com/FreeCAD/FreeCAD/pull/25144#issuecomment-3502916685
---------
Co-authored-by: wwmayer <wmayer@freecad.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* PartDesign: Enable drag and drop of shapeBinders
* [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>
* Add diameter measurement support
* change author name and change icon
* correct svg size to 64x64
* Update src/Mod/Measure/App/MeasureDiameter.cpp
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* somehow to icon color is undefine in inkscape, change to black
* Revert "somehow to icon color is undefine in inkscape, change to black"
This reverts commit 2277c1b9f4a7ab7519856986e2d6aec6e37ebf3e.
modified: src/Mod/Measure/Gui/Resources/icons/Measurement-Diameter.svg
* fix black color icon
---------
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
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.
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.
Changes include:
1. Modernize `for` loops with range whenever possible.
2. Flip `if` statements for a "flatter" flow.
3. Use internal functions for repeated identical tasks.
* [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.
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.
* [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>
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.
* 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>
- Offset and None cut Pattern error
- Ensure the tool is directly above the entry point before plunging,
- Retract to SafeHeight instead of ClearanceHeight between transitions
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
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.
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
* 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`.
* 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>
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
* 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.
* 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.
* 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>
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.
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.
* 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
Change `ViewProviderPart` to inherit from `ViewProviderGeometryObject`,
giving Part containers the Selectable property. This allows recursive
selectability checks to respect the entire container hierarchy.
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.
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.
- 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
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.
Currently if user selects object with `Selectable=false` property which
is nested inside a Part container, for example `Part->Body->Pad`, parent
Part container will get highlighted in the 3D view, even though the user
clicked on a non-selectable child object.
Cause of that is that tree view's `getTopParent()` function resolves
nested objects selections to their top-level container. When a Pad
inside Part is selected, `SoFCUnifiedSelection` was only checking Part's
`isSelectable()` status, even though the target is `Pad`.
So the fix is to resolve subname to get the final target object and
checks its `isSelectable()` status before checking for highlighting.
* 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
* 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>
- 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.
The current code in \src\Mod\CAM\Path\Main\Gui\Job.py (line 719) ignores selected stock selections. In case of e.g. cloned stock objects it defaults to the first item in the combolist, showing a wrong stock selection.
The cause lies in comparing different strings to find a label match, but one string object is generic (short name) while the other one has a suffix created during the clone process. The strings never match and the ridgid string comparison fails. I recommend using a partial (needle in haystack) string comparison.
This PR adds migration for toolbit units by automatically infering the
Units (Metric/Imperial) from toolbit parameter strings and sets the
Units property if missing. It adds a utility function to detect units
from JSON. This is done at the JSON level during migration to ensure
that all toolbits have the correct Units property set.
src/Mod/CAM/Path/Tool/toolbit/migration.py:
- Infer Units from parameter strings if not set during migration
- Set Units property and log inference
- Refactor migration logic for clarity and reliability
src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Use Path.Log.debug instead of print when adding Units property
src/Mod/CAM/Path/Tool/toolbit/util.py:
- Add units_from_json() to infer Metric/Imperial from parameter strings
- 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.
* 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
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.
* Sketcher: add reverse mapping correction to Carbon Copy
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replace M_PI with std::numbers::pi
* Replace vector initialization with Base::Vector3d::UnitX/UnitY, apply suggestions from code review
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Fix guard clause logic, apply suggestions from code review
* Replace std::numbers::pi with pi via `using std::numbers`
* Fix issues reported by the linter
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* 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
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.
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>
* 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`.
* 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>
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.
* 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>
- starts finishing pass farther down, to avoid looping back for it
This now has all the features to address #19768, but I think I want to
pick out just what is required for that PR
- rewrote area calculation using floats; it works (compared against
Clipper as ground truth)
- rewrote boundary approach code
- rewrote min cut/min engage code
Improves the point-based TSP solver to match tunnel solver behavior
for open routes (no endpoint constraint). Now applies 2-opt and
relocation optimizations that allow reversing or relocating segments
to the end of the route, resulting in better path optimization when
the ending point is flexible. Now links tsp_solver with
Python3::Python and uses add_library for compatibility with FreeCAD
and Fedora packaging.
src/Mod/CAM/App/tsp_solver.cpp:
- Add optimization limit variables for controlled iteration
- Add 2-opt and relocation optimizations for open routes
- Use Base::Precision::Confusion() for epsilon values
- Track last improvement step for efficient loop control
src/Mod/CAM/App/CMakeLists.txt:
- Switch tsp_solver from pybind11_add_module to add_library
- Link tsp_solver with pybind11::module and Python3::Python
- Update include directories for consistency
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.
Update TSP tunnel solver to match revised Pythonlogic, including
improved early exit, open-ended route handling, and performance tweaks.
Also ensure extra data in tunnel dictionaries is preserved through the
C++/Python interface and add a test for passthrough of extra keys.
src/Mod/CAM/App/tsp_solver.cpp:
- Refactor optimization loop to use lastImprovementAtStep and limit
variables
- Add special handling for open-ended routes (no end point)
- Change epsilon to 10e-6 for consistency with Python
- Cache distance calculations for relocation step
src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Preserve extra keys from input tunnel dicts in output
- Set tunnel index for passthrough
src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Add test to verify extra data in tunnel dicts is preserved through
TSP solver
- Print extra data for debugging
Ensures that all extra keys in tunnel dictionaries are preserved after
TSP solving by copying the original input dict and updating solver
results. Adds a dedicated test to verify passthrough of extra data and
prints extra keys for debugging.
src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Copy original tunnel dict and update with solver results to preserve extra keys
src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Add test_09_tunnels_extra_data_passthrough to verify extra data preservation
- Print extra tunnel data in print_tunnels for easier debugging
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.
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.
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.
Added extensive test coverage for the TSP tunnel solver including linear
tunnels, pentagram diagonals, and complex wire geometries with various
constraint combinations. Introduced a Python wrapper function for
tunnel sorting that integrates with the C++ solver.
src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Renumbered existing tests to run in sequential order
(test_01_simple_tsp, test_02_start_point, etc.)
- Added print_tunnels() helper function for displaying tunnel
information with original indices
- Added test_06_tunnels_tsp: Tests 7 linear tunnels with varying
lengths, connectivity, and flipping behavior
- Added test_07_pentagram_tunnels_tsp: Tests pentagram diagonal tunnels
with no constraints, start+end constraints, and start-only constraints
- Added test_08_open_wire_end_only: Tests end-only constraint on complex
wire with 8 tunnels including crossings and diagonals
src/Mod/CAM/PathScripts/PathUtils.py:
- Added sort_tunnels_tsp() wrapper function that interfaces with the C++
tsp_solver.solveTunnels()
- Supports allowFlipping, routeStartPoint, and routeEndPoint parameters
This is a quick and dirty fix for https://github.com/FreeCAD/FreeCAD/issues/22010
Basically if we want to use a bigger marker size than available, we use the biggest one
available. This is not a good way to fix the issue - we should ensure that the marker
size that the user requests is actually available - this, however, requires more
significant changes to the code.
Introduce TSPTunnel struct and implement TSPSolver::solveTunnels
for optimizing tunnel order with support for flipping and start/end points.
Expose the new functionality to Python via pybind11, returning tunnel
dictionaries with flipped status.
src/Mod/CAM/App/tsp_solver.cpp:
- Add solveTunnels implementation for tunnel TSP with flipping and route endpoints
src/Mod/CAM/App/tsp_solver.h:
- Define TSPTunnel struct
- Declare solveTunnels static method in TSPSolver
src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Add Python wrapper for solveTunnels
- Expose solveTunnels to Python with argument parsing and result conversion
* BIM: BIM Report MVP
* BIM: add Arch.selectObjects() API call and tests
* BIM: adopted ArchSchedule spreadsheet update and linking patterns
* BIM: SELECT with dynamic headers and dynamic data population
* BIM: fix deletion, dependencies, and serialization issues
* BIM: transition from individual query to multiple-query statements
* BIM: Mostly fix serialization issues
* BIM: Report editor UI/UX improvements
- Make edits directly on table (Description field only, for now)
- Sync table edits with query editor (Description field only, for now)
- Fix Property group name for spreadsheet object
- Add tooltips for all task panel widgets
- Put Description input and label on the same row
- Edit statement is now a static title
- Open report editor upon creation
- Remove overview table's redundant edit button
- Put report query options in a box
- Open spreadsheet after accepting report changes
* BIM: Aggregarion and grouping - implement GROUP BY with COUNT(*)
* BIM: Aggregation and grouping - implement SUM, MIN, MAX functions
* BIM: Aggregation and grouping - implement validation
* BIM: add reporting presets support
* BIM: align description and query preset inputs vertically
* BIM: write units on their own spreadsheet cell
* BIM: update test suite to new SQL engine behaviour
* BIM: fix various bugs: return values should not be stringized, non-grouped query with mixed extractors, handle nested properties
* BIM: expand Report test suite, fix property count vs count all bug
* BIM: add report engine SQL's IN clause support
* BIM: enable running Report presets tests from the build directory
* BIM: make spreadsheet more useful for analysis, units on headers
* BIM: update BIM Report icons
* BIM: Add key option columns to report overview table
* BIM: add syntax highlighting support to report query editor
* BIM: Add lark build dependency for SQL parser generator
* BIM: Install the generated parser
* BIM: implement TYPE() function
* BIM: simplify function registry, make it OOP
* BIM: add CHILDREN function
* BIM: improve SQL engine error descriptions
* BIM: Implement ORDER BY clause
* BIM: Implement column aliasing (AS...)
* BIM: improve error reporting to pinpoint exact token names
* BIM: implement CONCAT, LOWER, UPPER functions. Improve exception handling
* BIM: refactor to improve initialization readability and maintenance
* BIM: Improve query editor syntax highlighting
* BIM: Address CodeQL warnings
* BIM: Enable scalar functions in WHERE clause and refactor transformer
- Enable the use of scalar functions (e.g., `LOWER`, `TYPE`) in `WHERE` clause comparisons.
- Refactor the Lark transformer to correctly handle `NUMBER`, `NULL`, and `ASTERISK` terminals using dedicated methods.
- Refactor error handling to raise a custom `BimSqlSyntaxError` exception instead of returning values on failure.
- Improve syntax error messages to be more specific and user-friendly by inspecting the failing token.
- Fix regressions in `AggregateFunction` and `TypeFunction` handling that were introduced during the refactoring.
- Update the test suite to assert for specific exceptions, aligning with the new error handling API.
* BIM: Implement arithmetic operations in SELECT clause
- Update grammar with `expr`, `term`, and `factor` rules to support operator precedence.
- Introduce `ArithmeticOperation` class to represent calculations as a recursive tree.
- Add transformer methods to build the calculation tree from the grammar rules.
- Implement recursive evaluation that correctly normalizes `Quantity` and `float` types before calculation.
* BIM: Add CONVERT() function for unit conversions
- Implement a new ConvertFunction class to handle unit conversions in the SELECT clause.
- Leverage the core Quantity.getValueAs() FreeCAD API method to perform the conversion logic.
- Add a unit test to verify both successful conversions and graceful failure on incompatible units.
* BIM: add self-documenting supported SQL syntax helper
* BIM: document internal and external API functions
* BIM: Finalize and rename public ArchSql API, update all consumers
- Rename public API functions for clarity and consistency
(run_query_for_objects -> select, get_sql_keywords -> getSqlKeywords,
etc.).
- Establish Arch.py as the official API facade by exposing all public
SQL functions and exceptions via a safe wildcard import from ArchSql,
governed by __all__.
- Refactor all consumers (ArchReport.py, bimtests/TestArchReport.py) to
use the new function names and access the API exclusively through the
Arch facade (e.g., Arch.select).
- Finalize the error handling architecture:
- Arch.select now logs and re-raises exceptions for consumers to
handle.
- Arch.count remains "safe," catching exceptions and returning an
error tuple for the UI.
- Refactor the test suite to correctly assert the behavior of the new
"unsafe" (select) and "safe" (count) APIs, including verifying
specific exception messages.
* BIM: add results preview on demand on the query editor
* BIM: add documentation quick reference button
* BIM: Handle query errors gracefully in Report preview UI
Refactor the SQL engine's error handling to improve the Report preview
UI. Invalid queries from the "Preview Results" button no longer print
tracebacks to the console. Instead, errors are now caught and displayed
contextually within the preview table, providing clear feedback without
console noise.
- `ArchSql.select()` no longer logs errors to the console; it now only
raises a specific exception on failure, delegating handling to the
caller.
- The `ReportTaskPanel`'s preview button handler now wraps its call to
`Arch.select()` in a `try...except` block.
- Caught exceptions are formatted and displayed in the preview table
widget.
- Add new unit test
* BIM: consolidate internal API into a more semantically and functionally meaningful function
* BIM: Implement two-phase execution for SQL engine performance
Refactors the ArchSql engine to improve performance and internal API
semantics. The `Arch.count()` function, used for UI validation, now
executes faster by avoiding unnecessary data extraction.
This is achieved by splitting query execution into two phases. The first
phase performs fast filtering and grouping (`FROM`/`WHERE`/`GROUP BY`).
The second, slower phase processes the `SELECT` columns. The
`Arch.count()` function now only runs the first phase, while
`Arch.select()` runs both.
- Introduces `_run_query(query_string, mode)` as the mode-driven
internal entry point for the SQL engine
- The `SelectStatement` class is refactored with new internal methods:
`_get_grouped_data()` (Phase 1) and `_process_select_columns()`
(Phase 2).
- `Arch.count()` now uses a fast path that includes a "sample execution"
on a single object to correctly validate the full query without
performance loss.
- The internal `execute()` method of `SelectStatement` is now a
coordinator for the two-phase process.
* BIM: Implement autocompletion in Report SQL editor
Introduces an autocompletion feature for the SQL query editor in the BIM
Report task panel. The completer suggests SQL keywords, functions, and
property names to improve query writing speed and accuracy.
- Adds a custom `SqlQueryEditor` subclass that manages all
autocompletion logic within its `keyPressEvent`.
- The completion model is populated with static SQL keywords and
functions, plus all unique top-level property names dynamically
scanned from every object in the document.
- A blocklist is used to filter out common non-queryable properties
(e.g., `Visibility`, `Proxy`) from the suggestions.
- The editor manually calculates the completer popup's width based on
content (`sizeHintForColumn`) to resolve a Qt rendering issue and
ensure suggestions are always visible.
- The first suggestion is now pre-selected, allowing a single `Tab`
press to accept the completion.
* BIM: remove unused import
* BIM: support SQL comments in queries
* BIM: support non-ASCII characters in queries
* BIM: Allow ORDER BY to accept a comma-separated list of columns for multi-level sorting.
* BIM: fix two-way overview/editor sync
* BIM: refactor to simplify editor modification events
* BIM: add tooltips to overview table
* BIM: add tooltips to query editor, enrich syntax data with signature and snippets
* BIM: implement PARENT function
* BIM: Enable property access on SQL function results
Previously, the SQL engine could only access properties directly from
the main object in a given row. This made it impossible to query
attributes of objects returned by functions, such as getting the name of
a parent with PARENT(*). This commit evolves the SQL grammar to handle
chained member access (.) with correct operator precedence. The parser's
transformer and execution logic were updated to recursively resolve
these chains, enabling more intuitive queries like SELECT
PARENT(*).Label and standard nested property access like Shape.Volume.
* BIM: refactor function registration, internationalize API metadata
* BIM: remove outdated Report alias
* BIM: refactor selectObjects to use latest API, move implementation to ArchSql
* BIM: improve friendly token names for error reporting
* BIM: implement chained functions e.g. PARENT(*).PARENT(*)
* BIM: add further tests for property access, fix bug with non-literal AS clause argument
* BIM: Implement full expression support for GROUP BY
The SQL engine's GROUP BY clause was previously limited to simple
property names, failing on queries that used functions (e.g., `GROUP BY
TYPE(*)`). This has been fixed by allowing the SQL transformer and
validator to correctly process function expressions.
The `SelectStatement.validate()` method now uses a canonical signature
to compare SELECT columns against GROUP BY expressions, ensuring
correctness for both simple properties and complex functions.
New regression tests have also been added to validate `GROUP BY`
functionality with chained functions (PPA) and multiple columns.
* BIM: Make arithmetic engine robust against missing properties
Previously, a query containing an arithmetic expression in the `WHERE`
clause would cause a fatal error if it processed an object that was
missing one of the properties used in the calculation.
This has been fixed by making the `ArithmeticOperation` class NULL-safe.
The engine now correctly handles `None` values returned by property
lookups, propagating them through the calculation as per standard SQL
behavior.
As a result, the engine no longer crashes on such queries. It now
gracefully evaluates all objects, simply filtering out those for which
the arithmetic expression cannot be resolved to a valid number. This
significantly improves the robustness of the query engine.
* BIM: Finalize ORDER BY logic and fix query regressions
- The `ORDER BY` clause is now governed by a single, predictable rule:
it can only refer to column names or aliases that exist in the final
`SELECT` list. The engine's transformer and execution logic have been
updated to enforce and correctly implement this, fixing several test
failures related to sorting by aliases and expressions.
- Updated test suite to align with the new engine rules. Add new
dedicated unit tests that explicitly document the supported (aliased
expression) and unsupported (raw expression) syntax for the `ORDER BY`
clause.
* BIM: Implement backend for pipelined report execution
Adds the backend architecture for multi-step, pipelined queries. The
core SQL engine can now execute a statement against the results of a
previous one, enabling complex sequential filtering.
- The internal `_run_query` function was refactored to be
pipeline-aware, allowing it to operate on a pre-filtered list of
source objects.
- A new `execute_pipeline` orchestrator was added to manage the data
flow between statements, controlled by a new `is_pipelined` flag in
the `ReportStatement` data model.
- The public API was extended with `selectObjectsFromPipeline` for
scripting, and `count()` was enhanced to support contextual validation
for the UI.
Pipelines phase 2
Pipelines phase 3
* BIM: refactor to avoid circular imports
* BIM: Address key CodeQl check errors/notes
* BIM: Refactor Task Panel UI/UX with explicit editing workflow
Refactor the report editor UI to improve usability and prevent data
loss. Editing a statement is now an explicit action, triggered by a new
"Edit Selected" button. This prevents accidental changes and enables a
new transactional workflow with "Save" and "Discard" buttons for each
edit session. A checkbox for "Apply & Next" has been added to streamline
editing multiple statements.
The results preview feature has been redesigned into a self-contained,
closable pane controlled by a "Show Preview" toggle. This pane includes
its own contextual "Refresh" button, reducing UI clutter. All action
button groups have been consistently right-aligned to improve layout and
workflow.
* BIM: Integrate pipeline execution and stabilize UI workflow
Completes the implementation of the pipelined statements feature by
integrating the new backend orchestrator with the ArchReport object. It
also includes a series of critical bug fixes that were discovered during
end-to-end testing, resulting in a more stable user experience.
The primary feature integration consists of refactoring the
_ArchReport.execute method. It now uses the ArchSql.execute_pipeline
generator, enabling the report to correctly process multi-step pipelines
and honor the user-configured data flow.
Severalbugs and regressions were fixed:
- Backend: A major flaw was fixed where FROM-clause functions (like
CHILDREN) were not pipeline-aware. The engine's GROUP BY validator was
also corrected to enforce its original, safer design of not supporting
aliases.
- UI Workflow: A feedback loop that caused the editor cursor to reset
was resolved. The transactional logic for the Save, Discard, and "Save
& Add New" actions was corrected to prevent data loss and ensure
predictable behavior. The Add and Duplicate actions no longer auto-open
the editor, creating a more consistent workflow.
- UI State: Fixed regressions related to the explicit editing model,
including incorrect statement loading (Edit Selected) and state
management when a report is reloaded from a file.
* BIM: add presets manager
* BIM: Fix 'still touched after recompute' bug in some of the tests
* BIM: cleanup tests, fixed presets tests to new presets locations
* BIM: Move test model to its own module for reusability
* BIM: Move GUI tests to their own module
- Disable two of the tests: they pass, but cause a segmentation fault on
teardown. They need to be investigated before enabling them on CI.
* BIM: fix bug in interpreting CONVERT string from GROUP BY
* BIM: Migrate signal connections from lambdas to Qt slots
Refactors all signal connections in the `ReportTaskPanel` to use the
`@QtCore.Slot()` decorator instead of lambda wrappers.
- Resolves CodeQL warning "Unnecessary lambda".
- Adheres to PySide/Qt best practices for signal/slot handling.
- Improves code clarity by using explicit, named methods for
connections.
- Prevents potential runtime `TypeError` exceptions by correctly
managing slot signatures for signals that emit arguments (e.g.,
`clicked(bool)`).
- Introduces simple slot wrappers where necessary to cleanly separate UI
event handling from core logic.
* BIM: Address CodeQl warnings
* BIM: Add CHILDREN_RECURSIVE(subquery, max_depth) SQL function to find all descendants of an object set.
- Create internal _get_bim_type and _is_bim_group helpers to remove all Draft module dependencies from the SQL engine.
- Implement a new _traverse_architectural_hierarchy function using a deque-based BFS algorithm to prevent infinite loops.
- The CHILDREN and CHILDREN_RECURSIVE functions now use the new traversal engine.
- The traversal engine now transparently navigates generic groups but excludes them from the results.
- Correct ParentFunction logic to validate containment by checking the parent's .Group list instead of the child's .InList.
- Add unit tests for recursive traversal, depth limiting, and transparent group handling.
- Update test_group_by_multiple_mixed_columns to match the corrected behavior of the TYPE(*) function.
* BIM: Add __repr__ and __str__ for the ArchReport proxy
* BIM: Align report quantity headers with internal units
- Change default `Quantity` headers to use the property's internal unit
(e.g., `mm`) instead of the user's global preferred unit (e.g., `m`).
- Fixes inconsistency where the header unit (e.g., `m²`) did not match
the raw data's unit (e.g., `mm²`), making the default behavior
predictable.
- Implement by parsing `str(Quantity)` as a workaround for the C++
`Unit::getString()` method not being exposed to the Python API.
- Add a unit test that temporarily changes the global schema to verify
the fix is independent of user preferences.
* BIM: remove dual import ArchSql and from ArchSql import
* BIM: Fix IfcRole => IfcType
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* CI: add Lark as a build dependency
* BIM: Replace QRegExp with QRegularExpression for regex patterns
QRegExp is no longer available in PySide6. Make the code compatible with
both PySide2/Qt5 and PySide6/Qt6.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* CI: move lark dependency to pixi's requirements.host
* BIM: Correct numeric comparisons in SQL WHERE clause
Refactor the `BooleanComparison.evaluate` method to handle numeric and
string-based comparisons separately. Previously, all comparisons were
being performed on string-converted values, causing numerically
incorrect results for `Quantity` objects formatted with "smart" units
(e.g., `"10.0 m"` was incorrectly evaluated as less than `"8000"`).
- The `evaluate` method now normalizes `Quantity` objects to their raw
`.Value` first.
- If both operands are numeric, a direct numerical comparison is
performed for all operators (`=`, `!=`, `>`, `<`, `>=`, `<=`).
- String-based comparisons (for `like`, or as a fallback for other
types) are handled in a separate path.
- Add unit test to lock down this behavior.
* BIM: autocompleter improvements
- Add a trailing space when autocompleting the keywords that need it
- Autocomplete multi-word keywords as a unit
* BIM: Improve live validation user experience
- Do not throw syntax error when in the middle of autocompleting a
keyword
- Introduce typing state and show incomplete query status
* BIM: change double-click action to edit in statements overview
Also allow quick editing the statement description with F2
* BIM: Improve user strings for consistency
* BIM: show count of returned objects in statements table
* BIM: disable preview on invalid queries
* BIM: define slot so that tests can run headless
* BIM: Update unit test to adapt to new behaviour
* [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>
Add detailed test coverage for the new Command constructor that accepts
annotations parameter, including positional and keyword arguments,
string and numeric annotations, empty annotations, and backward
compatibility. Split existing save/restore tests for better granularity.
src/Mod/CAM/CAMTests/TestPathCommandAnnotations.py:
- Added test14-test20 for Command constructor with annotations
- Split test12 into test12 (empty annotations) and test13
(complex annotations) for focused testing
- Completely re-implemented the TSP algorithm in C++ for better path quality
- Added detailed comments and documentation to clarify each step
- Improved nearest neighbor, 2-opt, and relocation logic
- Enhanced handling of start/end point constraints
- Updated PathUtils.py docstring to accurately describe start point behavior
- Enhanced the C++ TSP solver to accept optional start and end points, so the route can begin and/or end at the closest point to specified coordinates.
- Updated the Python pybind11 wrapper and PathUtils.sort_locations_tsp to support startPoint and endPoint as named parameters.
- Added a new Python test suite (TestTSPSolver.py) to verify correct handling of start/end points and integration with PathUtils.
- Registered the new test in TestCAMApp.py and CMakeLists.txt for automatic test discovery.
This update introduces a new C++ 2-Opt TSP solver with Python bindings.
src/Mod/CAM/App/CMakeLists.txt:
- Add build and install rules for the new pybind11-based tsp_solver Python module
src/Mod/CAM/App/tsp_solver.cpp:
- Add new C++ implementation of a 2-Opt TSP solver with nearest-neighbor initialization
src/Mod/CAM/App/tsp_solver.h:
- Add TSPPoint struct and TSPSolver class with 2-Opt solve method
src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Add pybind11 wrapper exposing the TSP solver to Python as tsp_solver.solve
src/Mod/CAM/PathScripts/PathUtils.py:
- Add sort_locations_tsp Python wrapper for the C++ TSP solver
- Use tsp_solver.solve for TSP-based
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.
Used TestMach3Mach4LegacyPost.py as the starting point with input from
other test scripts too.
The test demonstrate a fix for #25723, as the Fanuc post processor has not been not updated to the latest changes in
the Path module.
This is related to #24676, where thread tapping was added to LinuxCNC, but the equivalent code in the Fanuc
postprocessor were not adjusted to cope, and #25677 where it was observed that the Fanuc postprocessor was
broken in versions 0.20 and 1.0.
Added MockTool class to provide ShapeName to fanuc_post.py, used to
convert drill cycles to threading cycles if the tool has shapeid "tap".
Several methods introduced 2025-05-04 are preferred, but the methods
available in version 1.0 are used as fallback sources
for active status and coolent enabled.
The difference according to the documentation is that M30 will rewind
the paper tape while M2 will not. The effect on a CNC from 1994 is
that M30 turn on the indicator light marking that the program has
completed, while M2 do not, and the light is wanted to know when
the machine is done.
Fanuc only understand upper case letters, no point in providing the
file name in lower case letters. The provided file name is always "-",
so drop it completely. The first comment is presented in the Fanuc user
interface, it should get more relevant content.
Dropped useless semicolon.
Enabling tool height compensation will cause the axis to move up
the length of the tool, which will cause a Z overtravel error when
the tool change take place close to the top of the machine. To
counter this move, ask the machine to move its commanded position
down the length of the tool height, which in effect causes no upward
movement after the tool change. The #4120 variable contain the
current tool number, and #2000 - #20XX contain the tool heights.
The Fanuc post processor add a trailing space to all M6 lines.
This make it problematic to write test for the generated output,
when compiled with the automatic policy enforcer on github
removing trialing space from the expected output. Avoid the
problem by removing the trailing space from the generated
output.
The thread tapping implementation in the Fanuc post processor change
behaviour of M3, G81 and G82 when the tool ShapeID matches "tap".
but the code not not expect that the parse() method will be
called with two different classes as arguments.
Rewrite the M3 handling to handle ToolController arguments
instead of crashing with an AttributeError.
Issues:
Fixes#14016Fixes#25723
Some Fanuc machines do not understand the 'M6 T0' instructions in the
preamble. Move it out of the preamble and controlled by a new
command line argument --no-end-spindle-empty for the machines
where running to cause a "Tool Number Alarm" and the program to crash
as tool zero is not a valid tool.
Fixes: #25677
Reset line number when using --line-numbers. Restore all default values when a
command line argument is not used.
This helps the test scripts ensure that the arguments passed during one test is the only
one taking effect during this test.
This PR allows each Toolbit to have its own Units property (Metric/Imperial) for better unit management.
Short Summary:
- Adds a Units property (Metric/Imperial) to ToolBit objects for better unit management.
- Ensures ToolBit schema is set and restored properly in the editor and utilities.
- Updates formatting and property handling to respect the selected units.
- Improves the ToolBit editor widget to refresh and sync schema/UI when units change.
- Uses FreeCAD.Units.setSchema and getSchema to switch between unit schemas.
NOTE: Toolbit dimensions are read from JSON in their native units (as specified by the Units property),
converted to metric for all internal calculations, and displayed in the UI using the
toolbit's selected units. This ensures both accurate internal computation and user-friendly
display, while storing the correct units in the JSON. This can cause some rounding differences
when switching units. Example: 2 mm becomes 0.0787 inches. If you save that as imperial and then
switch back to metric, it will show 1.9999 mm
src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Add Units property to ToolBit and ensure it's set and synced with toolbit shape parameters.
- Update property creation and value formatting to use Units.
src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Use setToolBitSchema to set schema based on toolbit units.
- Add logic to refresh property editor widget when units change.
- Restore original schema on close.
- Improve docstrings and signal handling.
src/Mod/CAM/Path/Tool/toolbit/util.py:
- Add setToolBitSchema function for robust schema switching.
- Update format_value to use schema and units.
- Add docstrings and clarify formatting logic.
src/Mod/CAM/Path/Tool/library/ui/browser.py:
- Restore original schema after editing toolbit.
src/Mod/CAM/Path/Tool/library/ui/editor.py:
- Ensure correct schema is set for new toolbits.
* Part: TopoShape make getElementTypeAndIndex more robust
* Part: Add unit tests for new regex
---------
Co-authored-by: Chris Hennes <chennes@gmail.com>
* 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>
* 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>
This commit makes boundary stock objects distinct from regular stock by
setting a boundary flag and label, and prevents editing of boundary
objects in the job view provider.
src/Mod/CAM/Path/Dressup/Boundary.py:
- Add promoteStockToBoundary method, set boundary properties, handle
missing stock/shape
src/Mod/CAM/Path/Main/Gui/Job.py:
- Block editing for objects flagged as boundary stock
This commit introduces support for passing an 'annotations' dictionary
to the Command class constructor and its Python bindings. The annotations
dictionary can contain string or numeric values for each key, allowing for
richer metadata on CAM commands. Each annotation must be provided as a
key-value pair within a dictionary.
Examples:
cmd = Command("G1", {"X": 10.0, "Y": 5.0}, {"note": "Rapid move"})
cmd = Command("G2", {"X": 20.0, "Y": 15.0}, {"priority": 1})
cmd = Command("G3", {"X": 30.0, "Y": 25.0}, {"note": "Arc move", "speed": 1500})
cmd = Command("G0", {"X": 0.0, "Y": 0.0}, {})
cmd = Command("G0", {"X": 0.0, "Y": 0.0})
cmd = Command("G1", {"X": 10.0, "Y": 5.0}, annotations={"note": "Rapid move"})
src/Mod/CAM/App/Command.cpp:
- Added new Command constructor accepting annotations
src/Mod/CAM/App/Command.h:
- Declared new Command constructor with annotations parameter
src/Mod/CAM/App/Command.pyi:
- Updated docstring to describe annotations argument
src/Mod/CAM/App/CommandPyImp.cpp:
- Extended Python init to parse and set annotations dictionary
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.
- 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.
* 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>
* 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>
`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>
* [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>
This PR adds rigid tapping back to the legacy LinuxCNC postprocessor, which
was removed in commit cd1c29e3f23fde0a90980ffcf3e70406769f2d43 in PR 24771.
The changes include:
- Modifying the linuxcnc_legacy_post.py script to include logic for Rigid tapping
- Updating comments and documentation to reflect the addition of Rigid tapping
* 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>
As the title says. This patch adds support for finding tooltip text,
also extends widget types to QSpinBoxes/QDoubleSpinBoxes and also adds
support for finding combobox items from QComboBox dropdown. Also adds
support for QGroupBox titles.
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.
* [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>
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.
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.
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.
[Gui] Fix string encoding for document, object and subobject names in PropertyLink, SelectionSearch, PD Sketch Based Tasks, Part Primitives and Document handling.
* 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.
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.
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.
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.
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
* #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>
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
* 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
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: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: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: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.
description:Report problems related to code structure, maintainability, performance, correctness, or technical debt that do not directly affect end-user behavior.
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
# 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)
# 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)
> Bleeding edge FreeCAD development builds for testing bugfixes, regressions, and recently implemented features. Do not use in a production environment.
@@ -62,7 +62,9 @@ The FreeCAD Contribution Process is expressed here with the following specific g
1. the PR description MUST contain proper attribution as the first line, for example: "This is work of XYZ cherry-picked from <link>";
2. all commits MUST have proper authorship, i.e. be authored by the original author and committed by the author of the PR;
3. if changes to cherry-picked commits are necessary they SHOULD be done as follow-up commits. If it is not possible to do so, then the modified commits MUST contain a `Co-Authored-By` trailer in their commit message.
14.A “Valid PR” is one which satisfies the above requirements.
14.Contributions must meet existing quality standards. Raw AI output is not accepted under any circumstances. AI may be used only as an assistive tool; in all cases, the resulting content must be reviewed, validated, and justifiable by the contributor. The contributor should be able to explain design and code decisions, answer reviewers’ questions, and ensure that AI use does not waste reviewers’ time during review. That being said, the use of AI is not recommended under any circumstances or in any manner.
15. The contributor provides reasonable assurance that the contribution does not infringe third-party copyrights or license terms.
16. A “Valid PR” is one which satisfies the above requirements.
\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