Commit Graph

546 Commits

Author SHA1 Message Date
a1105c9d80 fix(tests): add mods/sdk to sys.path in test_kindred_pure
All checks were successful
Build and Test / build (pull_request) Successful in 28m20s
The SDK migration (#250) moved kindred_sdk into mods/sdk/ but the
test file was not updated with the new path, causing
ModuleNotFoundError when importing kindred_sdk.
2026-02-17 12:51:05 -06:00
forbes
8e60dda810 fix: add missing Kindred test files from origin/main 2026-02-14 10:31:00 -06:00
forbes
630b08ea23 cherry-pick #3: dock task panel right, remove non-Kindred themes (bb3f3ac6d6) 2026-02-13 14:06:01 -06:00
forbes
9be9f9420a cherry-pick #1: initial Kindred branding + assembly joint fix
Cherry-picked 316d4f4b52 with conflict resolution:
- CMakeLists.txt: merged Kindred version vars with upstream 1.2.0-dev base
- src/Main/*.cpp: applied Kindred branding (banner, copyright, license)
- Resolved add/add conflicts for files already copied in Phase 1
- Includes assembly joint flip overconstrain fix
2026-02-13 14:05:31 -06:00
Chris Hennes
ec18d4e250 Tests/Sketcher: Eliminate unused variables 2026-02-11 17:03:18 +01:00
Chris Hennes
0a585dc3bb Base: Add tests for escapeXml 2026-01-31 09:09:27 +01:00
pre-commit-ci[bot]
c19eb5c0e0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-06 01:40:39 +00:00
Ajinkya Dahale
9000dc3c70 Sketcher: Add test stubs for SketchObject::addCopy() 2026-01-06 05:59:10 +05:30
Ajinkya Dahale
bf51899580 Sketcher: [test] Add test for addExternal and delExternal 2026-01-06 05:59:10 +05:30
Ajinkya Dahale
9c87e26280 [Sketcher][test] Add tests for replaceGeometries() 2026-01-06 05:42:44 +05:30
PaddleStroke
07756cc838 Part: Toposhape: fix regressions due to changes in getElementTypeAndIndex (#26596)
* Part: Toposhape: fix regressions due to changes in getElementTypeAndIndex

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

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

* Update TopoShape.cpp

* Update TopoShape.cpp

* Update TopoShape.cpp

* Update TopoShape.h

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-02 19:37:09 +01:00
horseDeveloper
4892154faf Fixing Leftover references from migration from freecadweb.org (#26163) 2025-12-26 11:11:12 -06:00
PaddleStroke
3608c9f8c4 Part: TopoShape make getElementTypeAndIndex more robust (#25913)
* Part: TopoShape make getElementTypeAndIndex more robust
* Part: Add unit tests for new regex

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2025-12-08 11:24:13 -06:00
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Chris Hennes
d97c7cc95c Core: Switch away from deprecated wstring_convert and codecvt_utf8 2025-10-21 09:01:59 +02:00
Adrian Insaurralde Avalos
667b841de1 [Base] fix some unit tests that where dependent on user config
redundant and faulty test `imperial_decimal_1_mm_default_precision` removed, it is already covered by `imperial_decimal_1_mm_precision_2`
2025-10-14 12:42:24 +02:00
Florian Foinant-Willig
f4fe303829 Sketcher: rename DeriVector2::crossProdNorm to DeriVector2::crossProdZ 2025-10-13 17:57:51 +02:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
084003e361 Tests: Add/update SPDX header (#24547) 2025-10-09 13:50:17 -05:00
Syres916
e77f181393 [Part] Fix Part Boolean operations Refine incorrectly set for new users (#24256)
* [Part] Fix Part Boolean operations Refine incorrectly set for new users

* [Part] update tests to specify Refine to be...

...false where necessary
2025-09-27 00:33:57 -05:00
Markus Reitböck
05a706697b Material: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-22 23:17:39 +02:00
Chris Hennes
929bd5090b App: Sanitize all paths for null characters (#23821)
* App: Sanitize all paths for null characters

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

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

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-09-18 17:37:33 +00:00
sliptonic
79640fd18a Merge pull request #23885 from chennes/pythonInterfaceToApplicationDirectories
App: Add Python interface to ApplicationDirectories
2025-09-17 18:11:41 -05:00
Chris Hennes
8f128f21f9 Tests: Update to match new behavior 2025-09-17 17:02:35 -05:00
Markus Reitböck
6ef07bb358 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Markus Reitböck
d05e2a0431 App: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:02 +02:00
Markus Reitböck
f0eca551b3 Base: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:01 +02:00
Markus Reitböck
749ac36615 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
Chris Hennes
1f05f5eda4 Merge pull request #23351 from 3x380V/fileinfo
Core: Modernize Fileinfo
2025-09-07 21:28:11 -05:00
Chris Hennes
325730dd9c Merge pull request #23384 from 3x380V/units
Base: Units update
2025-09-07 20:22:54 -05:00
Weston Schmidt
140c9febc4 Add test causing crash and fix map sorting function. (#22889)
* Add test causing crash and fix map sorting function.

When opening a model from FreeCAD 0.7, the model would crash when I
changed some of the parameters.  This turned out to be due to the
ElementNameComparator::operator() not correctly sorting the items going
into the map, which caused the map to be invalid.

This change adds a test that represented the exact names causing the
crash as well as a fix for the problem.  Names are now sorted:

1. Empty names first
2. Identifier based names second.
3. Hex based names last.

Identifiers are sorted lexicographically for the name portion and
numerically for the number portion, smallest to largest.

Hex based names are sorted by the value of the hex number, smallest to
largest.

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

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

* Fix lint issues.

* Add another test form to the mix.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-05 14:07:02 -05:00
Ladislav Michl
88f76f3605 Base: UnitsSchema: use basic imperial conversion constants
Use well defined basic constants for conversion of imperial units.
This makes code hopefully easily readable and verificable.
2025-09-05 17:31:55 +02:00
Ladislav Michl
1cd47c2dd4 Base: add back Imperial for Civil Engineering unit conversions
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
01b547912f Base: QuantityFormat: avoid storing formatting defaults
User defined precision and fractional inch are stored on QuantityFormat
construction making changes persistent to object life time.
Change that so until not explicitely overriden, user defined values
are always returned.

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-09-05 17:31:54 +02:00
Chris Hennes
8221ab77d7 Merge pull request #23503 from maxwxyz/issue-22123
Fix STEP import with bad string behavior
2025-08-31 23:23:25 -05:00
Chris Hennes
c26e3e9756 Base: Allow all valid Python 3 identifier characters
Note: Does not check for keywords, only character classes (not a change from the original code).
2025-08-31 21:39:49 +02:00
wmayer
ee2d35cad8 Test: Add test cases for Persistence::validateXMLString 2025-08-31 14:38:25 +02:00
Chris Hennes
102d0a9ac8 App: refactor to use unique_ptr
Also address other reviewer comments.
2025-08-27 11:51:22 -05:00
Chris Hennes
7ed4a9b731 App: Add directory versioning for data and config
At the application level, support the existence of subdirectories inside
the original config and data paths for a specific version of the
software. For a new installation, create them, but for an existing
installation use the most recent available version, even if it's not the
current one (and even if it's not versioned at all). Any migration must
be done at the GUI level due to the amount of data that is potentially
being copied during that process.
2025-08-27 11:51:22 -05:00
PaddleStroke
a346c266e7 PartDesign: Extrude 2 sides (#21794)
* PartDesign: extrude 2 sides

* Part: OpCodes XOR

* PartDesign: Remove deprecated generatePrism functions

* PartDesign: Extrude : Update Sides combobox strings

* Change "Sides" to "Mode"

* Use OpCodes::Extrude instead of Prism.
2025-08-25 17:17:23 +00:00
wmayer
8747607820 Tests: Add test case for ReaderOBJ 2025-08-25 18:13:59 +02:00
wmayer
a6cf8ba983 Tests: Add unit tests for FileInfo 2025-08-22 15:20:25 +02:00
Chris Hennes
d8168d33f3 App: Remove use of dangerous localtime() function 2025-08-18 17:44:34 +02:00
Kacper Donat
2f1d96bf44 Gui: Add ParameterDefinition to Style Parameters
This adds a way to define parameters within code, that allows developers
to easily encapsulate the parameters and their default values.
2025-08-12 22:04:23 +02:00
Kacper Donat
0cce9c1261 Gui: Make StyleParameterManager::resolve return optional result
This changes the resolve method of style parameter manager to return
optional intead of definitive result. In reality tokens may not be
defioned correctly and optionals provide a good way to nicely handle
defaults.
2025-08-12 22:04:23 +02:00
Kacper Donat
322ed2c7bc Gui: Rename StyleParameters::Length to StyleParameters::Numeric
This change gives a better name to the parameter type that is used to
store numeric values. Before it was called length, but it can store
other quantities as well so the name is no longer fitting.
2025-08-12 21:25:41 +02:00
Kacper Donat
cf55183ece Gui: StyleParameters - use Base::Color instead of QColor
If possible we should prefer using our own classess instead of ones
coming from frameworks. This changes Style Parameters to use Base::Color
class instead of QColor. Calculations are still done using QColor but
the data is always exposed as Base::Color.
2025-08-12 21:25:41 +02:00
Chris Hennes
91b3581a78 Merge pull request #22788 from pieterhijma/fix-func-expr-simplify
Core: Fix expression function simplify
2025-08-12 11:07:44 -05:00
Pieter Hijma
0acc2d1ed5 Core: Add test for a prop rename with expression 2025-08-08 17:09:49 +02:00
Frank David Martínez M
1b3851c502 [Core] Add Boolean Functions to expressions (AND, OR, NOT) (#22506)
* [Core] Add Boolean Functions to expressions (AND, OR, BOOL, NOT)

* [Core] Add `if` function to expressions to overcome ternary operator limitations

* [Core] Update expressions grammar to recognize relational operations as arguments

* [Core] The `if` function has been removed as no consensus was reached regarding its convenience or necessity. Its inclusion was considered potentially confusing or redundant.

* [Core] Make boolean cast based on Confusion threshold.
2025-08-05 03:50:13 +00:00
Chris Hennes
26c6aa934d Tests: Add tests for timestamp-based backups 2025-08-04 17:51:15 +02:00