Compare commits

...

812 Commits

Author SHA1 Message Date
pre-commit-ci[bot] 25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Kacper Donat eafd18dac0 Part,PartDesign,Gui: Add to pre-commit formatting 2025-11-11 13:45:27 +01:00
Kacper Donat b70b31226b All: Update formatting style 2025-11-11 13:45:27 +01:00
pre-commit-ci[bot] 28a5bcdf8e [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black-pre-commit-mirror: fe95161893684893d68b1225356702ca71f8d388 → 2892f1f81088477370d4fbc56545c05d33d2493f](https://github.com/psf/black-pre-commit-mirror/compare/fe95161893684893d68b1225356702ca71f8d388...2892f1f81088477370d4fbc56545c05d33d2493f)
- [github.com/pre-commit/mirrors-clang-format: 719856d56a62953b8d2839fb9e851f25c3cfeef8 → 317810f3c6a0ad3572367dc86cb6e41863e16e08](https://github.com/pre-commit/mirrors-clang-format/compare/719856d56a62953b8d2839fb9e851f25c3cfeef8...317810f3c6a0ad3572367dc86cb6e41863e16e08)
2025-11-11 09:47:59 +01:00
Billy Huddleston ec2a41b86b CAM: Fix ReferenceError when accessing deleted toolbit object
Prevent crash (CAMTests) in ToolBitRecomputeObserver when the toolbit object has been deleted/missing
by catching ReferenceError before accessing its Document attribute. This ensures slotRecomputedDocument
exits gracefully if the object is no longer valid.

src/Mod/CAM/Path/Tool/toolbit/models/base.py
- Wrapped access to self.toolbit_proxy.obj.Document in try/except to handle ReferenceError
if object is deleted/missing, preventing crash during document recompute.
2025-11-10 18:44:02 -06:00
Kacper Donat 5556821e7e Gui: Add special handling for too small overlay side panel
This basically is due to how OverlayTabWidget::setRect is implemented. If it faces width (or
height) of 0 it forces the width to be minimumOverlayWidth * 3, which in the default config
appears to be 90. 90 is obviously way too small of a value to display any widget in the side
panel, so we need to basically need to treat anything smaller or equal to that as an
incorrect value for width. We use here 100 just to be safe.

For the height value of 100 may be reasonable, so we leave it as is.
2025-11-10 18:40:17 -06:00
Chris Hennes 44c73fdd5b Gui: Restore 'Exit' menu text for Linux/Windows
Only macOS appears to set the text based on the menu item's role.
2025-11-11 00:17:00 +01:00
Chris Hennes 80080d9fde Merge pull request #25216 from kadet1090/fix-overlay-task-panel
Gui: Enable Overlay only for new users
2025-11-10 16:46:16 -06:00
pjcreath 280addd21c Gui: Fix crash in placement window after closing a document. (#25110)
Fixes #18156
2025-11-10 11:03:05 -06:00
Chris Hennes 483d0ef6fe Gui: Ensure Quit menu item is QAction::QuitRole 2025-11-10 17:52:31 +01:00
PaddleStroke 0ff0359524 PartDesign: Fix 'UpToShape' not saving correctly 2025-11-10 10:49:50 -06:00
FEA-eng b038f4130c FEM: Add ccx capacitance two spheres example (#25117)
* FEM: Update CMakeLists.txt

* FEM: add new ccx electrostatics example

* FEM: Update equation_electrostatics_capacitance_two_balls.py

* FEM: Update equation_electrostatics_capacitance_two_balls_ccx.py
2025-11-10 10:47:33 -06:00
Billy Huddleston 2d83e86f07 CAM: Improve Z retract reliability in rotational scan after geometry recompute
Introduced FLOAT_EPSILON for robust floating point comparisons, resolving cases
where Z axis retract moves were missing after geometry recompute in 3D Surface
rotational scan operations. This prevents precision errors from causing the
cutter to skip intended lifts between rings or scan lines.

src/Mod/CAM/Path/Op/Surface.py
 - Added FLOAT_EPSILON constant
 - Updated Z move comparison logic to use tolerance
2025-11-10 10:45:58 -06:00
Billy Huddleston 871ab6df64 CAM: Fix infinite recompute loop when ToolBit properties use expressions
A bug in the ToolBit model caused an infinite recompute loop and UI freeze when properties such as Diameter, Flutes, or CuttingEdgeHeight were set to expressions. The visual representation update was being triggered during document recompute, which could recursively trigger further recomputes. This fix defers visual updates by queuing them and processing only after the document recompute completes, using a document observer. The observer is cleaned up after use and on object deletion, preventing memory leaks and repeated recompute cycles.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- ToolBitRecomputeObserver: Document observer class that triggers queued visual updates after recompute completes via slotRecomputedDocument.
- _queue_visual_update: Queues a visual update to be processed after document recompute.
- _setup_recompute_observer: Registers the document observer for recompute completion.
- _process_queued_visual_update: Processes the queued visual update and cleans up the observer.
- onChanged: Now queues visual updates instead of calling them directly.
- onDelete: Cleans up any pending document observer before object removal.
2025-11-10 10:43:15 -06:00
neurallambda df7ee72171 Fix CAM job "no attribute Proxy" (#25034) 2025-11-10 10:42:32 -06:00
tarman3 2e37667371 CAM: Slot - Fix references enumeration 2025-11-10 10:41:58 -06:00
marbocub b5b00f7aff Fix legacy mmTangentPlane orientation in 1.1.0dev (resolves #24254) (#24529)
* Add legacy TangentPlane orientation compatibility layer

* Refactor: extract lambda for object identifier construction

* Refactor: axis calculation using std::ranges::max_element and std::distance

* Apply suggestions from code review

Co-authored-by: Pieter Hijma <pieterhijma@users.noreply.github.com>

* Part: Add regression test for issue 24254

---------

Co-authored-by: Pieter Hijma <pieterhijma@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@gmail.com>
2025-11-10 10:36:42 -06:00
Kacper Donat f7908335e5 Gui: Make overlay dragger respect palette
This changes Overlay Dragger to not have hardcoded color but instead
respect the palette from theme.
2025-11-10 17:05:25 +01:00
Kacper Donat f43c6906ff Gui: Enable Overlay only for new users
This change tries to detect invalid state where overlay was
half-initialized that resulted in overlay being enabled for more users
that we initially aimed for.
2025-11-10 17:05:25 +01:00
pjcreath 3071cc847c Gui: Fix crash in measuring tool after an undo. (#25129)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-11-09 20:04:22 -06:00
Steven James 5c464e0746 Fix setting Bool value in VarSet add properties dialog. (#24873)
* Connect Bool checkbox checkStateChanged to the editor callback so changes will actually happen.
Make the change compatible with Qt versions <6.7.0

* Remove delayed singleshot-value changed from the event filter for Checkbox as suggested by @pieterhijma

* Remove no longer relevent comment
2025-11-09 17:45:57 -06:00
theo-vt 484c724ac6 Techdraw: Assign AutoDistribute when creating a projection group (#25103) 2025-11-09 17:41:50 -06:00
tetektoza 6bed2e663e Sketcher: Clear selection on selected geometry when hiding
When a geometry element is selected and then hidden using the visibility
checkbox in the Elements panel, it remains in the selection.
Subsequently, if another geometry element is selected and deleted, both
the visible element AND the hidden element are deleted.

Root cause of that is basically that `changeLayer()` functions change
the geometry's visual layer, but never clear the geometry from
`Gui::Selection()`.

So, this patch adds the handling to collect every sub-element name of
the hidden geometry and then formats it and calls remove selection on
the geometry during layer change transaction.
2025-11-09 17:40:08 -06:00
chris ffea3da872 freecad issue #25069 fix issue with selecting the plot tab / window from the menu bar 2025-11-09 17:20:15 -06:00
Florian Foinant-Willig ee34d09f7a Core: add a check on object deletion 2025-11-09 16:44:40 -06:00
Chris Hennes 948f284472 Merge pull request #25186 from Roy-043/BIM-fix-human-figure
BIM: Fix human figure
2025-11-09 16:36:52 -06:00
pjcreath b92b54de0e Gui: prevent native macOS color picker crash.
Fixes #25153
2025-11-09 16:23:17 -06:00
paul 50d22e2bb7 [ArchStairs] Fix StringerOverlap with Base at Angle (#25167)
* [ArchStairs] Fix StringerOverlap Base at Angle

Github Issue Discussion
- https://github.com/FreeCAD/FreeCAD/issues/24321#issuecomment-3492459309

"... error when Stringer Overlap is set above certain threshold combined with a non-baseless stair which does not have orthogonal direction - this means that the base line or sketch is rotated to a degree, which is not 0, 90, 180 or 270 degrees."

Further
Fix #24321

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-09 18:59:14 +01:00
Roy-043 071e7f3dfa Remove HumanFigure.brep from Arch.qrc resources 2025-11-09 18:49:00 +01:00
Roy-043 ce0a3dd526 BIM: Fix human figure
Fixes #25084.

Instead of a brep file a point list is now used to generate the figure.

Additionally:
Two points have been added to make the head of the figure less 'pointy'.

It would make sense to move the `get_human_figure` function to a different file in the future.

With 1.7m the figure is not very tall BTW.
2025-11-09 16:49:37 +01:00
marioalexis 9e7b5f6444 Fem: Fix CapacitanceBody default value 2025-11-08 14:15:42 -06:00
Chris Hennes ca5d22ebca Merge pull request #25162 from Rexbas/sketcher-cleanup-grid-icon
Sketcher: Remove unused icons and fix SIGSEGV
2025-11-08 14:13:49 -06:00
Bas Ruigrok 3d0db63193 TechDraw: Fix ignored "Zoom at Cursor" for TouchPad style 2025-11-08 11:37:37 -06:00
Chris Hennes 924dfe29c8 CI: Update Python version to 3.13 in fetch-crowdin (#25149) 2025-11-08 18:23:17 +01:00
Bas Ruigrok d95f56b39b Sketcher: Remove unused rendering order icons 2025-11-08 14:12:33 +01:00
Bas Ruigrok a479197f0b Sketcher: Remove unused snap icons and fix SIGSEGV 2025-11-08 14:08:32 +01:00
Bas Ruigrok c828c5d1d1 Sketcher: Remove unused grid toggle icons and fix SIGSEGV 2025-11-08 13:42:39 +01:00
pjcreath be93298afd Gui: process remaining deferredDelete events before stopping event loop 2025-11-07 13:18:47 +01:00
marioalexis 06131ce8b5 Base: Restore schema spec for electromagnetic potential unit - fix #25093 2025-11-06 15:05:25 +01:00
FEA-eng 66600f9f1f Gui: Fix unreadable Choose Folder button in the macro recording panel 2025-11-06 15:04:04 +01:00
Florian Foinant-Willig 3ae8f3d57a OCC usage: fix deprecated Handle_* 2025-11-06 10:43:52 +01:00
Chris Hennes af41a9dcef Merge pull request #24317 from kpemartin/Issue24314
Update unit test to use new storage for DXF import settings
2025-11-05 14:25:58 -06:00
dependabot[bot] 7ecdb0236b Bump prefix-dev/setup-pixi from 0.9.2 to 0.9.3
Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/28eb668aafebd9dede9d97c4ba1cd9989a4d0004...82d477f15f3a381dbcc8adc1206ce643fe110fb7)

---
updated-dependencies:
- dependency-name: prefix-dev/setup-pixi
  dependency-version: 0.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 13:19:26 -06:00
marioalexis 6c7187b54f Fem: Fix magnetodynamic2D boundary condition 2025-11-05 13:06:53 -06:00
Pieter Hijma 011b6cdfbf Gui: Fix supporting xlinks in add property dialog 2025-11-05 12:49:47 -06:00
Ajinkya Dahale 857190a20a Sketcher: Only transfer equality in specific cases in trim
The transfer on should apply to (arcs of) conics.

Fixes #25008.
2025-11-05 12:48:05 -06:00
wandererfan 37af704998 [TD]fix angle dim in detail view 2025-11-05 12:46:35 -06:00
PhoneDroid f2d60d7abe [ Plot ]: Update SPDX License Identifiers 2025-11-05 12:45:42 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 54948b441d SPDX [ 34 ][ Src / Mod / Points ] (#25073) 2025-11-05 12:44:17 -06:00
PhoneDroid 28d5539fc7 [ Reverse ]: Update SPDX License Identifier 2025-11-05 12:42:10 -06:00
PhoneDroid bde82f19cb [ MacAppBundle ]: Update SPDX License Identifiers 2025-11-05 12:40:53 -06:00
marioalexis 123aee6b1b Fem: Fix CalculiX body heat source writer for 2D case 2025-11-05 12:37:52 -06:00
PhoneDroid 4e9fe02b9a [ Ext ]: Update SPDX License Identifiers 2025-11-05 12:37:18 -06:00
PaddleStroke cb108249f2 Sketcher: Fix offset of open profile (#25091)
* Sketcher: Fix offset of open profile

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-05 12:35:45 -06:00
dependabot[bot] a8ce12f2b4 Bump step-security/harden-runner from 2.13.1 to 2.13.2
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.1 to 2.13.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a...95d9a5deda9de15063e7595e9719c11c38c90ae2)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 11:20:34 -06:00
pre-commit-ci[bot] 8ddecd21a1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-05 13:32:09 +00:00
Kevin Martin 520dd7b2b7 Remove test from old location 2025-11-05 08:28:35 -05:00
Kevin Martin 5afe1e64f8 Transplant the test code from the old location
For some reason the app hangs after the test GUI is run
2025-11-05 08:28:34 -05:00
Kevin Martin 2d5bb51734 Add the sample input file 2025-11-05 08:28:34 -05:00
Kevin Martin 44bb16cae7 Enable Python Draft import tests
A failing test was added to Draft tests to ensure CI catches it
2025-11-05 08:28:17 -05:00
Furgo 2d2684cc3d BIM: remove BIM Project command from toolbar (#25086)
- The BIM_Project command is removed from the toolbar and relocated to
  the Utils menu
- The default when creating a new project has been changed to
  non-IFC-native
- The BIM_Project and IFC_MakeProject command menu text have been
  reworded to remove ambiguity
2025-11-05 09:56:46 +01:00
PaddleStroke af014a1bb4 Sketcher: Restore ExprBasedConstrDimColor (#25055)
* Sketcher: Restore ExprBasedConstrDimColor

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-04 20:07:44 +01:00
Chris Hennes 75151b2987 Addon Manager: Update to 2025-11-04 2025-11-04 20:04:03 +01:00
Chris Hennes 736ffd0140 Merge pull request #25015 from PhoneDroid/SPDX-Src-Mod-Spreadsheet
SPDX [ 33 ][ Src / Mod / Spreadsheet ]
2025-11-03 15:28:46 -06:00
Chris Hennes acb3f4a8f9 Merge pull request #24912 from marioalexis84/fem-elmer_solver 2025-11-03 12:40:06 -06:00
Kacper Donat 54d25bcabc Merge pull request #24904 from tetektoza/fix/23459_fix_locked_ovp_allowing_change_geom
Sketcher: Remember cursor angle for OVPs after OVP is set
2025-11-03 19:25:56 +01:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ f0e70e68e0 [ Draft ]: Update SPDX License Identifiers (#24965) 2025-11-03 11:58:14 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 0df300cee6 [ Import ]: Update SPDX License Identifiers (#24976) 2025-11-03 11:57:57 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ df142c35aa SPDX [ 25 ][ Src / Mod / Material ] (#24979)
* [ Material ]: Update SPDX License Identifiers

* [ Material ]: Correct Test Material License

---------

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-11-03 11:57:40 -06:00
PhoneDroid 00887c4f3a [ Web ]: Update SPDX License Identifiers 2025-11-03 11:57:21 -06:00
PhoneDroid a26610b315 [ Tux ]: Update SPDX License Identifiers 2025-11-03 11:57:14 -06:00
PhoneDroid 5400e01651 [ Start ]: Update SPDX License Identifiers 2025-11-03 11:57:06 -06:00
Adrian Insaurralde Avalos c783f818a8 [weeklies] fix #22989, missing ThirdPartyLibraries.html on windows bundles 2025-11-03 11:48:49 -06:00
Chris Hennes 5ea8399ada Spreadsheet: Correct accidental license change
In formatting commit 5bd5f3a963 a
contributor mistakenly changed the license of importXLSX.py
from LGPL to GPL. The original code contributed by @ulrich1a included an
LGPL license block in it, and that license should have been retained.
This commit changes the license block to the originally-intended LGPL
block, and updates the SPDX header to match.
2025-11-03 11:47:45 -06:00
Chris Hennes 0bc707ad34 CI: Silence expected error message for shallow repo 2025-11-03 14:14:43 -03:00
sliptonic 22309af65c Merge pull request #24732 from tarman3/dressup_icon
CAM: Fix Dressups icon Active state
2025-11-03 11:14:15 -06:00
paul 2c7e0f044b [BimWindow] Fix SymbolPlan position (#25001)
* [BimWindow] Fix SymbolPlan position

Fix #24903

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-03 18:08:56 +01:00
sliptonic cd5209f264 Merge pull request #25003 from chennes/contributingPRTitle
Project: Revise PR message guidelines for clarity
2025-11-03 10:44:36 -06:00
Chris Hennes 098f19f706 Merge pull request #24890 from mosfet80/upSubmodules
Update git submodules
2025-11-03 07:39:03 -06:00
tetektoza 08e4191e5a Gui: Force Expression Completer to show drop-down upon clicking on item (#25011)
As the title says - currently if user clicks "Box" from the autocomplete
dropdown, it adds "Box.", but the property drop-down is never resolved
further, so user has to delete the separator and write it by hand.

When a completion ends with '.' or '#' and is being selected by
clicking, code sets `block=true` and calls `slotTextChanged()` which
prevents the `textChanged2` signal from being emitted. This results in
completer being blocked from updating next level of properties.

So, this patch adds a direct call to `completer->slotUpdate()`, which
triggers completer to parse the expression and show the drop-down.
2025-11-03 11:11:55 +01:00
Chris Hennes 79412d205b Merge pull request #24970 from maxwxyz/cp_18075 2025-11-02 21:38:58 -06:00
PhoneDroid 27f6c9081c [ Spreadsheet ]: Update SPDX License Identifiers 2025-11-02 21:36:25 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ cdb990e810 [ JtReader ]: Update SPDX License Identifiers (#24977)
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-11-02 16:27:55 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 489e429b5c SPDX [ 29 ][ Src / Tools ] (#24999)
* [ Tools ]: Update SPDX License Identifiers

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-02 16:21:34 -06:00
PhoneDroid d80cd13d41 [ Part ]: Update SPDX License Identifiers 2025-11-02 16:16:07 -06:00
Joao Matos 41395f2051 Add PartDesign build dependency to Import.
Import now depends on PartDesign, so ensure CMake configure-time
dependency enforcement requires PartDesign alongside Part.

Fixes build regression from
https://github.com/FreeCAD/FreeCAD/commit/6fd6558040bb61cc1a9d35fd360cb1a169276cd3.
2025-11-02 15:59:06 -06:00
Roy-043 08cf89d1c9 Fix path for ContinueMode parameter retrieval 2025-11-02 15:50:26 -06:00
PhoneDroid 90a4f9ecb0 [ Mesh ]: Update SPDX License Identifiers 2025-11-02 15:49:56 -06:00
PhoneDroid 53ba534677 [ Measure ]: Update SPDX License Identifiers 2025-11-02 15:22:11 -06:00
Chris Hennes 8504bc8988 Points: Remove unimplemented CmdPointsTransform 2025-11-02 22:17:01 +01:00
PhoneDroid 69674d706f [ Inspection ]: Update SPDX License Identifiers 2025-11-02 15:06:47 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ ca1a25d6d6 SPDX [ 21 ][ Src / Mod / Assembly ] (#24974)
* [ Assembly ]: Update SPDX License Identifiers

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-02 15:06:03 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 46909c6fb8 [ IDF ]: Update SPDX License Identifiers (#24967) 2025-11-02 15:05:15 -06:00
PhoneDroid 6a1929a6d6 [ Help ]: Update SPDX License Identifiers 2025-11-02 14:58:06 -06:00
Roy-043 5b872b59a1 BIM/Draft: fix paths related to example files
* My mod (#23284) of CMakeLists.txt did not create the desired subfolder. Therefore the TTF and PAT files have now been put in the main example folder.
* draft_test_objects.FCStd has been update for the new path of the mentioned files.
* BIMExample.FCStd has been updated to use the PAT file from the example folder instead of acad.pat from a local folder.
2025-11-02 14:51:27 -06:00
Chris Hennes fe4a734a9d Merge pull request #24764 from WandererFan/FillTemplate2
[TD]defend against deleted object error
2025-11-02 14:49:34 -06:00
Chris Hennes 4d201c8f0e Merge pull request #24856 from tetektoza/fix/21547_respect_treat_ellipses_opt_in_prefs
Import: Use proper location for DXF prefs
2025-11-02 14:23:35 -06:00
Chris Hennes c8eefab345 Project: Revise PR message guidelines for clarity 2025-11-02 12:53:43 -06:00
Max Wilfinger aeb83b3c05 App: Apply code review suggestions 2025-11-02 17:38:06 +01:00
PaddleStroke 45ca23d074 Update JointObject.py 2025-11-02 17:03:37 +01:00
Leandro Heck e4f36afcb3 Gui: Use system dialogs by default (#24882)
* Fix the selector of the FileDialog and add the same default settings for the ColorDialog.

* Add option to set the default ColorDialog

* Use system dialog by default

* Remove new env var

* Fix the native file dialog selector

* Adjust env variable name

* Adjust env variable name
2025-11-02 16:50:48 +01:00
PaddleStroke 0b2268a921 Sketcher: Constraint rendering (#24534)
* Sketcher: Constraint rendering

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

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

* Update EditModeConstraintCoinManager.h

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

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

* Update EditModeConstraintCoinManager.cpp

* Update SoDatumLabel.cpp

* Update SoDatumLabel.cpp

* Update EditModeConstraintCoinManager.cpp

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

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

* Update EditModeConstraintCoinManager.cpp

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

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

* revert changes drawing the box around fx

* Update EditModeConstraintCoinManager.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>
2025-11-02 15:51:14 +01:00
Joao Matos 36d432e2cc Gui: Use C99 _Exit instead of not as portable POSIX _exit.
The actual fix here is for a compile error which started appearing as an
error due to `unistd.h` include being included implicitly from
`boost::signals`, which FastSignals does not do anymore.

```
Error:
/Users/runner/work/FreeCAD/FreeCAD/src/Gui/Dialogs/DlgVersionMigrator.cpp:366:5:
error: use of undeclared identifier '_exit'
```
2025-11-01 21:49:24 +01:00
Chris Hennes c5489e0f0a Gui: Fix allocation of posted ESC event 2025-11-01 21:47:00 +01:00
tetektoza ad2e866332 Gui: Fix window restoration after Edit->Alignment completion
After completing Edit->Alignment, main window remains small instead of
maximized. It looks like this is Qt 6 regression as the automatic
maximization behavior was somehow changed. Previously it didn't need
explicit handling to restore the maximisation.

So, this patch preserves the previous window state before entering
Alignment editor and restores window being maximized/minimized or normal
upon finishing the operation.
2025-11-01 21:17:24 +01:00
tetektoza ced9c0dd4f Sketcher: Remember cursor angle for Rectangle OVPs after OVP is set
As the title says. Currently user is able to change geometry if OVP is
set on labels. This is because `doEnforceControlParameters` reads mouse
position every mouse move and calculates angle from it, resulting in a
new angle every time mouse is moved.

So, this patch basically reads the position before it was set, and once
it is set, locks the position of the mouse and calculates angle from it
which will be maintained until user cleans the OVP or makes a new
primitive.
2025-11-01 20:43:12 +01:00
tetektoza 1f78dac7b5 Sketcher: Remember cursor angle for Line OVPs after OVP is set
As the title says. Currently user is able to change geometry if OVP is
set on labels. This is because `doEnforceControlParameters` reads mouse
position every mouse move and calculates angle from it, resulting in a
new angle every time mouse is moved.

So, this patch basically reads the position before it was set, and once
it is set, locks the position of the mouse and calculates angle from it
which will be maintained until user cleans the OVP or makes a new
primitive.
2025-11-01 20:43:12 +01:00
tetektoza e2a141785f Sketcher: Remember cursor angle for Slot OVPs after OVP is set
As the title says. Currently user is able to change geometry if OVP is
set on labels. This is because `doEnforceControlParameters` reads mouse
position every mouse move and calculates angle from it, resulting in a
new angle every time mouse is moved.

So, this patch basically reads the position before it was set, and once
it is set, locks the position of the mouse and calculates angle from it
which will be maintained until user cleans the OVP or makes a new
primitive.
2025-11-01 20:43:12 +01:00
wandererfan 97ca7d9818 [TD]use local language for ProjectionType 2025-11-01 20:34:44 +01:00
Roy-043 48d91d6dd8 BIM: no longer use DraftVecUtils.precision()
Fixes #24928

Use `Draft.precision()` instead of `DraftVecUtils.precision()`.
2025-11-01 20:25:41 +01:00
Chris Hennes 0b1b7ccc62 Tools: Add Measure to translation download 2025-11-01 20:15:59 +01:00
PaddleStroke 0d75ff1542 Assembly: ExplodedViews: fix their use in techdraw (#24769)
* Assembly: ExplodedViews: Add getExplodedShape for techdraw to use

* TechDraw: ShapeExtractor fix assembly exploded views

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

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

* Assembly: Fix variable casing in CommandCreateView.py

---------

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-11-01 20:02:48 +01:00
Kacper Donat 3b83367c4a Merge pull request #24936 from chennes/femTestTweaks
Fem test tweaks
2025-11-01 20:01:58 +01:00
tetektoza 9b2e4b4975 Draft: Do not set Make Face property when importing with DXF (#24857)
* Draft: Do not set Make Face property when importing with DXF

As the title says - this option was taken from last Draft setting, so
this disables it to always preserve only wire during import, instead of
adding faces on.

* Draft: Do not make faces when importing dxf primitives for legacy import
2025-11-01 13:26:13 +01:00
Max Wilfinger 7106c697d0 GUI: no minimum width for status bar buttons 2025-11-01 11:41:15 +01:00
wwmayer 1844fdd443 PD: Toggling transparency doesn't reset colors 2025-11-01 09:05:03 +01:00
sliptonic 0257c40bc4 Merge pull request #24964 from PhoneDroid/SPDX-Src-Mod-CAM
SPDX [ 17 ][ Src / Mod / CAM ]
2025-10-31 17:14:28 -05:00
pre-commit-ci[bot] f413a569b3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-10-31 21:06:39 +00:00
PhoneDroid ba99bc5da4 [ CAM ]: Update SPDX License Identifiers 2025-10-31 17:00:32 -04:00
sliptonic 05b7ad0e9c Merge pull request #24875 from tarman3/simsubmenu
CAM: Simulators - Drop down menu in toolbar
2025-10-31 11:11:34 -05:00
Chris Hennes f7689115ae FEM: Disable FEM GUI unit tests 2025-10-30 23:13:14 -05:00
Jacob Oursland c270a8ac66 CI: upgrade pixi to prevent CI-breaking version mismatch. 2025-10-30 22:23:50 -05:00
Chris Hennes c93db04d9e FEM/Tests: Ensure deletion of test files 2025-10-30 22:14:33 -05:00
sliptonic 4227a6d11b Merge pull request #24935 from chennes/updateImperialPressureUnitTest
Tests: Update values for Imperial pressure tests
2025-10-30 20:41:46 -05:00
marioalexis 428340a974 Fem: Migrate old Elmer solver object 2025-10-30 10:47:10 -03:00
marioalexis c7e74a68a7 Fem: Update Elmer test files 2025-10-30 10:47:10 -03:00
marioalexis 6c583d82f2 Fem: Use FileChooser widget in CalculiX task panel 2025-10-30 10:47:10 -03:00
marioalexis 243b42f4cb Fem: Rework Elmer solver - fixes #21479 2025-10-30 10:47:10 -03:00
marioalexis 275ece0bb2 Fem: Create element groups with gmsh 2025-10-30 10:47:10 -03:00
marioalexis d018b3f8fb Fem: Add method to rename mesh group 2025-10-30 10:47:10 -03:00
marioalexis 5e42f6a48d Fem: Add ParaView .pvd file importer 2025-10-30 10:47:09 -03:00
paul 6ab89664c6 [ArchStairs] Fix structure: when RiserThickness set & ConnectionDown not HorizontalCut (#24917)
* [ArchStairs]  Fix Structure: when RiserThickness is set & ConnectionDown is not HorizontalCut

Fix #24409

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

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

* Update src/Mod/BIM/ArchStairs.py - typo correction

Co-authored-by: João Matos <joao@tritao.eu>

* Update ArchStairs.py - typo correction

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: João Matos <joao@tritao.eu>
2025-10-30 11:41:58 +01:00
Chris Hennes 5379378626 Tests: Update values for Imperial pressure tests 2025-10-29 21:36:52 -05:00
Billy Huddleston 5b2987bd07 CAM: Fix expression editor so that widgets refresh after closing
src/Gui/QuantitySpinBox.cpp:
- Call updateExpression() after setExpression() in QuantitySpinBox

src/Gui/SpinBox.cpp:
- Call updateExpression() after setExpression() in ExpressionSpinBox

src/Gui/Widgets.cpp:
- Call onChange() after setExpression() in ExpLineEdit

src/Mod/CAM/Path/Base/Gui/Util.py:
- Connect to showFormulaDialog signal and refresh CAM QuantitySpinBox Python wrapper when dialog closes
2025-10-28 15:29:01 -05:00
dependabot[bot] 67cdd23918 Bump github/issue-metrics from 3.25.1 to 3.25.2
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.1 to 3.25.2.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/c640329f02bd24b12b91d51cd385f0b1c25cefb9...637a24e71b78bc10881e61972b19ea9ff736e14a)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 13:27:59 +01:00
github-actions 11fecb1558 Update translations from Crowdin 2025-10-27 21:06:54 -05:00
mosfet80 c2bd7d3543 Updated submodule src/3rdParty/GSL 2025-10-28 02:45:42 +01:00
mosfet80 f8de1c60b4 Updated submodule src/3rdParty/OndselSolver 2025-10-28 02:45:33 +01:00
mosfet80 0a2362dd57 Updated submodule src/Mod/AddonManager 2025-10-28 02:43:52 +01:00
dependabot[bot] 25e3cb0144 Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 19:10:43 -05:00
wandererfan f507ee449b [TD]use scale from view to fill template 2025-10-27 18:19:19 -04:00
wandererfan c72a707fca [TD]restore undo/redo function in FillTemplates 2025-10-27 18:19:19 -04:00
wandererfan 2709d2a595 [TD]defend against deleted object error
- App.ActiveDocument.Objects was returning a deleted object
  Most likely due to shenanigans with DrawViewPart/DrawProjGroup item
  in TaskProjGroup.
2025-10-27 18:19:19 -04:00
tarman3 478f8a0c76 CAM: Fix Dressups icon Active state 2025-10-27 20:21:45 +02:00
Max Wilfinger cf9bb8bb16 Merge pull request #23471 from hyarion/change/tasks-at-right 2025-10-27 19:01:03 +01:00
Roy-043 6eafca89e3 Draft: fix relative path issue when editing existing hatch
Something that was missed in #23294
2025-10-27 18:34:36 +01:00
PaddleStroke 676a3c3d0d Update Tree.cpp 2025-10-27 12:16:50 -05:00
sliptonic 3a5b565bd8 Merge pull request #24809 from sebastianohl/main
Zero-4 machine controller don't like two M-commands in one line
2025-10-27 12:11:27 -05:00
Billy Huddleston 478292b9ec CAM: Refactor LeadInOut task panel to use QuantitySpinBox and improve migration/visibility logic
- Replace QDoubleSpinBox widgets with Gui::QuantitySpinBox in DressUpLeadInOutEdit.ui for all lead-in/out numeric fields, enabling unit/expressions support.
- Register QuantitySpinBox as a custom widget in the .ui file.
- Refactor TaskDressupLeadInOut panel setup:
  - Add setupSpinBoxes, setupGroupBoxes, setupDynamicVisibility for cleaner UI initialization.
  - Use PathGuiUtil.QuantitySpinBox for all numeric fields and ensure updateWidget() is called for each.
  - Centralize signal registration and field updates using getSignalsForUpdate and pageGetFields.
  - Move group box signal handler to a class method.
  - Share hideModes dictionary for field visibility logic.
  - Add dynamic label switching for "Radius"/"Length" with translation placeholders.
  - Remove the Include layers Check Box
- Improve ObjectDressup migration:
  - Use shared hideModes from TaskDressupLeadInOut.
  - Set default angles to 90 instead of 45.
  - Preserve previous style values when migrating StyleOn/StyleOff.
  - Ensure field visibility is updated after migration.
- Add Perpendicular and Tangent to lead_styles in correct order.
2025-10-27 12:10:06 -05:00
FilippoR 9cf380810a Use packit to build rpm and add it as check on pull request (#21063)
* Update spec file

use custom macro to package the source file

reformat freecad.spec

add script for build from source archive

use bcond macro

use standard builddir and don't delete it to fast local rebuild

configure cmake correctly to avoid moving file later

add tests

remove python bytecompile is default

build in RelWithDebInfo to generate correctly the debuginfo package (debug info will be stripped from standard package and a debuginfo package will be generated

export dev package for ondselsolver

export libondselsolver

use new macro for filtering requires provides

simplify regexp.
remove delete unused source
enable gui tests
other fix

Disabile gui test to avoid timeout

add timeout to tests

remove rpkg macro for archive extraction

refactor prepare for packit

small fix

Update package/fedora/freecad.spec

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

small fix

change packit configuration

fix format

fix packit

/packit build

authomatic build on commit

remove libkdtree++-devel missing in rawhide

* add packit configuration

escape changelog for spec file

add new build on release

simplify configuration to use only packit
remove script used to have only a spec file and build with 3 system
rpkg
custom bash script
packit

* add tests in test-farm

add test that read build time tests result

use default build type for pr build and always print buiild time tests result

fix and disable option without bundled_gtest

Update package/fedora/freecad.spec

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

Update package/fedora/freecad.spec

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

* add github action

Update fedora-daily.yml

Potential fix for code scanning alert no. 203: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Update spec file

use custom macro to package the source file

reformat freecad.spec

add script for build from source archive

use bcond macro

use standard builddir and don't delete it to fast local rebuild

configure cmake correctly to avoid moving file later

add tests

remove python bytecompile is default

build in RelWithDebInfo to generate correctly the debuginfo package (debug info will be stripped from standard package and a debuginfo package will be generated

export dev package for ondselsolver

export libondselsolver

use new macro for filtering requires provides

simplify regexp.
remove delete unused source
enable gui tests
other fix

Disabile gui test to avoid timeout

add timeout to tests

remove rpkg macro for archive extraction

refactor prepare for packit

small fix

Update package/fedora/freecad.spec

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

small fix

change packit configuration

fix format

fix packit

/packit build

authomatic build on commit

remove libkdtree++-devel missing in rawhide

* add packit configuration

escape changelog for spec file

add new build on release

simplify configuration to use only packit
remove script used to have only a spec file and build with 3 system
rpkg
custom bash script
packit

* add tests in test-farm

add test that read build time tests result

use default build type for pr build and always print buiild time tests result

fix and disable option without bundled_gtest

Update package/fedora/freecad.spec

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

Update package/fedora/freecad.spec

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

* add github action

Update fedora-daily.yml

Potential fix for code scanning alert no. 203: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* tentative fix test

* add verbose failed tests

* fix ctest

* Remove error file if 2 time is successful

* Update plan.fmf add IfcOpenShell-python3

* Update .packit.yaml

Update freecad.spec

Update plan.fmf

Update .packit.yaml

Update plan.fmf

* Update freecad.spec

* restore version

* add rpm cmake preset

* update tests

* add qt6-assistant deps

* use xvfb-run for QuantitySpinBox test

* fix ctest command

* clean

* restore Addon Manager: Add defusedxml dependency

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-27 12:06:38 -05:00
sliptonic 1111f8da7c Merge pull request #24851 from FreeCAD/removeLiberaPayFromFunding
Remove Liberapay entry from FUNDING.yml
2025-10-27 11:55:06 -05:00
theo-vt 87d21a643d Sketcher: Reassign virtual space flag to constraints after modifying them through a default DHS 2025-10-27 11:53:26 -05:00
Chris Hennes 9a12579cb9 Merge pull request #24277 from ryankembrey/werner_fix_23504
Gui: Do not accept changes when pressing ESC key in 3D view
2025-10-27 11:49:46 -05:00
Roy-043 ee512ebc00 BIM: BIM_ProjectManager: add missing self.project check 2025-10-27 11:48:06 -05:00
Chris Hennes 8fe33581e6 Build: Use date as revision when using a shallow clone 2025-10-27 17:47:41 +01:00
Steven James 909d581265 Add Dockerfile and script to create an Ubuntu Qt6 based build image for docker. 2025-10-27 11:37:16 -05:00
wandererfan 09f3e6738c [TD]shrink selection frame 2025-10-27 11:36:31 -05:00
Kacper Donat 9e6e2f474f Gui: Enable overlay for the Tasks panel by default 2025-10-27 17:32:06 +01:00
tarman3 9a81201b24 CAM: Simulator submenu in toolbar 2025-10-27 12:46:06 +02:00
paul 3084c48c8e [ArchStairs] Fix Wrong Height when toSlabThickness & Landings AtCenter are set (#24864)
* [ArchStairs] Fix Wrong Height when toSlabThickness & Landings AtCenter are set

Fix #24408

This fix both Stairs Flight set as Straight and HalfTurnLeft/Right

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-27 11:10:48 +01:00
NepEgor 5409b12e6e Gui: Fix FreeTurntable orbit style not constraining vertical axis (#24861)
* Gui: Fix FreeTurntable orbit style not constraining vertical axis

* Apply suggestions from code review

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-26 22:41:45 +00:00
Syres916 e95d3cbdc9 [TechDraw] Fix the projection type combobox and align all references to First angle and Third angle (#24762) 2025-10-26 17:31:44 -05:00
tetektoza 4718c46170 TechDraw: Fix centerlines being double Y-axis transformed
As the title says. Currently when user exports to DXF, centerlines and
cosmetic edges appeared offset below their correct positions. The offset
was visible when opening exported DXF file in CAD software - centerlines
were displaced downward where they should be.

The issue was that cosmetic edges are already stored with the correct Y
orientation and should not be mirrored during export, so this caused
centerlines to be mirrored when they shouldn't be, resulting in
incorrect Y position.

So this is just a small modification to cosmetic edge export to skip the
Y-axis mirroring step.
2025-10-26 17:24:58 -05:00
tetektoza b65451c2b4 Import: Make sure to not convert text height from draw units to points
When importing DXF files using the C++ importer, TEXT and MTEXT entities
had incorrect heights. For example:
- text with height 100mm in the DXF file was imported as 35.28mm in FC.
The scaling factor was consistent to be 0.3528.

The issue was that we were applying a point-to-millimeter conversion to
the text height , but that seems to be incorrect since according to DXF
spec, TEXT and MTEXT entity heights are always specified in drawing
units, not in points, so just remove that code.
2025-10-26 16:47:43 -05:00
Florian Foinant-Willig 501c6273a3 PartDesign: only warn on refine failure 2025-10-26 22:16:04 +01:00
Benjamin Nauck 5aa00ca0ad Gui: Move tasks to the right side for easier defaults 2025-10-26 21:21:46 +01:00
tetektoza 0cfa5ba5fe Fix: Closed polylines import duplicate vertices
Similar case to the previous commit related to closed polylines having
coincident vertices, but this time for import. Basically if importing
DXF files containing closed polylines, FC would throw an exception.

This was because `BuildWireFromPolyline()` function in the DXF importer
attempted to create a closing edge for closed polylines by connecting
the last vertex back to first vertex.

So, this patch adds a skip for the closing edge if the vertices are
coincident.
2025-10-26 15:17:00 +01:00
Roy-043 b433350aff Change keyboard shortcut from 'I, P' to 'I, S' 2025-10-26 15:01:08 +01:00
tetektoza 01777cb320 Fix: Closed polylines export duplicate vertices
AS the title says - when exporting closed curves (ellipses for example)
as polylines with the "Treat ellipses and splines as polylines" option,
the generated DXF file contained duplicate vertices. For example, an
ellipse polyline would have vertex1 and vertex40 which are identical in
terms of coordinates. This has caused exception upon importing.

Cause of that was that discretizer was blindly iterating through all
discretized points without checking if the first and last points are
coincident.

So, this patch adds a check for that to detect and skip the last
coincident point if it is in fact coincident during Export.
2025-10-26 14:45:10 +01:00
tetektoza e221cfd47a Import: Export number of vertices in polylines as int instead of double 2025-10-26 14:29:24 +01:00
tetektoza 34eafe127e Import: Use proper location for DXF prefs
Currently if users enabled the "Treat ellipses and splines as polylines"
option in DXF export preferences and exported them, they were still
being exported as native primitives.

This was because we were reading from a wrong preferences location, UI
stored it in `BaseApp/Preferences/Mod/Draft`, but it was read from
`BaseApp/Preferences/Mod/Import`. Since the pref didn't exist, we were
taking default value which was set to `false`.

So the solution is obvious - just set it to the correct path.
2025-10-26 14:26:02 +01:00
Chris Hennes 4daf8d3b38 Remove Liberapay badge from README 2025-10-25 14:37:36 -05:00
Chris Hennes 99dee32e84 Remove Liberapay entry from FUNDING.yml
Removed Liberapay funding entry and updated formatting.
2025-10-25 14:29:14 -05:00
Roy-043 e366824b74 BIM: fix update of material tree icon 2025-10-25 20:04:12 +02:00
tetektoza 9e58650477 BIM: Fix beam rotation when Base property is cleared (#24831)
When a profile-based beam had its Base property cleared and the model
was recomputed, the beam would rotate 90 degrees, changing its direction
completely.

Profile objects are always created in the XY plane with Width along X,
height along Y and normal along Z. However, if Base is cleared, fallback
code always used YZ plane orientation for beams. This resulted in a
different orientation during cleaned Base property.

Fix is to check if we are profile-based or not and if yes, use XY plane
orientation, while we don't have this property then just use YZ plane
orientation (preserving traditional horizontal behavior).
2025-10-25 14:10:37 +02:00
Roy-043 4ef209cabe BIM: fix strict IFC drag and drop 2025-10-24 10:21:42 +02:00
Chris Hennes f6f919d229 Gui: Use postEvent instead of sendEvent for Esc handling
See https://github.com/FreeCAD/FreeCAD/pull/24277#issuecomment-3342091132

Co-authored-by: wwmayer <wmayer@freecad.org>
2025-10-23 14:39:31 -05:00
wwmayer 503ef79cea Gui: Do not accept changes when pressing ESC key in 3D view
Forward the ESC key event to the Task view to reject changes if needed. This fixes issue https://github.com/FreeCAD/FreeCAD/issues/23504
2025-10-23 14:35:40 -05:00
sliptonic c7c068be6e Merge pull request #24810 from tarman3/leadinout_fix_isActive
CAM: LeadInOut - Fix isActive()
2025-10-23 13:05:14 -05:00
tarman3 06e0fb4c19 CAM: LeadInOut - Fix isActive() 2025-10-23 15:16:02 +03:00
sliptonic 4b0259b57f Merge pull request #24666 from tarman3/leadinout_no_leadin
CAM: LeadInOut - Fix LeadIn off
2025-10-23 06:59:04 -05:00
Sebastian Ohl 70be188426 adding newline, as the Zero-4 machine controller don't like two M-commands in one line 2025-10-23 13:54:22 +02:00
PaddleStroke fce385dd73 Assembly: Fix Iisolate issue when obj and link both in assembly (#24781)
* Assembly: Fix Iisolate issue when obj and link both in assembly

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

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

* Update src/Mod/Assembly/Gui/ViewProviderAssembly.cpp

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

* [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>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-10-23 10:04:46 +00:00
tarman3 3ea894029f CAM: LeadInOut - Fix LeadIn off 2025-10-23 06:48:14 +03:00
sliptonic 70a7480601 Merge pull request #24471 from tarman3/leadinout_perp_tan
CAM: LeadInOut - Revert Perpendicular and Tangent styles
2025-10-22 19:23:02 -05:00
Leandro Heck 873fa449ce PD: Show custom direction settings on Pad/Pocket only when necessary. (#24642)
* PD: Show custom direction settings on Pad/Pocket only when necessary.

* Update the visibility of parameters.
2025-10-23 00:00:11 +02:00
PaddleStroke 498968b89c Sketcher: Do not open command if one is pending in doSetVisible (#24778)
* Sketcher: Do not open command if one is pending in doSetVisible

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-22 23:58:30 +02:00
tetektoza 1683f271c6 Import: Fix crash in glTF importer when removeSplitter() fails
Currently `removeSplitter()` function attempts to merge coplanar faces
by using `ModelRefine::FaceUniter`, which internally uses
`BRepBuilderAPI_Sewing`. This can fail in several scenarios, like
inability to produce a valid shell, failing in face unification due
to geometry incompatibilities, or when we have tolerance issue in the
reconstructed geometry from glTF triangulation that prevent us from face
merging.

That leads to the exception, which we are not handling correctly where
it's being handled the same way as this patch introduces in other parts
of FreeCAD.

So, this patch adds a try-catch block around `removeSplitter()` to
gracefully handle `Standard_Failure` exception and return the sewn shape
instead of crashing. Imported model will contain more individual faces
than necessary (since coplanar won't be merged), resulting in a more
complex topology in the places of those fails, but geometry and visual
appearance will be preserved.
2025-10-22 16:43:25 -05:00
tarman3 f8662d75eb CAM: LeadInOut - Revert Perpendicular and Tangent styles 2025-10-22 20:22:49 +03:00
sliptonic f1c7d91a74 Merge pull request #24433 from tarman3/leadinout_radius
CAM: LeadInOut - Radius and ToolController
2025-10-22 11:55:09 -05:00
Furgo 2096d0bd86 BIM: Implement double-click event for materials group (#24767)
* BIM: Implement double-click event for materials group

Add double-click handling for materials group in Tree View.

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

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-21 14:07:13 +02:00
PaddleStroke 529aae0238 Assembly: Prevent crash when toggling rigid of grounded sub assembly (#24761)
* Assembly: Prevent crash when toggling rigid of grounded sub assembly

* to squash

* to squash

* Update AssemblyLink.cpp
2025-10-21 07:51:15 +00:00
Chris Hennes d97c7cc95c Core: Switch away from deprecated wstring_convert and codecvt_utf8 2025-10-21 09:01:59 +02:00
Kacper Donat 3a6c75f5bd Merge pull request #24751 from tetektoza/fix/24009_clarify_selection_LMB_activated_by_accident
Gui: Add additional handling for Clarify Selection's long press
2025-10-20 23:22:17 +02:00
tetektoza 93f1cf717b Gui: Use assignment to auto in if statement
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-10-20 20:21:02 +02:00
tetektoza 58d319511a Gui: Add navigation modes to distinguish which nav mode requires CTRL 2025-10-20 20:18:28 +02:00
tetektoza 6a597a9277 Gui: Add additional handling for Clarify Selection's long press
This patch adds handling for different contexts that Clarify Selection's
long press may occur in. For example, different navigation styles,
transform tool, or dragger presence.

This way we are sure that the context menu for Clarify Selection won't
be popping up for the user when using one of the above-mentioned
contexts.

Also, this adds handling for different navigation styles, to accept
CTRL+LMB as the long press mouse-key combos, instead of just
long-pressing LMB, as in those navigation styles LMB is mostly used as
rotation.
2025-10-20 20:18:28 +02:00
tetektoza 5686d0a713 Gui: Add additional preferences for Clarify Select's long press to Prefs
As the title says. Two preferences, that reflect what has been added previously
- now the users can disable LMB at all, or increase the timeout through prefs.
2025-10-20 20:18:24 +02:00
Chris Hennes 5e63985fa7 Merge pull request #24749 from FreeCAD/BuildingEuroAreaDim2
Base, TechDraw: Use Unit Schema Values in Area Dimension
2025-10-20 11:37:55 -05:00
Petter Reinholdtsen 88d21ce70e Fixed inconsistent return types between several salomemesh methods and propotypes.
The prototypes in the header file did not match the implementation in the
C source.

These issues were discovered when enabling link time optimization.  There are
more LTO issues left to fix before it can be enabled, but these involve
mixing a C++ class and a pointer to floating point values and is a lot
more intrusive to fix.

This change is related to issue #13173, bringing LTO one step closer.
2025-10-20 11:09:56 -05:00
PaddleStroke 55d0e2b3ac Image: enable pasting image data directly (#24711)
* Image: enable pasting image data directly

* Update MainWindow.cpp
2025-10-20 17:59:49 +02:00
Chris 6fd6558040 Import: Export tip when body is selected (#24678) 2025-10-20 10:59:18 -05:00
Florian Foinant-Willig 7f6c39c358 PartDesign: fix MultiTransform from existant Transform 2025-10-20 17:55:01 +02:00
PaddleStroke 06c46bd352 Sketcher: Fix issue of reversed arcs input for polar pattern (#24351)
* Sketcher: Fix issue of reversed arcs input for polar pattern

* DrawSketchHandlerRotate: remove getRotatedPoint that is no longer needed

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

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

* Update Geometry.cpp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-20 10:45:18 -05:00
Syres916 5ba4feac59 [PartDesign] create a new Gui Unit Test for the creation of a sketch … (#23601)
* [PartDesign] create a new Gui Unit Test for the creation of a sketch and...

...improve the Selection Filter syntax error to show where it's being generated from.

* [PartDesign] address Lint feedback

* PD/Tests: Ensure test file does not exist before SaveAs

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-20 10:34:05 -05:00
Roy-043 fa67c65da9 BIM: fix site error when creating project with default structure
Fixes #24543.
2025-10-20 17:21:56 +02:00
Kevin Martin 0334c145d0 Do not use the object's Name as a Label if that Label already exists 2025-10-20 17:07:42 +02:00
github-actions 50d1dec4e0 Update translations from Crowdin 2025-10-20 09:57:05 -05:00
Chris Hennes e806592d92 Merge pull request #24734 from Syres916/CAM_Fix_SetupSheet_Table_MinHeight
[Gui] fix Arch Grid QTableview height and buttons width...
2025-10-20 09:41:51 -05:00
Chris 129d64dd87 Sketcher: Resolve aggressive snapping (#24730)
Fixes #24690
2025-10-20 09:37:51 -05:00
sliptonic adb327d98e Merge pull request #24397 from LarryWoestman/epic
CAM:  Add proposed Epic for improving postprocessors
2025-10-20 09:31:11 -05:00
PaddleStroke 7023e83843 Sketcher: Add support for tangent singularity when concentric circles (#24227) 2025-10-20 09:28:37 -05:00
Kacper Donat a09de19764 Gui: Fix order of stylesheet applying 2025-10-20 09:26:22 -05:00
Roy-043 08aeb5d65b BIM: remove 'show this dialog' checkbox from IFC Import and IFC Export prefs (#24728)
Fixes #24551
2025-10-20 09:15:43 -05:00
Roy-043 4b1ce402ff Rebased 2025-10-20 09:00:22 -05:00
dependabot[bot] 31ed7d2b67 Bump prefix-dev/setup-pixi from 0.9.1 to 0.9.2
Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/194d461b21b6c5717c722ffc597fa91ed2ff29fa...28eb668aafebd9dede9d97c4ba1cd9989a4d0004)

---
updated-dependencies:
- dependency-name: prefix-dev/setup-pixi
  dependency-version: 0.9.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 08:57:14 -05:00
wandererfan 0e7460496e [TD]use unit and text from schema 2025-10-20 08:55:44 -05:00
wandererfan c9fffa6789 [Base]retrieve unit text
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-20 08:54:52 -05:00
Kacper Donat e8aeffc096 PartDesign: Fix misplaced preview for Boolean operation 2025-10-20 08:46:28 -05:00
Chris Hennes 54535e072e Merge pull request #24752 from kadet1090/fix-various-stylesheet-issues
Stylesheets: Fix various stylesheet issues
2025-10-20 08:45:34 -05:00
Roy-043 2386ff1abc BIM: fix multi-material transparency IFC export issue (#24643)
* BIM: fix multi-material transparency IFC export issue

Fixes #22896.
2025-10-20 08:44:37 -05:00
Chris Hennes 98c9bca45a Merge pull request #24263 from captain0xff/gizmo4
Gui: Fix dependency issues with the interactive draggers
2025-10-19 23:47:45 -05:00
Roy-043 02d31f0457 BIM: fix Arch_RemoveShape attribute error
Fixes #24610.

Note that the command (after this PR) does not work properly (as was the case in v0.21).
2025-10-19 22:23:35 -05:00
Roy-043 f4bfbb47fa BIM: fix several dialog regressions (#24590)
* BIM: fix BIM_Classification dialog regression

* Fixed issues with more scenarios
2025-10-19 22:23:05 -05:00
captain0xff d08a7f1c0d Gui: change the group for the gizmo preferences 2025-10-19 22:19:21 -05:00
captain0xff 529c624afc Part: move GizmoHelper.h to src/Mod/Part/App 2025-10-19 22:19:11 -05:00
Steven James 5abf4da75e Building: Ubuntu environment needs python3-pyside2.qtnetwork for testing (#24493) 2025-10-19 21:41:50 -05:00
wandererfan 2172e82f23 [TD]fix area anno positioning 2025-10-19 21:40:25 -05:00
Chris d7b735ff95 GUI: Check correct parameter for pop-up notifications (#24727) 2025-10-19 21:04:06 -05:00
Lawrence Woestman fd2e4b1397 CAM: Incorporated the first round of feedback 2025-10-19 16:24:41 -07:00
Lawrence Woestman b8c6d59ab6 CAM: Add proposed Epic for improving postprocessors 2025-10-19 15:19:57 -07:00
Kacper Donat 06a9c56656 Stylesheets: Fix checked QToolButton style 2025-10-20 00:10:57 +02:00
Kacper Donat 777726f093 Stylesheets: Add styling for QPlainTextEdit 2025-10-20 00:10:57 +02:00
Kacper Donat c5ff1b4550 Stylesheets: Resreve space for right arrow 2025-10-19 23:09:21 +02:00
opgl fdd7dac561 CI (crowdin synchronization): Removed committing unneeded log file 2025-10-19 15:46:03 -05:00
tetektoza d5f9059199 Gui: Fix stack-use-after-return in DlgSettingsLightSources lambdas
Randomly discovered during some other bug hunt, only with
AddressSanitizer on. Basically, ASAN detected stack-use-after-return
when playing with spinboxes in the Light Sources preferences when Qt
signal handlers tried to invoke lambda callbacks that referenced
deallocated stack memory.

The main problem is that those lambda functions in the constructor
were captruing by reference. When they were connected to Qt signals
and invoked after constructor completed, they accessed stack vars that
have gone out of scope.

So fixed that by changing lambda captures from `[&]` to explicit captures:
- [this] for lambdas needing only class member access
- [this, updateLight] for lambdas that need both class members and the
`updateLight` lambda.
2025-10-19 22:23:36 +02:00
theo-vt a431ccc156 Quickmeasure: Allow measuring the length of a parabola 2025-10-19 12:31:47 -05:00
Furgo 2796296a24 BIM: Fix widget value setting in ArchMaterial (#24710)
ArchMaterial's view provider has a setTaskValue helper to set values of widgets inside a task panel. While specific to ArchMaterial, the real place where the helper is called is at BIM_Classification. It appears it's not a general but more like an ad-hoc API for a specific purpose and for a specific object.

In any case, this fix allows widgets that expect a numerical value to have their value set. Before, their value was set as text, unexpectedly.
2025-10-19 09:13:51 +00:00
opgl ac21faf35e CI (automated crowding synchronization): fix commiting additional log file 2025-10-18 14:37:10 -05:00
tarman3 68084b64c9 CAM: LeadInOut - Radius and ToolController 2025-10-18 18:37:37 +03:00
sliptonic a94382dd07 Merge pull request #24725 from davidgilkaufman/adaptive_model_aware_checkbox
[CAM] fix bug opening job ui panel
2025-10-18 10:07:23 -05:00
paul 4ff8998198 [ArchStairs] Fix StringerOverlap & StructureOffset (#24608)
1. Fix #24321
2. Fix - The 'Structure Offset' property does not allow to insert negative values

(Forum Discussion
- https://forum.freecad.org/viewtopic.php?t=100060 contains discussion on the above 2 issues)
2025-10-18 14:44:21 +00:00
Furgo e28f54f598 BIM: Prevent editing label on double-click (#24712)
Before this fix, double-clicking on an ArchMultimaterial object opened its task panel as expected. Unexpectedly, its label was selected and set for edit.

- The tree view's double-click handling expects the view-provider to declare whether it handled the double-click.
- The ViewProvider API's doubleClicked() is documented to return bool (True if handled).
- If a view provider's doubleClicked method returns None/False, the tree falls back to the default Qt behavior (which is beginning inline editing of the item label).
- In ArchMaterial.py the view provider calls self.edit() (or FreeCADGui.ActiveDocument.setEdit(...)) but the method that the tree actually calls (the view provider's doubleClicked) does not return True. Because the method returns None, the tree continues and starts inline label-editing.

In summary: setEdit returning True is fine, but doubleClicked is the method the tree checks; it must return True to suppress the default inline rename.
2025-10-18 15:34:10 +02:00
Syres916 879c083abf Merge branch 'FreeCAD:main' into CAM_Fix_SetupSheet_Table_MinHeight 2025-10-18 11:27:03 +01:00
Syres916 36b263a906 [Gui] change global QPushbutton min-width from 64px to 80px 2025-10-18 11:26:50 +01:00
ebswift bbea8ace72 Fix compilation error in TaskFeatureParameters.cpp 2025-10-17 22:35:44 -05:00
theo-vt 171389d9d3 Measure: allow length measurement for ellipse, hyperbola and parabola (#24659) 2025-10-17 21:34:07 +00:00
Chris 65d166f356 PD: Fix uninfomative error message box (#24705) 2025-10-17 19:48:31 +00:00
David Kaufman 909cd46a9f fix bug opening job ui panel 2025-10-17 15:08:10 -04:00
sliptonic f3186f4dc0 remove old supplemental fixture 2025-10-17 12:10:22 -05:00
David Kaufman e3874a1973 [CAM] make the adaptive model aware feature optional (#24553)
* [CAM] make the adaptive model aware feature optional

* fix CAM tests

* placate github codql

* remove model-aware-only properties from the adaptive task ui panel
2025-10-17 10:42:15 -05:00
sliptonic 8df09d92c0 Merge pull request #24661 from tarman3/icon
CAM: Fix icon while changing Active state for class ObjectOp
2025-10-17 10:41:20 -05:00
sliptonic b72f83136c Merge pull request #24606 from tarman3/toggle
CAM: Toggle Operation improve
2025-10-17 10:41:00 -05:00
sliptonic 7bb4bacc11 Merge pull request #24674 from Connor9220/EmbeddedToolMigrationFix
CAM: Fix embedded toolbits showing up as custom.
2025-10-17 10:40:40 -05:00
Chris Hennes 855d76bb40 Addon Manager: Synchronize with 2025.10.16 version 2025-10-17 05:25:19 +02:00
Chris Hennes e4b6b32f11 Merge pull request #24684 from furgo16/patch-34
BIM: remove obsolete Python 2 urllib2 import
2025-10-16 15:48:43 -05:00
Furgo ae0946ac9d BIM: replace obsolete urllib2 in BimTutorial 2025-10-16 21:21:40 +02:00
Furgo da4832fb50 BIM: remove obsolete Python 2 urllib2 import
Python 3 combined the former `urllib`, `urllib2`, `urlparse` Python 2 modules into subpackages of `urllib`. FreeCAD is written in Python 3, thus the `urllib2` import fallback will not work and needs to be removed.
2025-10-16 21:21:40 +02:00
tetektoza 0e6d4aa1d7 Gui: Restore focus to tree upon deletion and move selection to next obj (#24679) 2025-10-16 13:13:08 -05:00
PaddleStroke e278d22d42 Sketcher: Fix ctrlA with filter vertex index issue (#24665)
* Sketcher: Fix ctrlA with filter vertex index issue

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-16 13:01:30 -05:00
Chris Hennes 5e75a3ece9 Merge pull request #24692 from Roy-043/BIM-improve-MultiMaterial-task-panel
BIM: improve MultiMaterial task panel
2025-10-16 12:56:20 -05:00
captain0xff 8496d25279 Gui: fix null handling logic in Application::setEditDocument 2025-10-16 12:54:20 -05:00
Furgo a89c7eedcf BIM: add missing DraftGeomUtils import (#24683)
Added import for DraftGeomUtils to ArchCommands.makeFace to prevent crash.
2025-10-16 18:00:32 +02:00
Roy-043 bdb817a6a1 BIM: improve MultiMaterial task panel
Update MultiMaterialColumnWidth values to 120
2025-10-16 15:00:35 +02:00
Roy-043 0bfc4ac41e BIM: improve MultiMaterial task panel
Remove extra left margin from the first column in the tree view.
2025-10-16 14:58:59 +02:00
marcuspollio aef287cbb6 Update .git-blame-ignore-revs for BIM and Draft .pre-commit and Black format 2025-10-15 21:39:09 -05:00
Billy Huddleston 906edf7078 Promote embedded toolbits to correct shape type during migration
- Enhance _promote_toolbit to handle embedded toolbits that still have a "Custom" shape type.
- If ShapeType is "Custom" but ShapeID is present, attempt to promote to the correct shape class using ShapeID.
- Log promotion for traceability.
- This improves migration of legacy embedded toolbits and ensures proper shape assignment.
2025-10-15 18:04:40 -04:00
marcuspollio 50e4864efb Add Draft workbench to .pre-commit-config (#24664)
* Add Draft workbench to .pre-commit-config

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-15 11:21:09 +02:00
tetektoza 87f88bba30 BIM: Remove icon after unclone (#24654)
As the title says - upon unclone icon is not being removed, but the
cloned item stops mirroring original item which is correct, so this just
aligns the icon removal logic with the correct behavior.
2025-10-15 10:21:38 +02:00
tarman3 c995a331b6 CAM: Fix icon and Active state for class ObjectOp 2025-10-15 07:39:02 +03:00
Chris Hennes 41ce37233d Merge pull request #22696 from schmidtw/assembly-crash-fix
Fix: Prevent attempting to access non-existant nodes.
2025-10-14 10:14:51 -05:00
Kacper Donat 2b90740855 PartDesign: Fix boolean fuse without tools
This fixes issue where exception was thrown when no tools were selected
preventing the task dialog from being opened.
2025-10-14 10:05:24 -05:00
Kacper Donat 96b76b4e41 PartDesign: Ignore errors due to object misconfiguration in previews
This adds ignoring catch to the updatePreview method of
ViewProviderTransformed so it does not report issues that happen because
recompute takes place on object that is not yet fully configured.
2025-10-14 10:04:28 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 3f918a5d35 [ Surface ]: Updated SPDX (#24560) 2025-10-14 10:02:53 -05:00
PhoneDroid 7595a83f36 [ OpenSCAD ]: Updated SPDX 2025-10-14 10:01:41 -05:00
PhoneDroid d9cf2b65b5 [ MeshPart ]: Update SPDX 2025-10-14 10:01:02 -05:00
PhoneDroid 2a56489feb [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
dependabot[bot] 325dd3b701 Bump github/issue-metrics from 3.25.0 to 3.25.1
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.0 to 3.25.1.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/17c6bd18e923c2ec4161c6911f9b075908f7f090...c640329f02bd24b12b91d51cd385f0b1c25cefb9)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-14 15:53:53 +02:00
Chris Hennes 7bc525f885 Merge pull request #23592 from ryankembrey/td-vertices
TechDraw: Fix vertices regressions
2025-10-14 08:26:50 -05: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
PaddleStroke 8275916601 Sketcher: Fix deactivated Block bug (#24548)
* Sketcher: Fix deactivated Block bug

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

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

* Update Sketch.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>
2025-10-14 11:58:22 +02:00
Pieter Hijma 9462c7bfb3 Gui: Fix supporting links in add property dialog 2025-10-14 11:56:47 +02:00
PaddleStroke 981daca351 Sketcher: bspline tool: fix error message (#24566)
* Sketcher: bspline tool: fix error message

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-14 11:53:54 +02:00
Roy-043 1e56392c5c Tux: remove obsolete pythonToolbars function 2025-10-14 11:50:19 +02:00
PaddleStroke 6e090a2dad Assembly: Fix lengths cannot be negative (#24625)
* Assembly: Fix lengths cannot be negative

* Update PropertyUnits.cpp

* Update PropertyUnits.h

* Update JointObject.py
2025-10-14 11:40:10 +02:00
marcuspollio d0c7b427ff BIM: Prevent crash when removing a wall's base component (#24633)
* BIM: Prevent crash when removing a wall's base component

When a user selected a wall's base object in the Tree View and used the
`Arch_Remove` command, a traceback occurred due to an `AttributeError`.

The `removeComponents` function was incorrectly checking for the `.Base`
attribute on a list of subtractions (`s.Base`) instead of on the parent
host object (`h.Base`).

This commit corrects the reference to check against the parent object,
resolving the crash and allowing the component to be removed.

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

Authored-by:  furgo16 <148809153+furgo16@users.noreply.github.com>

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

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

---------

Co-authored-by: Furgo <148809153+furgo16@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-14 11:19:43 +02:00
Florian Foinant-Willig 9fad915d0e Core: fix Std_Placement for multiple objects 2025-10-13 22:54:31 +02:00
PaddleStroke b82505e86c PartDesign: Linear pattern, add checkbox for dir2 (#24378)
* PartDesign: Linear pattern, add checkbox for dir2

* Update PatternParametersWidget.ui

* Update PatternParametersWidget.h

* Update PatternParametersWidget.cpp
2025-10-13 21:34:38 +02:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 546a43b8b8 Removed outdated UTF8 declaration [ Other ] (#24528)
* Removed outdated UTF8 declaration

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-13 18:34:43 +02:00
WandererFan 558659d117 TechDraw: fix leader positioning (snapping) (#24468)
* [TD]specialize leader snap handling

* [TD]fix leader live update regression

* [TD]QGTracker code clean-up
2025-10-13 18:21:31 +02:00
matthiasdanner 62c222c211 Sketcher: Fix Angle Constraint jumping to opposite side on movement (#24150)
* Sketcher: Fix Angle Constraint jumping to opposite side on movement

* implement way to dynamically disable snapping where not needed

---------

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-10-13 18:07:09 +02:00
Chris Hennes 45401513b4 Robot: Remove unlicensed files
Users must obtain these files directly from Kuka, no license has been
granted to distribute them.
2025-10-13 18:02:37 +02:00
Florian Foinant-Willig f4fe303829 Sketcher: rename DeriVector2::crossProdNorm to DeriVector2::crossProdZ 2025-10-13 17:57:51 +02:00
Chris Hennes f7b4372108 Gui: Fix string encoding for drag-and-drop 2025-10-13 17:34:59 +02:00
Furgo b23d580941 Add BIM workbench to .pre-commit-config.yaml (#21591)
* Add BIM workbench to .pre-commit-config.yaml

* pre-commit: ignore translations

* pre-commit: add additional ignore pattern

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-13 13:07:48 +02:00
Billy Huddleston 51b5870953 Added myself to CONTRIBUTORS 2025-10-13 00:21:06 -05:00
schmidtw 33aeb38f0c Add unit tests for CommandInsertLink fix
Add comprehensive unit tests to verify the fix prevents AttributeError
  when accessing non-existent nodes.
2025-10-12 14:50:03 -07:00
schmidtw 4b2131f501 Fix: Prevent attempting to access non-existent nodes
This is defensive code that protects against attempting to dereference
  nodes that are not present, preventing the python code from throwing an
  AttributeError.
2025-10-12 14:49:28 -07:00
Syres916 806e3e9eb0 [Gui] revert PR23067 and apply table height...
...directly in the Python code
2025-10-12 18:41:05 +01:00
Syres916 8d3a2e93fd Merge branch 'FreeCAD:main' into CAM_Fix_SetupSheet_Table_MinHeight 2025-10-12 18:38:46 +01:00
tarman3 f17c46f8ec CAM: Toggle Operation improve 2025-10-12 15:22:35 +03:00
Chris Hennes 7d811f2ab2 CI: Update CrowdIn Push to use pinned versions 2025-10-12 14:16:22 +02:00
Chris Hennes e89fcf29f7 CI: Update CrowdIn Fetch workflow to use pinned versions 2025-10-12 14:16:22 +02:00
DONGGEUN YOO 911d82f99b BIM: Fix IFC import options dialog not showing until Preferences are opened (#24574) 2025-10-11 18:22:55 +02:00
PaddleStroke 557f45587f TechDraw: fix setMask error in mrichtextedit.cpp 2025-10-09 21:16:50 -05:00
Pieter Hijma 90f9996fdb Gui: Fix too enthusiastic auto-collapse 2025-10-09 16:11:24 -05:00
PaddleStroke 8f3d9d9cdf Part: Offset tools: do not copy sketch colors. 2025-10-09 14:43:12 -05:00
PaddleStroke 98d64f9939 Sketcher: Element Task : clear selection when list selection is cleared 2025-10-09 14:06:10 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 084003e361 Tests: Add/update SPDX header (#24547) 2025-10-09 13:50:17 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ cab1261a42 CAM: Remove UTF-8 coding declarations (#24527)
These declarations are no longer needed for Python 3+.
2025-10-09 13:49:18 -05:00
dependabot[bot] b460e85abe Bump github/issue-metrics from 3.24.0 to 3.25.0
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/45a6cb314ddaa4c12eed570eb2739435d712d480...17c6bd18e923c2ec4161c6911f9b075908f7f090)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 20:03:16 +02:00
PaddleStroke ca8bfc6180 Sketcher: Make ctrlA work with filter (#24541) 2025-10-09 12:37:54 -05:00
PaddleStroke 331e51cdfc Sketcher: Fix toggle construction not undoable (#24539)
* Sketcher: Fix toggle construction not undoable

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-09 12:31:50 -05:00
Chris Hennes 02df83e19d Merge pull request #24446 from pieterhijma/fix-add-prop-dialog-py-console
Gui: Fix Python Console messages Add Property dialog
2025-10-09 10:29:37 -05:00
Pieter Hijma 9a09e8e321 Gui: Fix console messages Add Property dialog 2025-10-09 16:01:05 +02:00
Pieter Hijma 6af8e0b380 Gui: Add a possibility to redirect macro commands 2025-10-09 16:00:12 +02:00
Benjamin Nauck f3c043195f Gui: Enable quick measure and input hints by default 2025-10-09 15:56:43 +02:00
PhoneDroid e2e75f1039 Updated SPDX License Identifiers 2025-10-08 21:58:26 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 78f29138bc CAM: Updated SPDX License Identifiers (#24525) 2025-10-09 00:36:39 +00:00
PhoneDroid b5b9913293 Updated SPDX License Identifiers 2025-10-08 19:11:11 -05:00
PhoneDroid 78447d9800 Updated SPDX License Identifiers 2025-10-08 19:10:28 -05:00
johndoe2323 23297f5045 fix for #18165
calculation changed to incorporate scale for distanceDim.X and distanceDim.Y
2025-10-08 17:38:35 -05:00
PhoneDroid 1b16eeeeb9 Updated SPDX License Identifiers 2025-10-08 16:39:12 -05:00
wandererfan 46f4014647 [TD]fix subscript out of range on bad selection 2025-10-08 16:08:13 -05:00
marcuspollio 17c8da0244 BIM: add formatting off comments (#24502) 2025-10-08 21:48:08 +02:00
marcuspollio 4323840e8e Draft: add formatting off comments (#24503) 2025-10-08 21:43:38 +02:00
PhoneDroid 8912dfd7e1 Updated SPDX License Identifiers 2025-10-08 10:56:23 -05:00
PhoneDroid 661bdd999a Updated SPDX License Identifiers 2025-10-08 10:53:08 -05:00
PhoneDroid 372959ddee Updated SPDX License Identifiers 2025-10-08 10:51:06 -05:00
PhoneDroid ca4a8cd200 Updated SPDX License Identifiers 2025-10-08 10:49:52 -05:00
PhoneDroid c78b483dd5 Updated SPDX License Identifiers 2025-10-08 10:28:46 -05:00
PhoneDroid d33b4b38f7 Updated SPDX License Identifiers 2025-10-08 10:27:10 -05:00
dependabot[bot] 5467173e01 Bump ossf/scorecard-action from 2.4.2 to 2.4.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/05b42c624433fc40578a4040d5cf5e36ddca8cde...4eaacf0543bb3f2c246792bd56e8cdeffafb205a)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-07 19:43:41 -05:00
PaddleStroke 94fb19d9be Assembly: Fix dragger when assembly is transformed 2025-10-07 19:41:55 -05:00
opgl 68f083a6d1 CI: Automatically synchronize translations with CrowdIn 2025-10-07 17:49:55 -05:00
Syres916 3a8de56ee5 [Gui] fix the Preferences tree font 2025-10-07 12:47:29 -05:00
Chris Hennes 9780cf931f Update translations 2025-10-05 2025-10-07 19:21:58 +02:00
PaddleStroke 6282dd48bb Assembly: Make pre-solve and reverse move all the downstream parts (#24193) 2025-10-07 11:44:11 -05:00
dependabot[bot] c64f06c3ad Bump actions/stale from 10.0.0 to 10.1.0
Bumps [actions/stale](https://github.com/actions/stale) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/3a9db7e6a41a89f618792c92c0e97cc736e1b13f...5f858e3efba33a5ca4407a664cc011ad407f2008)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 13:02:48 -05:00
PaddleStroke 96ca8a43a6 Assembly: Add tolerance to detect ground part movement 2025-10-06 13:02:24 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 01da3ddd35 Fix & update license to LGPLv2.1 2025-10-06 11:43:26 -05:00
IFo Hancroft e187e696b5 Added GPL-3.0-or-later to the list of licenses (#24447)
* Added GPL-3.0-or-later to the list of licenses

* Incremented number of licenses
2025-10-06 11:33:07 -05:00
PaddleStroke cb38761213 Assembly: replace properties float by propertylength & propertyangle (#24403)
* Assembly: replace properties float by propertylength & propertyangle

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-06 11:18:22 -05:00
sliptonic 6817ec7a78 Merge pull request #24374 from chennes/fix23777userEditMide
Part/PD: Send user edit mode to cmdSetEdit
2025-10-06 11:05:58 -05:00
sliptonic b93b67f1b6 Merge pull request #24014 from chennes/fixCopyMenuMisplaced23769
Gui: Ensure menus don't get moved inadvertently
2025-10-06 11:05:04 -05:00
PaddleStroke 365af33fc6 Sketcher: Symmetric arc when center is on symmetry line. (#24228)
* Sketcher: Symmetric arc when center is on symmetry line.

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-06 11:02:42 -05:00
Markus Reitböck 85776dd66b Gui: Fix unreadable button in Customize Dialog (#24285)
* Gui: Fix unreadable button in Customize Dialog

Also renamed Pixmap to Icon

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

* Update src/Gui/Dialogs/DlgActions.ui

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-06 10:59:29 -05:00
sliptonic 432583bb20 Merge pull request #24069 from tarman3/leadinout_fix2
CAM: LeadInOut - Fix SafeHeight
2025-10-06 10:58:21 -05:00
sliptonic b3f3bf5c0a Merge pull request #24177 from chennes/migrateLibE57ToSubtree
Migrate libE57Format to subtree
2025-10-06 10:56:18 -05:00
Sami Liedes 0a50bad4c0 Gui: Request 24-bit color depth if available
In some configurations, Qt apparently defaults to giving the "first
acceptable" buffer format. This often ends up being RGB565, which
gives us little color resolution.

Request 8-bit RGB samples to fix this.

This tends to happen easiest with
`QT_WAYLAND_DISABLE_WINDOWDECORATION=1` and `QT_QPA_PLATFORM=wayland`.
2025-10-06 10:48:30 -05:00
sliptonic 5e06ae1b4d Merge pull request #24179 from tarman3/oldsim
CAM: Old simulator - Fix z for G2,G3
2025-10-06 10:45:42 -05:00
sliptonic bc696ad89b Merge pull request #24016 from chennes/fixIgnoredFontPreference
Gui: Fix ignored font preference
2025-10-06 10:35:51 -05:00
sliptonic 1c816da43b Merge pull request #24114 from chennes/addDirectoryIsWritable
Base: Refine directory permissions test
2025-10-06 10:35:21 -05:00
Aqeel Labash 8fe4d67abe TechDraw: Make TaskWeldingSymbol buttons resizeable (#24395) 2025-10-05 21:09:26 -05:00
Furgo ffc6f840bd Core: FreeCadMacros.cmake:fc_copy_sources ensure parent directory is created before copy or symlink creation
Fixes: #24432
2025-10-05 21:08:34 -05:00
Pieter Hijma 532354c2a4 Gui: Exclude base type in Add Property dialog 2025-10-05 21:08:06 -05:00
wandererfan 9bae342c0d [TD]fix zero value on multi-face dimension 2025-10-05 21:06:03 -05:00
Chris Hennes 072f0b0fa3 Merge pull request #24438 from Rexbas/fix-openscad-transform-conflict
Gui: Fix transform tool conflict with OpenSCAD navigation style
2025-10-05 21:05:19 -05:00
Roy-043 6395af4113 BIM: fix BimMaterial dialog regression
Fixes #24381
2025-10-05 19:12:46 -05:00
PaddleStroke c2592271e8 Sketcher: remove edit tools from toolbar (#24229)
* Sketcher: remove edit tools from toolbar

* Update Workbench.h

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-05 19:11:46 -05:00
Syres916 ce8584c728 [Gui] Fix spreadsheet alias cells not being correctly set to the user's preference 2025-10-05 19:07:14 -05:00
Chris d2c306ce6a Packaging: Fix mac app bundling with homebrew (#24286) 2025-10-05 19:06:23 -05:00
Roy-043 abc8bb9849 BIM: fix update behavior of BIM views panel (#24273)
* BIM: fix update behavior of BIM views panel

Fixes #17415
Fixes #17868

To avoid unnecessarily updating the trees an `oldData` list is used.
2025-10-05 19:05:37 -05:00
Kacper Donat 8398ac7a81 Merge pull request #23620 from hyarion/fix/qm
Gui: Toggle quick measure and input hints from status bar context menu
2025-10-05 12:16:57 +02:00
Furgo 8e202d6aaf BIM: Fix ArchSite View Provider lifecycle, property constraints and defaults (#23844)
* BIM: Fix Site view provider initialization and constraints

This commit fixes bugs in the `_ViewProviderSite` lifecycle, ensuring
that sun path properties are correctly initialized with valid defaults
and that their constraints are reliably restored when a document is
opened.

Previously, two main problems existed:
1. New Objects: When a new `Site` object was created, its sun path
   properties (e.g., `SunDateMonth`) would default to 0, which is an
   invalid value. The property editor in the GUI would also lack the
   appropriate min/max constraints.
2. Restored Objects: When a document containing a `Site` was opened, the
   property constraints were not reapplied. This happened because the
   view provider's initialization logic was not being reliably triggered
   due to race conditions during the document deserialization process.

These issues are addressed now by a deferred initialization sequence:

- For New Objects: In `_ViewProviderSite.__init__`, constraint and
  default value setup is deferred using `QTimer.singleShot(0)`. The
  `restoreConstraints` method also now sets sensible defaults (e.g.,
  month 6, day 21) when it detects a new object.
- For Restored Objects: The data object's `_Site.onDocumentRestored`
  hook is now used as a trigger to start the view provider's
  initialization. This is a necessary workaround, as the `ViewProvider`
  lacks its own restoration hook. This method now ensures the view
  provider's properties are present and then schedules
  `restoreConstraints` to run via `QTimer`.

* BIM: add ArchSite GUI tests and fixtures

- Additionally clean up and document the CMakeLists.txt file for better
  maintainability and readability

* BIM: Enable GUI tests on CI

- The line to enable the BIM workbench has been commented out, as
  previously it occasioned a timeout error on CI
- The BIM GUI tests have been uncommented out to enable them
2025-10-05 11:47:56 +02:00
paul 960434f7e5 [ArchStairs] Fix Blondel Ratio and Winders (#24350)
* [ArchStairs] Fix Blondel Ratio and Winders

Fix #24065
Fix #24051

1. Blondel Ratio is not calculated, this if fixed now.  Blondel Ratio property is changed to Length following wiki's descripition.
2. Winders is not implemented as commented in wiki.  The property is not added at the moment until it is implemented.

* [ArchStairs] Fix Blondel Ratio and Winders - Remove old Property

For existing Stairs object, remove old property which is Float and add new propety which is Length.
2025-10-05 09:29:40 +02:00
Benjamin Nauck c4213b21ad Gui: Store visibility of status labels (quick measure and input hints) 2025-10-04 21:48:48 +02:00
Benjamin Nauck 99c24f1c2b Measure: Remove from menu + transfer ownership back
As discussed in 23399, discoverability is really poor as users doesn't know what Quick Measure is,
neither is it easy to find out as there's no visual feedback when toggling this feature.
The intension was to keep the command and only remove it from the menu, but that wasn't possible
due to ownership of quick measure object was inside the command. In addition the parameter had to
be renamed as well as mashing the qm button made them end up in an unknown state.

As the measurement can be disabled now by simply hiding the info text from context menu, we don't
need to keep the old toggling functionality.
2025-10-04 21:48:48 +02:00
Benjamin Nauck 6aff735482 Gui: Only measure with Quick Measure if showing in status bar 2025-10-04 21:48:48 +02:00
Benjamin Nauck e82b81c8c0 Gui: Make it possible to hide/show info labels in status bar 2025-10-04 21:48:23 +02:00
Bas Ruigrok 5e6fd1aeda Gui: Fix transform tool conflict with OpenSCAD navigation style 2025-10-04 13:50:53 +02:00
Bas Ruigrok 090a5a6995 Gui: Move isDraggerUnderCursor from Gesture to NavigationStyle 2025-10-03 20:01:29 +02:00
sliptonic eba0450647 Merge pull request #24392 from Connor9220/FixToolbitTopo
CAM: Fix Topo recomputation by only updating when values change in Toolbits
2025-10-03 12:20:10 -05:00
sliptonic 10f5cb7479 Merge pull request #24323 from tarman3/leadinout_fix6
CAM: LeadInOut - Fix ZeroDivisionError for LineZ
2025-10-03 11:30:24 -05:00
sliptonic ec0a78280b Merge pull request #24216 from tarman3/leadinout_threshold
CAM: LeadInOut - Fix RetractThreshold in Task panel
2025-10-03 11:28:59 -05:00
PaddleStroke 9c1454385e Assembly: Isolate joint components during selection and edit. (#23680)
* Core: Add signalBeforeOpenTransaction

* Assembly: Isolate

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

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

* Update src/App/AutoTransaction.cpp

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>
2025-10-02 21:07:06 -05:00
Chris Hennes c0c561d6b1 Merge pull request #24376 from pyro9/ReprFix
Improve the string representation of a few key FreeCAD Python objects.
2025-10-02 20:58:52 -05:00
dependabot[bot] 6c2a2116f7 Bump peter-evans/create-issue-from-file from 5.0.1 to 6.0.0
Bumps [peter-evans/create-issue-from-file](https://github.com/peter-evans/create-issue-from-file) from 5.0.1 to 6.0.0.
- [Release notes](https://github.com/peter-evans/create-issue-from-file/releases)
- [Commits](https://github.com/peter-evans/create-issue-from-file/compare/e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd...fca9117c27cdc29c6c4db3b86c48e4115a786710)

---
updated-dependencies:
- dependency-name: peter-evans/create-issue-from-file
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 20:54:43 -05:00
Billy Huddleston 4a6991b771 CAM: Fix Topo recomputation by only updating when values change in Toolbits
- Use PathUtil.setProperty instead of direct setattr for schema properties to ensure proper FreeCAD notifications.
- Only update custom shape properties if the value has changed, reducing unnecessary recomputation.
- For SpindleDirection and Material, only update the property if the new value differs from the current value, and use PathUtil.setProperty for consistency.
- This prevents overwriting existing values with defaults and avoids triggering unwanted recomputation.
2025-10-02 18:56:53 -04:00
Chris Hennes f34f15dc60 Part/PD: Send current edit mode to cmdSetEdit 2025-10-02 17:49:24 -05:00
dependabot[bot] bae76a4dc0 Bump korthout/backport-action from 3.3.0 to 3.4.1
Bumps [korthout/backport-action](https://github.com/korthout/backport-action) from 3.3.0 to 3.4.1.
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](https://github.com/korthout/backport-action/compare/ca4972adce8039ff995e618f5fc02d1b7961f27a...d07416681cab29bf2661702f925f020aaa962997)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: 3.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-02 11:38:37 -05:00
sliptonic 51ffac77cf Merge pull request #24372 from FreeCAD/speedUpPreCommitRun
Change black repo to black-pre-commit-mirror
2025-10-02 08:49:57 -05:00
Steven James 17e8092643 Make repr for a TaskDialog indicate the associated document. 2025-10-02 04:27:59 -04:00
Steven James 9ff4a40bc2 Fixing repr for App/Document and Gui/Document 2025-10-02 04:22:24 -04:00
Chris Hennes 04c466260c Gui: Ensure menus don't get moved inadvertently
Co-authored-by: depthoffocus <depthoffocus@users.noreply.github.com>
2025-10-01 21:46:39 -05:00
Chris Hennes 5cc7d1a869 Change black repo to black-pre-commit-mirror
Updated the pre-commit configuration to use the black-pre-commit-mirror repository instead of the original black repository. Also omit scanning the Fem examples directory.
2025-10-01 20:58:39 -05:00
Chris Hennes b08a0f87d6 Merge pull request #24108 from WandererFan/DxfDimensionExport
[TD]fix no dimension in DXF export
2025-09-30 18:55:55 -05:00
Chris Hennes 9d232222df Addon Manager: Add defusedxml dependency 2025-09-30 19:59:12 -03:00
Chris Hennes 1f57d10bdd Merge pull request #22894 from tetektoza/fix/22545_fix_ovp_being_validated_too_early
Sketcher: Unset labels that are below confusion point before enforcing
2025-09-30 16:07:32 -05:00
wandererfan 3d7db8fb83 [TD] Use isProjectGroupItem() in remaining cases
- isDerivedFrom<DrawProjGroupItem>() is no longer reliable due to smart
  view creation changes.
2025-09-30 13:56:45 -05:00
wandererfan bbb15ea940 [TD]fix dimension not exported to dxf 2025-09-30 13:36:30 -05:00
Chris Hennes 33dd8e2f45 Build: Don't remove the doc directory
It contains the ThirdPartyLibraries.html file.
2025-09-30 15:31:16 -03:00
paddle f90e73f64b Sketcher: Force OVP visibility for offset and scale. 2025-09-30 13:27:18 -05:00
Roy-043 fc5e6dcf8b PartDesign: iso10642-fine.json wrong M5 diameter
Compare iso10642.json:
https://github.com/FreeCAD/FreeCAD/blob/efbe579e25b993a9a26ef45491387a19b14d1f59/src/Mod/PartDesign/Resources/Hole/iso10642.json#L11
2025-09-30 13:25:20 -05:00
Chris Hennes b215adf723 Addon Manager: Sync with upstream 2025-09-23 2025-09-30 20:09:26 +02:00
PaddleStroke db00a9b8e2 Merge pull request #24162 from PaddleStroke/asm_linkgroup_asmlink
Assembly: Add support to Link groups in sub-assemblies.
2025-09-30 13:02:47 -05:00
Chris Hennes 60c8c51d49 Merge pull request #24178 from FlachyJoe/non-recursive-freeze
Core: Freeze state enhancement
2025-09-30 13:01:15 -05:00
wandererfan e8e5fc79ea [TD]prevent area dim crash on multiple faces 2025-09-30 12:59:17 -05:00
Chris Hennes efbe579e25 Merge pull request #24333 from PaddleStroke/patch-83
PartDesign: Pocket Through all: Taper should be writable and offset hidden
2025-09-30 11:51:52 -05:00
PaddleStroke 5264cb1f9e PartDesign: Pattern: Fix occurences not taken into account when pressing enter 2025-09-30 11:44:33 -05:00
PaddleStroke ef10f20351 Sketcher: Prevent non-edit toolbars from showing up when switching tab (#24202)
* Sketcher: Prevent non-edit toolbars from showing up when switching tab

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-30 11:36:27 -05:00
Michael Marais cbe93b3b56 Merge pull request #23915 from Mikestriken/project_utility_fix
Fixed createDocument() utility importing phantom '\.' files with 0 bytes
2025-09-30 11:04:08 -05:00
dependabot[bot] 32712dcd8e Bump github/issue-metrics from 3.23.3 to 3.24.0 (#24338)
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.23.3 to 3.24.0.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/c2ad23cdf3192065f868ff0ece4e91e4077a4f73...45a6cb314ddaa4c12eed570eb2739435d712d480)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-09-30 16:02:32 +00:00
Chris Hennes 703d9ebd12 Merge pull request #23735 from longrackslabs/feature/sketcher-hints-comprehensive-coverage-22282
Feature/sketcher hints comprehensive coverage 22282
2025-09-30 09:51:50 -05:00
Chris Hennes 2b1a3aedbe Merge pull request #23770 from PaddleStroke/patch-59
PartDesign: FeatureExtrude fix symmetric + custom dir
2025-09-30 08:55:18 -05:00
longrackslabs 99f27f1a56 Add 'or click to finish' to Sketcher_Dimension hints
After selecting first geometry, users can now see that they can
click empty space to finish the dimension and set its value,
rather than having to pick additional geometry.

Added PICK_SECOND_POINT_OR_EDGE_OR_CLICK_TO_FINISH constant and
updated all selection cases in DrawSketchHandlerDimension::getToolHints().
2025-09-30 08:47:43 -05:00
longrackslabs a940181998 Fix ConstrainSymmetric hint for point→edge→point workflow
Change 'pick symmetry point' to 'pick point' when the workflow is
point → symmetry line → point, since the final selection is a
regular point, not a special 'symmetry point'.
2025-09-30 08:47:43 -05:00
George Peden 1ac117f1c8 Add MODE_HINT to dimension tool
- Add MODE_HINT constant to DrawSketchHandlerDimension class
- Shows 'switch mode' hint for M key in dimension tool
- Addresses reviewer feedback for missing M key hint
2025-09-30 08:47:43 -05:00
George Peden abf9762abb Fix ConstrainSymmetric two points + symmetry point workflow
- Fix hint text to say 'pick symmetry line or symmetry point' for two points + symmetry point workflow
- Add missing sequence {SelVertexOrRoot, SelVertexOrRoot, SelVertexOrRoot} to allowedSelSequences
- Add case 8 to handle two points + symmetry point constraint creation
- Fix duplicate constraint creation by adding return statement in case 8
- Add getSelection().clearSelection() for consistency

Fixes reviewer comment #2 from PR #22282
2025-09-30 08:47:43 -05:00
George Peden b82408c545 Fix Sketcher Dimension hints - add context-aware hints based on selection
- Add PICK_POINT_OR_EDGE constant to DrawSketchHandlerDimension class
- Implement nuanced hints for Dimension tool based on selected geometry:
  - Empty selection: 'pick point or edge'
  - Single point/line/circle: 'pick second point or edge'
  - Multiple selections: 'pick second point or edge'
- Remove stray character causing build error
- Addresses feedback on issue #22282 for comprehensive Sketcher hints coverage
2025-09-30 08:47:43 -05:00
George Peden dbd72f9c60 Improve context-aware hints for Sketcher constraints
- ConstrainDistanceX/Y: Fix hints to show 'pick second point' instead of 'pick second point or edge' when first selection is a point
- ConstrainPerpendicular: Add context-aware hints for edge+point+edge workflow
- ConstrainTangent: Add context-aware hints for edge+point+edge workflow
- ConstrainSymmetric: Fix hints to show 'pick edge or second point' instead of 'pick edge or first point' when first selection is a point
- ConstrainSymmetric: Fix hints to show 'pick symmetry line' instead of 'pick symmetry line or point' for point+point+edge workflow

All changes are hint improvements only - no functionality changes to existing workflows.
2025-09-30 08:47:43 -05:00
George Peden 584472f779 Refactor: Replace all literal hint strings with constants
- Added class-level static constexpr constants for all hint strings
- Replaced all QObject::tr("%1 pick...") with constants in both DrawSketchHandlerGenConstraint and DrawSketchHandlerDimension classes
- Eliminates string duplication and improves maintainability
- Addresses Copilot's PR feedback on string refactoring
2025-09-30 08:47:43 -05:00
George Peden 8b36da6782 Refactor hint strings to use constants
- Add class-level constants for all hint texts
- Replace all hardcoded strings in static table and context-aware hints
- Eliminate duplication and improve maintainability
- Addresses Copilot PR review feedback on code duplication

All hint strings are now defined once and reused consistently.
2025-09-30 08:47:43 -05:00
George Peden 17533deb50 Add context-aware hints for remaining constraint tools
- Add context-aware hints for ConstrainPerpendicular
- Add context-aware hints for ConstrainTangent
- Add context-aware hints for ConstrainSymmetric
- All hints now remember user selections to provide appropriate guidance
- Covers all workflows mentioned in issue #22282 feedback
- Completes comprehensive coverage of missing constraint hints
2025-09-30 08:47:43 -05:00
George Peden 871ee4ca32 Add context-aware hints for ConstrainAngle tool
- Add special case for Sketcher_ConstrainAngle in getToolHints()
- Hints now remember what user has selected to provide appropriate guidance
- Step 0: 'pick edge or first point' (covers all workflows)
- Step 1: Context-aware based on first selection:
  - If point first: 'pick first edge' (point+edge+edge workflow)
  - If line first: 'pick second line or point' (line+line or edge+point+edge)
- Step 2: Context-aware based on selection history:
  - Point+edge+edge: 'pick second edge'
  - Edge+point+edge: 'pick second edge'
- Fixes part of issue #22282 - missing angle constraint hints
2025-09-30 08:47:43 -05:00
George Peden 582eae5ba3 Add missing hints for ConstrainRadiam tool
- Add hints entry for Sketcher_ConstrainRadiam in hints array
- ConstrainRadiam now shows 'pick circle or arc' hint like other radius/diameter tools
- Fixes part of issue #22282 - missing radius constraint hints
2025-09-30 08:47:43 -05:00
PaddleStroke 6d238a93e1 PartDesign: TaskExtrudeParameters : offset should not be visible for throughall 2025-09-30 10:19:26 +02:00
PaddleStroke d52260b2f4 PartDesign: FeatureExtrude: Taper should not be read-only when throughall. 2025-09-30 10:17:36 +02:00
pre-commit-ci[bot] 65b7b5d4bd [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b → af0ba72a73598c76189d6dd1b21d8532255d5942](https://github.com/psf/black/compare/8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b...af0ba72a73598c76189d6dd1b21d8532255d5942)
- [github.com/pre-commit/mirrors-clang-format: 86fdcc9bd34d6afbbd29358b97436c8ffe3aa3b2 → 719856d56a62953b8d2839fb9e851f25c3cfeef8](https://github.com/pre-commit/mirrors-clang-format/compare/86fdcc9bd34d6afbbd29358b97436c8ffe3aa3b2...719856d56a62953b8d2839fb9e851f25c3cfeef8)
2025-09-29 19:31:32 -05:00
Sami Liedes b3e8ed7814 Gui/Application, QuarterWidget: request OpenGL compatibility profile (#23768)
On Wayland with Qt, the default OpenGL context often ends up being
OpenGL ES. ES is a stricter API based on the "core" profile and lacks
many legacy functions (e.g. glEnd). FreeCAD relies on some of these
functions, which work under Mesa’s permissive stack but fail outright
with NVIDIA’s proprietary drivers, resulting in a blank 3D view.

Fix this by explicitly requesting a desktop OpenGL compatibility
profile both before QApplication creation and in QuarterWidget. This
ensures the presence of the legacy entry points required by Coin/SoQt.

(NB: both requests appear to be necessary; a single change was not
sufficient in testing.)
2025-09-29 19:22:29 -05:00
tetektoza f2af5b7e7f Sketcher: Remove isSet checks that were replaced by hasFinishedEditing 2025-09-29 20:41:53 +02:00
dependabot[bot] e38a8d8eeb Bump actions/dependency-review-action from 4.7.3 to 4.8.0
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.7.3 to 4.8.0.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/595b5aeba73380359d98a5e087f648dbb0edce1b...56339e523c0409420f6c2c9a2f4292bbb3c07dd3)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 4.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 12:57:10 -05:00
PaddleStroke f67b854aad Assembly: Fix errors on solve when limits 2025-09-29 12:46:19 -05:00
sliptonic f45408053c CAM: Fixes #11163
Changes default scale from 2.0 to 3.0  Adds a parameter. DefaultArrowScale
to control.
2025-09-29 11:37:06 -05:00
Chris Hennes 8b759af395 Part: Fix 'Copy' item text 2025-09-29 18:17:12 +02:00
Ryan Kembrey e26a47d96c TechDraw: Fix selections not clearing when subelements are also selected 2025-09-29 11:11:34 -05:00
tarman3 4d5ad23cce CAM: LeadInOut - Fix ZeroDivisionError for LineZ 2025-09-29 19:09:15 +03:00
sliptonic 5349b819b0 Merge pull request #24046 from Connor9220/FixCAMSanityReport
CAM: Fix CAM Sanity Report
2025-09-29 11:09:06 -05:00
Kacper Donat 9d61aeb04b Compiler warning cleanup (#22997)
* Part: Remove unused arguments from isLinearEdge

* Gui: For Qt 6.5 and later, use ParseOptions in xml

* Gui: Remove unused variable from fuzzyMatch()

* Sketcher: Remove unused parameter from *ReferenceSelection

* PD: Remove unused parameter from *ReferenceSelection

* Part: Rename layout to avoid conflict

* FEM: remove unused variable from handlePropertyChange

* CAM: Eliminate C++11 compiler warning by explicitly defaulting copy
2025-09-29 18:05:58 +02:00
sliptonic b18a3b3536 Merge pull request #24148 from Connor9220/ConvertTappingOpToExperimental
CAM: Convert tapping operation to experimental feature, Add tap pitch / spindle speed, Fix toolbit schema bugs, update legacy linuxcnc post
2025-09-29 11:03:13 -05:00
sliptonic 68bb3b2af7 Merge pull request #24234 from Connor9220/FixTooLibrarySpindleDirection
CAM: Fix SpindleDirection and Material not updating from toolbit files; reduce log noise
2025-09-29 11:02:58 -05:00
Chris Hennes f7e6b94aba Merge pull request #21713 from 3x380V/pd_fixes
PartDesign: Random fixes
2025-09-29 10:54:46 -05:00
Chris Hennes 0b14e8e24b Assembly: Fix translatable strings (#24243)
* Assembly: Fix translatable strings

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-29 17:48:01 +02:00
Krzysztof 861470c6ac FEM: Restore and harmonize FEM Task selection hints (#23678)
* FEM: Add hint about selectable geometry types in 'Geometry reference selector'

* FEM: Harmonize selection hint in FEM Task dialogs

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

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

FEM: Add translation support, correct selectable geometry

FEM: Harmonize selection hint in FEM Task dialogs

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-29 10:43:23 -05:00
Roy-043 e1a3b1cbe7 BIM: Arch_MergeWalls: issue message when walls are not the same
Fixes #21228.
2025-09-29 17:28:53 +02:00
Chris Hennes 274cd094d8 Merge pull request #23230 from tetektoza/fix/22070_fix_deleting_compound_not_deleting_children
Core: Allow users deleting objects under group recursively
2025-09-29 10:14:11 -05:00
luzpaz 42cf50cc57 FEM: fix source comment typos
Fix various source comment typos introduced recently.
2025-09-29 08:47:20 -05:00
PaddleStroke 94750baa6b PartDesign: FeatureExtrude: single prism for modes that can 2025-09-29 13:24:55 +02:00
PaddleStroke a01cab21cc PartDesign: FeatureExtrude: Make single prism if both modes are length and no taper 2025-09-29 09:33:53 +02:00
captain0xff d8d32c1b3a Gui: set focus to the corresponding property when a gizmo is released 2025-09-28 21:39:34 -05:00
Kacper Donat dc2aec50d4 Sketcher: Do not force visibility of planes on edit
This updates the logic that had special handling for planes for the
temporary visibility feature of sketcher which was mishandled after move
to core datums.
2025-09-28 18:59:37 -05:00
Bas Ruigrok df2df0905d Don't inform Coin to use EGL for Coin 4.0.6+
Coin figures it out automatically starting from 4.0.6. Only for Coin 4.0.4 and 4.0.5 it is needed to explicitly tell Coin to use EGL.
2025-09-28 18:57:18 -05:00
marioalexis 633817ceac Fem: Add tensor components to calculator variables 2025-09-28 18:55:48 -05:00
tetektoza 9be5c97fcf Sketcher: Unset labels that are invalid only after user finished editing
As the title says, currently if user tries to type "0", nothing gets
typed because the OVP automatically invalidates the "0" as an invalid
value in most of the cases.

The solution to that is to only validate it if user has finished editing
OVP, not earlier when they are only typing.
2025-09-28 19:50:16 +02:00
marcuspollio 4393f3bd72 Draft: update Group icons (#23771)
* Draft: update Group icons

* Draft: update Group icons after feedback
2025-09-28 15:10:00 +02:00
Chris Hennes 75c8749189 GUI: Fix some translatable text (#24289) 2025-09-28 10:47:16 +02:00
tetektoza 247e725ad3 Part: Allow deleting children recursively
Add feature to allow deletion of all children of compounds and booleans.
2025-09-27 19:10:42 -05:00
tetektoza 8e00addabf Core: Allow deleting objects in group recursively
Add a special marker that will signal to VPs that they should delete
their children recursively under the group.
2025-09-27 19:09:55 -05:00
Kacper Donat d712537638 PartDesign: Fix crash on editing feature outside of body 2025-09-27 15:21:59 -05:00
Ladislav Michl 7a266b1d78 PartDesign: Microoptimize updateSpacings()
This also fixes "comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’" warning.

Fixes: 5d2037c820 ("PartDesign: Transform rework")
2025-09-27 11:40:07 -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
luzpaz cfb1810d92 Docs: update stylesheet doc (fixes #22717) (#23056)
* Docs: update stylesheet doc (fixes #22717)
Fixes #22717

* Refined instructions to be more OS agnostic

* Update src/Gui/Stylesheets/FreeCAD.qss

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Beep6581 <Beep6581@noreply.users.github.com>
2025-09-27 02:52:13 +00:00
Tiago-Almeida007 0d48351c9e Gui: Organize tree view preferences (#21867)
* feat #18649: Organize tree options in one single preference page
-Removed tree view related code from all DlgSettingsAdvanced files
-Added Font size and Item Background Padding to DlgSettingsUI

Co-authored-by: Tiago Cardoso <tiagomiguelcardoso@tecnico.ulisboa.pt>

* fix #18649: Organize tree options in one single preference page
-Added new line at the end of file DlgSettingsAdvanced.cpp
-Added new line at the end of file DlgSettingsAdvanced.py
-Added new line at the end of file DlgSettingsUI.ui
-Delete trailing space on file DlgSettingsAdvanced.py
-Delete extra line on file DlgSettingsAdvanced.h

Co-authored-by: Tiago Almeida <tiago.c.almeida@tecnico.ulisboa.pt>

* Gui: Remove over-advanced UI prefs

---------

Co-authored-by: Tiago Cardoso <tiagomiguelcardoso@tecnico.ulisboa.pt>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-09-27 02:33:04 +00:00
wandererfan 919f5fd265 [TD]fix uncommanded leader position change 2025-09-26 21:24:49 -05:00
Chris Hennes 140de440cc Merge pull request #21541 from furgo16/bim-refactor-arch-iter-2
BIM: Arch module refactor, Arch.makeWindow documentation and tests - iteration 2
2025-09-26 19:58:49 -05:00
Roy-043 17f01bb88c BIM: fix linked document of BIM_Library task panel (#24169)
* BIM: fix linked document of BIM_Library task panel

Fixes #22437.

The task panel of the BIM_Library command would be linked to the active document, which would to be the temporary Viewer document if that option was checked. Closing that document in the `Insert` function would therefore also close the task panel resulting in errors for following code.

Additionally:
The code to close the temporary Viewer document was moved to the `Reject` function. Otherwise that document would stay open if the task panel was closed without inserting.
2025-09-27 00:54:31 +00:00
marioalexis 406c3ba42c PartDesign: Use AllowCompound user parameter along the workbench - fixes #23596 2025-09-26 19:50:21 -05:00
tetektoza 68b754effd Gui: Fix clarify selection menu HiDPI positioning issues
On HiDPI screens, the Clarify Selection context menu appears
far to the right of the intended position when triggered via
right-click, which was making it really problematic to select entities.

So the easiest solution is to apply `devicePixeLRatio` scaling when
converting the stored right-click postiion from device pixels to Qt
logical coordinates before calling `mapToGlobal()`.
2025-09-26 19:19:04 -05:00
Kacper Donat b3fd31b108 Gui: Render profile preview in proper coordinate space 2025-09-26 17:00:53 -05:00
wmayer 20a4dc3839 PD: Restore GUI commands for PartDesign datum objects
With PR 19114 the commands to create PD datum objects are replaced with
the counterparts of Part. However, PD datum objects are much more powerful
than the Part datum objects.
(see e.g. https://forum.freecad.org/viewtopic.php?p=806960)

So, this change brings these commands back to the task panel.
2025-09-26 23:46:27 +02:00
wmayer ab60695ef9 PD: Show commands in task panel when selecting (sub) shape binders
This fixes issue 19098
2025-09-26 23:46:27 +02:00
wmayer df5c75d6b0 PD: Improve groove feature
The only difference between groove and revolution is that for the former
the revolved face is removed from the base shape instead of added.

Thus, the code of the Revolution and Groove classes should be almost
identical. This allows it in a further step to refactor the code and
make a common base class.

This fixes issue 18842.
2025-09-26 23:46:25 +02:00
wmayer 4d80f3ec28 PD: Improve revolution feature
* Allow a minimum angle of 0.0 as this is needed in 'Two Angles' mode
* Set the default value of Angle2 to 0.0
* Check for valid input in 'Angle' and 'Two Angles' mode
* Replace the confusing enum labels 'Dimension' and 'TwoDimensions'
2025-09-26 23:45:53 +02:00
wmayer 5a3fafcc55 PD: Remove unneeded class member 'isApplying' from 'TaskHoleParameters' 2025-09-26 23:45:23 +02:00
wmayer cf0412b7e2 PD: Support of plane in linear pattern feature 2025-09-26 23:45:23 +02:00
wmayer a539e5e460 PD: Fix support of datum lines in draft 2025-09-26 23:45:23 +02:00
wmayer a2c5788a98 PD: SubtractivePipe Fails
Fixes issue 18003
2025-09-26 23:45:20 +02:00
wmayer 796f5b1cfd PD: Positive offset on a binder shouldn't turn holes into squares
Fixes issue 18776
2025-09-26 23:44:28 +02:00
Frank David Martínez M 05707c61fb Fix Refine in Cut Compound test 2025-09-26 16:12:56 -05:00
theo-vt a41159a043 Sketcher.Scale: Add case for distance of a single curve 2025-09-26 15:45:22 -05:00
Frank Martinez c3348bc823 Fix #24257: findSubShapesWithSharedVertex signature parsing 2025-09-26 15:38:19 -05:00
Chris Hennes 9f25cb9d40 Merge pull request #24201 from marioalexis84/fem-fix_plane_function
Fem:Fix plane manipulator - fixes #14523
2025-09-26 15:13:24 -05:00
Roy-043 5d26e2f0f6 BIM: prevent dialogs being opened twice
Fixes #20403
Partly fixes issue #17983

I have basically copied Yorik's solution (#22446), but have added a call to `raise_()`.
2025-09-26 15:09:38 -05:00
PaddleStroke 91017606aa Sketcher: Fix crash on Sketcher.Constraint (#24269)
* Sketcher: Fix crash on Sketcher.Constraint

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-26 20:08:08 +00:00
PaddleStroke af4ed78c01 Sketcher: Slot tool: fix redundant horizontal (#24248)
* Sketcher: Slot tool: clean vertical/horizontal mess.

* Update DrawSketchHandlerSlot.h

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

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

* Update DrawSketchHandlerSlot.h

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

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

* Clean removeRedundantHorizontalVertical

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-26 15:05:55 -05:00
marioalexis b9ab71e606 Fem: Fix memory leaks and error handling 2025-09-26 14:41:43 -05:00
Chris Hennes 16906e93db Merge pull request #24240 from mrpilot2/cmake_pch_mods_part_2
Mods: use CMake to generate precompiled headers on all platforms
2025-09-26 09:46:26 -05:00
Furgo b3147b6b11 BIM: DEBUG, disable part of the Gui tests 2025-09-26 12:07:23 +02:00
Furgo 09944fde79 BIM: set up TestArchGui, clean up CLI/GUI tests
- Also update TechDraw templates path after reorganization from https://github.com/FreeCAD/FreeCAD/pull/23719
2025-09-26 00:46:16 +02:00
Furgo 7994e411b7 BIM: ArchWindow, add unit tests
TODO: check comments on test_create_with_width_height_no_baseobj_initially
2025-09-26 00:46:01 +02:00
marioalexis84 3db74dee60 Fem: Remove pipeline from analysis highlighter - fixes #23466 (#23984)
* Fem: Remove pipeline from analysis highlighter - fixes #23466

* FEM: Clean up lint

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-09-25 22:06:51 +00:00
dependabot[bot] 370c9bc1c7 Bump actions/cache from 4.2.4 to 4.3.0
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.4 to 4.3.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/0400d5f644dc74513175e3cd8d07132dd4860809...0057852bfaa89a56745cba8c7296529d2fc39830)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-25 16:14:51 -05:00
captain0xff a678d8ec7f Gui: hide the gizmos in case of any errors 2025-09-25 16:14:09 -05:00
marioalexis 014edacf1b App: Fix GroupExtension finding wrong group for objects 2025-09-25 15:52:43 -05:00
Billy Huddleston cbeb67b509 CAM: Convert tapping operation to experimental feature, Add tap pitch support, improve tapping logic, and update toolbit schema and legacy linuxcnc post
CAM/App/PathSegmentWalker.cpp
- Add G74 to drill/tap/bore G-code recognition for tapping cycles

CAM/InitGui.py
- Move CAM_Tapping command behind experimental feature flag
- Only group drilling/tapping commands if both are enabled

CAM/Path/Base/Generator/tapping.py
- Add pitch and spindle_speed parameters to tapping.generate
- Output S (spindle speed) and F (pitch) in generated G-code

CAM/Path/Op/Tapping.py
- Require Pitch property for tap tools and SpindleSpeed for tool controllers
- Pass pitch and spindle speed to tapping.generate
- Use SpindleDirection to determine right/left hand tap

CAM/Path/Post/scripts/linuxcnc_post.py
- Handle G84/G74 tapping cycles: convert pitch and spindle speed to feed rate
- Remove F and S from output and recalculate F as needed

CAM/Path/Tool/shape/models/tap.py
- Add Pitch property to ToolBitShapeTap schema
- CAM/Path/Tool/toolbit/models/tap.py
- Show pitch and rotation in tap tool summary
- Use is_imperial_pitch to format pitch as TPI or mm

CAM/Path/Tool/toolbit/util.py
- Add is_imperial_pitch utility to classify pitch as imperial or metric

CAM/Tools/Bit/375-16_Tap.fctb
- Remove unused parameters (Coating, Rotation, TPI, Type)
- Keep only relevant tap parameters for new schema
2025-09-25 16:26:03 -04:00
Kacper Donat 5bf0e30676 Gui: Check for every VP expiration in TaskAttacher 2025-09-25 14:09:07 -05:00
Billy Huddleston 695cb49345 CAM: Fix SpindleDirection and Material not updating from toolbit files; reduce log noise
- Change missing property log in shape/doc.py from warning to debug
- Ensure SpindleDirection property exists and is set, defaulting to "Forward"
- Ensure Material property exists and is set, defaulting to "HSS"
- Update SpindleDirection and Material from toolbit file parameters if provided
2025-09-25 13:21:57 -04:00
Furgo a9f8993237 BIM: Arch.makeWindow, expand docstring, add examples 2025-09-25 18:51:33 +02:00
Furgo 3e37cbcfc0 BIM: Arch.makeWindow, add type hinting 2025-09-25 18:51:33 +02:00
Chris Hennes 39d39f34c3 Update translations 2025-09-25 2025-09-25 17:25:13 +02:00
FEA-eng 702eb9f5af FEM: Update commands.py 2025-09-25 08:46:41 -05:00
Chris Hennes 864cde5aed Gui: Improve file corruption checks 2025-09-25 14:37:38 +02:00
Gaël Écorchard c32628c61c BIM: fix regression in DAE import, support for polylists (#24031)
* BIM: fix regression in DAE import, support for polylists

The support for non-triangular faces was remove in
commit 346c7581d4.
Now, the support for them is restored, by triangulating them
during the import (with a warning and changing the object name).

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* BIM: Remove translation calls console

Use raw strings for console messages, as they are usually not
translated.

---------

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Co-authored-by: Gaël Écorchard <gael@km-robotics.cz>
2025-09-25 14:28:05 +02:00
Furgo e4881dd92f Apply wording suggestions from code review
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-09-25 14:26:54 +02:00
Furgo 948916b888 BIM: enable live updates of the cut when changing placement 2025-09-25 14:26:54 +02:00
Furgo edf1c82b9f BIM: redesign rotation, center and resize controls 2025-09-25 14:26:54 +02:00
Furgo c60dadf147 BIM: separate scope and placement & visuals in Task panel 2025-09-25 14:26:54 +02:00
Furgo 1a2cd1befc BIM: Fix inverted cut direction for rotated SectionPlane
Rotating an ArchSectionPlane object caused its cutting effect to flip,
affecting both the live `CutView` and 2D projections. The
`_SectionPlane.execute()` method incorrectly tried to auto-correct the
orientation of a temporary plane before applying the object's final
placement. The fix refactors this to a "transform-then-verify" pattern:
the object's full `Placement` is now applied to the temporary plane
first, and only then is the resulting face's actual normal validated
against the intended normal from the `Placement`. This ensures the
`Shape` is always geometrically consistent with the `Placement`, making
the cut direction predictable at all angles.
2025-09-25 14:26:54 +02:00
Furgo 0c71c05c06 BIM: make cut view a toggle button 2025-09-25 14:26:54 +02:00
Furgo c64ed630cd BIM: Use correct icon for SectionPlane 2025-09-25 14:26:54 +02:00
Furgo 673f6664bd BIM: Change SectionPlane task panel button from OK to Close 2025-09-25 14:26:54 +02:00
Furgo 94d893bbe6 BIM: Fix SectionPlane's label being editable on double-click 2025-09-25 14:26:54 +02:00
Furgo 9b4f336eba BIM: add Cut View toggle on SectionPlane task panel 2025-09-25 14:26:54 +02:00
Roy-043 1d38352607 Draft: Update Draft example file (#23284)
* Draft: Update Draft example file

Fixes #23198

I have added osifont-lgpl3fe.ttf to the example folder. The ShapeString in draft_test_objects.FCStd references it using a
relative path. I am not sure if including the font here is allowed though.

Additionally: The example file showed up an error in view_wire.py. It is also used for fillets (which do not have a Points property).

* Updated

* Also use a relative path for the PAT file.
* Subfolder for the PAT and TTF files.

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt
2025-09-25 14:21:12 +02:00
tarman3 aa7b8f977c CAM: LeadInOut - Fix RetractThreshold in Task panel 2025-09-25 11:37:39 +03:00
Furgo 26995b7f67 Theme: bring back visual feedback on toolbar button press
And also on toolbar button hover.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/22747
2025-09-24 22:48:34 -05:00
PaddleStroke 001bab4439 Core: Add signalAboutToOpenTransaction (#24049)
* Core: Add signalAboutToOpenTransaction

* change name to squash

* Update AutoTransaction.cpp

* Update Application.h

* reorder

* Update AutoTransaction.cpp

* Update Application.h
2025-09-24 22:45:57 -05:00
Chris Hennes 80449715c6 Merge pull request #23729 from marioalexis84/fem-loggin_error
Fem: Better error handling in task panels with logging
2025-09-24 22:44:44 -05:00
Furgo 5a6af2e41f Assembly: fix delete shortcut parameter mismatch
Fixes: https://github.com/FreeCAD/FreeCAD/issues/23792
2025-09-24 22:19:00 -05:00
Chris Hennes 02bbc77f3c Merge pull request #23823 from marioalexis84/fem-remove_elmer_filter_parameter
Fem: Remove dependency of the ViewProviderFemPostObject class on user parameters
2025-09-24 22:18:19 -05:00
Chris Hennes 9fdbbe44ee Merge pull request #23803 from 3x380V/py
Py3.13: fix warnings
2025-09-24 22:16:30 -05:00
chris 0f6d00d2a5 fix issue #23829 build with boost v1.89 and greater 2025-09-24 22:12:47 -05:00
matt-git 06ad520851 Fix shortcuts for grouped Python commands
- Add shortcut setting for individual actions in PythonGroupCommand::createAction()
- Update PythonGroupCommand::languageChange() to include default command shortcut in group tooltip
- Fix variable redefinition error in languageChange() function
- Ensure shortcuts work and display in tooltips for grouped commands like Arch_Nest
2025-09-24 22:12:04 -05:00
marioalexis 8547e798fb CMake: Fix Eigen3 version search 2025-09-24 21:56:56 -05:00
Markus Reitböck 2ce0323b8f cleanup remaining implementations of precompiled headers 2025-09-24 20:08:57 +02:00
Markus Reitböck abc6b9e7d0 Test: 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-24 20:08:57 +02:00
Markus Reitböck 2150afc470 Sandbox: 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-24 20:08:57 +02:00
Markus Reitböck b864ccda60 CAM: 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-24 20:08:56 +02:00
Markus Reitböck b15f3c1155 Robot: 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-24 20:08:56 +02:00
Markus Reitböck 8fa48b25b4 Part: 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-24 20:08:56 +02:00
Markus Reitböck ba03cf1ed6 JtReader: 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-24 20:08:55 +02:00
Markus Reitböck 499742eea2 Draft: 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-24 20:08:54 +02:00
Markus Reitböck 550786e6b0 Cloud: 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-24 20:08:54 +02:00
PaddleStroke 5194dfc18a Assembly: fix onChanged crash 2025-09-24 10:59:41 -05:00
sliptonic 902079af20 Merge pull request #24167 from pmjdebruijn/cam-clearingpattern
CAM: fix PocketShape OffsetPattern broken by #23649
2025-09-24 10:48:30 -05:00
marioalexis ca286fb5be Fem: Set autoscale to false in Plane function and remove unnecessary code 2025-09-24 12:26:10 -03:00
marioalexis b23491901f Fem: Align plane translator to Z-axis 2025-09-24 12:26:10 -03:00
PaddleStroke 2aa8f133f3 Sketcher: Fix crash on constraint selection 2025-09-24 10:21:22 -05:00
PaddleStroke c384a52fa5 Feature Extrude: Make Length mode act as it did before. 2025-09-24 09:22:05 +02:00
PaddleStroke 155edc0f53 Sketcher: Fix is active. (#24124)
* Sketcher: Fix is active.

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

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

* Sketcher: Delint and compiler warning cleanup

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@gmail.com>
2025-09-23 19:10:44 -05:00
PaddleStroke 27806651b4 Assembly: Fix subassembly linkgroups not moving with dragger 2025-09-23 19:07:25 -05:00
Chris Hennes b06bafe3cd libE57Format: Check for IPO before enabling 2025-09-23 17:46:18 -05:00
tarman3 7205191f81 CAM: Old simulator - Fix z for G2,G3 2025-09-24 00:34:52 +03:00
Chris Hennes 4b98ebe4f2 libE57Format: Remove gtest submodule 2025-09-23 16:20:44 -05:00
Florian Foinant-Willig 09ab65ce1a Core: freeze is no more recursive on children 2025-09-23 22:42:56 +02:00
Florian Foinant-Willig d15d9948bc Core: set properties of frozen object read-only 2025-09-23 22:42:14 +02:00
Markus Reitböck 015896f4e4 MeshPart: 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-23 22:39:36 +02:00
Markus Reitböck 5b6a0b1852 PartDesign: 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-23 22:39:36 +02:00
Markus Reitböck cfe0d9ffac Surface: 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-23 22:39:36 +02:00
Markus Reitböck 914f6bec44 ReverseEngineering: 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-23 22:39:35 +02:00
Markus Reitböck 93830929ae Measure: 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-23 22:39:35 +02:00
Markus Reitböck 4bc92384b7 Inspection: 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-23 22:39:35 +02:00
Markus Reitböck 7051848d10 Import: 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-23 22:39:35 +02:00
Markus Reitböck 59724846e3 Assembly: 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-23 22:39:34 +02:00
Chris Hennes 86048e7482 libE57Format: Accumulated FreeCAD changes before subtree 2025-09-23 14:50:19 -05:00
Chris Hennes 0da017a6f9 Merge commit '82927817b878295060edd8fc57b3e384404dc277' as 'src/3rdParty/libE57Format' 2025-09-23 14:20:50 -05:00
Chris Hennes 82927817b8 Squashed 'src/3rdParty/libE57Format/' content from commit d51a32d6ab7
git-subtree-dir: src/3rdParty/libE57Format
git-subtree-split: d51a32d6ab7c5dde5e1c68d0ec8ec61d980f06a3
2025-09-23 14:20:50 -05:00
Chris Hennes 11f6f498ab 3rdParty: Remove original libE57Format 2025-09-23 14:17:47 -05:00
Ryan Kembrey e9ce06155d TechDraw: Fix double drag in projection groups 2025-09-23 13:47:15 -05:00
luzpaz d092a94902 Techdraw: fix dialog text in Gui/Command.cpp (#24165) 2025-09-23 18:47:02 +00:00
dependabot[bot] 520dafa03c Bump prefix-dev/setup-pixi from 0.9.0 to 0.9.1
Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/fef5c9568ca6c4ff7707bf840ab0692ba3f08293...194d461b21b6c5717c722ffc597fa91ed2ff29fa)

---
updated-dependencies:
- dependency-name: prefix-dev/setup-pixi
  dependency-version: 0.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-23 13:43:39 -05:00
Pascal de Bruijn 3e6eacbf76 TechDraw: reorganize Templates (#23719) 2025-09-23 13:40:13 -05:00
wandererfan 22af5df757 [TD]fix FileChooser mode in preferences 2025-09-23 13:00:44 -05:00
theo-vt c6c084f22c Sketcher: fix split breaking sketch (#23711)
* Sketcher: Scale: Reorder operations and delete original modified constraints to ensure validity

* Sketcher: replace boolean parameters for deletion with enum and expose solver override on some deletion functions in the python API

* Use correct flag in ::delGeometry

* Set default value of false to noSolve

* Sketcher: autoscale: use deleteAllGeometry

* Sketcher: Scale: revert to checking constraints for geoId validity and handle horizontal&vertical

* Sketcher.Split: Avoid early solve that can break sketch

* Avoid reintroducing a 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>
2025-09-23 12:00:36 -05:00
matthiasdanner 5961651547 Sketcher: Display non-empty Sketch when having external geometry (#23660) 2025-09-23 11:58:26 -05:00
Roy-043 ae29b67041 Part: fix copy_visual_attributes in BOPFeatures.py
Fixes #23900.

The ShapeAppearance related code should be removed. It is atypical that the result of a boolean operation has the same number of faces as one of its source objects, therefore simply applying its ShapeAppearance to the new object does not make sense in most cases.

The ShapeAppearance of Fusion objects gets overwritten by other code. For Cut objects this does not happen anymore (Used to happen in V0.21).
2025-09-23 11:30:08 -05:00
PaddleStroke ff1bde69fc Assembly: Prevent crash when link to linkgroup in subassembly (#24125)
* Assembly: Prevent crash when link to linkgroup in subassembly

* ViewProviderAssembly: Additional crash failsafe.
2025-09-23 11:06:01 -05:00
PaddleStroke e72834b94c Assembly: Fix LinkElement dragger 2025-09-23 10:39:28 -05:00
Pascal de Bruijn a3ebead67f CAM: fix PocketShape OffsetPattern broken by #23649 2025-09-23 17:25:44 +02:00
sliptonic 66c7f82f4a Merge pull request #22336 from dbtayl/fix_22177
[CAM] Correctly process Adaptive extensions
2025-09-23 09:24:01 -05:00
sliptonic a7abaaef23 Merge pull request #23575 from tarman3/stock1mm
CAM: Fix stock create for flat objects
2025-09-23 09:22:30 -05:00
sliptonic 4c04586d1e Merge pull request #21756 from papaathome/CAM-fix-for-3Dsurface,-rotational-path,-#21556
CAM: Update PathUtils.py
2025-09-23 09:21:41 -05:00
sliptonic fc71a76f50 Merge pull request #24070 from tarman3/leadinout_fix3
CAM: LeadInOut - Remove useless var
2025-09-23 09:20:59 -05:00
sliptonic 91489bcf18 Merge pull request #24138 from pmjdebruijn/cam-stepover
CAM: Pocket sensible default StepOver
2025-09-23 09:20:17 -05:00
sliptonic 73bbaac919 Merge pull request #24141 from Connor9220/FixPropertyBagEnum
CAM: Fix group dropdown showing individual letters by ensuring groups is a list
2025-09-23 09:19:30 -05:00
Chris Hennes d1ca523ca7 Merge pull request #24107 from mrpilot2/cmake_pch_mods
Mods (Part 1): use CMake to generate precompiled headers on all platforms
2025-09-23 08:35:43 -05:00
PaddleStroke c3707cc4a5 PartDesign: Enable child reorder
Enable dragging a sketch within a body.
2025-09-23 00:03:49 -05:00
marioalexis def22ad234 Fem: Better VTK version check 2025-09-22 22:46:20 -05:00
wandererfan c75bb47bff [TD]fix balloon auto-placement 2025-09-22 22:10:55 -05:00
PaddleStroke d5db01d3d4 Assembly: Simulation: Fix motion double click (#23778)
* Assembly: Simulation: Fix motion double click

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-22 21:22:29 -05:00
Markus Reitböck c3805ecf4a fix duplicate include guards in precompiled headers 2025-09-23 00:51:00 +02:00
Markus Reitböck c1be416c7f Fem: 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-23 00:51:00 +02:00
Markus Reitböck ef670e7880 Sketcher: 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-23 00:51:00 +02:00
Markus Reitböck 0019739095 TechDraw: 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-23 00:50:59 +02:00
Markus Reitböck 62b915ee7b Spreadsheet: 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-23 00:50:59 +02:00
PaddleStroke b905c0dd95 Link: make OverrideMaterial use the per-face override. (#23544)
* Link: make OverrideMaterial use the per-face override.

* Fix small issue on per face transparency

* update names

* Update ViewProviderExt.cpp
2025-09-22 22:47:12 +00:00
marioalexis 0c5746fe7a Fem: Remove dependency of the ViewProviderFemPostObject class on user parameters 2025-09-22 18:27:18 -03:00
marioalexis b9129f4453 Fem: Add upstream vtkCleanUnstructuredGrid class source files 2025-09-22 18:27:18 -03:00
marioalexis 3e1741dfea Fem: Move FemFrameSourceAlgorithm class to its own source files 2025-09-22 18:27:18 -03:00
Markus Reitböck f323323e8b Web: 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:40 +02:00
Markus Reitböck 13c8b52a6a Mesh: 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:40 +02:00
Markus Reitböck a6f7cb950a Points: 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:40 +02:00
Markus Reitböck 412b72d8d6 Start: 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
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
Billy Huddleston c2d8077d96 CAM: Fix CAM Sanity Report
Fix base template substitution and improve tool/op formatting in sanity report, also update HTML/CSS and image handling.

- Major HTML/CSS refactor for CAM Sanity Report template:
  - Rewrote HTMLTemplate.py with modern, responsive CSS, semantic HTML, and accessibility improvements.
  - Added CSS reset, responsive image handling, and improved table/list styling.
  - Introduced .heading-container and .top-link for right-aligned "Top" navigation links on all major sections and tool headers (hidden in print).
  - Updated all section and tool headers to use new navigation and layout.
  - Cleaned up legacy markup, removed inline styles, and standardized variable substitution using string.Template syntax (${key}, ${val}).
  - Updated base_template in HTMLTemplate.py to use string.Template syntax (${key}, ${val}) instead of %{key}, %{val} for correct variable substitution.

- Enhanced image generation and embedding:
  - Updated ImageBuilder to support high-DPI (800x800) images and direct byte output for embedding.
  - All report images (base, stock, datum, tool) now use in-memory bytes for embedding when possible.
  - Tool images support a toggle for using toolbit thumbnails or fallback head-on renders.
  - ReportGenerator now embeds images as base64 when requested, with correct HTML tags.

- Improved squawk, tool, and operation data formatting:
  - Squawk dates now use localized string formatting.
  - Tool diameter and feedrate now use .UserString for better display.
  - Spindle speed now formatted as integer with "rpm" suffix.
  - Operation feed and speed values also use .UserString and "rpm" formatting.
  - Fixed _format_bases in ReportGenerator.py to iterate over base_data.items() and pass {"key": key, "val": val} to the template, ensuring all bases are listed correctly.
  - General code cleanup and improved maintainability throughout the CAM Sanity reporting stack.
2025-09-22 13:44:53 -04:00
Billy Huddleston 69ba0d2241 CAM: Fix group dropdown showing individual letters by ensuring groups is a list
- Add type check in PropertyCreate to wrap CustomPropertyGroups as a list if not already
- Prevents dropdown from displaying each character of a string as a separate group option
2025-09-22 12:59:26 -04:00
tarman3 544605bde7 CAM: LeadInOut - Remove useless var 2025-09-22 19:50:11 +03:00
sliptonic 3ffb861d11 Merge pull request #23892 from alihantadal/feature_23649_update_confusing_nomenclature_offset_pattern
CAM: Improve confusing nomenclature: Offset Pattern (#23649)
2025-09-22 11:42:31 -05:00
sliptonic 873210d190 Merge pull request #23957 from tarman3/leadinout_fix
CAM: LeadInOut - Fix for rapid move in end
2025-09-22 11:33:12 -05:00
PaddleStroke 2e5b02e52c Link: Fix Selectable (#23567)
* Link: Fix Selectable

* to squash

* squash

* squash
2025-09-22 18:25:16 +02:00
xtemp09 aeddcaec27 Remove unused file 2025-09-22 11:20:26 -05:00
Chris Hennes a23bd23159 Gui: Remove references to the Addon Manager if no Std_AddonMgr (#23167)
* Gui: Remove references to the Addon Manager if no Std_AddonMgr

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

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

* Gui: Switch to disabling controls rather than hiding

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-22 18:20:07 +02:00
Kacper Donat 707ee60d64 Gui: Fix transform of link sub-elements 2025-09-22 11:17:04 -05:00
Chris Hennes 29c18019ae Merge pull request #23710 from kadet1090/fix-transform-basefeature-outside-body
Gui: Add handling for BaseFeatures outside of Body edge case
2025-09-22 11:15:53 -05:00
André Althaus 1b799ad355 PartDesign: Fix mirror Add/remove buttons 2025-09-22 11:12:31 -05:00
MisterMakerNL 26863fe895 Remove default close icon from OverlayToolButton styles
Eliminates the default and hover close icon image assignments for Gui--OverlayToolButton in all theme and overlay QSS files. This change likely delegates icon handling to a different mechanism or improves theme consistency.
2025-09-22 11:11:40 -05:00
Alfredo Monclus 0dc6cbd16f PD: hole prefer finding closest diameter if pitch is 0 2025-09-22 11:10:54 -05:00
Alfredo Monclus 7faf899b8d PD: fix hole thread depth being reset when changing to through all
the property is correctly updated by the updateThreadDepthParam below
2025-09-22 11:09:27 -05:00
Chris Hennes f6128e5fab Merge pull request #24113 from sliptonic/versions
[CAM]: Asset versions and Various Fixes
2025-09-22 11:04:09 -05:00
matthiasdanner 46ec53f4da Fix "Show only Visible Constraints" option (#23187)
Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-09-22 10:54:24 -05:00
Pieter Hijma 9d11551972 Merge pull request #23648 from pieterhijma/fix-enabled-ok-expr-editor
Gui: Fix issues with Expr dialog with VarSets
2025-09-22 10:51:35 -05:00
theo-vt 7a672a3207 PartDesign: Hole: Print error when no axis was found (#23659)
* PartDesign: Hole: Print error when no axis was found

* Remove unrelated string update
2025-09-22 10:47:20 -05:00
Pascal de Bruijn 2ce559834b CAM: Pocket sensible default StepOver 2025-09-22 17:46:16 +02:00
Chris Hennes 90e9533df3 Merge pull request #23709 from marioalexis84/fem-solver_file_chooser
Fem: Fix use of file chooser Qt signals in solvers preferences.
2025-09-22 10:41:42 -05:00
Chris Hennes da380d8b64 Merge pull request #24017 from sliptonic/betterunitschema
[CAM] change dialog to allow directly switching unit schema
2025-09-22 10:40:24 -05:00
marioalexis df82e7b71c Fem: Do not allow selection of external objects for analysis objects - fixes #23834 2025-09-22 10:38:01 -05:00
David Kaufman a85f53d0bb [CAM] reorder job tabs to put Setup first 2025-09-22 10:37:27 -05:00
drwho495 9f2d212b12 Toponaming: Don't add empty tags past the threshold 2025-09-22 10:35:13 -05:00
Roy-043 99812e3ed8 Draft: fix snapper lagging (#24081)
* Draft: fix snapper lagging

The `WorkingPlane.get_working_plane()` function is too slow to be called repeatedly by `_get_wp`. That function has been reverted to what it was before #19728.

* Draft: fix snapper lagging

Using WorkingPlane.get_working_plane(update=False) instead of reverting.
2025-09-22 17:31:24 +02:00
Paul Lee 3569e77172 [ArchCurtainWall] Regression Curve Support
Fix https://github.com/FreeCAD/FreeCAD/issues/23945

"Arch_CurtainWall results in an error when trying to create it based on a sketch consisting of spline or arc."

This fixes the regression introduced in -
https://github.com/FreeCAD/FreeCAD/commit/147e97d40740230e59f17397652cc8811ed98344#diff-b4849bbc0941a0f60f25d13c40d4bfeca94171f55bd78a6196362343c3fdcf6fR287
2025-09-22 17:30:35 +02:00
Roy-043 d666e8db11 BIM: fix material handling of equipment 2025-09-22 17:26:58 +02:00
Chris Hennes 4ff209197f Merge pull request #23535 from pieterhijma/prop-view-expansion
Gui: Property View Expand/Collapse
2025-09-22 09:20:49 -05:00
PaddleStroke 3872d0682d Sketcher: Improve circle constraint position (#23569)
* Make prevCursorPosition protected so tools can use it

* DrawSketchHandlerCircle : Position constraint on prevCursorPosition

* [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>
2025-09-22 09:01:29 -05:00
pre-commit-ci[bot] af592924b6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-09-22 13:51:05 +00:00
sliptonic 21fa5facbf codeQl and suggestions from discussion. 2025-09-22 08:47:48 -05:00
sliptonic 9c81c71728 fix default library name on import 2025-09-21 13:32:31 -05:00
Chris Hennes 465bd7ef5c Base: Refine directory permissions test 2025-09-21 13:16:35 -05:00
sliptonic 260aa3abf1 refactor migration 2025-09-21 13:14:13 -05:00
sliptonic fbd81cf4f8 Versioning directories 2025-09-21 12:01:27 -05:00
sliptonic f65a826b08 library and bit import improvements 2025-09-21 12:01:27 -05:00
sliptonic 2dee048f0e template directory to camassets 2025-09-21 12:01:27 -05:00
Ryan Kembrey eb58e2e343 TechDraw: Fix vertices hiding on cosmetic object removal 2025-09-22 01:01:33 +10:00
Furgo 7640a03cc8 Sketcher: improve Make Internals property tooltip (#23636)
* Sketcher: improve Make Internals property tooltip

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

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

* Sketcher: reword final MakeInternals tooltip

* Sketcher: apply final code review suggestion

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

---------

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>
2025-09-21 08:24:30 +00:00
sliptonic f51893fbc6 Merge pull request #24087 from chennes/fixIsVersionedPathPythonWrapper
App: Fix the Python wrapper for isVersionedPath
2025-09-20 14:17:29 -05:00
Chris Hennes 6a8cfed1d6 App: Fix the Python wrapper for isVersionedPath 2025-09-20 11:46:11 -05:00
sliptonic 636bd90d4d Merge pull request #23585 from chennes/extractVersionMigrator
Gui: Improve version migration UX
2025-09-20 10:01:40 -05:00
captain0xff 5be668b696 Gui: fix a lifetime issue with the draggers 2025-09-20 14:03:33 +02:00
tarman3 4f955a8b2a CAM: LeadInOut - Fix SafeHeight 2025-09-19 23:06:01 +03:00
tarman3 37eefde380 CAM: LeadInOut - Fix for path without rapid move in the end 2025-09-19 22:59:10 +03:00
sliptonic 4911c23d1f Merge pull request #23718 from pmjdebruijn/cam-pocketshape-offset
CAM: PocketShape defaults to Offset and 50% StepOver
2025-09-19 14:27:02 -05:00
pre-commit-ci[bot] dfb3ae2ef4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-09-19 19:17:09 +00:00
sliptonic b7153e12e0 [CAM] Robustly test schemas to find the ones that work.
Robustly test current schema.

Fixes #22549
2025-09-19 14:14:08 -05:00
sliptonic 5f909452d2 [CAM] change dialog to allow directly switching unit schema 2025-09-19 14:12:50 -05:00
sliptonic 31d609eec8 Merge pull request #23720 from davidgilkaufman/leadinout_migration
[CAM] add missing migration from intermediate version for lead in/out dressup
2025-09-19 11:29:38 -05:00
sliptonic 8df2a54ccd Merge pull request #21578 from lagnat/main
CAM: Dragknife dressup adds unnecessary maneuvers
2025-09-19 11:24:43 -05:00
matt-taylor-git 38785ddd96 Fix: Update tooltip for grouped commands (#24043)
When a command is part of a toolbar group, the tooltip for the group's button was not correctly updated with the shortcut of the selected command. This was happening because the tooltip generation was using the shortcut of the group itself, not the selected child command.

This commit fixes the issue by ensuring that the tooltip of the group action is updated with the full tooltip of the child action, which already contains the correct shortcut information. This is done in both 'ActionGroup::onActivated' (for when a new tool is selected) and 'ActionGroup::setCheckedAction' (for the initial default tool).
2025-09-19 15:20:39 +00:00
Roy-043 6ce59d2475 Draft: fix working plane tooltip (#24040)
* Draft: fix working plane tooltip

Related to #24033.

* Update WorkingPlane.py: remove trailing blank line
2025-09-19 09:17:45 -05:00
paddle 9ba65136d1 Core: Add beforeDelete python interface. 2025-09-19 09:13:20 -05:00
PaddleStroke 750c2a0c4d Sketcher: Offset: fix bad arcs (#24053) 2025-09-19 09:09:22 -05:00
PaddleStroke 6e4d2a94d5 Core: GeoFeature::getPlacementFromProp prevent potential crash 2025-09-19 08:40:06 -05:00
luzpaz ea08cb6776 BIM: Pin upstream pyshp shapefile.py URL to version 2.4.1
This is the safest solution for now until someone can vet the upstream breaking changes (https://github.com/GeospatialPython/pyshp/blob/master/README.md#breaking-changes)
2025-09-19 09:58:43 +02:00
luzpaz d9124497d3 BIM: Update shapefile import URL to latest version
Fixes #23911
2025-09-19 09:58:43 +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
Chris Hennes a63cbd7057 Gui: Fix ignored font preference 2025-09-18 11:45:45 -05:00
dependabot[bot] dd08f6c845 Bump github/issue-metrics from 3.23.2 to 3.23.3
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.23.2 to 3.23.3.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/e8f19041d9996b64cd5eebd653f065adb6d0e195...c2ad23cdf3192065f868ff0ece4e91e4077a4f73)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.23.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-18 16:00:14 +02:00
Furgo 0bea8ac10d CI: run exclusively GUI tests in the GUI test steps (#23933)
* CI: run exclusively GUI tests in the GUI test steps

* Fix linter error

Fix the unsupported operand type(s) for | (unsupported-binary-operation) linter error. It appears the linter uses or assumes Python <3.10.

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

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

* CI: move __future__ import to the top of the module...

... to fix linter error.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-18 14:39:58 +02:00
jffmichi f31bd4a1c0 PartDesign: fix crash when creating new sketch 2025-09-17 22:34:00 -05:00
sliptonic c9e7da359a Fixes #23015
The standard in FreeCAD is that workbench preference pages get loaded when the module gets loaded.
That behavior was altered by PR 21981 which attempted to load CAM preference pages at startup even if CAM was not loaded.
The result was that pages were only partially loaded and the result was a confusing mess.

There is some discussion about future enhancements to allow workbench preferences to be loaded early.
When that is implemented, CAM will adjust to be compliant with FreeCAD standard.

This effectively revertts PR #21981
2025-09-17 18:21:16 -05: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
Pieter Hijma ec6cadc01d Gui: Fix segfault DlgPropertyLink
In some cases FreeCAD can segfault when signals to the selection model
aren't blocked.
2025-09-17 16:50:24 -05:00
theo-vt fa2e5cd5fe Sketcher: Use the right delete flag for delConstraints 2025-09-17 16:42:40 -05:00
sliptonic 12a7151806 Merge pull request #23724 from davidgilkaufman/adaptive_reenable_profile
[CAM] regression fix: re-enable adaptive profile mode
2025-09-17 16:41:51 -05:00
Chris Hennes a6c5e9f08e App: Remove manual PCH entries 2025-09-17 16:18:10 -05:00
Chris Hennes b64b0f528b App: Address reviewer comments 2025-09-17 16:08:07 -05:00
Chris Hennes cdb4da3cc7 Gui: Address review comments 2025-09-17 15:45:07 -05:00
sliptonic a8c1c2f9dd Merge pull request #23902 from deimi/fix-import-snapmaker-post
CAM: fix library import in snapmaker postprocessor
2025-09-17 15:43:50 -05:00
Pascal de Bruijn d1f5437002 Material PMMA generic (#24006)
* Materials: Add PMMA-Generic

* Materials: Add PMMA-Generic to CMakeLists

* Materials: Fix PMMA-Generic Description
2025-09-17 18:54:32 +00:00
Pascal de Bruijn 255aaabf7b Materials: Update Aluminum-6061-T6 (#23977)
* Materials: Update Aluminum-6061-T6

* Materials: Update Aluminum-6061-T6 fixups
2025-09-17 12:54:47 -05:00
Chris Hennes eed3e09792 Gui: Migration complete wording tweak 2025-09-17 12:16:24 -05:00
Kacper Donat bc01dc17a4 Gui: Support for default and flat buttons in QSS 2025-09-17 12:08:26 -05:00
Chris Hennes 909464c17b Gui: Add window title 2025-09-17 12:07:00 -05:00
Chris Hennes 26ba6969f6 Gui: Migration UI take 2 2025-09-17 10:43:16 -05:00
Chris Hennes 3dd12e5da1 Gui: Improve version migration UX 2025-09-17 10:43:16 -05:00
captain0xff 2cab5e7b64 Gui: refactor gizmo attachment code 2025-09-17 15:46:35 +02:00
Pascal de Bruijn fcd9a416d2 Materials: Add Aluminum-7075-T6 (#23976) 2025-09-17 08:37:07 -05:00
Roy-043 1c591cd43a Sketcher: fix some prefs texts (#23992)
* Sketcher: fix some prefs texts

* Sketcher: fix some prefs texts
2025-09-17 14:50:26 +02:00
Ryan Kembrey e91751bceb TechDraw: Update missed UI strings to Title Case 2025-09-17 14:50:17 +02:00
Roy-043 bac49e4659 Sketcher: context menu of Elements section in task panel to Title Case 2025-09-16 22:38:23 +02:00
Roy-043 4bb387dd0b Sketcher: titles of parameter sections to Title Case (#23936)
* Sketcher: titles of parameter sections to Title Case

* Update src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h

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

---------

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-16 21:03:16 +02:00
Pieter Hijma ade4e4d96a Gui: Enable single click expand property editor 2025-09-16 11:47:40 +02:00
Pieter Hijma 8e1f983e37 Gui: Create a Property View submenu for expansion
The Property View's context menu has a submenu for property expansion
that allows you set the property expansion to default (remembers state),
to expand all and to collapse all.  Then there are toggles for
default/auto expand/auto collapse that always collapses or expands or
remembers the state.
2025-09-16 11:47:22 +02:00
Alex Tran 76e43efdc6 Read auto collapse user preferences 2025-09-16 11:29:49 +02:00
Alex Tran 2c9056255a Expand/Collapse Property Editor 2025-09-16 11:29:48 +02:00
Chris Hennes 29c69a4689 Update translations 2025-09-15 2025-09-16 09:55:13 +02:00
FEA-eng 29dc9ebcdb Fix typos in the strings reported in Crowdin (#23956)
* BIM: Update dialogWelcome.ui

* BIM: Update dialogWelcome.ui

* Mesh: Update Command.cpp

* MeshPart: Update Tessellation.cpp

* Mesh: Update Selection.ui

* Robot: Update TaskTrajectoryDressUpParameter.ui

* Core: Update MayaGestureNavigationStyle.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>
2025-09-15 21:51:56 -05:00
sliptonic e2ca3cce4b Merge pull request #23916 from davidgilkaufman/remove_qsignalblocker
[CAM] bugfix: replace python uses of QSignalBlocker
2025-09-15 14:10:54 -05:00
sliptonic 15eeb8ab1f Merge pull request #23776 from davidgilkaufman/fix_missing_tool_proxy
[CAM] regression fix: migrate old tools to new system
2025-09-15 14:08:47 -05:00
Roy-043 9c4bafc28f Sketcher: Add 'Toggle' to 'Construction Geometry' menu texts (#23944)
* Sketcher: Add 'Toggle' to 'Construction Geometry' menu texts

* Sketcher: Add 'Toggle' to 'Construction Geometry' menu texts

* Update TaskSketcherElements.cpp

* Update CommandAlterGeometry.cpp
2025-09-15 19:38:13 +02:00
Roy-043 010e7fc45f Sketcher: Change "By control points" and "By knots" texts (#23943)
* Sketcher: Change "By control points" and "By knots" texts

Elsewhere in the Sketcher GUI texts, "By" has been replaced by "From". For example "Arc From Center". It makes sense to also do that for the B-spline modes "By control points" and "By knots".

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-15 17:12:58 +00:00
Pieter Hijma 11ec98ede3 Gui: Remove internal prop types Add Prop dialog
This commit removes types from the list that have no editor and are
meant for internal use.
2025-09-15 19:00:10 +02:00
sliptonic c7936ddcf4 Merge pull request #22500 from jffmichi/drilling_select_line
CAM: select rows instead of cells in drilling panel
2025-09-15 10:46:52 -05:00
sliptonic 768cbbc85b Merge pull request #23856 from Connor9220/library-editor
CAM: Replace the main library editor dialog and add copy & paste & drag & drop support
2025-09-15 10:37:19 -05:00
Roy-043 eec6f4ec0d BIM: fix material handling of component 2025-09-15 15:29:55 +02:00
Furgo c4b2dad89a BIM: fix double click both editing label and opening task panel 2025-09-15 15:28:58 +02:00
Roy-043 68f4a30a1b BIM: fix issues with T-slot profile (#23813)
* BIM: fix issue with T-slot profile

* BIM: fix issue with T-slot profile

* BIM: fix issue with T-slot profile

* Update ArchProfile.py: remove temp print
2025-09-15 15:28:16 +02:00
Furgo a0787e988a BIM: fix double click both editing label and opening task panel 2025-09-15 15:24:11 +02:00
Paul Lee b10fa7fb34 [Arch] Fix makeStairs Move & Addition Behaviour Consistency
Consistent Addition

1. Additions are hidden by onChanged()
2. makeStairs() previously made 1st segment of a Complex Stairs went to Base and the rest segments went to Additions
3. For consistency in grouping and visibility, all segments in go to Additions with this commit

Consistent Move With Host

1. A Complex Stairs has multiple segment (in Additions) and railings (in RailingLeft/Right), they should move togther.
2. All segments and Railing set MoveWithHost to True upon creation, and thus move together, regardless system setting default with this commit

Other Associated Inconsistency

    Other visibility default behaviour as discussed in https://forum.freecad.org/viewtopic.php?p=844965#p844920 would be added in subsequent PR

Last associated PR/commits :
2025-09-15 15:19:49 +02:00
Ryan Kembrey 5642620281 TechDraw: Fix projection groups not recursively deleting 2025-09-15 09:36:42 +02:00
David Kaufman 2cb86f259e also add qt5 compatibility for checkbox state change signal 2025-09-14 14:59:21 -04:00
Ryan K 6bed5b4255 TechDraw: Add number decimals and reference dimension options to dimension task panel (#23501)
* TechDraw: Add num decimals option to task panel

* TechDraw: Add Reference option for dimensions

* Update src/Mod/TechDraw/Gui/TaskDimension.cpp

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

* Update src/Mod/TechDraw/Gui/TaskDimension.cpp

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

---------

Co-authored-by: Ryan Kembrey <ryan.kembrey@student.uts>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-09-14 18:14:10 +02:00
Chris Hennes a6ab6f510e Merge pull request #23906 from mrpilot2/cmake_pch_core
Core: use CMake to generate precompiled headers on all platforms
2025-09-14 09:24:40 -05:00
Pascal de Bruijn 651c2d500c Materials: Add POM-(Homopolymer|Copolymer)-Generic followup (#23922)
* Materials: Add POM-(Homopolymer|Copolymer)-Generic

* Materials: Adjust CMakeLists for POM-(Homopolymer|Copolymer)-Generic

* Materials: fixups for POM-(Homopolymer|Copolymer)-Generic

* Materials: Fix POM-(Homopolymer|Copolymer)-Generic UUID
2025-09-14 09:17:50 -05:00
Pascal de Bruijn d09b632cf5 Materials: Add PEEK-Generic (#23779) 2025-09-14 09:16:49 -05:00
Ryan Kembrey 34173f5d3a TechDraw: Fix selections not clearing 2025-09-14 09:15:49 -05:00
Roy-043 f7f3c18e52 Sketcher: QMessageBox titles to Title Case (#23925)
* Sketcher: QMessageBox titles to Title Case

* Sketcher: QMessageBox titles to Title Case

* Sketcher: QMessageBox titles to Title Case

* Update Command.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>
2025-09-14 11:59:20 +00:00
Roy-043 4dbdd1031d Sketcher change "don't attach" (#23924)
* Update Command.cpp

* Update Command.cpp
2025-09-14 11:31:11 +00:00
Roy-043 5b59d94d55 Sketcher: Update text in prefs (Title Case related) 2025-09-14 12:31:52 +02:00
Roy-043 57ee6870b4 Sketcher: QInputDialog titles to Title Case (#23920)
* Sketcher: QInputDialog titles to Title Case

* Remove 2nd trailing blank line
2025-09-14 10:21:33 +00: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
David Kaufman 9ce9c6b99a [CAM] replace python uses of QSignalBlocker 2025-09-13 22:13:55 -04:00
Matthias Deimbacher c0c9212c97 CAM: fix library import in postprocessor 2025-09-13 21:33:31 +02:00
Pascal de Bruijn 2458f47550 Materials: Add POM-(Homopolymer|Copolymer)-Generic (#23820)
* Materials: Add POM-(Homopolymer|Copolymer)-Generic

* Materials: Adjust CMakeLists for POM-(Homopolymer|Copolymer)-Generic

* Materials: fixups for POM-(Homopolymer|Copolymer)-Generic
2025-09-13 14:27:47 -05:00
Markus Reitböck b2c8f4b084 CMake: fix disable msvc warning on wrong target 2025-09-13 12:35:43 -05:00
tetektoza 817ffc5782 Gui: Make Report View properly claim Select All (Ctrl+A) shortcut
Currently if user tries to use CTRL+A on Report View while having
document opened, it rejects the action and nothing happens.

This happened during the introduction of Select All (CTRL+A) behavior in
Sketcher. Basically, before Report View was not catching the event, but
neither any widget, resulting in QTextEdit catching it at the end of the
chain. Now, after enabling it for the whole document,
Report View rejected it, but we have registered it throughout the
document, so another widget was intercepting the event.

So, fix for that is simple - add a check for Select All shortcut on
Report View level, so the event will get consumed instead of being
rejected and propagated to further widgets.
2025-09-13 13:39:09 +02:00
PaddleStroke 37b4560893 Sketcher: Coin resize when screen change. Fix #23267 (#23865)
* Sketcher: Coin resize when screen change. Fix #23267

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

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

* Update ViewProviderSketch.cpp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-13 12:03:39 +02:00
PaddleStroke 37de4ce264 PartDesign: remove duplicate scale during sketch creation with attach task 2025-09-13 11:43:17 +02:00
Kacper Donat 470ad2a874 Merge pull request #23426 from pieterhijma/reconcile-add-prop-dialogs
Gui: Reconcile Add Property Dialogs
2025-09-13 11:26:52 +02:00
Alihan Tadal 6bb3a39e39 CAM: Let old files adapt OffsetPattern property changes 2025-09-13 11:53:39 +03:00
Alihan Tadal c9001c103c Merge branch 'main' into feature_23649_update_confusing_nomenclature_offset_pattern 2025-09-13 08:42:34 +03:00
Alihan Tadal afff03c38b CAM: Improve confusing nomenclature: Offset Pattern (#23649) 2025-09-13 08:35:29 +03:00
Billy 60bcf64a01 CAM: Consistently rename "Tool" to "Toolbit" in UI and code
- Updated all user-facing strings from "Tool" to "Toolbit" for clarity and consistency.
- Changed combo box filtering logic to use index for "All Toolbit Types" (localization-safe).
- Improved visual distinction for "All Toolbits" in library editor (bold/italic).
- Reduced default SVG icon size in ShapeWidget for a more compact display.
- Updated window titles, labels, tooltips, and placeholder texts to use "Toolbit".
- Removed obsolete string comparisons in filtering logic.
- Change the Menu item from "Toolbit Library Editor" to "Toolbit Library Manager"
2025-09-12 18:04:57 -04:00
Pieter Hijma f0a9b5ea01 Part: Add deprecation warning for import/export 2025-09-12 16:30:25 -05:00
PaddleStroke 061e185e7f Sketcher: Fix ctrl A (#23866) 2025-09-12 15:40:24 -05:00
Chris Hennes 0dcbac7b30 App: Add Python interface to ApplicationDirectories
The Python version of this class is entirely static: no instance is
required. Internally it accesses th pre-constructed instance of the C++
ApplicationDirectories class that is instantiated at program startup by
the Application class.
2025-09-12 15:25:47 -05:00
sliptonic 4ae36283d0 Ensure Qt5 compatibility with enums
Correct LGPL headers

rework bullnose  Fixes #19050
2025-09-12 15:24:16 -04:00
George Peden f2803283b8 Fix B-spline keyboard focus issue (#23859) (#23860)
* Fix B-spline keyboard focus issue (#23859)

- Restore keyboard focus after command restart in changeConstructionMethode()
- Fixes M key mode switching and R toggle periodic functionality
- Uses direct MDI view focus restoration instead of private ensureFocus() method

Fixes issue where keyboard shortcuts stop working after first mode switch.

* Address Copilot feedback: Add null check for activeDocument()

- Use ternary operator for cleaner null safety
- Prevents potential crash if activeDocument() returns null
- More idiomatic C++ code style

* Improve variable scope per @chennes feedback

- Use if-with-initialization to scope doc and mdi variables
- Variables now only exist where needed instead of leaking into function scope
- More idiomatic C++ code style
2025-09-12 18:26:39 +00:00
sliptonic db5117e1ae Update src/Mod/CAM/Gui/Resources/panels/LibraryProperties.ui
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

Update src/Mod/CAM/Gui/Resources/panels/ToolBitLibraryEdit.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-09-12 14:19:30 -04:00
sliptonic 78bd46f815 fixes
fix duplicate toolbits
add tools to 'all tools'
context menus and deletion
/CamAssets/Tool/  directory structure
Assets and preferences
2025-09-12 14:19:30 -04:00
Billy 81faf7727c CAM: Remove hardcoded style for Tool Number, Fix TestPathToolBitSerializer
Fix issue with toolshapes
Renamed fillet to radius
Added Tool Type Filter to library
Fix units so that they honor user preference
Remove the QToolBox widget from the Shape Selector page and combine into a single page.
Fix issue with PropertyBag so that CustomPropertyGroups as a string is converted to enum and enums are handled correctly.
Update TestPathPropertyBag test for enum changes.
Update TestPathToolBitListWidget
Update TestPathToolLibrarySerializer to match new LinuxCNC output
Fix LinuxCNC export too handle ALL tool types, use user preferences for units, and include all lcnc fields
2025-09-12 14:18:33 -04:00
Matthias Danner 95840a79d3 Sketcher: Fix Select all with BSplines and clean up selection logic 2025-09-12 12:56:41 -05:00
PaddleStroke ee44d265c8 Sketcher: Bspline tool: prevent double click failure (#23872)
* Sketcher: Bspline tool: prevent double click failure

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

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

* Update DrawSketchHandlerBSpline.h

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-12 16:51:31 +00:00
PaddleStroke 547c97fc79 Sketcher: Fix arc double click bug (#23873) 2025-09-12 11:20:43 -05:00
Pieter Hijma 1a9247d393 Gui: Fix disabling editing Property View
This commit fixes an issue that blocks editing values after pressing F2.
2025-09-12 11:05:33 -05:00
matthiasdanner 5d76be01e1 Sketcher: Fix Freeze in Offset with too large negative value (#23467)
* Sketcher: Fix Freeze in Offset with too large negative value

* Remove ErrorMessages when offsetting circles with too large negative value

* fix linting comment

* Add Error feedback

---------

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-09-12 10:52:33 -05:00
tarman3 34f4f16383 CAM: Clean DogboneDressup after PR#22250 (#23752) 2025-09-12 09:43:18 -05:00
tarman3 0336185ec1 CAM: Improve SelectLoop (#23275) 2025-09-12 09:42:20 -05:00
Connor9220 fff2e2daf9 CAM: Reorder the Clearance height and Safe Height spinners in task panel (#23727)
Co-authored-by: Billy <billy.huddleston@preparis.com>
2025-09-12 09:40:08 -05:00
matthiasdanner 34747719fb Sketcher: Fix use after free Bug when commiting value with enter in OVP (#23853)
* Sketcher: Fix use after free Bug when commiting value with enter

* Fix new use after free bug

---------

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-09-12 09:18:09 -05:00
dependabot[bot] b66d44ac49 Bump github/issue-metrics from 3.23.1 to 3.23.2
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.23.1 to 3.23.2.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/6fa9041b3ea7b6a9dafbdc388d25d86d06b2b6af...e8f19041d9996b64cd5eebd653f065adb6d0e195)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.23.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-12 08:54:47 -05:00
Pieter Hijma 1edacbf508 Gui: Small refactor of Tree.cpp selecting docs
Based on review comment, a small refactoring of code that was duplicated
when adding functionality to select documents.  The duplication has been
removed in this commit.
2025-09-12 10:59:17 +02:00
Pieter Hijma 12b7699800 Gui: Process minor review comments
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-09-12 10:58:34 +02:00
Markus Reitböck 952bff5b63 Mesh: give evaluation panel a title (#23423)
* Mesh: give evaluation panel a title

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

* Mesh: Evaluation panel - move refresh button beside selection box

as per request in pull request #23423

* Mesh: replace ampersand with 'and' in Evaluate and Repair dialog
2025-09-11 22:41:38 -05:00
Chris Hennes 112e22b639 Merge pull request #23837 from longrackslabs/feature/sketcher-keyboard-shortcuts-hints-23815
Feature/sketcher keyboard shortcuts hints 23815
2025-09-11 22:37:55 -05: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
Markus Reitböck 965109dd73 missing includes in Base, App and Gui headers (#23854)
* missing includes in Base, App and Gui headers

header should be self contained

* use cstddef header instead of stddef.h

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

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-09-11 18:58:44 -05:00
marioalexis 7387fc2210 Fem: Force utf8 encoding for Netgen Python process 2025-09-11 18:28:17 -03:00
marioalexis 7d1e05f21d Fem: Better error handling in task panels with logging 2025-09-11 18:28:08 -03:00
sliptonic 10d1031e9b Make default postprocessor empty string. (#23706)
* Make default postprocessor empty string.

Default post when creating a job is now not set.  This will cause the user to be prompted for a post instead
This PR also cleans up some unit tests to avoid loading from disk

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-11 16:07:38 -05:00
captain0xff 603e0bc6e5 Gui: update gizmo state based on new property 2025-09-11 22:54:47 +02:00
Kacper Donat 1f96b30832 Merge pull request #23510 from pieterhijma/modify-property-tooltip
Gui: Add editing a property tooltip in Property View
2025-09-11 22:14:08 +02:00
Ryan K f7a85081e8 TechDraw: Fix tree view selection not showing on page (#23593) 2025-09-11 12:35:19 -05:00
Ryan Kembrey caa009036a TechDraw: Fix selection regressions 2025-09-11 12:34:37 -05:00
Roy-043 1bbc1c805d Spreadsheet: fix Split Cell name in context menu 2025-09-11 12:32:23 -05:00
Samuel Abels 2168e3cd99 CAM: Add AssetManager.copy() and .deepcopy()
CAM: Add copy/paste support for the ToolBitBrowser

CAM: Move library dropdown and sort order combo to dedicated row to give them more space

CAM: Fix: PathAssetManagerTest failed

CAM: Add YamlSerializer

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

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

CAM: Fix CodeQL complaints

CAM: add LibraryProperties dialog

CAM: Replace the LibraryEditor

CAM: allow for editing tool number in the tool editor dialog

CAM: Remember last selected library and sort order in preferences

CAM: support natural sort order in tool and library lists

CAM: Fix CodeQL complaints

CAM: Fix: not all attributes included in YAML serialization

CAM: Fix: UTF8 chars not included in LinuxCNC export

Fix: tool library not displayed when loading it for the first time

CAM: Fix: custom shape class not found

CAM: Check dependencies on import for friendlier error messages

CAM: Open file dialogs in home by default

CAM: Show "All Tools" entry in library list in the library editor

CAM: fix: error on sorting tools with no tool number

CAM: Fix: traceback if library contained tool number as string

CAM: Fix: Linter errors in manager.py

CAM: Fix: separator between library and tool buttons

CAM: Add drag & drop support to the library editor

CAM: Fix numerous linter errors on the AssetManager

CAM: Show current library in library editor window title

CAM: Add dedicated icons for library add + remove

CAM: Support F2 key in library editor

CAM: library editor handles delete key when library list is in focus; focus search field by default

CAM: fix: tool list in dock initially not loading

CAM: Fix: library editor did not open from "all tools" list

CAM: Increase precision of parameters in tool summary to 3 digits

fix TestToolBitListWidget
2025-09-11 10:45:41 -05:00
marioalexis a4ca9a0526 Fem: Fix regression in netgentools 2025-09-11 10:21:08 -05:00
PaddleStroke d5929bcdbf PartDesign: NewSketch: fix crash when no body 2025-09-11 16:23:48 +02:00
Roy-043 a4b659fcbf Spreadsheet: message box titles to Title Case (#23842) 2025-09-11 14:45:37 +02:00
George Peden ed444318e4 Fix inconsistent keyboard shortcut hints in Rectangle tool
- Add missing U (rounded corners) and J (frame) hints to ThreePoints method
- Add missing U (rounded corners) and J (frame) hints to CenterAnd3Points method
- Now all four construction methods show consistent keyboard shortcut hints
- Addresses Copilot feedback on PR
2025-09-10 20:40:18 -10:00
George Peden 343bd6c77c Add keyboard shortcuts to fillet/chamfer hints
- M key for switching between Fillet and Chamfer modes
- U key for toggling preserve corner option
- Hints are shown in all states (SeekFirst, SeekSecond, End)
- Addresses issue #23815 for missing keyboard shortcuts in hints
2025-09-10 19:59:49 -10:00
George Peden 80290baaf6 Add mode-aware keyboard shortcuts to B-spline hints
- Control Points mode: U/J for degree control (+ degree, - degree)
- Knots mode: R for periodic toggle
- Hints are now context-aware based on construction method
- Addresses issue #23815 for missing keyboard shortcuts in hints
2025-09-10 19:34:53 -10:00
George Peden d524b9ceef Add M (Mode) keyboard shortcut to arc slot hints
- Add switchModeHint constant with M key
- Include mode shortcut in all arc slot states (SeekFirst through SeekFourth)
- Addresses issue #23815 for missing keyboard shortcuts in hints
2025-09-10 19:13:15 -10:00
George Peden 23ea8ce37b Add U (rounded corners) and J (frame) keyboard shortcuts to rectangle hints
- Add roundedCornersHint and frameHint constants
- Include U and J shortcuts in all rectangle construction method states
- Addresses issue #23815 for missing keyboard shortcuts in hints
2025-09-10 19:08:59 -10:00
Roy-043 770f769b1f Draft: fix issue with ContinueMode 2025-09-10 22:30:26 -05:00
Ryan Kembrey 7a0b93cabe TechDraw: Fix spreadsheet incorrect render due to cell merges 2025-09-10 22:28:20 -05:00
Chris Hennes 3d65ae46d5 Merge pull request #23746 from 3x380V/cmake
CMake: Use scoped include and library directories
2025-09-10 21:54:51 -05:00
PaddleStroke d8640019e5 Assembly: Fix simulation crash with limits 2025-09-10 21:54:20 -05:00
FEA-eng 3df7bb34bf Update CommandFilter.cpp 2025-09-10 21:52:50 -05:00
wandererfan f2ac9e2baa [TD]fix TheoreticalExact frame color 2025-09-10 21:50:59 -05:00
FEA-eng 689740d3d3 Sketcher: Remove redundant title case from task panel option of the Mirror tool (#23822)
* Sketcher: Update DrawSketchHandlerSymmetry.h

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-10 18:07:42 +00:00
dependabot[bot] 0b5552f375 Bump github/issue-metrics from 3.23.0 to 3.23.1
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.23.0 to 3.23.1.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/63da87a2ab16c720cf9199a73c11f56a42f39cd4...6fa9041b3ea7b6a9dafbdc388d25d86d06b2b6af)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.23.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 12:40:14 -05:00
dependabot[bot] 6483675405 Bump step-security/harden-runner from 2.13.0 to 2.13.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/ec9f2d5744a09debf3a187a3f4f675c53b671911...f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 12:39:56 -05:00
PaddleStroke aef10a1bc8 PartDesign: Extrude: Fix twoLength/uptoshape broken (#23812)
* PartDesign: Extrude: Fix twoLength/uptoshape broken

* Update FeaturePocket.cpp

* Update FeatureExtrude.cpp

* fix test
2025-09-10 19:12:02 +02:00
PaddleStroke 8aa527119b Core: Add btn_rotate.svg (#23781)
* Core: Add btn_rotate.svg

* Add files via upload

* Update resource.qrc
2025-09-10 15:35:35 +02:00
FEA-eng 2073ccf8e2 Update DlgSettings3DView.ui 2025-09-10 10:43:48 +02:00
Ladislav Michl 8e7e9c4bbc Gui: check for null document name
Make the check for null document name more obvious.
2025-09-10 10:08:04 +02:00
Chris Hennes 58a8d589a7 Update translations 2025-09-09 2025-09-10 08:53:41 +02:00
Ladislav Michl ea9cdfd962 Py3.13: Initialize field tp_versions_used 2025-09-10 08:49:31 +02:00
wmayer 692d40916a Py3.13: Disable Py_UNICODE support in PyCXX 2025-09-10 08:49:30 +02:00
Kacper Donat 0677982c8b Gui: Fix segfault in ViewProviderPlane::getRole 2025-09-10 06:16:02 +02:00
David Kaufman 874fe54053 [CAM] migrate old tools to new system 2025-09-09 11:49:55 -04:00
PaddleStroke 02479a1528 PartDesign: FeatureExtrude fix symmetric + custom dir 2025-09-09 15:25:00 +02:00
marioalexis d1dae5af1c Fem: Fix Gmsh preferences file chooser 2025-09-09 07:30:10 -03:00
marioalexis 1ee3992436 Fem: Fix Elmer preferences file chooser 2025-09-09 07:30:01 -03:00
marioalexis 31ff4124f2 Fem: Fix Mystran preferences file chooser 2025-09-09 07:29:56 -03:00
marioalexis 9efc0d77a0 Fem: Fix Z88 preferences file chooser 2025-09-09 07:29:51 -03:00
marioalexis 344f93c2da Fem: Fix CalculiX preferences file chooser 2025-09-08 23:47:20 -03:00
wmayer b1a37aebbb CMake: Replace link_directories with target_link_directories 2025-09-08 19:04:38 +02:00
wmayer 93db4c7d8a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
David Kaufman 24c382232a [CAM] re-enable adaptive profile mode 2025-09-07 10:55:24 -04:00
David Kaufman 1182e38fd1 [CAM] add missing migration from intermediate version for lead in/out dressup 2025-09-07 09:38:36 -04:00
Ryan Kembrey 415fa0a415 TechDraw: Fix center marks not showing 2025-09-07 23:15:32 +10:00
Pascal de Bruijn 839ccb5e3a CAM: PocketShape defaults to Offset and 50% StepOver 2025-09-07 14:35:50 +02:00
Kacper Donat 288255f074 Gui: Disallow dragging features outside of body 2025-09-07 01:26:14 +02:00
Kacper Donat 5fbe1b66a8 Gui: Add handling for BaseFeatures outside of Body edge case 2025-09-07 01:25:24 +02:00
Pieter Hijma 459a8bc4c8 Gui: Adjust size of the Add Property dialog 2025-09-03 15:33:45 +02:00
Pieter Hijma 66df6b39c8 Gui: Select the VarSet when clicking Std_VarSet
To make clear which VarSet is being added to, the VarSet is being
selected.
2025-09-03 11:51:14 +02:00
Pieter Hijma 550aac53a7 Gui: Improve adding multiple properties
This is based on a review of the DWG suggesting to remove the checkbox
for adding multiple properties and change the Ok button to an Add
button.

To make the impact of an extra click to cancel adding properties, the
Cancel button is the default right after adding a property (which
already disabled the Ok/Add button).
2025-09-03 11:51:14 +02:00
Pieter Hijma 93a73d55e1 Gui: Move DlgAddPropertyVarSet -> DlgAddProperty 2025-09-03 11:50:49 +02:00
Pieter Hijma 37e8a753b6 Gui: Disallow adding props to multiple objects
This commit is in preparation for switching the old Add Property dialog
to the Add Property VarSet dialog.  For now, this dialog does not handle
adding properties for multiple objects.
2025-09-03 10:24:54 +02:00
Pieter Hijma 65a8597ad8 Gui: Generalize add property VarSet dialog
This commit ensures that the adding properties does not work only for
VarSets, but also for generic property containers.
2025-09-03 10:21:07 +02:00
Pieter Hijma 35cd20bb17 Gui: Simplify title Add Property VarSet dialog 2025-09-03 10:21:07 +02:00
Ryan Kembrey a8d8d59f2e TechDraw: Fix regression in hiding vertices 2025-09-03 16:17:25 +10:00
tarman3 d2f5dcebc2 CAM: Create stock height 1 mm for flat objects 2025-09-02 20:50:44 +03:00
Pieter Hijma cf15c637b8 Gui: Process minor review comments
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2025-09-01 15:32:36 +02:00
Pieter Hijma bc406bee68 Gui: Add editing a property tooltip
This commit adds a way to edit the tooltip of a property in the Property
View.
2025-08-31 17:42:06 +02:00
Chris Hennes c4da72f55e CAM: Eliminate C++11 compiler warning by explicitly defaulting copy 2025-08-28 18:30:56 -05:00
Chris Hennes ff1932d550 FEM: remove unused variable from handlePropertyChange 2025-08-28 18:30:55 -05:00
Chris Hennes ece6353bd7 Part: Rename layout to avoid conflict 2025-08-28 18:30:55 -05:00
Chris Hennes acf9827891 PD: Remove unused parameter from *ReferenceSelection 2025-08-28 18:30:55 -05:00
Chris Hennes 780c49b6f0 Sketcher: Remove unused parameter from *ReferenceSelection 2025-08-28 18:30:55 -05:00
Chris Hennes 545dadab4d Gui: Remove unused variable from fuzzyMatch() 2025-08-28 18:30:22 -05:00
Chris Hennes 3f85cf14d3 Gui: For Qt 6.5 and later, use ParseOptions in xml 2025-08-28 18:30:22 -05:00
Chris Hennes 4be6a64abb Part: Remove unused arguments from isLinearEdge 2025-08-28 18:30:22 -05:00
Syres916 e86fbd0689 [CAM] Fix SetupSheet form table minimum height to be 300px 2025-08-13 12:34:25 +01:00
jffmichi e12b4fd27c CAM: select rows instead of cells in drilling panel 2025-07-15 21:09:16 +02:00
Dan Taylor a7f1b96c45 [CAM] Correctly process Adaptive extensions as faces instead of shells (fix 22177) 2025-07-04 14:51:55 -05:00
papaathome fc92b2ba90 Update PathUtils.py
Removed typo ('.') at line 838
2025-06-04 17:28:46 +02:00
papaathome 047e39389f CAM: Update PathUtils.py
Proposed fix for `CAM: 3Dsurface, rotational path, difference between X/A and Y/B paths #21556`
2025-06-04 09:50:02 +02:00
Stephen Green c8c63a4099 Fix for https://github.com/FreeCAD/FreeCAD/issues/21533 2025-05-25 22:12:13 -04:00
6205 changed files with 730162 additions and 1223178 deletions
+76 -49
View File
@@ -1,22 +1,22 @@
# Generated from CLion C/C++ Code Style settings
# --- Based on Qt Coding Style ---
BasedOnStyle: LLVM
# --- Bracket and Indentation Behavior ---
IndentWidth: 4
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
TabWidth: 4
ColumnLimit: 100
UseTab: Never
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AlignAfterOpenBracket: BlockIndent
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BinPackArguments: false
BreakBeforeBraces: Custom
BreakTemplateDeclarations: Yes
BreakBeforeBinaryOperators: All
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
@@ -31,41 +31,68 @@ BraceWrapping:
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeColon
ColumnLimit: 100
CompactNamespaces: false
ContinuationIndentWidth: 4
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
InsertBraces: true
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
PointerAlignment: Left
ReflowComments: true
SortIncludes: Never
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: false
# --- Special: Lambdas and Short Things ---
AllowShortFunctionsOnASingleLine: None
AllowShortBlocksOnASingleLine: Never
AllowShortEnumsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: Inline
AllowAllArgumentsOnNextLine: false
# --- Spaces ---
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: false
Cpp11BracedListStyle: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
SpaceAfterTemplateKeyword: false
SpaceBeforeInheritanceColon: false
# --- Alignment & Formatting Tweaks ---
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignOperands: DontAlign
BreakConstructorInitializers: BeforeComma
PointerAlignment: Left
ReferenceAlignment: Left
# --- Comment Style ---
CommentPragmas: '^ IWYU pragma:'
# --- Namespace handling ---
NamespaceIndentation: None
# --- Others ---
SortIncludes: Never
IncludeBlocks: Preserve
MaxEmptyLinesToKeep: 2
IndentCaseLabels: true
InsertBraces: true
AlignEscapedNewlines: DontAlign
PPIndentWidth: 1
IndentPPDirectives: AfterHash
ReflowComments: true
# --- Penalties (Fine-tuning when to break lines) ---
PenaltyBreakAssignment: 80
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 60
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakOpenParenthesis: 5
PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 600
+3 -1
View File
@@ -102,4 +102,6 @@ c5c2ea3498f402c0c89916c46ddb071e22756622 # Assembly: Final application of pre-co
d472927bba7b2d8d151c99fb29cf1d8dd099ea7d # Correct PartDesign Helix feature negative angles (#11399)
b93c02e07da4990482b9d927506901e6f5d624e1 # Black updated to 24.3.0
cbea6b60942f8327e6105b12e8c1d5db4647984c # FEM: Apply pre-commit to FEM files
f9d66096878c7d89c273522b9ca57bdb14fee3bc # Rearranged CommandCreateGeo.cpp
f9d66096878c7d89c273522b9ca57bdb14fee3bc # Rearranged CommandCreateGeo.cpp
b23d5809414d63ea90bcc744212c126645051438 # BIM: add to pre-commit and apply Black formatting
50e4864efb06faf3e2126e8cb9ff9058a08a54b2 # Draft: add to pre-commit and apply Black formatting
-1
View File
@@ -1,7 +1,6 @@
# These are supported funding model platforms
github: FreeCAD
liberapay: FreeCAD
open_collective: freecad
patreon: # Replace with a single Patreon username
ko_fi: # Replace with a single Ko-fi username
+1 -2
View File
@@ -6,8 +6,7 @@
"owner": "msvc-problem-matcher",
"pattern": [
{
"regexp":
"^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
+168
View File
@@ -0,0 +1,168 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later
"""
run_gui_tests.py
List registered tests via `FreeCAD -t`, filter for GUI tests (names containing 'Gui'), and run each
GUI test module using the specified FreeCAD executable.
Usage:
run_gui_tests.py [FREECAD_EXEC]
If FREECAD_EXEC is omitted the script falls back to 'FreeCAD' on PATH.
If FREECAD_EXEC is a directory containing bin/FreeCAD, that binary is used.
If FREECAD_EXEC is an executable path, it is used directly.
This script returns 0 if all GUI modules run successfully. Otherwise it returns the last non-zero
exit code.
"""
from __future__ import annotations
import sys
import subprocess
import os
from pathlib import Path
def find_executable(arg: str | None) -> str:
"""Return the FreeCAD executable path to use.
If `arg` is None or empty, returns the plain name 'FreeCAD' which will be looked up on PATH. If
`arg` is a directory and contains `bin/FreeCAD` that binary will be returned. If `arg` is a file
path it is returned as-is. Otherwise the original argument is returned.
Common use cases: use the FreeCAD binary from a build directory or an installed FreeCAD prefix.
"""
if not arg:
return "FreeCAD"
p = Path(arg)
if p.is_dir():
candidate = p / "bin" / "FreeCAD"
if candidate.exists():
return str(candidate)
if p.is_file():
return str(p)
# fallback: return as-is (may be on PATH)
return arg
def validate_executable(path: str) -> tuple[bool, str]:
"""Return (ok, message). Checks if the executable exists or is likely on PATH.
This is best effort: if a bare name is given (e.g. 'FreeCAD') we can't stat it here, so we
accept it but warn. If the path points to a file, we check executability. Also warn if the name
looks like the CLI-only 'FreeCADCmd'.
"""
p = Path(path)
if p.is_file():
if not os.access(str(p), os.X_OK):
return False, f"File exists but is not executable: {path}"
if p.name.endswith("FreeCADCmd"):
return (
True,
(
"Warning: executable looks like 'FreeCADCmd' (CLI); GUI tests require the GUI "
"binary 'FreeCAD'."
),
)
return True, ""
# Bare name or non-existent path: accept but warn
if p.name.endswith("FreeCADCmd"):
return (
True,
(
"Warning: executable name looks like 'FreeCADCmd' (CLI); GUI tests require the GUI "
"binary 'FreeCAD'."
),
)
return True, ""
def run_and_capture(cmd: list[str]) -> tuple[int, str]:
"""Run `cmd` and return (returncode, combined stdout+stderr string).
If the executable is not found a return code of 127 is returned and a small error string is
provided as output to aid diagnosis.
"""
try:
proc = subprocess.run(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, check=False
)
return proc.returncode, proc.stdout
except FileNotFoundError:
return 127, f"Executable not found: {cmd[0]}\n"
def parse_registered_tests(output: str) -> list[str]:
"""Parse output from `FreeCAD -t` and return a list of registered test unit names.
The function looks for the section starting with the literal 'Registered test units:' and
then collects non-empty, stripped lines from that point onwards as test names.
"""
lines = output.splitlines()
tests: list[str] = []
started = False
for ln in lines:
if not started:
if "Registered test units:" in ln:
started = True
continue
s = ln.strip()
if not s:
# allow blank lines but keep going
continue
tests.append(s)
return tests
def main(argv: list[str]) -> int:
"""Entry point: run GUI test modules registered in the FreeCAD executable.
Returns the last non-zero exit code from any GUI test module, or 0 on success.
"""
exec_arg = argv[1] if len(argv) > 1 else None
freecad_exec = find_executable(exec_arg)
print(f"Using FreeCAD executable: {freecad_exec}")
ok, msg = validate_executable(freecad_exec)
if msg:
print(msg, file=sys.stderr)
if not ok:
print(f"Aborting: invalid FreeCAD executable: {freecad_exec}", file=sys.stderr)
return 3
code, out = run_and_capture([freecad_exec, "-t"])
if code != 0:
print(
f"Warning: listing tests returned exit code {code}; attempting to parse output anyway",
file=sys.stderr,
)
tests = parse_registered_tests(out)
if not tests:
print("No registered tests found; exiting with success.")
return 0
gui_tests = [t for t in tests if "Gui" in t]
if not gui_tests:
print("No GUI tests found in registered tests; nothing to run.")
return 0
print("Found GUI test modules:")
for t in gui_tests:
print(" ", t)
last_rc = 0
for mod in gui_tests:
print(f"\nRunning GUI tests for module: {mod}")
rc, out = run_and_capture([freecad_exec, "-t", mod])
print(out)
if rc != 0:
print(f"Module {mod} exited with code {rc}", file=sys.stderr)
last_rc = rc
return last_rc
if __name__ == "__main__":
sys.exit(main(sys.argv))
+2 -2
View File
@@ -58,7 +58,7 @@ jobs:
logdir: /tmp/log/
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -108,7 +108,7 @@ jobs:
done
- name: Upload logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ github.job }}-Logs
path: |
@@ -21,13 +21,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: '🧹 Tag & close stale unconfirmed bugs'
id: stale_issues
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 60
@@ -53,7 +53,7 @@ jobs:
- name: '🧹 Close stale requested feedback issues'
id: awaiting_issues
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 20
@@ -80,7 +80,7 @@ jobs:
- name: '🧹 Tag & close inactive issues'
id: inactive_issues
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 190
@@ -110,7 +110,7 @@ jobs:
- name: '🧹 Tag & close inactive PRs'
id: inactive_pr
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: -1
+1 -1
View File
@@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Create backport pull requests
uses: korthout/backport-action@ca4972adce8039ff995e618f5fc02d1b7961f27a # v3.3.0
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
with:
# Inputs documented here: https://github.com/korthout/backport-action?tab=readme-ov-file#inputs
github_token: ${{ github.token }}
+1 -1
View File
@@ -64,7 +64,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+2 -2
View File
@@ -68,7 +68,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -156,7 +156,7 @@ jobs:
sarif_file: sarif-results/cpp.sarif
- name: Upload loc as a Build Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: sarif-results
path: sarif-results
+2 -2
View File
@@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: 'Checkout Repository'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4
+30
View File
@@ -0,0 +1,30 @@
name: Fedora Daily Build
permissions:
contents: read
on:
schedule:
- cron: "00 00 * * *"
workflow_dispatch:
jobs:
trigger-copr-build:
env:
copr_token: ${{ secrets.COPR_TOKEN }}
runs-on: ubuntu-latest
container: quay.io/packit/packit
steps:
- name: setup copr token
run: |
mkdir -p ~/.config
echo "$copr_token" > ~/.config/copr
- name: checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 500
fetch-tags: true
- name: Setup safe Git directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: trigger copr build
run: |
packit build in-copr --project freecad
@@ -0,0 +1,67 @@
name: Fetch Crowdin Translations
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
update-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0
- name: Install Qt ≥ 6.8
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
with:
aqtversion: "==3.1.*"
version: "6.8.3"
host: "linux"
target: "desktop"
arch: "linux_gcc_64"
- name: Setup Python & dependencies
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
with:
python-version: "3.13"
- name: Install Python packages
run: |
python3 -m pip install --upgrade pip
pip install pyside6
- name: Gather translations from crowdin
run: |
./updatecrowdin.py build
while ./updatecrowdin.py build-status | grep -q "status: inProgress"; do sleep 10; done
./updatecrowdin.py download
./updatecrowdin.py install
working-directory: ./src/Tools
env:
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
CROWDIN_PROJECT_ID: freecad
- name: Commit changes
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add src
git commit -m "Update translations from Crowdin" || echo "No changes to commit"
- name: Push changes to a new branch
run: |
git branch update-crowdin-translations
git push origin update-crowdin-translations --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
with:
branch: update-crowdin-translations
title: "Update translations from Crowdin"
body: "Automatic Crowdin update."
labels: "translations, automated"
delete-branch: true
add-paths: |
src
+3 -3
View File
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -35,13 +35,13 @@ jobs:
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@63da87a2ab16c720cf9199a73c11f56a42f39cd4 # v3.23.0
uses: github/issue-metrics@637a24e71b78bc10881e61972b19ea9ff736e14a # v3.25.2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:FreeCAD/FreeCAD is:issue created:${{ env.last_month }}'
- name: Create issue
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
with:
title: Monthly issue metrics report
token: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -0,0 +1,42 @@
name: Push Crowdin Translations
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
update-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0
- name: Install Qt ≥ 6.8
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
with:
aqtversion: "==3.1.*"
version: "6.8.3"
host: "linux"
target: "desktop"
arch: "linux_gcc_64"
- name: Setup Python & dependencies
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
with:
python-version: "3.13"
- name: Install Python packages
run: |
python3 -m pip install --upgrade pip
pip install pyside6
- name: Push translations to Crowdin
run: |
./updatecrowdin.py gather
./updatecrowdin.py upload
working-directory: ./src/Tools
env:
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
CROWDIN_PROJECT_ID: freecad
+3 -3
View File
@@ -36,7 +36,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -46,7 +46,7 @@ jobs:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
@@ -68,7 +68,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: SARIF file
path: results.sarif
+7 -7
View File
@@ -75,7 +75,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -116,15 +116,15 @@ jobs:
mkdir -p ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
- uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
pixi-version: v0.48.1
pixi-version: v0.59.0
cache: false
- name: Restore Compiler Cache
id: cache-restore
if: always()
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
@@ -209,14 +209,14 @@ jobs:
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ inputs.artifactBasename }}-${{ matrix.os }}-Logs
path: |
@@ -225,7 +225,7 @@ jobs:
- name: Upload report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ env.reportfilename }}
path: |
+9 -7
View File
@@ -77,7 +77,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -116,7 +116,7 @@ jobs:
- name: Restore Compiler Cache
id: cache-restore
if: always()
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
@@ -173,7 +173,8 @@ jobs:
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on build dir"
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
# Use Python wrapper to run only GUI-registered tests with the built FreeCAD executable
testCommand: xvfb-run python3 ./.github/scripts/run_gui_tests.py "${{ env.builddir }}"
logFile: ${{ env.logdir }}TestGUIBuild.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
@@ -207,21 +208,22 @@ jobs:
uses: ./.github/workflows/actions/runPythonTests
with:
testDescription: "GUI tests on install"
testCommand: xvfb-run FreeCAD -t 0
# Use Python wrapper to run only GUI-registered tests using the installed FreeCAD
testCommand: xvfb-run python3 ./.github/scripts/run_gui_tests.py "FreeCAD"
logFile: ${{ env.logdir }}TestGUIInstall.log
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
@@ -230,7 +232,7 @@ jobs:
- name: Upload report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ env.reportfilename }}
path: |
+4 -4
View File
@@ -66,7 +66,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -99,7 +99,7 @@ jobs:
- name: Restore compiler cache
id: cache-restore
if: always()
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
@@ -157,14 +157,14 @@ jobs:
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
+3 -3
View File
@@ -198,7 +198,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -355,7 +355,7 @@ jobs:
- name: Upload logs and fixes
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
@@ -364,7 +364,7 @@ jobs:
- name: Upload report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ env.reportfilename }}
path: |
+3 -3
View File
@@ -81,7 +81,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -180,14 +180,14 @@ jobs:
echo "" >> $GITHUB_OUTPUT
- name: Upload logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
- name: Upload report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ env.reportfilename }}
path: |
+4 -4
View File
@@ -14,7 +14,7 @@ jobs:
build_tag: ${{ steps.tag_build.outputs.build_tag }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -72,7 +72,7 @@ jobs:
environment: weekly-build
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
@@ -104,9 +104,9 @@ jobs:
fetch-tags: true
submodules: 'recursive'
- uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
- uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
pixi-version: v0.48.1
pixi-version: v0.59.0
cache: false
- name: Install the Apple certificate and provisioning profile
+1 -1
View File
@@ -54,7 +54,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
+1
View File
@@ -1,5 +1,6 @@
# file types to ignore
.*
!/.packit.yaml
!/.clang-format
!/.clang-tidy
!/.git-blame-ignore-revs
+68
View File
@@ -0,0 +1,68 @@
specfile_path: package/fedora/freecad.spec
files_to_sync:
- .packit.yaml
actions:
post-upstream-clone:
- bash -c 'BUILD_TAG=dev /usr/bin/python3 package/rattler-build/scripts/make_version_file.py freecad_version.txt'
- rm -f freecad-sources.tar.gz
changelog-entry:
- bash -c 'git log --no-merges --pretty="format:- %s (%an)" $(git describe --tags --abbrev=0 )..HEAD -- |sed 's/%/%%/g''
create-archive:
- git submodule update --init
- bash -c 'git ls-files --recurse-submodules | tar -caf freecad-sources.tar.gz -T-'
- echo -n 'freecad-sources.tar.gz'
downstream_package_name: freecad
additional_packages:
- python3
jobs:
- job: copr_build
identifier: pull_request
trigger: pull_request
notifications:
pull_request:
successful_build: True
branch: main
additional_repos:
- copr://bpostle/IfcOpenShell
manual_trigger: true
targets:
fedora-stable:
without_opts:
- debug_info
fedora-development:
without_opts:
- debug_info
- job: tests
identifier: pull_request
trigger: pull_request
branch: main
manual_trigger: true
targets:
fedora-latest-stable:
without_opts:
- debug_info
fmf_path: package/fedora/tests
- job: copr_build
identifier: main
trigger: commit
manual_trigger: true
branch: main
additional_repos:
- copr://bpostle/IfcOpenShell
owner: freecad
project: nightly
- job: copr_build
identifier: release
trigger: release
owner: freecad
project: freecad
additional_repos:
- copr://bpostle/IfcOpenShell
targets:
fedora-all:
without_opts:
- tests
+15 -7
View File
@@ -6,20 +6,24 @@ files: |
(?x)^(
.github|
src/Base|
src/Gui|
src/Main|
src/Tools|
tests/src|
src/Mod/Assembly|
src/Mod/BIM|
src/Mod/CAM|
src/Mod/Cloud|
src/Mod/Draft|
src/Mod/Fem|
src/Mod/Help|
src/Mod/Import|
src/Mod/Inspection|
src/Mod/JtReader|
src/Mod/Measure|
src/Mod/Mesh|
src/Mod/MeshPart|
src/Mod/Mesh|
src/Mod/PartDesign|
src/Mod/Part|
src/Mod/Plot|
src/Mod/Points|
src/Mod/ReverseEngineering|
@@ -31,7 +35,8 @@ files: |
src/Mod/Surface|
src/Mod/Test|
src/Mod/Tux|
src/Mod/Web
src/Mod/Web|
tests/src
)
exclude: |
(?x)^(
@@ -44,12 +49,15 @@ exclude: |
src/Gui/3Dconnexion/navlib|
src/Gui/QSint|
src/Gui/Quarter|
src/Mod/Fem/femexamples|
src/Mod/Import/App/SCL|
src/Mod/Import/App/SCL_output|
src/Mod/Mesh/App/TestData|
src/Mod/Mesh/App/WildMagic4|
src/Mod/Robot/App/kdl_cp|
src/Mod/Robot/Lib
src/Mod/Robot/Lib|
.*\.ts$|
.*\.brep$
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -60,12 +68,12 @@ repos:
- id: check-yaml
- id: check-added-large-files
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: 8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # frozen: 25.1.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 2892f1f81088477370d4fbc56545c05d33d2493f # frozen: 25.11.0
hooks:
- id: black
args: ['--line-length', '100']
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 86fdcc9bd34d6afbbd29358b97436c8ffe3aa3b2 # frozen: v21.1.0
rev: 317810f3c6a0ad3572367dc86cb6e41863e16e08 # frozen: v21.1.5
hooks:
- id: clang-format
+139 -1
View File
@@ -307,6 +307,144 @@
"value": "OFF"
}
}
}
},
{
"name": "rpm",
"description": "Settings like rpm build",
"displayName": "rpm",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/rpm",
"cacheVariables": {
"CMAKE_INSTALL_DATAROOTDIR": {
"type": "PATH",
"value": "/usr/share"
},
"CMAKE_C_FLAGS_RELEASE": {
"type": "STRING",
"value": "-DNDEBUG"
},
"CMAKE_CXX_FLAGS_RELEASE": {
"type": "STRING",
"value": "-DNDEBUG"
},
"CMAKE_Fortran_FLAGS_RELEASE": {
"type": "STRING",
"value": "-DNDEBUG"
},
"CMAKE_VERBOSE_MAKEFILE": {
"type": "BOOL",
"value": "ON"
},
"CMAKE_INSTALL_DO_STRIP": {
"type": "BOOL",
"value": "OFF"
},
"CMAKE_INSTALL_PREFIX": {
"type": "PATH",
"value": "/usr/lib64/freecad"
},
"CMAKE_INSTALL_FULL_SBINDIR": {
"type": "PATH",
"value": "/usr/bin"
},
"CMAKE_INSTALL_SBINDIR": {
"type": "PATH",
"value": "bin"
},
"INCLUDE_INSTALL_DIR": {
"type": "PATH",
"value": "/usr/include"
},
"LIB_INSTALL_DIR": {
"type": "PATH",
"value": "/usr/lib64"
},
"SYSCONF_INSTALL_DIR": {
"type": "PATH",
"value": "/etc"
},
"SHARE_INSTALL_PREFIX": {
"type": "PATH",
"value": "/usr/share"
},
"LIB_SUFFIX": {
"type": "STRING",
"value": "64"
},
"BUILD_SHARED_LIBS": {
"type": "BOOL",
"value": "ON"
},
"CMAKE_INSTALL_DOCDIR": {
"type": "PATH",
"value": "/usr/share/doc/freecad"
},
"CMAKE_INSTALL_INCLUDEDIR": {
"type": "PATH",
"value": "/usr/include"
},
"RESOURCEDIR": {
"type": "PATH",
"value": "/usr/share/freecad"
},
"FREECAD_USE_EXTERNAL_PIVY": {
"type": "BOOL",
"value": "TRUE"
},
"FREECAD_USE_EXTERNAL_FMT": {
"type": "BOOL",
"value": "TRUE"
},
"FREECAD_USE_PCL": {
"type": "BOOL",
"value": "OFF"
},
"FREECAD_QT_VERSION": {
"type": "STRING",
"value": "6"
},
"OpenGL_GL_PREFERENCE": {
"type": "STRING",
"value": "GLVND"
},
"USE_OCC": {
"type": "BOOL",
"value": "TRUE"
},
"PYCXX_INCLUDE_DIR": {
"type": "PATH",
"value": "/usr/include"
},
"PYCXX_SOURCE_DIR": {
"type": "PATH",
"value": "/usr/src/CXX"
},
"ENABLE_DEVELOPER_TESTS": {
"type": "BOOL",
"value": "TRUE"
},
"FREECAD_USE_EXTERNAL_GTEST": {
"type": "BOOL",
"value": "TRUE"
},
"ONDSELSOLVER_BUILD_EXE": {
"type": "BOOL",
"value": "TRUE"
},
"BUILD_GUI": {
"type": "BOOL",
"value": "TRUE"
}
},
"environment": {
"CC": "gcc",
"CXX": "g++",
"LT_SYS_LIBRARY_PATH": "/usr/lib64:",
"CCACHE_PROGRAM": "/usr/bin/ccache",
"CFLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer",
"CXXFLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer",
"LDFLAGS": "-Wl,--as-needed -Wl,--no-undefined"
}
}
]
}
+1 -1
View File
@@ -57,7 +57,7 @@ The FreeCAD Contribution Process is expressed here with the following specific g
9. A PR MUST compile cleanly and pass project self-tests on all target platforms.
10. Changes that break python API used by extensions SHALL be avoided. If it is not possible to avoid breaking changes, the amount of them MUST be minimized and PR MUST clearly describe all breaking changes with clear description on how to replace no longer working solution with newer one. Contributor SHOULD search for addons that will be broken and list them in the PR.
11. Each commit message in a PR MUST succinctly explain what the commit achieves. The commit message SHALL follow the suggestions in the `git commit --help` documentation, section DISCUSSION.
12. The PR message MUST consist of a single short line, the PR Title, summarizing the problem being solved, followed by a blank line and then the proposed solution in the Body. If a PR consists of more than one commit, the PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
12. The PR Title MUST succinctly explain what the PR achieves. The Body MAY be as detailed as needed. If a PR changes the user interface (UI), the body of the text MUST include a presentation of these UI changes, preferably with screenshots of the previous and revised state.
13. If a PR contains the work of another author (for example, if it is cherry-picked from a fork by someone other than the PR-submitter):
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;
+121 -98
View File
@@ -1,113 +1,125 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991 Free Software Foundation, Inc.
51 Franklin Street - Fifth Floor
Boston, MA 02110-1301, USA.
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
@@ -134,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -146,7 +158,7 @@ Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
@@ -204,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
@@ -255,8 +267,8 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
@@ -283,23 +295,31 @@ of these things:
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
@@ -309,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
@@ -348,9 +368,9 @@ Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
@@ -391,7 +411,7 @@ excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
@@ -402,7 +422,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
@@ -412,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -435,8 +455,9 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
@@ -455,7 +476,7 @@ convey the exclusion of warranty; and each file should have at least the
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -464,7 +485,8 @@ convey the exclusion of warranty; and each file should have at least the
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
Also add information on how to contact you by electronic and paper mail.
@@ -473,7 +495,8 @@ school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
+1 -1
View File
@@ -10,7 +10,7 @@
[Blog](https://blog.freecad.org)
[![Release](https://img.shields.io/github/release/freecad/freecad.svg)](https://github.com/freecad/freecad/releases/latest) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad) [![Liberapay](https://img.shields.io/liberapay/receives/FreeCAD.svg?logo=liberapay)](https://liberapay.com/FreeCAD)
[![Release](https://img.shields.io/github/release/freecad/freecad.svg)](https://github.com/freecad/freecad/releases/latest) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad)
<img src="/.github/images/partdesign.png" width="800"/>
+20 -9
View File
@@ -23,16 +23,27 @@ if(NOT Eigen3_FIND_VERSION)
endif(NOT Eigen3_FIND_VERSION)
macro(_eigen3_check_version)
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
# file Version exists from Eigen3 5.0.0
if (EXISTS "${EIGEN3_INCLUDE_DIR}/Eigen/Version")
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/Version" _eigen3_version_header)
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_PATCH_VERSION[ \t]+([0-9]+)" _eigen3_patch_version_match "${_eigen3_version_header}")
set(EIGEN3_PATCH_VERSION "${CMAKE_MATCH_1}")
set(EIGEN3_VERSION ${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}.${EIGEN3_PATCH_VERSION})
else()
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
endif()
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK FALSE)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
@@ -22,7 +22,7 @@ macro(CheckInterModuleDependencies)
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER BUILD_TECHDRAW)
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
REQUIRES_MODS(BUILD_FEM BUILD_PART)
REQUIRES_MODS(BUILD_IMPORT BUILD_PART)
REQUIRES_MODS(BUILD_IMPORT BUILD_PART BUILD_PART_DESIGN)
REQUIRES_MODS(BUILD_INSPECTION BUILD_MESH BUILD_POINTS BUILD_PART)
REQUIRES_MODS(BUILD_JTREADER BUILD_MESH)
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH)
@@ -24,11 +24,7 @@ macro(InitializeFreeCADBuildOptions)
option(INSTALL_TO_SITEPACKAGES "If ON the freecad root namespace (python) is installed into python's site-packages" ON)
option(INSTALL_PREFER_SYMLINKS "If ON then fc_copy_sources macro will create symlinks instead of copying files" OFF)
option(OCCT_CMAKE_FALLBACK "disable usage of occt-config files" OFF)
if (WIN32 OR APPLE)
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
else()
option(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." ON)
endif()
option(FREECAD_USE_QT_DIALOGS "Use Qt's dialogs instead of the native one." OFF)
# == Win32 is default behaviour use the LibPack copied in Source tree ==========
if(MSVC)
+1 -1
View File
@@ -3,7 +3,7 @@ macro(SetupBoost)
set(_boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS})
set (BOOST_COMPONENTS program_options regex system thread date_time)
set (BOOST_COMPONENTS program_options regex thread date_time)
find_package(Boost ${BOOST_MIN_VERSION}
COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
+5 -41
View File
@@ -18,8 +18,12 @@ MACRO (fc_copy_sources target_name outpath)
foreach(it ${ARGN})
get_filename_component(infile ${it} ABSOLUTE)
get_filename_component(outfile "${outpath}/${it}" ABSOLUTE)
# Ensure parent directory exists when copying or creating symlinks
get_filename_component(outfile_dir "${outfile}" PATH)
add_file_dependencies("${infile}" "${outfile}")
ADD_CUSTOM_COMMAND(
# Make sure destination directory exists before copy/symlink
COMMAND "${CMAKE_COMMAND}" -E make_directory "${outfile_dir}"
COMMAND "${CMAKE_COMMAND}" -E ${copy_command} "${infile}" "${outfile}"
OUTPUT "${outfile}"
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
@@ -211,47 +215,6 @@ macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE)
endmacro(generate_from_any)
MACRO(ADD_MSVC_PRECOMPILED_HEADER TargetName PrecompiledHeader PrecompiledSource SourcesVar)
IF(MSVC)
GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
IF(MSVC_IDE)
SET(PrecompiledBinary "$(IntDir)\\$(TargetName).pch")
ELSE(MSVC_IDE)
SET(PrecompiledBinary ${CMAKE_CURRENT_BINARY_DIR}/${TargetName}.pch)
ENDIF(MSVC_IDE)
SET(Sources ${${SourcesVar}})
SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource}
PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\""
OBJECT_OUTPUTS "${PrecompiledBinary}")
SET_SOURCE_FILES_PROPERTIES(${Sources}
PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeader}\" /FI\"${PrecompiledBinary}\" /Fp\"${PrecompiledBinary}\""
OBJECT_DEPENDS "${PrecompiledBinary}")
# Add precompiled header to SourcesVar
LIST(APPEND ${SourcesVar} ${PrecompiledSource})
ENDIF(MSVC)
ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER)
MACRO(GET_MSVC_PRECOMPILED_SOURCE PrecompiledSource SourcesVar)
IF(MSVC)
FOREACH (it ${ARGN})
GET_FILENAME_COMPONENT(file_ext ${it} EXT)
GET_FILENAME_COMPONENT(file_name ${it} NAME)
STRING(COMPARE EQUAL ${it} ${PrecompiledSource} pch)
IF (NOT pch)
# get c++ source files
STRING(REGEX MATCH "^(.cpp|.cc|.cxx)$" cpp_file ${file_ext})
# ignore any generated source files from Qt
STRING(REGEX MATCH "^(moc_|qrc_|ui_)" gen_file ${file_name})
IF(cpp_file AND NOT gen_file)
LIST(APPEND ${SourcesVar} ${it})
ENDIF(cpp_file AND NOT gen_file)
ENDIF(NOT pch)
ENDFOREACH (it)
ENDIF(MSVC)
ENDMACRO(GET_MSVC_PRECOMPILED_SOURCE)
# Macro to replace all the binary output locations. Takes 2 optional parameters.
# ${ARGVN} is zero based so the 3rd element is ${ARGV2}. When the 3rd element is missing,
# Runtime and Lib directories default to /bin and /lib. When present, the 3rd element
@@ -364,3 +327,4 @@ function(target_compile_warn_error ProjectName)
target_compile_options(${ProjectName} PRIVATE -Werror)
endif()
endfunction()
Binary file not shown.
+3 -1
View File
@@ -8,6 +8,9 @@ SET(Examples_Files
FEMExample.FCStd
AssemblyExample.FCStd
ArchDetail.FCStd
FCPAT.pat
osifont.license
osifont-lgpl3fe.ttf
)
ADD_CUSTOM_TARGET(Example_data ALL
@@ -132,4 +135,3 @@ INSTALL(
DESTINATION
${CMAKE_INSTALL_DATADIR}/examples
)
+23
View File
@@ -0,0 +1,23 @@
; standard PAT patterns
*Diamond, 45 diagonals L & R, Solid, 1.0 mm separation
45,0,0,0,1.0
-45,0,0,0,1.0
*Diamond2, 45 diagonals L & R, Solid, 2.0 mm separation
45,0,0,0,2.0
-45,0,0,0,2.0
*Diamond4, 45 diagonals L & R, Solid, 4.0 mm separation
45,0,0,0,4.0
-45,0,0,0,4.0
*Diagonal4, 45 diagonal R, Solid, 4.0 mm separation
45,0,0,0,4.0
*Diagonal5, 45 diagonal L, Solid, 4.0 mm separation
-45,0,0,0,4.0
*Square, square grid, Solid, 5.0 mm separation
90,1,1,0,5.0
0,0,0,1,5.0
*Horizontal5, horizontal lines, Solid 5.0 separation
0,0,0,0,5.0
*Vertical5, vertical lines, Solid, 5.0 separation
90,0,0,0,5.0
Binary file not shown.
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
osifont license:
osifont-lgpl3fe.ttf is used under one or more of the following licenses:
- GNU GPL licence version 3 with GPL font exception,
- GNU GPL licence version 2 with GPL font exception,
- GNU LGPL licence version 3 with GPL font exception.
https://github.com/hikikomori82/osifont/
+239 -281
View File
@@ -1,109 +1,67 @@
# This package depends on automagic byte compilation
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3
%global py_bytecompile 1
# Some configuration options for other environments
# rpmbuild --without=bundled_zipios: don't use bundled version of zipios++
%bcond_without bundled_zipios
# rpmbuild --with=bundled_pycxx: use bundled version of pycxx
%bcond_with bundled_pycxx
# rpmbuild --without=bundled_smesh: don't use bundled version of Salome's Mesh
%bcond_without bundled_smesh
# rpmbuild --without=bundled_gtest: don't use bundled version of gtest and gmock
%bcond_with bundled_gtest
# rpmbuild --without=tests exclude tests in %%check
%bcond_without tests
# rpmbuild --without=debug_info don't generate package with debug info
%bcond_without debug_info
Name: freecad
Epoch: 1
Version: 1.1.0~dev
Release: 1%{?dist}
Summary: A general purpose 3D CAD modeler
Group: Applications/Engineering
License: LGPL-2.0-or-later
URL: https://www.freecad.org/
Source0: freecad-sources.tar.gz
# Setup python target for shiboken so the right cmake file is imported.
%global py_suffix %(%{__python3} -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))")
# Maintainers: keep this list of plugins up to date
# List plugins in %%{_libdir}/%{name}/lib, less '.so' and 'Gui.so', here
%global plugins AssemblyApp AssemblyGui CAMSimulator DraftUtils Fem FreeCAD Import Inspection MatGui Materials Measure Mesh MeshPart Part PartDesignGui Path PathApp PathSimulator Points QtUnitGui ReverseEngineering Robot Sketcher Spreadsheet Start Surface TechDraw Web _PartDesign area flatmesh libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libOndselSolver libSMDS libSMESH libSMESHDS libStdMeshers libarea-native
# List plugins in %%{_libdir}/%%{name}/lib, less '.so' and 'Gui.so', here
%global plugins AssemblyApp AssemblyGui CAMSimulator DraftUtils Fem FreeCAD Import Inspection MatGui Materials Measure Mesh MeshPart Part PartDesignGui Path PathApp PathSimulator Points QtUnitGui ReverseEngineering Robot Sketcher Spreadsheet Start Surface TechDraw Web _PartDesign area flatmesh libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libSMDS libSMESH libSMESHDS libStdMeshers libarea-native
# Some configuration options for other environments
# rpmbuild --with=bundled_zipios: use bundled version of zipios++
%global bundled_zipios %{?_with_bundled_zipios: 1} %{?!_with_bundled_zipios: 1}
# rpmbuild --with=bundled_pycxx: use bundled version of pycxx
%global bundled_pycxx %{?_with_bundled_pycxx: 1} %{?!_with_bundled_pycxx: 0}
# rpmbuild --without=bundled_smesh: don't use bundled version of Salome's Mesh
%global bundled_smesh %{?_without_bundled_smesh: 0} %{?!_without_bundled_smesh: 1}
# Prevent RPM from doing its magical 'build' directory for now
%global __cmake_in_source_build 0
%global exported_libs libOndselSolver
# See FreeCAD-main/src/3rdParty/salomesmesh/CMakeLists.txt to find this out.
%global bundled_smesh_version 7.7.1.0
# Some plugins go in the Mod folder instead of lib. Deal with those here:
%global mod_plugins Mod/PartDesign
%define name freecad
%define github_name FreeCAD
%define branch main
Name: %{name}
Epoch: 1
Version: 1.1.0
Release: pre_{{{git_commit_no}}}%{?dist}
Summary: A general purpose 3D CAD modeler
Group: Applications/Engineering
License: LGPLv2+
URL: https://www.freecad.org/
Source0: {{{ git_repo_pack }}}
#add all submodule as source
Source1: {{{ git_pack path=$GIT_ROOT/src/3rdParty/OndselSolver/ dir_name="OndselSolver" }}}
Source2: {{{ git_pack path=$GIT_ROOT/src/3rdParty/GSL/ dir_name="GSL" }}}
Source3: {{{ git_pack path=$GIT_ROOT/src/Mod/AddonManager/ dir_name="AddonManager" }}}
# See /src/3rdParty/PyCXX/CXX/Version.h to find this out.
%global bundled_pycxx_version 7.1.9
# See /src/3rdParty/OndselSolver/CMakeLists.txt to find this out.
%global bundled_ondsel_solver_version 1.0.1
# Utilities
BuildRequires: cmake gcc-c++ gettext
BuildRequires: doxygen swig graphviz
BuildRequires: gcc-gfortran
BuildRequires: desktop-file-utils
BuildRequires: git
BuildRequires: tbb-devel
BuildRequires: cmake gcc-c++ gettext doxygen swig graphviz gcc-gfortran desktop-file-utils tbb-devel ninja-build strace
%if %{with tests}
BuildRequires: xorg-x11-server-Xvfb python3-typing-extensions
%if %{without bundled_gtest}
BuildRequires: gtest-devel gmock-devel
%endif
%endif
# Development Libraries
BuildRequires: freeimage-devel
BuildRequires: libXmu-devel
BuildRequires: mesa-libEGL-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: opencascade-devel
BuildRequires: Coin4-devel
BuildRequires: python3-devel
BuildRequires: python3-matplotlib
BuildRequires: python3-pivy
BuildRequires: boost-devel
BuildRequires: eigen3-devel
BuildRequires: qt6-qtsvg-devel
BuildRequires: qt6-qttools-static
BuildRequires: fmt-devel
BuildRequires: xerces-c
BuildRequires: xerces-c-devel
BuildRequires: libspnav-devel
BuildRequires: python3-shiboken6-devel
BuildRequires: python3-pyside6-devel
BuildRequires: pyside6-tools
%if ! %{bundled_smesh}
BuildRequires:boost-devel Coin4-devel eigen3-devel freeimage-devel fmt-devel libglvnd-devel libicu-devel libspnav-devel libXmu-devel med-devel mesa-libEGL-devel mesa-libGLU-devel netgen-mesher-devel netgen-mesher-devel-private opencascade-devel openmpi-devel python3 python3-devel python3-matplotlib python3-pivy python3-pybind11 python3-pyside6-devel python3-shiboken6-devel pyside6-tools qt6-qttools-static qt6-qtsvg-devel vtk-devel xerces-c-devel yaml-cpp-devel
#pcl-devel
%if %{without bundled_smesh}
BuildRequires: smesh-devel
%endif
BuildRequires: netgen-mesher-devel
BuildRequires: netgen-mesher-devel-private
%if ! %{bundled_zipios}
%if %{without bundled_zipios}
BuildRequires: zipios++-devel
%endif
%if ! %{bundled_pycxx}
%if %{without bundled_pycxx}
BuildRequires: python3-pycxx-devel
%endif
BuildRequires: python3-pybind11
BuildRequires: libicu-devel
BuildRequires: vtk-devel
BuildRequires: openmpi-devel
BuildRequires: med-devel
BuildRequires: libkdtree++-devel
BuildRequires: pcl-devel
BuildRequires: python3
BuildRequires: libglvnd-devel
BuildRequires: yaml-cpp-devel
#BuildRequires: zlib-devel
# For appdata
%if 0%{?fedora}
BuildRequires: libappstream-glib
@@ -115,38 +73,31 @@ Requires: %{name}-data = %{epoch}:%{version}-%{release}
# Obsolete old doc package since it's required for functionality.
Obsoletes: %{name}-doc < 0.22-1
Requires: hicolor-icon-theme
Requires: hicolor-icon-theme fmt python3-matplotlib python3-pivy python3-collada python3-pyside6 qt6-assistant python3-typing-extensions python3-defusedxml
Requires: fmt
Requires: python3-pivy
Requires: python3-matplotlib
Requires: python3-collada
Requires: python3-pyside6
Requires: qt6-assistant
%if %{bundled_smesh}
%if %{with bundled_smesh}
Provides: bundled(smesh) = %{bundled_smesh_version}
%endif
%if %{bundled_pycxx}
Provides: bundled(python-pycxx)
%if %{with bundled_pycxx}
Provides: bundled(python-pycxx) = %{bundled_pycxx_version}
%endif
Recommends: python3-pysolar
Provides: bundled(libondselsolver) = %{bundled_ondsel_solver_version}
Recommends: python3-pysolar IfcOpenShell-python3
# plugins and private shared libs in %%{_libdir}/freecad/lib are private;
# prevent private capabilities being advertised in Provides/Requires
%define plugin_regexp /^\\\(libFreeCAD.*%(for i in %{plugins}; do echo -n "\\\|$i\\\|$iGui"; done)\\\)\\\(\\\|Gui\\\)\\.so/d
%{?filter_setup:
%filter_provides_in %{_libdir}/%{name}/lib
%filter_from_requires %{plugin_regexp}
%filter_from_provides %{plugin_regexp}
%filter_provides_in %{_libdir}/%{name}/Mod
%filter_requires_in %{_libdir}/%{name}/Mod
%filter_setup
}
%global plugin_exclude %( for i in %{plugins}; do echo -n "\|$i\(Gui\)\?"; done )
# prevent declaring Requires for internal FreeCAD libraries
%global lib_exclude %( for i in %{exported_libs}; do echo -n "\|$i"; done )
%global __requires_exclude_from ^%{_libdir}/%{name}/(lib|Mod)/.*
%global __provides_exclude_from ^%{_libdir}/%{name}/Mod/.*
%global __provides_exclude ^(libFreeCAD.*%{plugin_exclude})\.so.*
%global __requires_exclude ^(libFreeCAD.*%{plugin_exclude}%{lib_exclude})\.so.*
%description
FreeCAD is a general purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler, aimed
@@ -165,204 +116,211 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
%description data
Data files for FreeCAD
%package libondselsolver-devel
Summary: Development file for OndselSolver
BuildArch: noarch
Requires: %{name} = %{epoch}:%{version}-%{release}
%description libondselsolver-devel
Development file for OndselSolver
#path that contain main FreeCAD sources for cmake
%global tests_resultdir %{_datadir}/%{name}/tests_result/%{_arch}
%if %{without debug_info}
%global debug_package %{nil}
%global _enable_debug_packages 0
%endif
%prep
rm -rf %{github_name}
# extract submodule archive and move in correct path
%setup -T -a 1 -c -q -D -n %{github_name}/src/3rdParty/ #OndselSolver
%setup -T -a 2 -c -q -D -n %{github_name}/src/3rdParty/ #GSL
%setup -T -a 3 -c -q -D -n %{github_name}/src/Mod/ #AddonManager
%setup -T -b 0 -q -D -n %{github_name}
# Remove bundled pycxx if we're not using it
%if ! %{bundled_pycxx}
rm -rf src/CXX
%endif
%if ! %{bundled_zipios}
rm -rf src/zipios++
#sed -i "s/zipios-config.h/zipios-config.hpp/g" \
# src/Base/Reader.cpp src/Base/Writer.h
%endif
# Removed bundled libraries
%setup -T -a 0 -q -c -n FreeCAD-1.0.2
%build
rm -rf build && mkdir build && cd build
# Deal with cmake projects that tend to link excessively.
LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS
# Deal with cmake projects that tend to link excessively.
CXXFLAGS='-Wno-error=cast-function-type'; export CXXFLAGS
LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS
# -DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \
# -DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \
%define MEDFILE_INCLUDE_DIRS %{_includedir}/med/
%cmake \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-DRESOURCEDIR=%{_datadir}/%{name} \
-DFREECAD_USE_EXTERNAL_PIVY=TRUE \
-DFREECAD_USE_EXTERNAL_FMT=TRUE \
-DFREECAD_USE_PCL:BOOL=OFF \
-DFREECAD_QT_VERSION:STRING=6 \
-DOpenGL_GL_PREFERENCE=GLVND \
-DUSE_OCC=TRUE \
%if %{without bundled_pycxx}
-DPYCXX_INCLUDE_DIR=$(pkg-config --variable=includedir PyCXX) \
-DPYCXX_SOURCE_DIR=$(pkg-config --variable=srcdir PyCXX) \
%endif
%if %{without bundled_smesh}
-DFREECAD_USE_EXTERNAL_SMESH=TRUE \
%endif
%if %{without bundled_zipios}
-DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE \
%endif
%if %{with tests}
-DENABLE_DEVELOPER_TESTS=TRUE \
%if %{without bundled_gtest}
-DFREECAD_USE_EXTERNAL_GTEST=TRUE \
%else
-DINSTALL_GTEST=OFF \
-DINSTALL_GMOCK=OFF \
%endif
%else
-DENABLE_DEVELOPER_TESTS=FALSE \
%endif
-DONDSELSOLVER_BUILD_EXE=TRUE \
-DBUILD_GUI=TRUE \
-G Ninja
%cmake \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
-DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-DRESOURCEDIR=%{_datadir}/%{name} \
-DFREECAD_USE_EXTERNAL_PIVY=TRUE \
-DFREECAD_USE_EXTERNAL_FMT=TRUE \
-DFREECAD_USE_PCL:BOOL=OFF \
-DFREECAD_QT_VERSION:STRING=6 \
-DSHIBOKEN_INCLUDE_DIR=%{_includedir}/shiboken6 \
-DSHIBOKEN_LIBRARY=-lshiboken6.%{py_suffix} \
-DPYTHON_SUFFIX=.%{py_suffix} \
-DPYSIDE_INCLUDE_DIR=/usr/include/PySide6 \
-DPYSIDE_LIBRARY=-lpyside6.%{py_suffix} \
-DPython3_EXECUTABLE:FILEPATH=/usr/bin/python3 \
-DMEDFILE_INCLUDE_DIRS=%{MEDFILE_INCLUDE_DIRS} \
-DOpenGL_GL_PREFERENCE=GLVND \
-DCOIN3D_INCLUDE_DIR=%{_includedir}/Coin4 \
-DCOIN3D_DOC_PATH=%{_datadir}/Coin4/Coin \
-DUSE_OCC=TRUE \
%if ! %{bundled_smesh}
-DFREECAD_USE_EXTERNAL_SMESH=TRUE \
-DSMESH_FOUND=TRUE \
-DSMESH_INCLUDE_DIR=%{_includedir}/smesh \
-DSMESH_DIR=`pwd`/../cMake \
%endif
%if ! %{bundled_zipios}
-DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE \
%endif
%if ! %{bundled_pycxx}
-DPYCXX_INCLUDE_DIR=$(pkg-config --variable=includedir PyCXX) \
-DPYCXX_SOURCE_DIR=$(pkg-config --variable=srcdir PyCXX) \
%endif
-DPACKAGE_WCREF="%{release} (Git)" \
-DPACKAGE_WCURL="git://github.com/%{github_name}/FreeCAD.git main" \
-DENABLE_DEVELOPER_TESTS=FALSE \
-DBUILD_GUI=TRUE \
../
%cmake_build
make fc_version
for I in src/Build/Version.h src/Build/Version.h.out; do
sed -i 's,FCRevision \"Unknown\",FCRevision \"%{release} (Git)\",' $I
sed -i 's,FCRepositoryURL \"Unknown\",FCRepositoryURL \"git://github.com/FreeCAD/FreeCAD.git main\",' $I
done
%{make_build}
%install
cd build
%make_install
%cmake_install
# Symlink binaries to /usr/bin
mkdir -p %{buildroot}%{_bindir}
ln -s ../%{_lib}/%{name}/bin/FreeCAD %{buildroot}%{_bindir}/FreeCAD
ln -s ../%{_lib}/%{name}/bin/FreeCADCmd %{buildroot}%{_bindir}/FreeCADCmd
# Symlink binaries to /usr/bin
mkdir -p %{buildroot}%{_bindir}
ln -s ../%{_lib}/%{name}/bin/FreeCAD %{buildroot}%{_bindir}/FreeCAD
ln -s ../%{_lib}/%{name}/bin/FreeCADCmd %{buildroot}%{_bindir}/FreeCADCmd
mkdir %{buildroot}%{_metainfodir}/
mv %{buildroot}%{_libdir}/%{name}/share/metainfo/* %{buildroot}%{_metainfodir}/
# Remove header from external library that's erroneously installed
rm -rf %{buildroot}%{_libdir}/%{name}/include/E57Format
rm -rf %{buildroot}%{_includedir}/gmock
rm -rf %{buildroot}%{_includedir}/gtest
mkdir %{buildroot}%{_datadir}/applications/
mv %{buildroot}%{_libdir}/%{name}/share/applications/* %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}%{_datadir}/thumbnailers/
mv %{buildroot}%{_libdir}/%{name}/share/thumbnailers/* %{buildroot}%{_datadir}/thumbnailers/
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/
mv %{buildroot}%{_libdir}/%{name}/share/icons/hicolor/scalable/* %{buildroot}%{_datadir}/icons/hicolor/scalable/
mkdir -p %{buildroot}%{_datadir}/pixmaps/
mv %{buildroot}%{_libdir}/%{name}/share/pixmaps/* %{buildroot}%{_datadir}/pixmaps/
mkdir -p %{buildroot}%{_datadir}/mime/packages/
mv %{buildroot}%{_libdir}/%{name}/share/mime/packages/* %{buildroot}%{_datadir}/mime/packages/
pushd %{buildroot}%{_libdir}/%{name}/share/
rmdir metainfo/
rmdir applications/
rm -rf mime
rm -rf icons
popd
# Remove obsolete Start_Page.html
rm -f %{buildroot}%{_docdir}/%{name}/Start_Page.html
# Remove header from external library that's erroneously installed
rm -f %{buildroot}%{_libdir}/%{name}/include/E57Format/E57Export.h
rm -rf %{buildroot}%{_includedir}/OndselSolver/*
rm -f %{buildroot}%{_libdir}/%{name}/share/pkgconfig/OndselSolver.pc
# Bug maintainers to keep %%{plugins} macro up to date.
#
# Make sure there are no plugins that need to be added to plugins macro
new_plugins=`ls %{buildroot}%{_libdir}/%{name}/%{_lib} | sed -e '%{plugin_regexp}'`
if [ -n "$new_plugins" ]; then
echo -e "\n\n\n**** ERROR:\n" \
"\nPlugins not caught by regexp: " $new_plugins \
"\n\nPlugins in %{_libdir}/%{name}/lib do not exist in" \
"\nspecfile %%{plugins} macro. Please add these to" \
"\n%%{plugins} macro at top of specfile and rebuild.\n****\n" 1>&2
exit 1
fi
# Make sure there are no entries in the plugins macro that don't match plugins
for p in %{plugins}; do
if [ -z "`ls %{buildroot}%{_libdir}/%{name}/%{_lib}/$p*.so`" ]; then
set +x
echo -e "\n\n\n**** ERROR:\n" \
"\nExtra entry in %%{plugins} macro with no matching plugin:" \
"'$p'.\n\nPlease remove from %%{plugins} macro at top of" \
"\nspecfile and rebuild.\n****\n" 1>&2
exit 1
fi
done
# Bytecompile Python modules
%py_byte_compile %{__python3} %{buildroot}%{_libdir}/%{name}
rm -rf %{buildroot}%{_libdir}/%{name}/%{_lib}/cmake
rm -rf %{buildroot}%{_libdir}/%{name}/%{_lib}/pkgconfig
#Move files using `-DCMAKE_INSTALL_DATAROOTDIR=%%{_datadir}` break ctest
mkdir -p %{buildroot}%{_datadir}
mv %{buildroot}%{_libdir}/freecad/share/applications %{buildroot}%{_datadir}/
mkdir -p %{buildroot}%{_metainfodir}
mv %{buildroot}%{_libdir}/freecad/share/metainfo/* %{buildroot}%{_metainfodir}/
mkdir -p %{buildroot}%{_datadir}
mv %{buildroot}%{_libdir}/freecad/share/icons %{buildroot}%{_datadir}/
mv %{buildroot}%{_libdir}/freecad/share/pixmaps %{buildroot}%{_datadir}/
mv %{buildroot}%{_libdir}/freecad/share/mime %{buildroot}%{_datadir}/
mv %{buildroot}%{_libdir}/freecad/share/thumbnailers %{buildroot}%{_datadir}/
mv %{buildroot}%{_libdir}/freecad/share/pkgconfig %{buildroot}%{_datadir}/
%check
desktop-file-validate \
%{buildroot}%{_datadir}/applications/org.freecad.FreeCAD.desktop
%{?fedora:appstream-util validate-relax --nonet \
%{buildroot}%{_metainfodir}/*.metainfo.xml}
%if %{with tests}
mkdir -p %{buildroot}%tests_resultdir
if %ctest -E '^QuantitySpinBox_Tests_run$' &> %{buildroot}%tests_resultdir/ctest.result ; then
echo "ctest OK"
else
echo "**** Failed ctest ****"
touch %{buildroot}%tests_resultdir/ctest.failed
fi
if xvfb-run \%ctest -R '^QuantitySpinBox_Tests_run$' &>> %{buildroot}%tests_resultdir/ctest_gui.result ; then
echo "ctest gui OK"
else
echo "**** Failed ctest gui ****"
touch %{buildroot}%tests_resultdir/ctest_gui.failed
fi
%endif
desktop-file-validate %{buildroot}%{_datadir}/applications/org.freecad.FreeCAD.desktop
%{?fedora:appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml}
# Bug maintainers to keep %%{plugins} macro up to date.
#
# Make sure there are no plugins that need to be added to plugins macro
%define plugin_regexp /^\\\(libFreeCAD.*%(for i in %{plugins}; do echo -n "\\\|$i"; done)\\\)\\\(\\\|Gui\\\)\\.so/d
%define exported_libs_regexp /^\\\(%(for i in %{exported_libs}; do echo -n "\\\|$i"; done)\\\)\\.so/d
new_plugins=`ls %{buildroot}%{_libdir}/%{name}/%{_lib} | sed -e '%{plugin_regexp}' -e '%exported_libs_regexp'`
if [ -n "$new_plugins" ]; then
echo -e "\n\n\n**** ERROR:\n" \
"\nPlugins not caught by regexps:" \
"\n" $new_plugins \
"\n\nPlugins in %{_libdir}/%{name}/lib do not exist in" \
"\nspecfile %%{plugins} or %%{exported_libs_regexp} macro." \
"\nPlease add these to %%{plugins} or %%{exported_libs}" \
"\nmacro at top of specfile" \
"\nand rebuild.\n****\n" 1>&2
exit 1
fi
# Make sure there are no entries in the plugins macro that don't match plugins
for p in %{plugins}; do
if [ -z "`ls %{buildroot}%{_libdir}/%{name}/%{_lib}/$p*.so`" ]; then
set +x
echo -e "\n\n\n**** ERROR:\n" \
"\nExtra entry in %%{plugins} macro with no matching plugin:" \
"'$p'.\n\nPlease remove from %%{plugins} macro at top of" \
"\nspecfile and rebuild.\n****\n" 1>&2
exit 1
fi
done
# Make sure there are no entries in the exported_libs_regexp macro that don't match plugins
for d in %{exported_libs}; do
if [ -z "`ls %{buildroot}%{_libdir}/%{name}/%{_lib}/$d*.so`" ]; then
set +x
echo -e "\n\n\n**** ERROR:\n" \
"\nExtra entry in %%{exported_libs} macro with no matching lib:" \
"'$d'.\n\nPlease remove from %%{exported_libs} macro at top of" \
"\nspecfile and rebuild.\n****\n" 1>&2
exit 1
fi
done
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor/scalable/apps &>/dev/null || :
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor/scalable/apps &>/dev/null || :
%files
%{_bindir}/*
%{_metainfodir}/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/bin/
%{_libdir}/%{name}/%{_lib}/
%{_libdir}/%{name}/Ext/
%{_libdir}/%{name}/Mod/
%{_libdir}/%{name}/share/
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*
%{_datadir}/pixmaps/*
%{_datadir}/mime/packages/*
%{_datadir}/thumbnailers/*
#find a way to configure in cmake with %%name to avoid conflict with different package name
%{python3_sitelib}/freecad/*
%if %{with tests}
%tests_resultdir/*
%endif
%{_bindir}/*
%{_metainfodir}/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/bin/
%{_libdir}/%{name}/%{_lib}/
%{_libdir}/%{name}/Ext/
%{_libdir}/%{name}/Mod/
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/scalable/*
%{_datadir}/pixmaps/*
%{_datadir}/mime/packages/*
%{_datadir}/thumbnailers/*
%{_libdir}/../lib/python*/site-packages/%{name}/*
%files data
%{_datadir}/%{name}/
%{_docdir}/%{name}/LICENSE.html
%{_docdir}/%{name}/ThirdPartyLibraries.html
%{_datadir}/%{name}/
%{_docdir}/%{name}/LICENSE.html
%{_docdir}/%{name}/ThirdPartyLibraries.html
%files libondselsolver-devel
%{_datadir}/pkgconfig/OndselSolver.pc
%{_includedir}/OndselSolver/*
%changelog
* Mon Mar 10 2025 Leif-Jöran Olsson <info@friprogramvarusyndikatet.se> - 1.1.0-1
- Adding support for building with Qt6 and PySide6 for Fedora 40+
-3
View File
@@ -1,3 +0,0 @@
[rpkg]
auto_pack = False
user_macros = "${git_props:root}/rpkg.macros"
+1
View File
@@ -0,0 +1 @@
1
+1
View File
@@ -0,0 +1 @@
!/.fmf/
+12
View File
@@ -0,0 +1,12 @@
/ctest :
test: |
cat /usr/share/freecad/tests_result/`uname -m`/ctest.result
if [ -f /usr/share/freecad/tests_result/`uname -m`/ctest.failed ]; then
exit 1
fi
/ctest_gui :
test: |
cat /usr/share/freecad/tests_result/`uname -m`/ctest_gui.result
if [ -f /usr/share/freecad/tests_result/`uname -m`/ctest_gui.failed ]; then
exit 1
fi
+42
View File
@@ -0,0 +1,42 @@
/tests:
/TestAssemblyWorkbench :
test: /usr/bin/FreeCADCmd -t TestAssemblyWorkbench
/TestArch :
test: /usr/bin/FreeCADCmd -t TestArch
/TestCAMApp :
test: /usr/bin/FreeCADCmd -t TestCAMApp
/TestDraft :
test: /usr/bin/FreeCADCmd -t TestDraft
/TestFemApp :
test: /usr/bin/FreeCADCmd -t TestFemApp
/TestMaterialsApp :
test: /usr/bin/FreeCADCmd -t TestMaterialsApp
/MeshTestsApp :
test: /usr/bin/FreeCADCmd -t MeshTestsApp
/TestPartApp :
test: /usr/bin/FreeCADCmd -t TestPartApp
/TestPartDesignApp :
test: /usr/bin/FreeCADCmd -t TestPartDesignApp
/TestSketcherApp :
test: /usr/bin/FreeCADCmd -t TestSketcherApp
/TestSpreadsheet :
test: /usr/bin/FreeCADCmd -t TestSpreadsheet
/TestSurfaceApp :
test: /usr/bin/FreeCADCmd -t TestSurfaceApp
/TestTechDrawApp :
test: /usr/bin/FreeCADCmd -t TestTechDrawApp
/BaseTests :
test: /usr/bin/FreeCADCmd -t BaseTests
/UnitTests :
test: /usr/bin/FreeCADCmd -t UnitTests
/Document :
test: /usr/bin/FreeCADCmd -t Document
/Metadata :
test: /usr/bin/FreeCADCmd -t Metadata
/StringHasher :
test: /usr/bin/FreeCADCmd -t StringHasher
/UnicodeTests :
test: /usr/bin/FreeCADCmd -t UnicodeTests
/TestPythonSyntax :
test: /usr/bin/FreeCADCmd -t TestPythonSyntax
+74
View File
@@ -0,0 +1,74 @@
/tests:
/TestAssemblyWorkbench :
test: xvfb-run /usr/bin/FreeCAD -t TestAssemblyWorkbench
/TestArch :
test: xvfb-run /usr/bin/FreeCAD -t TestArch
/TestCAMApp :
test: xvfb-run /usr/bin/FreeCAD -t TestCAMApp
/TestDraft :
test: xvfb-run /usr/bin/FreeCAD -t TestDraft
/TestFemApp :
test: xvfb-run /usr/bin/FreeCAD -t TestFemApp
/TestMaterialsApp :
test: xvfb-run /usr/bin/FreeCAD -t TestMaterialsApp
/MeshTestsApp :
test: xvfb-run /usr/bin/FreeCAD -t MeshTestsApp
/TestPartApp :
test: xvfb-run /usr/bin/FreeCAD -t TestPartApp
/TestPartDesignApp :
test: xvfb-run /usr/bin/FreeCAD -t TestPartDesignApp
/TestSketcherApp :
test: xvfb-run /usr/bin/FreeCAD -t TestSketcherApp
/TestSpreadsheet :
test: xvfb-run /usr/bin/FreeCAD -t TestSpreadsheet
/TestSurfaceApp :
test: xvfb-run /usr/bin/FreeCAD -t TestSurfaceApp
/TestTechDrawApp :
test: xvfb-run /usr/bin/FreeCAD -t TestTechDrawApp
/BaseTests :
test: xvfb-run /usr/bin/FreeCAD -t BaseTests
/UnitTests :
test: xvfb-run /usr/bin/FreeCAD -t UnitTests
/Document :
test: xvfb-run /usr/bin/FreeCAD -t Document
/Metadata :
test: xvfb-run /usr/bin/FreeCAD -t Metadata
/StringHasher :
test: xvfb-run /usr/bin/FreeCAD -t StringHasher
/UnicodeTests :
test: xvfb-run /usr/bin/FreeCAD -t UnicodeTests
/TestPythonSyntax :
test: xvfb-run /usr/bin/FreeCAD -t TestPythonSyntax
/TestArchGui :
test: xvfb-run /usr/bin/FreeCAD -t TestArchGui
/TestCAMGui :
test: xvfb-run /usr/bin/FreeCAD -t TestCAMGui
/TestDraftGui :
test: xvfb-run /usr/bin/FreeCAD -t TestDraftGui
/TestFemGui :
test: xvfb-run /usr/bin/FreeCAD -t TestFemGui
/TestImportGui :
test: xvfb-run /usr/bin/FreeCAD -t TestImportGui
/TestMaterialsGui :
test: xvfb-run /usr/bin/FreeCAD -t TestMaterialsGui
/TestOpenSCADGui :
test: xvfb-run /usr/bin/FreeCAD -t TestOpenSCADGui
/TestPartGui :
test: xvfb-run /usr/bin/FreeCAD -t TestPartGui
/TestPartDesignGui :
test: xvfb-run /usr/bin/FreeCAD -t TestPartDesignGui
/TestSketcherGui :
test: xvfb-run /usr/bin/FreeCAD -t TestSketcherGui
/TestTechDrawGui :
test: xvfb-run /usr/bin/FreeCAD -t TestTechDrawGui
/Workbench :
test: xvfb-run /usr/bin/FreeCAD -t Workbench
/Menu :
test: xvfb-run /usr/bin/FreeCAD -t Menu
/Menu.MenuDeleteCases :
test: xvfb-run /usr/bin/FreeCAD -t Menu.MenuDeleteCases
/Menu.MenuCreateCases :
test: xvfb-run /usr/bin/FreeCAD -t Menu.MenuCreateCases
/GuiDocument :
test: xvfb-run /usr/bin/FreeCAD -t GuiDocument
+10
View File
@@ -0,0 +1,10 @@
summary:
Run All FreeCAD python tests
prepare:
how: install
package:
- xorg-x11-server-Xvfb
discover:
how: fmf
execute:
how: tmt
+4
View File
@@ -0,0 +1,4 @@
summary: Run All FreeCADCmd python tests
test: /usr/bin/FreeCADCmd -v
require: /usr/bin/FreeCADCmd
duration: 1m
-1
View File
@@ -36,6 +36,5 @@ if %ERRORLEVEL% neq 0 exit 1
ninja -C build install
if %ERRORLEVEL% neq 0 exit 1
rmdir /s /q "%LIBRARY_PREFIX%\doc"
ren %LIBRARY_PREFIX%\bin\FreeCAD.exe freecad.exe
ren %LIBRARY_PREFIX%\bin\FreeCADCmd.exe freecadcmd.exe
+1
View File
@@ -140,6 +140,7 @@ requirements:
- blinker
- calculix
- debugpy
- defusedxml
- docutils
- gmsh
- graphviz
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
set -x
set -x
conda_env="fc_env"
@@ -46,6 +46,8 @@ cp -a ${conda_env}/Library/data ${copy_dir}/data
cp -a ${conda_env}/Library/Ext ${copy_dir}/Ext
cp -a ${conda_env}/Library/lib ${copy_dir}/lib
cp -a ${conda_env}/Library/Mod ${copy_dir}/Mod
mkdir -p ${copy_dir}/doc
cp -a ${conda_env}/Library/doc/{ThirdPartyLibraries.html,LICENSE.html} ${copy_dir}/doc
rm -rf ${conda_env}/bin_tmp
# Apply Patches
+1
View File
@@ -53,6 +53,7 @@ packages=(
pyqt5-dev-tools
pyside2-tools
python3-dev
python3-defusedxml
python3-git
python3-markdown
python3-matplotlib
+16
View File
@@ -63,6 +63,7 @@ environments:
- conda: https://conda.anaconda.org/conda-forge/linux-64/dav1d-1.2.1-hd590300_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-64/dbus-1.16.2-h3c4dab8_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-64/debugpy-1.8.15-py311hc665b79_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/defusedxml-0.7.1-pyhd8ed1ab_0.tar.bz2
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.0-pyhd8ed1ab_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/docutils-0.21.2-pyhd8ed1ab_1.conda
- conda: https://conda.anaconda.org/conda-forge/linux-64/double-conversion-3.3.1-h5888daf_0.conda
@@ -489,6 +490,7 @@ environments:
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/dav1d-1.2.1-h31becfc_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/dbus-1.16.2-heda779d_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/debugpy-1.8.15-py311h8e4e6a5_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/defusedxml-0.7.1-pyhd8ed1ab_0.tar.bz2
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.0-pyhd8ed1ab_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/docutils-0.21.2-pyhd8ed1ab_1.conda
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/double-conversion-3.3.1-h5ad3122_0.conda
@@ -903,6 +905,7 @@ environments:
- conda: https://conda.anaconda.org/conda-forge/osx-64/dav1d-1.2.1-h0dc2134_0.conda
- conda: https://conda.anaconda.org/conda-forge/osx-64/dbus-1.16.2-h27bd348_0.conda
- conda: https://conda.anaconda.org/conda-forge/osx-64/debugpy-1.8.15-py311hc651eee_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/defusedxml-0.7.1-pyhd8ed1ab_0.tar.bz2
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.0-pyhd8ed1ab_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/docutils-0.21.2-pyhd8ed1ab_1.conda
- conda: https://conda.anaconda.org/conda-forge/osx-64/double-conversion-3.3.1-h240833e_0.conda
@@ -1232,6 +1235,7 @@ environments:
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/dav1d-1.2.1-hb547adb_0.conda
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/dbus-1.16.2-hda038a8_0.conda
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/debugpy-1.8.15-py311ha59bd64_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/defusedxml-0.7.1-pyhd8ed1ab_0.tar.bz2
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.0-pyhd8ed1ab_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/docutils-0.21.2-pyhd8ed1ab_1.conda
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/double-conversion-3.3.1-h286801f_0.conda
@@ -1544,6 +1548,7 @@ environments:
- conda: https://conda.anaconda.org/conda-forge/noarch/cycler-0.12.1-pyhd8ed1ab_1.conda
- conda: https://conda.anaconda.org/conda-forge/win-64/dav1d-1.2.1-hcfcfb64_0.conda
- conda: https://conda.anaconda.org/conda-forge/win-64/debugpy-1.8.15-py311h5dfdfe8_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/defusedxml-0.7.1-pyhd8ed1ab_0.tar.bz2
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.0-pyhd8ed1ab_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/docutils-0.21.2-pyhd8ed1ab_1.conda
- conda: https://conda.anaconda.org/conda-forge/win-64/double-conversion-3.3.1-he0c23c2_0.conda
@@ -4622,6 +4627,17 @@ packages:
- pkg:pypi/debugpy?source=hash-mapping
size: 3932954
timestamp: 1752827138613
- conda: https://conda.anaconda.org/conda-forge/noarch/defusedxml-0.7.1-pyhd8ed1ab_0.tar.bz2
sha256: 9717a059677553562a8f38ff07f3b9f61727bd614f505658b0a5ecbcf8df89be
md5: 961b3a227b437d82ad7054484cfa71b2
depends:
- python >=3.6
license: PSF-2.0
license_family: PSF
purls:
- pkg:pypi/defusedxml?source=hash-mapping
size: 24062
timestamp: 1615232388757
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.0-pyhd8ed1ab_0.conda
sha256: 6d977f0b2fc24fee21a9554389ab83070db341af6d6f09285360b2e09ef8b26e
md5: 003b8ba0a94e2f1e117d0bd46aebc901
+1
View File
@@ -16,6 +16,7 @@ coin3d = "*"
compilers = ">=1.10,<1.11"
conda-devenv = "*"
debugpy = "*"
defusedxml = "*"
docutils = "*"
doxygen = "*"
eigen = "*"
-4
View File
@@ -1,4 +0,0 @@
function git_commit_no {
commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...main' | grep "\"ahead_by\":" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//')
echo -n $((commits + 1))
}
+4
View File
@@ -133,6 +133,10 @@
typedef long int Py_hash_t;
#endif
#if PY_VERSION_HEX >= 0x030d0000
#define Py_UNICODE_DEPRECATED
#endif
#ifndef PYCXX_PYTHON_2TO3
#define PYCXX_PYTHON_2TO3
#endif
+8 -8
View File
@@ -1783,7 +1783,7 @@ namespace Py
// Python strings return strings as individual elements.
// I'll try having a class Char which is a String of length 1
//
#if !defined(Py_LIMITED_API)
#if !defined(Py_LIMITED_API) && !defined(Py_UNICODE_DEPRECATED)
typedef std::basic_string<Py_UNICODE> unicodestring;
extern Py_UNICODE unicode_null_string[1];
#endif
@@ -1979,7 +1979,7 @@ namespace Py
validate();
}
#if !defined( Py_LIMITED_API )
#if !defined( Py_LIMITED_API ) && !defined(Py_UNICODE_DEPRECATED)
Char( Py_UNICODE v )
: Object( PyUnicode_FromOrdinal( v ), true )
{
@@ -1987,7 +1987,7 @@ namespace Py
}
#endif
#if !defined( Py_LIMITED_API )
#if !defined( Py_LIMITED_API ) && !defined(Py_UNICODE_DEPRECATED)
Char( const unicodestring &v )
: Object( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, const_cast<Py_UNICODE*>( v.data() ),1 ), true )
{
@@ -2008,7 +2008,7 @@ namespace Py
return *this;
}
#if !defined( Py_LIMITED_API )
#if !defined( Py_LIMITED_API ) && !defined(Py_UNICODE_DEPRECATED)
Char &operator=( const unicodestring &v )
{
set( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, const_cast<Py_UNICODE*>( v.data() ), 1 ), true );
@@ -2016,7 +2016,7 @@ namespace Py
}
#endif
#if !defined( Py_LIMITED_API )
#if !defined( Py_LIMITED_API ) && !defined(Py_UNICODE_DEPRECATED)
Char &operator=( int v_ )
{
Py_UNICODE v( v_ );
@@ -2025,7 +2025,7 @@ namespace Py
}
#endif
#if !defined( Py_LIMITED_API )
#if !defined( Py_LIMITED_API ) && !defined(Py_UNICODE_DEPRECATED)
Char &operator=( Py_UNICODE v )
{
set( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, &v, 1 ), true );
@@ -2164,7 +2164,7 @@ namespace Py
}
#endif
#if !defined( Py_LIMITED_API )
#if !defined( Py_LIMITED_API ) && !defined(Py_UNICODE_DEPRECATED)
String( const Py_UNICODE *s, int length )
: SeqBase<Char>( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, s, length ), true )
{
@@ -2185,7 +2185,7 @@ namespace Py
return *this;
}
#if !defined( Py_LIMITED_API )
#if !defined( Py_LIMITED_API ) && !defined(Py_UNICODE_DEPRECATED)
String &operator=( const unicodestring &v )
{
set( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, const_cast<Py_UNICODE *>( v.data() ), v.length() ), true );
+1 -1
View File
@@ -45,7 +45,7 @@ Py_ssize_t numeric_limits_max()
return std::numeric_limits<Py_ssize_t>::max();
}
#if !defined(Py_LIMITED_API)
#if !defined(Py_LIMITED_API) && !defined(Py_UNICODE_DEPRECATED)
Py_UNICODE unicode_null_string[1] = { 0 };
#endif
char32_t ucs4_null_string[1] = { 0 };
+2
View File
@@ -38,6 +38,8 @@
#ifndef __PyCXX_wrap_python_hxx__
#define __PyCXX_wrap_python_hxx__
#include <FCConfig.h>
// On some platforms we have to include time.h to get select defined
#if !defined(__WIN32__) && !defined(WIN32) && !defined(_WIN32) && !defined(_WIN64)
#include <sys/time.h>
+36 -30
View File
@@ -7,7 +7,7 @@ AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
@@ -24,19 +24,20 @@ AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
@@ -48,28 +49,32 @@ BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 100
CommentPragmas: '@copydetails '
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 3
ContinuationIndentWidth: 3
Cpp11BracedListStyle: false
DeriveLineEnding: false
DerivePointerAlignment: false
EmptyLineBeforeAccessModifier: LogicalBlock
EmptyLineAfterAccessModifier: Never
FixNamespaceComments: false
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 3
IndentWidth: 3
IndentWrappedFunctionNames: true
InsertBraces: true
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
MaxEmptyLinesToKeep: 1
@@ -83,13 +88,14 @@ PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
@@ -97,12 +103,12 @@ SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: true
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 3
UseTab: Never
...
Standard: c++14
TabWidth: 3
UseCRLF: false
UseTab: Never
+135 -44
View File
@@ -4,67 +4,151 @@ on: [push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }} (${{ matrix.build_type }})
runs-on: ${{ matrix.config.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
build_type: ["Debug", "Release"]
config:
- {
name: "macOS Clang",
os: macos-latest,
}
- {
name: "Ubuntu GCC",
os: ubuntu-latest,
}
- {
name: "Windows MSVC",
os: windows-latest,
}
include:
- name: 🍏 macOS (Clang - Debug)
os: macos-latest
platform: macos
build_type: Debug
build_shared: OFF
build_test: ON
validation_level: 2
- name: 🍏 macOS (Clang, no validation - Release)
os: macos-latest
platform: macos
build_type: Release
build_shared: OFF
build_test: ON
validation_level: 0 # build one with no validation
- name: 🍏 macOS (Clang, Shared - Release)
os: macos-latest
platform: macos
build_type: Release
build_shared: ON
build_test: ON
validation_level: 2
- name: 🐧 Linux (GCC - Debug)
os: ubuntu-latest
platform: linux
build_type: Debug
build_shared: OFF
build_test: ON
validation_level: 2
- name: 🐧 Linux (GCC, extra validation - Release)
os: ubuntu-latest
platform: linux
build_type: Release
build_shared: OFF
build_test: ON
validation_level: 1 # build one with basic validation
- name: 🐧 Linux (GCC, Shared - Release)
os: ubuntu-latest
platform: linux
build_type: Release
build_shared: ON
build_test: ON
validation_level: 2
- name: 🪟 Windows (MSVC - Debug)
os: windows-latest
platform: windows
arch: x86_64
build_type: Debug
build_debug: ON
build_shared: OFF
build_test: ON
validation_level: 2
- name: 🪟 Windows (MSVC [32-bit] - Debug)
os: windows-latest
platform: windows
arch: x86
build_type: Debug
build_debug: ON
build_shared: OFF
build_test: OFF
validation_level: 2
- name: 🪟 Windows (MSVC - Release)
os: windows-latest
platform: windows
arch: x86_64
build_type: Release
build_shared: OFF
build_test: ON
validation_level: 2
- name: 🪟 Windows (MSVC, Shared - Release)
os: windows-latest
platform: windows
arch: x86_64
build_type: Release
build_shared: ON
build_test: ON
validation_level: 2
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout Test Data
uses: actions/checkout@v4
with:
repository: 'asmaloney/libE57Format-test-data'
path: libE57Format-test-data
- name: Install Dependencies (macOS)
if: matrix.config.os == 'macos-latest'
if: matrix.platform == 'macos'
run: |
brew install ninja xerces-c
brew install ccache ninja xerces-c
- name: Install Dependencies (Ubuntu)
if: matrix.config.os == 'ubuntu-latest'
- name: Install Dependencies (Linux)
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libxerces-c-dev ninja-build
- name: Install miniconda (Windows)
if: matrix.config.os == 'windows-latest'
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge
miniconda-version: 'latest'
sudo apt-get install -y ccache libxerces-c-dev ninja-build
sudo locale-gen fr_FR
- name: Install Dependencies (Windows)
if: matrix.config.os == 'windows-latest'
if: matrix.platform == 'windows'
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
- name: Install More Dependencies (Windows)
if: matrix.platform == 'windows'
shell: bash -el {0}
run: |
conda install -y ninja xerces-c
conda install conda-forge::xerces-c
choco upgrade ccache ninja
ccache --version | head -n 1
echo "ninja $(ninja --version)"
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
max-size: '5G'
key: ${{ matrix.os }}-${{ matrix.build_type }}
- name: Configure MSVC console (Windows)
if: matrix.config.os == 'windows-latest'
if: matrix.platform == 'windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Set environment for MSVC (Windows)
if: matrix.config.os == 'windows-latest'
- name: Output conda info (Windows)
if: matrix.platform == 'windows'
run: |
# Set these env vars so cmake picks the correct compiler
echo "CXX=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CC=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Configure
run: >
@@ -74,9 +158,16 @@ jobs:
-B libE57Format-build
-G "Ninja"
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_CXX_FLAGS_DEBUG="-g -DE57_MAX_VERBOSE"
-DE57_BUILD_SHARED=${{ matrix.build_shared }}
-DE57_BUILD_TEST=${{ matrix.build_test }}
-DE57_VALIDATION_LEVEL=${{ matrix.validation_level }}
-DE57FORMAT_WARNING_AS_ERROR:BOOL=ON
-DE57FORMAT_SANITIZE_ALL:BOOL=ON
.
- name: Build
run: |
cmake --build libE57Format-build
run: cmake --build libE57Format-build
- name: Test
if: matrix.build_test == 'ON'
run: libE57Format-build/testE57
@@ -0,0 +1,19 @@
name: C++ Code Format
on:
push:
pull_request:
branches:
- master
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check
uses: jidicula/clang-format-action@v4.15.0
with:
clang-format-version: '18'
exclude-regex: 'extern'
+3
View File
@@ -0,0 +1,3 @@
build
.vscode
.cache
-42
View File
@@ -1,42 +0,0 @@
dist: xenial
sudo: false
language: cpp
env:
global:
# For coverity
- secure: "Ddou0BLHkn4V8b/Q6E56lUVz4woSXS8eI0IzRxyYqkDvXtqqjSlxqtu2fuU/awieA6Y5rzEHZrpHnvJU80uC+gnlIfMkIU9O0Cj0rwppKTTTWpXzohrESfXzJc8iZs+3gxpReZhWp6IGrfitdudfpFAgLWBENgzemWsHy7prnDcQQA99FBUhCuhbqhtXRR8wxXUWNQr2RntbFbH22Eqcwbd5a+OYpPSCtV296ZII6/iskMI3OeXCEGnqKBxe2L9oohcrTS/0beCLM7dhCflelns8MTGa1AYmJEwXf3/n4PmwRo7EjTpSBow70n9SCps5mS42+wRDU8FMBTNgqzBNjOdDojrPhijnEPfhRzFygsyfgoEmuZjD2MuXBSIwpYa9mFusVpN2BON3zZLvmw5Y1HuBadf3yLoD0/Vy1K6YBnQRMIm5JhVYj4hY8ogtPNVfjYjckHEPlCRcwzS5rwh/sZ2eYW30LW3IusCB2wu3/iR97jamBu3sEOY67ln3M6EOjnMPHApBqsVhapQv+XtOtxaVPzKVc1u6tlzRRijPCfcN6ssNHzFh1feqFopthapY4erfA+DrjQivW+E49Yv306ig6HVBbrMkOR+TX+bgDmZisLtbJ8d2eym063KuojBRqDlq8wrz0MlUXVIz2H0FhXPIho8z9Uj7fkswM+jQiJc="
matrix:
- BUILD_TYPE=Debug
- BUILD_TYPE=Release
compiler:
- clang
- gcc
before_install:
- echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
apt:
packages:
- libxerces-c-dev
coverity_scan:
project:
name: "asmaloney/libE57Format"
description: "Library for reading & writing the E57 file format (fork of E57RefImpl) "
notification_email: asmaloney@gmail.com
build_command_prepend: "cmake -DCMAKE_BUILD_TYPE=Debug ."
build_command: "make -j2"
branch_pattern: coverity_scan
before_script:
- mkdir build-${BUILD_TYPE}
- cd build-${BUILD_TYPE}
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS_DEBUG="-g -DE57_MAX_VERBOSE" ..
script:
- if [[ "${COVERITY_SCAN_BRANCH}" != 1 ]]; then
$CC_FOR_BUILD -v && $CXX_FOR_BUILD -v && cmake --version;
make -j2;
fi
+207 -4
View File
@@ -1,16 +1,219 @@
# Changelog
All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 3.3.0 - (in progress)
## 2.2.1 - (in progress)
### Added
- {cmake} Generate a package version file ([#316](https://github.com/asmaloney/libE57Format/pull/316)) (Thanks SunBlack!)
### Changed
- {cmake} Require XercesC 3.2 and remove `USING_STATIC_XERCES` ([#317](https://github.com/asmaloney/libE57Format/pull/317)) (Thanks SunBlack!)
### Fixed
- {cmake} Added missing include for GNUInstallDirs ([#315](https://github.com/asmaloney/libE57Format/pull/315)) (Thanks Adrian!)
If you built without testing on, the cmake files were not installed to the correct location.
## [3.2.0](https://github.com/asmaloney/libE57Format/releases/tag/v3.2.0) - 2024-06-27
### Added
- {cmake} Added `E57_INSTALL_CMAKEDIR` option to override where the cmake files are installed. ([#305](https://github.com/asmaloney/libE57Format/pull/305))
This defaults to `lib/cmake/E57Format` and the path is relative to `CMAKE_INSTALL_PREFIX`.
### Changed
- {cmake} If building as a shared library, set [VERSION](https://cmake.org/cmake/help/v3.15/prop_tgt/VERSION.html) & [SOVERSION](https://cmake.org/cmake/help/v3.15/prop_tgt/SOVERSION.html). ([#304](https://github.com/asmaloney/libE57Format/pull/304))
- {cmake} Don't force warnings as errors when building self. ([#299](https://github.com/asmaloney/libE57Format/pull/299))
- {cmake} Use git tag in library version for more precision. ([#298](https://github.com/asmaloney/libE57Format/pull/298))
- {license} Re-license all my (asmaloney) MIT files to BSL-1.0. It is just easier to have it all under one license. ([#296](https://github.com/asmaloney/libE57Format/pull/296))
- {format} Update to clang-format 18 & reformat code. ([#286](https://github.com/asmaloney/libE57Format/pull/286))
- Add "E57\_" to macros in E57Exception.h. ([#285](https://github.com/asmaloney/libE57Format/pull/285))
- "De-deprecate" methods in **E57SimpleWriter**. These methods can be useful when writing batches. ([#284](https://github.com/asmaloney/libE57Format/pull/284))
### Fixed
- Update CRCpp to fix MSVC and MinGW warnings. ([#302](https://github.com/asmaloney/libE57Format/pull/302))
- Fix warnings about redefinition of `_LARGEFILE64_SOURCE` and `__LARGE64_FILES` ([#301](https://github.com/asmaloney/libE57Format/pull/301)) (Thanks Niklas!)
- Fix building with emscripten. (Note that the project doesn't officially support emscripten.) ([#288](https://github.com/asmaloney/libE57Format/pull/288)) (Thanks maz-1!)
- {standard conformance} CompressedVectors always write an index packet. This is required by the standard (9.3.5). ([#295](https://github.com/asmaloney/libE57Format/pull/295))
- {standard conformance} **E57SimpleReader** accepts files containing zero scans. ([#283](https://github.com/asmaloney/libE57Format/pull/283))
- {cmake} Replace deprecated "exec_program" with "execute_process". ([#282](https://github.com/asmaloney/libE57Format/pull/282))
- Fix potential invalid range exceptions when reading integer nodes. ([#278](https://github.com/asmaloney/libE57Format/pull/278))
## [3.1.1](https://github.com/asmaloney/libE57Format/releases/tag/v3.1.1) - 2023-11-28
### Fixed
- Fix library version in CMakeLists.txt. (Thanks Olli!)
## [3.1.0](https://github.com/asmaloney/libE57Format/releases/tag/v3.1.0) - 2023-11-20
### Added
- {cmake} New option `E57_RELEASE_LTO` controls whether link-time optimization is on for release builds. It defaults to `ON`. ([#254](https://github.com/asmaloney/libE57Format/pull/254))
CMake forces "thin" LTO (see [this issue](https://gitlab.kitware.com/cmake/cmake/-/issues/23136)) which is a problem if compiling statically for distribution (e.g. in a package manager). Generally you will only want to turn this off for distributing static release builds.
### Changed
- Trying to read a Data3D with zero records which has an ill-formed header will now throw an `ErrorData3DReadInvalidZeroRecords` exception instead of `ErrorInternal`. ([#264](https://github.com/asmaloney/libE57Format/pull/264))
> Note that previous versions of this library (and E57RefImpl itself) could write these headers incorrectly. This was also fixed in this release (see below).
- {cmake} Remove `E57_VISIBILITY_HIDDEN` option. ([#259](https://github.com/asmaloney/libE57Format/pull/259))
I cannot get extern templates to work across all of gcc, clang, apple clang, and MSVC when using "hidden" visibility with shared libraries.
### Fixed
- Fix #include to avoid MSVC compilation error with Visual Studio 2017 ([#268](https://github.com/asmaloney/libE57Format/pull/268)) (Thanks Thomas!)
- {standard conformance} A compressed vector with 0 records must still write a data packet. ([#266](https://github.com/asmaloney/libE57Format/pull/266))
- {standard conformance} Fix reading a compressed vector with 0 points which has an empty data packet. ([#267](https://github.com/asmaloney/libE57Format/pull/267))
- {standard conformance} Compressed vectors with an invalid section ID now throw an `ErrorBadCVPacket` exception if `E57_VALIDATION_LEVEL` > 0. ([#265](https://github.com/asmaloney/libE57Format/pull/265))
- Fix clang warnings about implicit conversions in _SourceDestBufferImpl.cpp_. Apple's clang doesn't warn about these, but it looks like the official clang releases do. ([#257](https://github.com/asmaloney/libE57Format/pull/257)) (Thanks Martin!)
## [3.0.2](https://github.com/asmaloney/libE57Format/releases/tag/v3.0.2) - 2023-07-22
### Fixed
- Fix `E57_VERBOSE` build. ([#251](https://github.com/asmaloney/libE57Format/pull/251)) (Thanks Jia!)
- {standard conformance} Fix invalid range exception in FloatNode implementation. ([#250](https://github.com/asmaloney/libE57Format/pull/250))
- Fix reading of index packets. ([#249](https://github.com/asmaloney/libE57Format/pull/249))
- Fix several places where we should be checking for MSVC, not WIN32. ([#248](https://github.com/asmaloney/libE57Format/pull/248))
- Fix "unnecessary semicolons" warnings which prevented building with GCC <= 10. ([#241](https://github.com/asmaloney/libE57Format/pull/241)) (Thanks Andre!)
## [3.0.1](https://github.com/asmaloney/libE57Format/releases/tag/v3.0.1) - 2023-03-15
### Added
- {ci} Added an MSVC 32-bit build. ([#235](https://github.com/asmaloney/libE57Format/pull/235))
### Fixed
- {cmake} Turn off inter-procedural optimization in debug builds. Link-time optimization can make debugging more difficult. ([#240](https://github.com/asmaloney/libE57Format/pull/240))
- {cmake} Don't force a debug postfix if `CMAKE_DEBUG_POSTFIX` is defined.([#239](https://github.com/asmaloney/libE57Format/pull/239))
- {cmake} Don't force install locations. This prevents overriding them using `CMAKE_INSTALL_BINDIR` & `CMAKE_INSTALL_LIBDIR`.([#237](https://github.com/asmaloney/libE57Format/pull/237))
- Fix warnings which prevented building on 32-bit systems. ([#233](https://github.com/asmaloney/libE57Format/pull/233), [#234](https://github.com/asmaloney/libE57Format/pull/234))
## [3.0.0](https://github.com/asmaloney/libE57Format/releases/tag/v3.0.0) - 2023-02-23
There have been _many_ changes around the `Simple API` in this release to fix some problems, avoid potential errors, and simplify the use of the API. Where possible these changes are marked as `deprecated` to be removed later. The compiler will produce warnings for these indicating what needs to change. Other changes could not be marked deprecated but will break the API, requiring code changes. The notable ones are marked with 🚧 below.
### Added
- Add address (ASan) and undefined behaviour (UBSan) sanitizers. These are controlled by `E57FORMAT_SANITIZE_ALL`, `E57FORMAT_SANITIZE_ADDRESS` and `E57FORMAT_SANITIZE_ADDRESS`. They are not included when building with MSVC.
- Add new `E57Version.h` header for more convenient access to version information. ([#197](https://github.com/asmaloney/libE57Format/pull/197)).
- Add `ImageFile::extensionsLookupPrefix()` overload for more concise user code. ([#161](https://github.com/asmaloney/libE57Format/pull/161))
- Added a constructor & destructor for **E57SimpleData**'s `Data3DPointsData_t`. This will create all the required buffers based on an `e57::Data3D` struct and handle their cleanup. See the `SimpleWriter` tests for examples. ([#149](https://github.com/asmaloney/libE57Format/pull/149))
> **Note:** I strongly recommend these new constructors be used to simplify your code and help prevent errors.
- A new **E57SimpleReader** constructor takes a `ReaderOptions` struct which allows setting the checksum policy.
```cpp
Reader( const ustring &filePath, const ReaderOptions &options );
```
- {test} Added testing using [GoogleTest](https://github.com/google/googletest). For details, please see [test/README.md](test/README.md) ([#121](https://github.com/asmaloney/libE57Format/pull/121))
- Added `E57Exception::errorStr()` to get the error string directly. ([#128](https://github.com/asmaloney/libE57Format/pull/128))
- {cmake} Use [ccache](https://ccache.dev/) if available. ([#129](https://github.com/asmaloney/libE57Format/pull/129))
- {ci} Added a CI check for proper clang-formatted code. ([#125](https://github.com/asmaloney/libE57Format/pull/125))
### Changed
- Now requires a **[C++14](https://en.cppreference.com/w/cpp/14)** compatible compiler.
- Now requires **[CMake](https://cmake.org/) >= 3.15**. ([#205](https://github.com/asmaloney/libE57Format/pull/205))
- 🚧 **DEBUG** and **VERBOSE** macros were changed to simplify and clarify:
- New `E57_ENABLE_DIAGNOSTIC_OUTPUT` controls the inclusion of the code for the `dump()` functions on nodes. I don't see any real reason to turn this off, but I left the capability in for compatibility.
- New `E57_VALIDATION_LEVEL=N` replaces `E57_DEBUG` (N=1) and `E57_MAX_DEBUG` (N=2).
- `E57_MAX_VERBOSE` was consolidated with `E57_VERBOSE` since they were essentially the same.
- When building itself, warnings are now treated as errors. ([#205](https://github.com/asmaloney/libE57Format/pull/205), [#211](https://github.com/asmaloney/libE57Format/pull/211))
- Clean up global const and enum names to use the `e57` namespace and avoid repetition. ([#176](https://github.com/asmaloney/libE57Format/pull/176))
- i.e. instead of `e57::E57_STRUCTURE`, we now use `e57::TypeStructure`
- {format} Update clang-format rules for clang-format 15. ([#168](https://github.com/asmaloney/libE57Format/pull/168), [#179](https://github.com/asmaloney/libE57Format/pull/179))
- Change default checksum policies to an enum. ([#166](https://github.com/asmaloney/libE57Format/pull/166))
Old | New
--|--
CHECKSUM_POLICY_NONE | ChecksumPolicy::None
CHECKSUM_POLICY_SPARSE | ChecksumPolicy::Sparse
CHECKSUM_POLICY_HALF | ChecksumPolicy::Half
CHECKSUM_POLICY_ALL | ChecksumPolicy::All
- Avoid implicit conversion in constructors. ([#135](https://github.com/asmaloney/libE57Format/pull/135))
- Update [CRCpp](https://github.com/d-bahr/CRCpp) to 1.2. ([#130](https://github.com/asmaloney/libE57Format/pull/130))
- **E57Exception** changes ([#118](https://github.com/asmaloney/libE57Format/pull/118)):
- mark methods as `noexcept`
- use `private` instead of `protected`
- Rename **E57Simple**'s `Data3DPointsData` and `Data3DPointsData_d` structs to `Data3DPointsFloat` and `Data3DPointsDouble` respectively. ([#180](https://github.com/asmaloney/libE57Format/pull/180))
- 🚧 **E57Simple:** Specifying the node type for cartesian & spherical points, time stamp, and intensity is now explicit using new fields (`pointRangeNodeType`, `angleNodeType`, `timeNodeType`, and `intensityNodeType`) and a new enum (`NumericalNodeType`). ([#178](https://github.com/asmaloney/libE57Format/pull/178))
- For examples, please see _test/src/testSimpleWriter.cpp_.
- Simplify the **E57SimpleWriter** API with `WriteImage2DData()` for images and `WriteData3DData()` for 3D data. This reduces code, hides complexity, and avoids potential errors. ([#171](https://github.com/asmaloney/libE57Format/pull/171))
- As part of this simplification, `WriteData3DData()` will now fill in any missing min/max values for cartesian & spherical points, intensity, and time stamps by looking at the data.([#175](https://github.com/asmaloney/libE57Format/pull/175))
- 🚧 **E57Simple:** Intensity now uses `double` instead of `float`. ([#178](https://github.com/asmaloney/libE57Format/pull/178))
- 🚧 **E57Simple:** Colours now use `uint16_t` instead of `uint8_t`. ([#167](https://github.com/asmaloney/libE57Format/pull/167))
- 🚧 Change **E57SimpleData**'s Data3D field name from `pointsSize` to `pointCount`. ([#164](https://github.com/asmaloney/libE57Format/pull/164))
- 🚧 Min/max fields in **E57SimpleData**'s Data3D's point fields were a mix of floats and doubles. Since the fields are doubles, set them all to doubles and use the new `Data3DPointsData_t` constructor to set them properly for floats. ([#153](https://github.com/asmaloney/libE57Format/pull/153))
> **Note:** If you were previously relying on these to be floats and are not using the new `Data3DPointsData_t` constructor, you will need to set these.
- 🚧 Renamed the [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension's fields in **E57SimpleData**'s `PointStandardizedFieldsAvailable` to be in line with existing code. ([#149](https://github.com/asmaloney/libE57Format/pull/149))
- `normalX` renamed to `normalXField`
- `normalY` renamed to `normalYField`
- `normalZ` renamed to `normalZField`
### Deprecated
- `e57::Utilities::getVersions()`. ([#197](https://github.com/asmaloney/libE57Format/pull/197))
- `e57::Data3DPointsData` and `e57::Data3DPointsData_d` types. ([#180](https://github.com/asmaloney/libE57Format/pull/180))
- Many global const and enum names. The compiler will produce warnings including the replacement symbols (note that enumerators will not produce warnings on C++14, but they will on C++17). ([#176](https://github.com/asmaloney/libE57Format/pull/176))
- `e57::Writer::NewImage2D`and `e57::Writer::SetUpData3DPointsData`. ([#171](https://github.com/asmaloney/libE57Format/pull/171))
- Old default checksum policies (`CHECKSUM_POLICY_NONE`, `CHECKSUM_POLICY_SPARSE`, `CHECKSUM_POLICY_HALF`, and `CHECKSUM_POLICY_ALL`). ([#166](https://github.com/asmaloney/libE57Format/pull/166))
- The old `e57::Reader` constructor taking only `filePath`. ([#139](https://github.com/asmaloney/libE57Format/pull/139))
- The old `e57::Writer` constructor taking only `filePath`. ([#117](https://github.com/asmaloney/libE57Format/pull/117))
### Fixed
- Fix several potential divide-by-zero cases. ([#224](https://github.com/asmaloney/libE57Format/pull/224))
- {ci} Now builds shared library versions as well. ([#219](https://github.com/asmaloney/libE57Format/pull/219))
- {win} Fixes shared library build warnings. ([#215](https://github.com/asmaloney/libE57Format/pull/215), [#216](https://github.com/asmaloney/libE57Format/pull/216), [#217](https://github.com/asmaloney/libE57Format/pull/217))
- Fix the code which shortens floating point numbers when converted to strings. The impact of it being incorrect was negligible since it's just the floating point representation in the XML portion of the file. ([#214](https://github.com/asmaloney/libE57Format/pull/214))
- Turned on a lot of compiler warnings and fixed them. ([#201](https://github.com/asmaloney/libE57Format/pull/201), [#202](https://github.com/asmaloney/libE57Format/pull/202), [#203](https://github.com/asmaloney/libE57Format/pull/203), [#204](https://github.com/asmaloney/libE57Format/pull/204), [#205](https://github.com/asmaloney/libE57Format/pull/205), [#207](https://github.com/asmaloney/libE57Format/pull/207), [#209](https://github.com/asmaloney/libE57Format/pull/209))
- Fix writing floating point numbers when `std::locale::global` is set. ([#174](https://github.com/asmaloney/libE57Format/pull/174))
- E57XmlParser: Parse doubles in a locale-independent way. ([#173](https://github.com/asmaloney/libE57Format/pull/173)) (Thanks Hugal31!)
- E57SimpleReader: Ensure scaled integer fields are set as best we can when reading. ([#158](https://github.com/asmaloney/libE57Format/pull/158))
- Fix the [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension's URI in **E57SimpleWriter**. ([#143](https://github.com/asmaloney/libE57Format/pull/143))
- {win} Fix conversion warning when compiling with debug on. ([#124](https://github.com/asmaloney/libE57Format/pull/124))
- Add errno detail to `E57_ERROR_OPEN_FAILED` exception. ([#119](https://github.com/asmaloney/libE57Format/pull/119), [#120](https://github.com/asmaloney/libE57Format/pull/120))
## [2.3.0](https://github.com/asmaloney/libE57Format/releases/tag/v2.3.0) - 2022-10-04
### Added
- {cmake} Added `E57_VISIBILITY_HIDDEN` option to control [CXX_VISIBILITY_PRESET](https://cmake.org/cmake/help/latest/prop_tgt/LANG_VISIBILITY_PRESET.html). Defaults to `ON`. ([#104](https://github.com/asmaloney/libE57Format/pull/104)) (Thanks Nigel!)
- Added BSD support. ([#99](https://github.com/asmaloney/libE57Format/pull/99)) (Thanks Christophe!)
### Changed
- Updated &amp; reorganized the [online API docs](https://asmaloney.github.io/libE57Format-docs/) and changed to a [cleaner theme](https://github.com/jothepro/doxygen-awesome-css).
- Change file creation to use _0666_ permissions on [POSIX](https://en.wikipedia.org/wiki/POSIX) systems. ([#105](https://github.com/asmaloney/libE57Format/pull/105)) (Thanks Nigel!)
- {cmake} [CXX_VISIBILITY_PRESET](https://cmake.org/cmake/help/latest/prop_tgt/LANG_VISIBILITY_PRESET.html) is now set and `ON` by default. ([#104](https://github.com/asmaloney/libE57Format/pull/104)) (Thanks Nigel!)
- A new **E57SimpleWriter** constructor takes a `WriterOptions` struct which allows setting the file's GUID.
```cpp
Writer( const ustring &filePath, const WriterOptions &options );
```
The old constructor taking only `coordinateMetadata` is deprecated and will be removed in the future. ([#96](https://github.com/asmaloney/libE57Format/pull/96)) (Thanks Nigel!)
- Change `E57_DEBUG`, `E57_MAX_DEBUG`, `E57_VERBOSE`, `E57_MAX_VERBOSE`, `E57_WRITE_CRAZY_PACKET_MODE` from **#defines** to cmake options. ([#80](https://github.com/asmaloney/libE57Format/pull/80)) (Thanks Nigel!)
### Fixed
- Fix **E57SimpleWriter**'s writing of invalid quaternions. It now defaults to the identity quaternion. ([#108](https://github.com/asmaloney/libE57Format/pull/108)) (Thanks Nigel!)
- Fix **E57SimpleReader** to handle missing `images2D` and `isAtomicClockReferenced` nodes. ([#90](https://github.com/asmaloney/libE57Format/pull/90)) (Thanks Olli!)
- Fix **BitpackIntegerDecoder** sometimes reading past end of input buffer. ([#87](https://github.com/asmaloney/libE57Format/pull/87)) (Thanks Nigel!)
- Fix compilation when some debug options are set. ([#81](https://github.com/asmaloney/libE57Format/pull/81), [#82](https://github.com/asmaloney/libE57Format/pull/82), [#84](https://github.com/asmaloney/libE57Format/pull/84)) (Thanks Nigel!)
- Fix compilation with [musl libc](https://musl.libc.org/) ([#70](https://github.com/asmaloney/libE57Format/pull/70)) (Thanks Dimitri!)
- Add missing include for [GCC 11](https://gcc.gnu.org/gcc-11/porting_to.html#header-dep-changes) ([#68](https://github.com/asmaloney/libE57Format/pull/68)) (Thanks bartoszek!)
**Note:** The next release will be 3.0 and will require a [C++14](https://en.cppreference.com/w/cpp/14) compiler.
## [2.2.0](https://github.com/asmaloney/libE57Format/releases/tag/v2.2.0) - 2021-04-01
### Added
@@ -35,7 +238,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Other
- Removed all internal usage of dynamic_cast<>. ([#39](https://github.com/asmaloney/libE57Format/pull/39)) (Thanks Jiri!)
- Split classes out from E57FormatImpl.[h,cpp] intot their own files.
- Split classes out from E57FormatImpl.[h,cpp] into their own files.
## [2.1.0](https://github.com/asmaloney/libE57Format/releases/tag/v2.1) - 2020-04-01
+142 -83
View File
@@ -3,8 +3,8 @@
#
# Use git blame to see all the changes and who has contributed.
#
# Copyright 2018-2023 Andy Maloney <asmaloney@gmail.com>
# Original work Copyright 2010-2012 Roland Schwarz, Riegl LMS GmbH
# Modified work Copyright 2018-2020 Andy Maloney <asmaloney@gmail.com>
#
# Permission is hereby granted, free of charge, to any person or organization
# obtaining a copy of the software and accompanying documentation covered by
@@ -28,10 +28,12 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
cmake_minimum_required( VERSION 3.10.0 )
cmake_minimum_required( VERSION 3.15 )
# Set a private module find path
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/" )
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" )
message( STATUS "Using CMake ${CMAKE_VERSION}" )
project( E57Format
DESCRIPTION
@@ -39,10 +41,20 @@ project( E57Format
LANGUAGES
CXX
VERSION
2.2.1
3.2.0
)
string( TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPERCASE )
# Creates a build tag which is used in the REVISION_ID
# e.g. "x86_64-darwin-AppleClang140"
include( Tags )
include( GitInfo )
# Collect all our current git info using:
# https://github.com/cppmf/GitInfo.cmake
GitInfo( ${CMAKE_CURRENT_SOURCE_DIR} )
# GitInfoReport()
# Check if we are building ourself or being included and use this to set some defaults
if ( ${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME} )
@@ -65,7 +77,7 @@ if ( E57_BUILDING_SELF )
endif()
find_package( Threads REQUIRED )
find_package( XercesC REQUIRED )
find_package( XercesC 3.2 REQUIRED )
option( E57_BUILD_SHARED
"Compile E57Format as a shared library"
@@ -77,105 +89,116 @@ if( BUILD_SHARED_LIBS )
endif()
#########################################################################################
# Various levels of cross checking and verification in the code.
# Cross checking and runtime verification in the code.
# The extra code does not change the file contents.
# Recommend that E57_DEBUG remain defined even for production versions.
# E57_VALIDATION_LEVEL=0 off
# E57_VALIDATION_LEVEL=1 basic
# E57_VALIDATION_LEVEL=2 deep (implies basic) - checks at the packet level, so it will be slower
set( E57_VALIDATION_LEVEL "1" CACHE STRING "Runtime validation level (0 = OFF, 1 = basic, 2 = deep)" )
option( E57_DEBUG "Compile library with minimal debug checking" ON )
option( E57_MAX_DEBUG "Compile library with maximum debug checking" OFF )
# Output detailed logging while processing.
option( E57_VERBOSE "Compile library with verbose logging" OFF )
# Various levels of printing to the console of what is going on in the code.
# Optional
option( E57_VERBOSE "Compile library with verbose logging" OFF )
option( E57_MAX_VERBOSE "Compile library with maximum verbose logging" OFF )
# Enable/disable code which dumps detailed node info to std::ostream. (See NodeImpl::dump())
# Instead of always including this code, it is an option for backwards compatibility.
# The only real reason to turn this off would be for slightly smaller binaries.
option( E57_ENABLE_DIAGNOSTIC_OUTPUT "Include code for diagnostic output using dump() on nodes" ON )
# Enable writing packets that are correct but will stress the reader.
option( E57_WRITE_CRAZY_PACKET_MODE "Compile library to enable reader-stressing packets" OFF )
# Other compile options
# Link-time optiomization
# CMake forces "thin" LTO (see https://gitlab.kitware.com/cmake/cmake/-/issues/23136)
# which is a problem if compiling statically for distribution (e.g. in a package manager).
# Generally you will only want to turn this off for distributing static release builds.
option( E57_RELEASE_LTO "Compile release library with link-time optimization" ON )
#########################################################################################
set( revision_id "${PROJECT_NAME}-${PROJECT_VERSION}-${${PROJECT_NAME}_BUILD_TAG}" )
message( STATUS "[E57] Revision ID: ${revision_id}" )
# Need to explicitly set the source files to add_library()
if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
file(GLOB E57Format_SOURCES src/[^.]*.cpp)
set( REVISION_ID "${PROJECT_NAME}-${PROJECT_VERSION}-${${PROJECT_NAME}_BUILD_TAG}" )
if ( GIT_LATEST_TAG )
set( REVISION_ID "${REVISION_ID} (git ${GIT_LATEST_TAG})" )
endif()
message( STATUS "[${PROJECT_NAME}] Revision ID: ${REVISION_ID}" )
# Target
if ( E57_BUILD_SHARED )
message( STATUS "[E57] Building shared library" )
message( STATUS "[${PROJECT_NAME}] Building shared library" )
add_library( E57Format SHARED ${E57Format_SOURCES})
else()
message( STATUS "[E57] Building static library" )
message( STATUS "[${PROJECT_NAME}] Building static library" )
add_library( E57Format STATIC ${E57Format_SOURCES})
endif()
include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_ok OUTPUT ipo_msg)
if(NOT ipo_ok)
set(E57_RELEASE_LTO Off)
endif()
include( E57ExportHeader )
include( GitUpdate )
# Main sources and includes
add_subdirectory( extern/CRCpp )
add_subdirectory( include )
add_subdirectory( src )
include( ClangFormat )
# Target properties
set_target_properties( E57Format
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
DEBUG_POSTFIX "-d"
CXX_EXTENSIONS NO
EXPORT_COMPILE_COMMANDS ON
POSITION_INDEPENDENT_CODE ON
INTERPROCEDURAL_OPTIMIZATION ${E57_RELEASE_LTO}
INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF
)
if ( NOT DEFINED CMAKE_DEBUG_POSTFIX )
set_target_properties( E57Format
PROPERTIES
DEBUG_POSTFIX "-d"
)
endif()
if ( E57_BUILD_SHARED )
set_target_properties( E57Format
PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
)
endif()
target_compile_features( ${PROJECT_NAME}
PRIVATE
cxx_std_14
)
# Warnings
include( CompilerWarnings )
# Check our validation level
string( STRIP "${E57_VALIDATION_LEVEL}" E57_VALIDATION_LEVEL )
if ( NOT E57_VALIDATION_LEVEL MATCHES "^[0-2]$" )
message( FATAL_ERROR "[${PROJECT_NAME}] E57_VALIDATION_LEVEL should be 0-2: '${E57_VALIDATION_LEVEL}'" )
else()
message( STATUS "[${PROJECT_NAME}] Setting validation level to ${E57_VALIDATION_LEVEL}" )
endif ()
# Target definitions
target_compile_definitions( E57Format
PRIVATE
CRCPP_USE_CPP11
CRCPP_BRANCHLESS
REVISION_ID="${revision_id}"
REVISION_ID="${REVISION_ID}"
E57_VALIDATION_LEVEL=${E57_VALIDATION_LEVEL}
$<$<BOOL:${E57_ENABLE_DIAGNOSTIC_OUTPUT}>:E57_ENABLE_DIAGNOSTIC_OUTPUT>
$<$<BOOL:${E57_VERBOSE}>:E57_VERBOSE>
$<$<BOOL:${E57_WRITE_CRAZY_PACKET_MODE}>:E57_WRITE_CRAZY_PACKET_MODE>
)
if ( E57_DEBUG )
target_compile_definitions( E57Format PRIVATE E57_DEBUG )
endif()
if ( E57_MAX_DEBUG )
target_compile_definitions( E57Format PRIVATE E57_MAX_DEBUG )
endif()
if ( E57_VERBOSE )
target_compile_definitions( E57Format PRIVATE E57_VERBOSE )
endif()
if ( E57_MAX_VERBOSE )
target_compile_definitions( E57Format PRIVATE E57_MAX_VERBOSE )
endif()
if ( E57_WRITE_CRAZY_PACKET_MODE )
target_compile_definitions( E57Format PRIVATE E57_WRITE_CRAZY_PACKET_MODE )
endif()
if ( WIN32 )
option( USING_STATIC_XERCES "Turn on if you are linking with Xerces as a static lib" OFF )
if ( USING_STATIC_XERCES )
target_compile_definitions( E57Format
PUBLIC
XERCES_STATIC_LIBRARY
)
endif()
endif()
# Suppress all warnings for this specific 3rd-party target
target_compile_options(E57Format PRIVATE
$<$<CXX_COMPILER_ID:GNU,Clang>:-w>
$<$<CXX_COMPILER_ID:MSVC>:/w>
)
# sanitizers
include( Sanitizers )
# Target Libraries
target_link_libraries( E57Format PRIVATE XercesC::XercesC )
@@ -186,21 +209,57 @@ install(
E57Format
EXPORT
E57Format-export
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# CMake package files
#install(
# EXPORT
# E57Format-export
# DESTINATION lib/cmake/E57Format
#)
# ccache
# Turns on ccache if found
include( ccache )
#install(
# FILES
# ${CMAKE_CURRENT_SOURCE_DIR}/cmake/e57format-config.cmake
# DESTINATION
# lib/cmake/E57Format
#)
# Formatting
include( ClangFormat )
# Testing
option( E57_BUILD_TEST
"Build tests"
${E57_BUILDING_SELF}
)
if ( E57_BUILD_TEST )
message( STATUS "[${PROJECT_NAME}] Testing enabled" )
enable_testing()
add_subdirectory( test )
endif()
# CMake package files
include( GNUInstallDirs )
set( E57_INSTALL_CMAKEDIR
"${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
CACHE STRING
"Install path for ${PROJECT_NAME} CMake files"
)
message( STATUS "[${PROJECT_NAME}] CMake files install to ${CMAKE_INSTALL_PREFIX}/${E57_INSTALL_CMAKEDIR}" )
install(
EXPORT
E57Format-export
DESTINATION
"${E57_INSTALL_CMAKEDIR}"
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file (
e57format-config-version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/e57format-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/e57format-config-version.cmake
DESTINATION
"${E57_INSTALL_CMAKEDIR}"
)
+24 -8
View File
@@ -1,21 +1,37 @@
# How To Contribute
## Code Changes
These are some of the things you can do to contribute to the project:
## 💰 Financial
Given that I'm an independent developer without funding, financial support is appreciated. If you would like to support the project financially (especially if you sell a product which uses this library), you can use the [sponsors page](https://github.com/sponsors/asmaloney) for one-off or recurring support, or we can arrange <a href="mailto:asmaloney@gmail.com?subject=libE57Format B2B Sponsorship">B2B invoicing</a> of some kind. Thank you!
## ✍ Write About The Project
If you find the project useful, spread the word! Articles, mastodon posts, tweets, blog posts, instagram photos - whatever you're into. Please include a referral back to the repository page: https://github.com/asmaloney/libE57Format
## ⭐️ Add a Star
If you found this project useful, please consider starring it! It helps me gauge how useful this project is.
## ☝ Raise Issues
If you run into something which doesn't work as expected, raising [an issue](https://github.com/asmaloney/libE57Format/issues) with all the relevant information to reproduce it would be helpful.
## 🐞 Bug Fixes & 🧪 New Things
I am happy to review any [pull requests](https://github.com/asmaloney/libE57Format/pulls). Please keep them as short as possible. Each pull request should be atomic and only address one issue. This helps with the review process.
Note that I will not accept everything, but I welcome discussion. If you are proposing a big change, please raise it as [an issue](https://github.com/asmaloney/libE57Format/issues) first for discussion.
### Formatting
This project uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format the code. There is a cmake target (_format_) - which runs _clang-format_ on the source files. After changes have been made, and before you submit your pull request, please run the following:
This project uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format the code. There is a cmake target (_e57-clang-format_) - which runs _clang-format_ on the source files. After changes have been made, and before you submit your pull request, please run the following:
```sh
cmake --build . --target format
cmake --build . --target e57-clang-format
```
## Documentation
## 📖 Documentation
The [documentation](https://github.com/asmaloney/libE57Format) is a bit old and could use some lovin'. You can submit changes over in the [libE57Format-docs](https://github.com/asmaloney/libE57Format-docs) repository.
## Financial
If you would like to support the project financially, you can use the **Sponsor** button at the top of the [libE57Format](https://github.com/asmaloney/libE57Format) repository page.
+131 -25
View File
@@ -1,53 +1,159 @@
# libE57Format
[![Build Status](https://travis-ci.org/asmaloney/libE57Format.svg?branch=master)](https://travis-ci.org/asmaloney/libE57Format)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/asmaloney/libE57Format)](https://github.com/asmaloney/libE57Format/releases/latest) [![Docs](https://img.shields.io/badge/docs-online-orange)](https://asmaloney.github.io/libE57Format-docs/) [![GitHub](https://img.shields.io/github/license/asmaloney/libE57Format)](LICENSE) ![Build](https://github.com/asmaloney/libE57Format/actions/workflows/build.yml/badge.svg)
A library to provide read & write support for the E57 file format.
This is a fork of [E57RefImpl](https://sourceforge.net/projects/e57-3d-imgfmt/) v1.1.332. The original source is from [E57RefImpl 1.1.332](https://sourceforge.net/projects/e57-3d-imgfmt/files/E57Refimpl-src/) and then everything was stripped out except the main implementation for reading and writing E57.
This version also removes the dependency on [Boost](https://www.boost.org/) and requires C++11.
Many, many other changes were made prior to the first release of this fork. See the [CHANGELOG](CHANGELOG.md) and git history for details.
libE57Format is a C++ library which provides read & write support for the ASTM-standard [E57 file format](https://www.astm.org/e2807-11r19e01.html) on Linux, macOS, and Windows. E57 files store 3D point cloud data (produced by 3D imaging systems such as laser scanners), attributes associated with 3D point data (color & intensity), and 2D images (photos taken using a 3D imaging system).
## Documentation
The doxygen-generated documentation may be [found here](https://asmaloney.github.io/libE57Format-docs/). These docs are generated and saved in the [libE57Format-docs](https://github.com/asmaloney/libE57Format-docs) repo.
## Contributing
## Commercial Use
Please see [CONTRIBUTING](CONTRIBUTING.md).
If you are using this library in commercial software, please [contribute to the project](/CONTRIBUTING.md).
## Why Fork?
Of course the open source license allows you to just take and not give anything back. It is perfectly Legal, but it is not Right and it's not good for the project.
The E57RefImpl code hasn't been touched in years and I wanted to make changes to compile this library with macOS. Forking it gives me a bit more freedom to update the code and make changes as required.
Over the many years I've worked on this library, I have received precisely _zero_ contributions (PRs, documentation updates, improved testing, financial support) from the many million/billion-dollar companies who use it in their software.
I changed the name of the project so that it is not confused with the **E57RefImpl** project.
The more companies that leech on Open Source instead of nurturing it, the less healthy & viable the ecosystem is.
I have also changed the main include file's name from `E57Foundation.h` to `E57Format.h` to make sure there is no inclusion confusion.
## Requirements
Versions of **libE57Format** started at 2.0.
- a [C++14](https://en.cppreference.com/w/cpp/14) compatible compiler
- [CMake](https://cmake.org/) >= 3.15
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) for code formatting
- (_optional_) [ccache](https://ccache.dev/) to speed up rebuilds
## Dependencies
- [Xerces-C++](https://xerces.apache.org/xerces-c/) (for parsing XML)
### Installing Dependencies On Linux (Ubuntu)
```sh
$ sudo apt install libxerces-c-dev clang-format
```
### Installing Dependencies On macOS (homebrew)
```sh
$ brew install ccache clang-format xerces-c
```
## Build, Install, & Test
Here's how you build & install a release version with the defaults:
```
$ cmake -B E57-build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=E57-install libE57Format
$ cmake --build E57-build --parallel
$ cmake --install E57-build
```
If CMake can't find the xerces-c library, you can set [CMAKE_PREFIX_PATH](https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html) to point at it.
```
$ cmake -B E57-build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=E57-install \
-DCMAKE_PREFIX_PATH=/path/to/xerces-c \
libE57Format
```
Once the library is built, you can run the tests like this:
```
$ cd E57-build
$ ./test/testE57
[==========] Running 36 tests from 8 test suites.
[----------] Global test environment set-up.
[----------] 1 test from TestData
[ RUN ] TestData.RepoExists
...
```
See [test/README](test/README.md) for details about testing and the test data.
## 🍴 Fork (2018)
This is a fork of [E57RefImpl](https://sourceforge.net/projects/e57-3d-imgfmt/). The original source is from [E57RefImpl 1.1.332](https://sourceforge.net/projects/e57-3d-imgfmt/files/E57Refimpl-src/).
The original code had not been touched in several years and I wanted to make changes to compile it on macOS. Forking it gave me more freedom to update the code and make changes as required. Everything was stripped out except the main implementation for reading & writing E57 files.
- I changed the name of the project so that it is not confused with the **E57RefImpl** project.
- I changed the main include file's name from `E57Foundation.h` to `E57Format.h` to make sure there is no inclusion confusion.
- Versions of **libE57Format** started at 2.0.
- I fixed it to compile and run on macOS.
- It no longer depends on [Boost](https://www.boost.org/).
- It now requires [C++14](https://en.cppreference.com/w/cpp/14). (Version 2.x required [C++11](https://en.cppreference.com/w/cpp/11).)
Many, many other changes were made prior to the first release of this fork, and it has diverged significantly since. See the [CHANGELOG](CHANGELOG.md) and git history for details.
### E57Simple API
Since the original fork, [Jiri Hörner](https://github.com/ptc-jhoerner) has added the E57Simple API from the old reference implementation and updated it.
[Jiri Hörner](https://github.com/ptc-jhoerner) added the E57Simple API from the old reference implementation and updated it.
### Tools
This _Simple API_ has evolved since this original port to fix some problems and to make it more foolproof & easier to use. Please see the [CHANGELOG](CHANGELOG.md) for version 3.
[Ryan Baumann](https://github.com/ryanfb) has updated the `e57unpack` and `e57validate` tools to work with **libE57Format**. You can find them in the [e57tools](https://github.com/ryanfb/e57tools) repo.
## Projects Using libE57Format
- [AliceVision](https://github.com/alicevision/AliceVision)
- [CloudCompare](https://github.com/CloudCompare/CloudCompare)
- [MeshLab](https://github.com/cnr-isti-vclab/meshlab)
- [pye57](https://github.com/davidcaron/pye57)
These projects use hard forks of libE57Format:
- [FreeCAD](https://github.com/FreeCAD/FreeCAD)
- [PDAL](https://github.com/PDAL/PDAL)
There are also many commercial products using libE57Format. If any of them would like to sponsor the project and be listed here, please <a href="mailto:asmaloney@gmail.com?subject=libE57Format Sponsorship">contact Andy</a>.
## How To Contribute
These are some of the things you can do to contribute to the project:
### 💰 Financial
Given that I'm an independent developer without funding, financial support is appreciated. If you would like to support the project financially (especially if you sell a product which uses this library), you can use the [sponsors page](https://github.com/sponsors/asmaloney) for one-off or recurring support, or we can arrange <a href="mailto:asmaloney@gmail.com?subject=libE57Format B2B Sponsorship">B2B invoicing</a> of some kind. Thank you!
### ✍ Write About The Project
If you find the project useful, spread the word! Articles, mastodon posts, tweets, blog posts, instagram photos - whatever you're into. Please include a referral back to the repository page: https://github.com/asmaloney/libE57Format
### ⭐️ Add a Star
If you found this project useful, please consider starring it! It helps me gauge how useful this project is.
### ☝ Raise Issues
If you run into something which doesn't work as expected, raising [an issue](https://github.com/asmaloney/libE57Format/issues) with all the relevant information to reproduce it would be helpful.
### 🐞 Bug Fixes & 🧪 New Things
I am happy to review any [pull requests](https://github.com/asmaloney/libE57Format/pulls). Please keep them as short as possible. Each pull request should be atomic and only address one issue. This helps with the review process.
Note that I will not accept everything, but I welcome discussion. If you are proposing a big change, please raise it as [an issue](https://github.com/asmaloney/libE57Format/issues) first for discussion.
#### Formatting
This project uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format the code. There is a cmake target (_e57-clang-format_) - which runs _clang-format_ on the source files. After changes have been made, and before you submit your pull request, please run the following:
```sh
cmake --build . --target e57-clang-format
```
### 📖 Documentation
The [documentation](https://github.com/asmaloney/libE57Format) is a bit old and could use some lovin'. You can submit changes over in the [libE57Format-docs](https://github.com/asmaloney/libE57Format-docs) repository.
## License
This project as a whole is licensed under the [**BSL-1.0**](https://opensource.org/licenses/BSL-1.0) license - see the [LICENSE](LICENSE.md) file for details.
This project is licensed under the [**BSL-1.0** license](https://opensource.org/licenses/BSL-1.0) - see the [LICENSE](LICENSE.md) file for details.
Individual source files may contain the following tag instead of the full license text:
SPDX-License-Identifier: BSL-1.0
Some CMake files are licensed under the **MIT** license - see the [LICENSE-MIT](LICENSE-MIT.txt) file for details.
These files contain the following tag instead of the full license text:
SPDX-License-Identifier: MIT
Using SPDX enables machine processing of license information based on the [SPDX License Identifiers](https://spdx.org/ids) and makes it easier for developers to see at a glance which license they are dealing with.
+32
View File
@@ -0,0 +1,32 @@
# SPDX-License-Identifier: BSL-1.0
# Copyright 2020 Andy Maloney <asmaloney@gmail.com>
find_program( E57_CLANG_FORMAT_PROGRAM NAMES clang-format )
if ( E57_CLANG_FORMAT_PROGRAM )
message( STATUS "[${PROJECT_NAME}] Using clang-format: ${E57_CLANG_FORMAT_PROGRAM}" )
get_target_property( e57_sources ${PROJECT_NAME} SOURCES )
# Remove some files from the list
list( FILTER e57_sources EXCLUDE REGEX ".*/E57Export.h" )
list( FILTER e57_sources EXCLUDE REGEX ".*/extern/.*" )
# Get list of test files. We cannot use get_target_property here
# since we will not have a target if E57_BUILD_TEST is off.
file( GLOB e57_test_sources
LIST_DIRECTORIES false
CONFIGURE_DEPENDS
${PROJECT_SOURCE_DIR}/test/include/*.h
${PROJECT_SOURCE_DIR}/test/src/*.cpp
)
list( APPEND e57_sources ${e57_test_sources} )
add_custom_target( e57-clang-format
COMMAND ${E57_CLANG_FORMAT_PROGRAM} --style=file -i ${e57_sources}
COMMENT "Running clang-format..."
COMMAND_EXPAND_LISTS
VERBATIM
)
endif()
+112
View File
@@ -0,0 +1,112 @@
# SPDX-License-Identifier: BSL-1.0
# Copyright 2022 Andy Maloney <asmaloney@gmail.com>
string( TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPERCASE )
if ( NOT MSVC )
option( ${PROJECT_NAME_UPPERCASE}_WARN_EVERYTHING "Turn on all warnings (not recommended - used for lib development)" OFF )
endif()
option( ${PROJECT_NAME_UPPERCASE}_WARNING_AS_ERROR "Treat warnings as errors" OFF )
# Set some helper variables for readability
set( compiler_is_clang "$<OR:$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:Clang>>" )
set( compiler_is_gnu "$<CXX_COMPILER_ID:GNU>" )
set( compiler_is_msvc "$<CXX_COMPILER_ID:MSVC>" )
target_compile_options( ${PROJECT_NAME}
PRIVATE
# MSVC only
$<${compiler_is_msvc}:
/W4
/w14263 # 'function': member function does not override any base class virtual member function
/w14296 # 'operator': expression is always 'boolean_value'
/w14311 # 'variable': pointer truncation from 'type1' to 'type2'
/w14545 # expression before comma evaluates to a function which is missing an argument list
/w14546 # function call before comma missing argument list
/w14547 # 'operator': operator before comma has no effect; expected operator with side-effect
/w14549 # 'operator': operator before comma has no effect; did you intend 'operator'?
/w14619 # pragma warning: there is no warning number 'number'
/w14640 # thread un-safe static member initialization
/w14905 # wide string literal cast to 'LPSTR'
/w14906 # string literal cast to 'LPWSTR'
/wd4251 # 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
>
# Clang and GNU common options
$<$<OR:${compiler_is_clang},${compiler_is_gnu}>:
-Wall
-Wcast-align
-Wextra
-Wformat=2
-Wnon-virtual-dtor
-Wnull-dereference
-Woverloaded-virtual
-Wpedantic
-Wshadow
-Wunused
>
# Clang only
$<${compiler_is_clang}:
-Wdocumentation
-Wno-documentation-deprecated-sync # because enumerator [[deprecated]] attribute is C++17
>
# GNU only
$<${compiler_is_gnu}:
-Wduplicated-branches
-Wduplicated-cond
-Wlogical-op
>
)
# Turn on (almost) all warnings on Clang, Apple Clang, and GNU.
# Useful for internal development, but too noisy for general development.
function( set_warn_everything )
message( STATUS "[${PROJECT_NAME}] Turning on (almost) all warnings")
target_compile_options( ${PROJECT_NAME}
PRIVATE
# Clang and GNU
$<$<OR:${compiler_is_clang},${compiler_is_gnu}>:
-Weverything
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-padded
>
# Clang only
$<${compiler_is_clang}:
-Wno-documentation-deprecated-sync # because enumerator [[deprecated]] attribute is C++17
>
)
endfunction()
if ( NOT MSVC AND ${PROJECT_NAME_UPPERCASE}_WARN_EVERYTHING )
set_warn_everything()
endif()
# Treat warnings as errors
function( set_warning_as_error )
message( STATUS "[${PROJECT_NAME}] Treating warnings as errors")
if ( CMAKE_VERSION VERSION_GREATER_EQUAL "3.24" )
set_target_properties( ${PROJECT_NAME}
PROPERTIES
COMPILE_WARNING_AS_ERROR ON
)
else()
# This will do nothing on compilers other than MSVC, Clang, Apple Clang, and GNU compilers.
target_compile_options( ${PROJECT_NAME}
PRIVATE
$<${compiler_is_msvc}:
/WX
>
$<$<OR:${compiler_is_clang},${compiler_is_gnu}>:
-Werror
>
)
endif()
endfunction()
if ( ${PROJECT_NAME_UPPERCASE}_WARNING_AS_ERROR )
set_warning_as_error()
endif()
@@ -1,11 +1,13 @@
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: BSL-1.0
# Copyright 2020 Andy Maloney <asmaloney@gmail.com>
# Generate the export header file for E57Format
include( GenerateExportHeader )
set( comment "// NOTE: This is a generated file. Any changes will be overwritten." )
set( comment "\r
// NOTE: This is a generated file. Any changes will be overwritten."
)
generate_export_header( E57Format
EXPORT_FILE_NAME E57Export.h
+122
View File
@@ -0,0 +1,122 @@
# ---------------------------------------------------------------------------- #
#
# Copyright (c) 2020 C++ Modern Framework
#
# https://github.com/cppmf/GitInfo.cmake
#
# ---------------------------------------------------------------------------- #
# Modified June 2024 - Andy Maloney <asmaloney@gmail.com>
# - remove some vars we aren't using
# - fix spelling/grammar
# ---------------------------------------------------------------------------- #
#
# Following variables will be set when calling GitInfo
#
# GIT_DIR: path to the project .git directory
# GIT_IS_DIRTY: whether or not the working tree is dirty
# GIT_HEAD_BRANCH : name of the branch associated to HEAD
# GIT_REVISION_HASH: current HEAD sha hash
# GIT_REVISION: short version of GIT_REVISION_HASH
# GIT_REVISION_NAME: name associated to GIT_REVISION_HASH
# GIT_REMOTE_ORIGIN_URL : origin remote url
# GIT_LATEST_TAG_LONG : most recent tag of the current branch
# GIT_LATEST_TAG : most recent tagname of the current branch
#
# ---------------------------------------------------------------------------- #
# This is the main function to call in project CMakeLists.txt
# source should point to the root project directory
function(GitInfo source)
# Check is source is a valid path
if(NOT EXISTS ${source})
message(FATAL_ERROR "'${source}' is not a valid path")
endif()
# Define the possible location of the .git directory
set(GIT_DIR "${source}/.git")
# Check if .git folder exist
if(EXISTS ${GIT_DIR})
#
set(GIT_DIR "${GIT_DIR}" CACHE PATH "Project .git directory")
# Check if git is installed
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
if(NOT GIT_FOUND)
message(AUTHOR_WARNING "Git not found, cannot get git information")
return()
endif()
# name of the branch associated to HEAD
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${source}
OUTPUT_VARIABLE GIT_HEAD_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_HEAD_BRANCH "${GIT_HEAD_BRANCH}" CACHE INTERNAL "name of the branch associated to HEAD")
# git revision full hash
execute_process(COMMAND ${GIT_EXECUTABLE} show -s "--format=%H" HEAD
WORKING_DIRECTORY ${source}
OUTPUT_VARIABLE GIT_REVISION_HASH OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_REVISION_HASH "${GIT_REVISION_HASH}" CACHE INTERNAL "git revision full hash")
# short version of git revision
execute_process(COMMAND ${GIT_EXECUTABLE} show -s "--format=%h" HEAD
WORKING_DIRECTORY ${source}
OUTPUT_VARIABLE GIT_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_REVISION "${GIT_REVISION}" CACHE INTERNAL "short version of git revision")
# short version of git revision name
execute_process(COMMAND ${GIT_EXECUTABLE} show -s "--format=%s" HEAD
WORKING_DIRECTORY ${source}
OUTPUT_VARIABLE GIT_REVISION_NAME OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_REVISION_NAME "${GIT_REVISION_NAME}" CACHE INTERNAL "short version of git revision name")
# origin remote url
execute_process(COMMAND ${GIT_EXECUTABLE} config --get remote.origin.url
WORKING_DIRECTORY ${source}
OUTPUT_VARIABLE GIT_REMOTE_ORIGIN_URL OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_REMOTE_ORIGIN_URL "${GIT_REMOTE_ORIGIN_URL}" CACHE INTERNAL "git origin remote url")
# most recent tag of the current branch
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 HEAD
WORKING_DIRECTORY ${source}
OUTPUT_VARIABLE GIT_LATEST_TAG_LONG OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_LATEST_TAG_LONG "${GIT_LATEST_TAG_LONG}" CACHE INTERNAL "git most recent tag of the current branch")
# most recent tagname of the current branch
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags HEAD
WORKING_DIRECTORY ${source}
OUTPUT_VARIABLE GIT_LATEST_TAG OUTPUT_STRIP_TRAILING_WHITESPACE)
set(GIT_LATEST_TAG "${GIT_LATEST_TAG}" CACHE INTERNAL "git most recent tagname of the current branch")
endif()
endfunction()
# Report git information
function(GitInfoReport)
message(STATUS "")
message(STATUS "----------------------------------------------------")
message(STATUS " GitInfo.cmake")
message(STATUS "")
message(STATUS "GIT_DIR : ${GIT_DIR}")
message(STATUS "")
message(STATUS "GIT_HEAD_BRANCH : ${GIT_HEAD_BRANCH}")
message(STATUS "GIT_REVISION : ${GIT_REVISION}")
message(STATUS "GIT_REVISION_HASH : ${GIT_REVISION_HASH}")
message(STATUS "GIT_REVISION_NAME : ${GIT_REVISION_NAME}")
message(STATUS "")
message(STATUS "GIT_REMOTE_ORIGIN_URL : ${GIT_REMOTE_ORIGIN_URL}")
message(STATUS "GIT_LATEST_TAG_LONG : ${GIT_LATEST_TAG_LONG}")
message(STATUS "GIT_LATEST_TAG : ${GIT_LATEST_TAG}")
message(STATUS "")
message(STATUS "----------------------------------------------------")
message(STATUS "")
endfunction()
+22
View File
@@ -0,0 +1,22 @@
find_package( Git QUIET )
if ( GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git" )
# Update submodules as needed
option( E57_GIT_SUBMODULE_UPDATE "Check submodules and update during build" ON )
if ( E57_GIT_SUBMODULE_UPDATE )
message( STATUS "Submodule update using git (${GIT_EXECUTABLE})" )
message( STATUS "Submodule update directory: ${CMAKE_CURRENT_SOURCE_DIR}" )
execute_process( COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT
ERROR_VARIABLE GIT_SUBMOD_RESULT)
if ( GIT_SUBMOD_RESULT EQUAL "0" )
message( STATUS "Submodule update complete" )
else()
message( FATAL_ERROR "Submodule update failed with ${GIT_SUBMOD_RESULT}, please checkout submodules" )
endif()
endif()
endif()
@@ -1,19 +0,0 @@
# SPDX-License-Identifier: MIT
# Copyright 2020 Andy Maloney <asmaloney@gmail.com>
find_program( E57_CLANG_FORMAT_EXE NAMES clang-format )
if ( E57_CLANG_FORMAT_EXE )
get_target_property( e57_sources ${PROJECT_NAME} SOURCES )
# Remove some files from the list
list( FILTER e57_sources EXCLUDE REGEX ".*/E57Export.h" )
list( FILTER e57_sources EXCLUDE REGEX ".*/extern/.*" )
add_custom_target( format
COMMAND clang-format --style=file -i ${e57_sources}
COMMENT "Running clang-format..."
COMMAND_EXPAND_LISTS
VERBATIM
)
endif()
-41
View File
@@ -1,41 +0,0 @@
# This file defines the variables
# ${PROJECT_NAME}_BUILD_TAG
# calculate the tag
set(T_ ${CMAKE_SYSTEM_PROCESSOR})
if (CMAKE_CL_64)
set(T_ ${T_}_64)
endif (CMAKE_CL_64)
string(TOLOWER ${CMAKE_SYSTEM_NAME} T1_)
set(T_ ${T_}-${T1_})
if (MSVC90)
set(T1_ "-vc90")
elseif (MSVC10)
set(T1_ "-vc100")
elseif (MSVC80)
set(T1_ "-vc80")
elseif (MSVC71)
set(T1_ "-vc711")
elseif (MSVC70)
set(T1_ "-vc7")
elseif (MINGW)
set(T1_ "-mgw")
exec_program(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE T2_
)
string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" T2_ ${T2_})
set(T1_ ${T1_}${T2_})
elseif (CMAKE_COMPILER_IS_GNUCXX)
set(T1_ "-gcc")
exec_program(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE T2_
)
string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" T2_ ${T2_})
set(T1_ ${T1_}${T2_})
else()
set(T1_)
endif()
set(T_ ${T_}${T1_})
set(${PROJECT_NAME}_BUILD_TAG ${T_})
+93
View File
@@ -0,0 +1,93 @@
# SPDX-License-Identifier: BSL-1.0
# Copyright 2023 Andy Maloney <asmaloney@gmail.com>
# Note: In theory address sanitization should work on MSVC, but I could not get it working.
# If you know how to fix it, please submit a PR:
# https://github.com/asmaloney/libE57Format/pulls
string( TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPERCASE )
set( compiler_is_clang "$<OR:$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:Clang>>" )
set( compiler_is_gnu "$<CXX_COMPILER_ID:GNU>" )
set( compiler_is_msvc "$<CXX_COMPILER_ID:MSVC>" )
set( compiler_is_not_msvc "$<NOT:${compiler_is_msvc}>" )
if ( NOT MSVC )
option( ${PROJECT_NAME_UPPERCASE}_SANITIZE_ALL "Enable all sanitizers if available." OFF )
option( ${PROJECT_NAME_UPPERCASE}_SANITIZE_ADDRESS "Enable address sanitizer (ASan) if available." OFF )
option( ${PROJECT_NAME_UPPERCASE}_SANITIZE_UNDEFINED "Enable memory sanitizer (UBSan) if available." OFF )
endif()
function( enable_address_sanitizer target )
message( STATUS "[${target}] Enabling address sanitizer (ASan)" )
target_compile_options( ${target}
PRIVATE
$<${compiler_is_not_msvc}:
-fno-omit-frame-pointer
-fsanitize=address
>
$<${compiler_is_msvc}:
/fsanitize=address
/INCREMENTAL:NO
/Zi
>
)
target_link_options( ${target}
PUBLIC
$<${compiler_is_not_msvc}:
-fno-omit-frame-pointer
-fsanitize=address
>
$<${compiler_is_msvc}:
/DEBUG
/INCREMENTAL:NO
>
)
endfunction()
function( enable_undefined_sanitizer target )
if ( MSVC )
message( WARNING "[${target}] Undefined behaviour sanitizer (UBSan) not available for MSVC" )
return()
endif()
message( STATUS "[${target}] Enabling undefined behaviour sanitizer (UBSan)" )
target_compile_options( ${target}
PRIVATE
-fsanitize=undefined
)
target_link_options( ${target}
PUBLIC
-fsanitize=undefined
)
endfunction()
function( enable_all_sanitizers target )
if ( MSVC )
return()
endif()
unset( ${PROJECT_NAME_UPPERCASE}_SANITIZE_ADDRESS CACHE )
unset( ${PROJECT_NAME_UPPERCASE}_SANITIZE_UNDEFINED CACHE )
enable_address_sanitizer( ${target} )
enable_undefined_sanitizer( ${target} )
endfunction()
if ( NOT MSVC )
if ( ${PROJECT_NAME_UPPERCASE}_SANITIZE_ALL )
enable_all_sanitizers( ${PROJECT_NAME} )
else()
if ( ${PROJECT_NAME_UPPERCASE}_SANITIZE_ADDRESS )
enable_address_sanitizer( ${PROJECT_NAME} )
endif()
if ( ${PROJECT_NAME_UPPERCASE}_SANITIZE_UNDEFINED )
enable_undefined_sanitizer( ${PROJECT_NAME} )
endif()
endif()
endif()
+39
View File
@@ -0,0 +1,39 @@
# This file defines the variables
# ${PROJECT_NAME}_BUILD_TAG
set( T_ ${CMAKE_SYSTEM_PROCESSOR} )
string( TOLOWER ${CMAKE_SYSTEM_NAME} T1_ )
function( add_compiler_version )
execute_process(
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE T2_
)
string( REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" T2_ ${T2_} )
string( STRIP ${T2_} T2_ )
set( T1_ ${T1_}${T2_} PARENT_SCOPE )
endfunction()
# default to just the CMake compiler ID
set( T1_ ${CMAKE_CXX_COMPILER_ID} )
# special cases to add versions and other info
if ( MSVC )
if ( CMAKE_CL_64 )
set( T_ ${T_}_64 )
endif()
set( T1_ "vc${MSVC_VERSION}" )
elseif ( MINGW )
set( T1_ "MinGW" )
add_compiler_version()
elseif ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
set( T1_ "gcc" )
add_compiler_version()
elseif ( CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compiler_version()
endif()
set( T_ ${T_}-${T1_} )
set( ${PROJECT_NAME}_BUILD_TAG ${T_} )
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: BSL-1.0
# Copyright 2022 Andy Maloney <asmaloney@gmail.com>
# See: https://crascit.com/2016/04/09/using-ccache-with-cmake/
find_program( CCACHE_PROGRAM ccache )
if ( CCACHE_PROGRAM )
message( STATUS "[${PROJECT_NAME}] Using ccache: ${CCACHE_PROGRAM}" )
set_target_properties( ${PROJECT_NAME}
PROPERTIES
CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}"
C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}"
)
endif()
+9 -3
View File
@@ -1,14 +1,20 @@
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: BSL-1.0
# Copyright © Andy Maloney <asmaloney@gmail.com>
# CRCpp from here: https://github.com/d-bahr/CRCpp
target_compile_definitions( ${PROJECT_NAME}
PRIVATE
CRCPP_USE_CPP11
CRCPP_BRANCHLESS
)
target_sources( ${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/inc/CRC.h
inc/CRC.h
)
target_include_directories( ${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/inc
inc
)
+1 -1
View File
@@ -1,5 +1,5 @@
CRC++
Copyright (c) 2016, Daniel Bahr
Copyright (c) 2022, Daniel Bahr
All rights reserved.
Redistribution and use in source and binary forms, with or without
+68 -1
View File
@@ -82,7 +82,24 @@ int main(int argc, char ** argv)
This will return the same CRC as the first example.
Both of the above examples compute a CRC bit-by-bit. However, CRC++ also supports lookup tables, as the following example demonstrates:
If you need to compute a CRC on an input that is not a multiple of `CHAR_BIT` (usually 8 bits), use the `CalculateBits()` function instead:
```cpp
int main(int argc, char ** argv)
{
const unsigned char data[] = { 0x98, 0x76, 0x54, 0x32, 0x10 };
// Second argument is the number of bits. The input data must
// be a whole number of bytes. Pad any used bits with zeros.
std::uint32_t crc = CRC::CalculateBits(data, 37, CRC::CRC_32());
std::cout << std::hex << crc;
return 0;
}
```
The above examples compute a CRC bit-by-bit. However, CRC++ also supports lookup tables, as the following example demonstrates:
```cpp
int main(int argc, char ** argv)
@@ -149,6 +166,56 @@ Define to enables C++11 features (move semantics, constexpr, static_assert, etc.
* `#define CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS`
Define to include definitions for little-used CRCs. Not defined by default.
### Build
CRC does not require a build for basic usage; simply include the header file in your project.
Unit tests and documentation can be built manually with the project files provided or automatically with CMake.
To build documentation manually:
```bash
cd doxygen
doxygen Doxyfile.dox
```
To build unit tests manually via Make:
```bash
# Build
cd test/prj/gcc
make [debug|release]
# Run unit tests
bin/unittest
```
Project files and solutions for Visual Studio 2015, 2017 and 2022 are provided in `test/prj`. Simply open the solution file and run the project; no additional configuration should be necessary.
CMake can also be used to build the documentation and unit tests. An out-of-source build is recommended. In this example, we will do an out-of-source build in the `build` directory:
```bash
mkdir -p build
cd build
cmake .. [-DBUILD_DOC=ON]
# Build and run unit tests
make tests
# Build documentation
make doxygen
# Install header file
sudo make install
```
Unit tests are built by default. Enable the `BUILD_DOC` CMake flag to also build documentation (requires [Doxygen](https://www.doxygen.nl/index.html)).
### Documentation
https://d-bahr.github.io/CRCpp/
### License
CRC++ is free to use and provided under a BSD license.
### References
Catalog of CRCs: https://reveng.sourceforge.io/crc-catalogue/
5G-NR Specification 3GPP TS 38.212: https://www.etsi.org/deliver/etsi_ts/138200_138299/138212/15.03.00_60/ts_138212v150300p.pdf
USB 2.0 Specification: https://www.usb.org/document-library/usb-20-specification
+471 -60
View File
@@ -1,11 +1,11 @@
/**
@file CRC.h
@author Daniel Bahr
@version 0.2.0.6
@version 1.2.0.0
@copyright
@parblock
CRC++
Copyright (c) 2016, Daniel Bahr
Copyright (c) 2022, Daniel Bahr
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@
multiplication in the bit-by-bit calculation instead of a small conditional. The branchless implementation
may be faster on processor architectures which support single-instruction integer multiplication.
#define CRCPP_USE_CPP11 - Define to enables C++11 features (move semantics, constexpr, static_assert, etc.).
#define CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS - Define to include definitions for little-used CRCs.
#define CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS - Define to include definitions for little-used CRCs.
*/
#ifndef CRCPP_CRC_H_
@@ -127,6 +127,12 @@
# define crcpp_constexpr const
#endif
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER)
/* Disable warning C4127: conditional expression is constant. */
#pragma warning(push)
#pragma warning(disable : 4127)
#endif
#ifdef CRCPP_USE_NAMESPACE
namespace CRCPP
{
@@ -202,6 +208,18 @@ public:
template <typename CRCType, crcpp_uint16 CRCWidth>
static CRCType Calculate(const void * data, crcpp_size size, const Table<CRCType, CRCWidth> & lookupTable, CRCType crc);
template <typename CRCType, crcpp_uint16 CRCWidth>
static CRCType CalculateBits(const void * data, crcpp_size size, const Parameters<CRCType, CRCWidth> & parameters);
template <typename CRCType, crcpp_uint16 CRCWidth>
static CRCType CalculateBits(const void * data, crcpp_size size, const Parameters<CRCType, CRCWidth> & parameters, CRCType crc);
template <typename CRCType, crcpp_uint16 CRCWidth>
static CRCType CalculateBits(const void * data, crcpp_size size, const Table<CRCType, CRCWidth> & lookupTable);
template <typename CRCType, crcpp_uint16 CRCWidth>
static CRCType CalculateBits(const void * data, crcpp_size size, const Table<CRCType, CRCWidth> & lookupTable, CRCType crc);
// Common CRCs up to 64 bits.
// Note: Check values are the computed CRCs when given an ASCII input of "123456789" (without null terminator)
#ifdef CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS
@@ -212,16 +230,20 @@ public:
static const Parameters< crcpp_uint8, 6> & CRC_6_CDMA2000A();
static const Parameters< crcpp_uint8, 6> & CRC_6_CDMA2000B();
static const Parameters< crcpp_uint8, 6> & CRC_6_ITU();
static const Parameters< crcpp_uint8, 6> & CRC_6_NR();
static const Parameters< crcpp_uint8, 7> & CRC_7();
#endif
static const Parameters< crcpp_uint8, 8> & CRC_8();
#ifdef CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS
static const Parameters< crcpp_uint8, 8> & CRC_8_EBU();
static const Parameters< crcpp_uint8, 8> & CRC_8_HDLC();
static const Parameters< crcpp_uint8, 8> & CRC_8_MAXIM();
static const Parameters< crcpp_uint8, 8> & CRC_8_WCDMA();
static const Parameters< crcpp_uint8, 8> & CRC_8_LTE();
static const Parameters<crcpp_uint16, 10> & CRC_10();
static const Parameters<crcpp_uint16, 10> & CRC_10_CDMA2000();
static const Parameters<crcpp_uint16, 11> & CRC_11();
static const Parameters<crcpp_uint16, 11> & CRC_11_NR();
static const Parameters<crcpp_uint16, 12> & CRC_12_CDMA2000();
static const Parameters<crcpp_uint16, 12> & CRC_12_DECT();
static const Parameters<crcpp_uint16, 12> & CRC_12_UMTS();
@@ -232,8 +254,10 @@ public:
static const Parameters<crcpp_uint16, 16> & CRC_16_ARC();
static const Parameters<crcpp_uint16, 16> & CRC_16_BUYPASS();
static const Parameters<crcpp_uint16, 16> & CRC_16_CCITTFALSE();
static const Parameters<crcpp_uint16, 16> & CRC_16_MCRF4XX();
#ifdef CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS
static const Parameters<crcpp_uint16, 16> & CRC_16_CDMA2000();
static const Parameters<crcpp_uint16, 16> & CRC_16_CMS();
static const Parameters<crcpp_uint16, 16> & CRC_16_DECTR();
static const Parameters<crcpp_uint16, 16> & CRC_16_DECTX();
static const Parameters<crcpp_uint16, 16> & CRC_16_DNP();
@@ -254,6 +278,9 @@ public:
static const Parameters<crcpp_uint32, 24> & CRC_24();
static const Parameters<crcpp_uint32, 24> & CRC_24_FLEXRAYA();
static const Parameters<crcpp_uint32, 24> & CRC_24_FLEXRAYB();
static const Parameters<crcpp_uint32, 24> & CRC_24_LTEA();
static const Parameters<crcpp_uint32, 24> & CRC_24_LTEB();
static const Parameters<crcpp_uint32, 24> & CRC_24_NRC();
static const Parameters<crcpp_uint32, 30> & CRC_30();
#endif
static const Parameters<crcpp_uint32, 32> & CRC_32();
@@ -299,8 +326,8 @@ private:
template <typename CRCType, crcpp_uint16 CRCWidth>
static CRCType CalculateRemainder(const void * data, crcpp_size size, const Table<CRCType, CRCWidth> & lookupTable, CRCType remainder);
template <typename IntegerType>
static crcpp_constexpr IntegerType BoundedConstexprValue(IntegerType x);
template <typename CRCType, crcpp_uint16 CRCWidth>
static CRCType CalculateRemainderBits(unsigned char byte, crcpp_size numBits, const Parameters<CRCType, CRCWidth> & parameters, CRCType remainder);
};
/**
@@ -320,13 +347,13 @@ inline CRC::Table<CRCType, CRCWidth> CRC::Parameters<CRCType, CRCWidth>::MakeTab
/**
@brief Constructs a CRC table from a set of CRC parameters
@param[in] parameters CRC parameters
@param[in] params CRC parameters
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
*/
template <typename CRCType, crcpp_uint16 CRCWidth>
inline CRC::Table<CRCType, CRCWidth>::Table(const Parameters<CRCType, CRCWidth> & parameters) :
parameters(parameters)
inline CRC::Table<CRCType, CRCWidth>::Table(const Parameters<CRCType, CRCWidth> & params) :
parameters(params)
{
InitTable();
}
@@ -334,13 +361,13 @@ inline CRC::Table<CRCType, CRCWidth>::Table(const Parameters<CRCType, CRCWidth>
#ifdef CRCPP_USE_CPP11
/**
@brief Constructs a CRC table from a set of CRC parameters
@param[in] parameters CRC parameters
@param[in] params CRC parameters
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
*/
template <typename CRCType, crcpp_uint16 CRCWidth>
inline CRC::Table<CRCType, CRCWidth>::Table(Parameters<CRCType, CRCWidth> && parameters) :
parameters(::std::move(parameters))
inline CRC::Table<CRCType, CRCWidth>::Table(Parameters<CRCType, CRCWidth> && params) :
parameters(::std::move(params))
{
InitTable();
}
@@ -395,7 +422,8 @@ inline void CRC::Table<CRCType, CRCWidth>::InitTable()
static crcpp_constexpr CRCType BIT_MASK((CRCType(1) << (CRCWidth - CRCType(1))) |
((CRCType(1) << (CRCWidth - CRCType(1))) - CRCType(1)));
static crcpp_constexpr CRCType SHIFT(CRC::BoundedConstexprValue(CHAR_BIT - CRCWidth));
// The conditional expression is used to avoid a -Wshift-count-overflow warning.
static crcpp_constexpr CRCType SHIFT((CHAR_BIT >= CRCWidth) ? static_cast<CRCType>(CHAR_BIT - CRCWidth) : 0);
CRCType crc;
unsigned char byte = 0;
@@ -414,7 +442,7 @@ inline void CRC::Table<CRCType, CRCWidth>::InitTable()
{
// Undo the special operation at the end of the CalculateRemainder()
// function for non-reflected CRCs < CHAR_BIT.
crc <<= SHIFT;
crc = static_cast<CRCType>(crc << SHIFT);
}
table[byte] = crc;
@@ -425,7 +453,7 @@ inline void CRC::Table<CRCType, CRCWidth>::InitTable()
/**
@brief Computes a CRC.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data
@param[in] size Size of the data, in bytes
@param[in] parameters CRC parameters
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
@@ -444,7 +472,7 @@ inline CRCType CRC::Calculate(const void * data, crcpp_size size, const Paramete
@brief Appends additional data to a previous CRC calculation.
@note This function can be used to compute multi-part CRCs.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data
@param[in] size Size of the data, in bytes
@param[in] parameters CRC parameters
@param[in] crc CRC from a previous calculation
@tparam CRCType Integer type for storing the CRC result
@@ -466,7 +494,7 @@ inline CRCType CRC::Calculate(const void * data, crcpp_size size, const Paramete
/**
@brief Computes a CRC via a lookup table.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data
@param[in] size Size of the data, in bytes
@param[in] lookupTable CRC lookup table
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
@@ -488,7 +516,7 @@ inline CRCType CRC::Calculate(const void * data, crcpp_size size, const Table<CR
@brief Appends additional data to a previous CRC calculation using a lookup table.
@note This function can be used to compute multi-part CRCs.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data
@param[in] size Size of the data, in bytes
@param[in] lookupTable CRC lookup table
@param[in] crc CRC from a previous calculation
@tparam CRCType Integer type for storing the CRC result
@@ -509,6 +537,149 @@ inline CRCType CRC::Calculate(const void * data, crcpp_size size, const Table<CR
return Finalize<CRCType, CRCWidth>(remainder, parameters.finalXOR, parameters.reflectInput != parameters.reflectOutput);
}
/**
@brief Computes a CRC.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data, in bits
@param[in] parameters CRC parameters
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
@return CRC
*/
template <typename CRCType, crcpp_uint16 CRCWidth>
inline CRCType CRC::CalculateBits(const void * data, crcpp_size size, const Parameters<CRCType, CRCWidth> & parameters)
{
CRCType remainder = parameters.initialValue;
// Calculate the remainder on a whole number of bytes first, then call
// a special-case function for the remaining bits.
crcpp_size wholeNumberOfBytes = size / CHAR_BIT;
if (wholeNumberOfBytes > 0)
{
remainder = CalculateRemainder(data, wholeNumberOfBytes, parameters, remainder);
}
crcpp_size remainingNumberOfBits = size % CHAR_BIT;
if (remainingNumberOfBits != 0)
{
unsigned char lastByte = *(reinterpret_cast<const unsigned char *>(data) + wholeNumberOfBytes);
remainder = CalculateRemainderBits(lastByte, remainingNumberOfBits, parameters, remainder);
}
// No need to mask the remainder here; the mask will be applied in the Finalize() function.
return Finalize<CRCType, CRCWidth>(remainder, parameters.finalXOR, parameters.reflectInput != parameters.reflectOutput);
}
/**
@brief Appends additional data to a previous CRC calculation.
@note This function can be used to compute multi-part CRCs.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data, in bits
@param[in] parameters CRC parameters
@param[in] crc CRC from a previous calculation
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
@return CRC
*/
template <typename CRCType, crcpp_uint16 CRCWidth>
inline CRCType CRC::CalculateBits(const void * data, crcpp_size size, const Parameters<CRCType, CRCWidth> & parameters, CRCType crc)
{
CRCType remainder = UndoFinalize<CRCType, CRCWidth>(crc, parameters.finalXOR, parameters.reflectInput != parameters.reflectOutput);
// Calculate the remainder on a whole number of bytes first, then call
// a special-case function for the remaining bits.
crcpp_size wholeNumberOfBytes = size / CHAR_BIT;
if (wholeNumberOfBytes > 0)
{
remainder = CalculateRemainder(data, wholeNumberOfBytes, parameters, parameters.initialValue);
}
crcpp_size remainingNumberOfBits = size % CHAR_BIT;
if (remainingNumberOfBits != 0)
{
unsigned char lastByte = *(reinterpret_cast<const unsigned char *>(data) + wholeNumberOfBytes);
remainder = CalculateRemainderBits(lastByte, remainingNumberOfBits, parameters, remainder);
}
// No need to mask the remainder here; the mask will be applied in the Finalize() function.
return Finalize<CRCType, CRCWidth>(remainder, parameters.finalXOR, parameters.reflectInput != parameters.reflectOutput);
}
/**
@brief Computes a CRC via a lookup table.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data, in bits
@param[in] lookupTable CRC lookup table
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
@return CRC
*/
template <typename CRCType, crcpp_uint16 CRCWidth>
inline CRCType CRC::CalculateBits(const void * data, crcpp_size size, const Table<CRCType, CRCWidth> & lookupTable)
{
const Parameters<CRCType, CRCWidth> & parameters = lookupTable.GetParameters();
CRCType remainder = parameters.initialValue;
// Calculate the remainder on a whole number of bytes first, then call
// a special-case function for the remaining bits.
crcpp_size wholeNumberOfBytes = size / CHAR_BIT;
if (wholeNumberOfBytes > 0)
{
remainder = CalculateRemainder(data, wholeNumberOfBytes, lookupTable, remainder);
}
crcpp_size remainingNumberOfBits = size % CHAR_BIT;
if (remainingNumberOfBits != 0)
{
unsigned char lastByte = *(reinterpret_cast<const unsigned char *>(data) + wholeNumberOfBytes);
remainder = CalculateRemainderBits(lastByte, remainingNumberOfBits, parameters, remainder);
}
// No need to mask the remainder here; the mask will be applied in the Finalize() function.
return Finalize<CRCType, CRCWidth>(remainder, parameters.finalXOR, parameters.reflectInput != parameters.reflectOutput);
}
/**
@brief Appends additional data to a previous CRC calculation using a lookup table.
@note This function can be used to compute multi-part CRCs.
@param[in] data Data over which CRC will be computed
@param[in] size Size of the data, in bits
@param[in] lookupTable CRC lookup table
@param[in] crc CRC from a previous calculation
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
@return CRC
*/
template <typename CRCType, crcpp_uint16 CRCWidth>
inline CRCType CRC::CalculateBits(const void * data, crcpp_size size, const Table<CRCType, CRCWidth> & lookupTable, CRCType crc)
{
const Parameters<CRCType, CRCWidth> & parameters = lookupTable.GetParameters();
CRCType remainder = UndoFinalize<CRCType, CRCWidth>(crc, parameters.finalXOR, parameters.reflectInput != parameters.reflectOutput);
// Calculate the remainder on a whole number of bytes first, then call
// a special-case function for the remaining bits.
crcpp_size wholeNumberOfBytes = size / CHAR_BIT;
if (wholeNumberOfBytes > 0)
{
remainder = CalculateRemainder(data, wholeNumberOfBytes, lookupTable, parameters.initialValue);
}
crcpp_size remainingNumberOfBits = size % CHAR_BIT;
if (remainingNumberOfBits > 0)
{
unsigned char lastByte = *(reinterpret_cast<const unsigned char *>(data) + wholeNumberOfBytes);
remainder = CalculateRemainderBits(lastByte, remainingNumberOfBits, parameters, remainder);
}
// No need to mask the remainder here; the mask will be applied in the Finalize() function.
return Finalize<CRCType, CRCWidth>(remainder, parameters.finalXOR, parameters.reflectInput != parameters.reflectOutput);
}
/**
@brief Reflects (i.e. reverses the bits within) an integer value.
@param[in] value Value to reflect
@@ -523,8 +694,8 @@ inline IntegerType CRC::Reflect(IntegerType value, crcpp_uint16 numBits)
for (crcpp_uint16 i = 0; i < numBits; ++i)
{
reversedValue = (reversedValue << 1) | (value & 1);
value >>= 1;
reversedValue = static_cast<IntegerType>((reversedValue << 1) | (value & 1));
value = static_cast<IntegerType>(value >> 1);
}
return reversedValue;
@@ -591,7 +762,7 @@ inline CRCType CRC::UndoFinalize(CRCType crc, CRCType finalXOR, bool reflectOutp
/**
@brief Computes a CRC remainder.
@param[in] data Data over which the remainder will be computed
@param[in] size Size of the data
@param[in] size Size of the data, in bytes
@param[in] parameters CRC parameters
@param[in] remainder Running CRC remainder. Can be an initial value or the result of a previous CRC remainder calculation.
@tparam CRCType Integer type for storing the CRC result
@@ -620,7 +791,7 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
CRCType polynomial = CRC::Reflect(parameters.polynomial, CRCWidth);
while (size--)
{
remainder ^= *current++;
remainder = static_cast<CRCType>(remainder ^ *current++);
// An optimizing compiler might choose to unroll this loop.
for (crcpp_size i = 0; i < CHAR_BIT; ++i)
@@ -631,9 +802,9 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
// remainder = (remainder >> 1) ^ polynomial;
// else
// remainder >>= 1;
remainder = (remainder >> 1) ^ ((remainder & 1) * polynomial);
remainder = static_cast<CRCType>((remainder >> 1) ^ ((remainder & 1) * polynomial));
#else
remainder = (remainder & 1) ? ((remainder >> 1) ^ polynomial) : (remainder >> 1);
remainder = static_cast<CRCType>((remainder & 1) ? ((remainder >> 1) ^ polynomial) : (remainder >> 1));
#endif
}
}
@@ -644,11 +815,12 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
#ifndef CRCPP_BRANCHLESS
static crcpp_constexpr CRCType CRC_HIGHEST_BIT_MASK(CRCType(1) << CRC_WIDTH_MINUS_ONE);
#endif
static crcpp_constexpr CRCType SHIFT(BoundedConstexprValue(CRCWidth - CHAR_BIT));
// The conditional expression is used to avoid a -Wshift-count-overflow warning.
static crcpp_constexpr CRCType SHIFT((CRCWidth >= CHAR_BIT) ? static_cast<CRCType>(CRCWidth - CHAR_BIT) : 0);
while (size--)
{
remainder ^= (static_cast<CRCType>(*current++) << SHIFT);
remainder = static_cast<CRCType>(remainder ^ (static_cast<CRCType>(*current++) << SHIFT));
// An optimizing compiler might choose to unroll this loop.
for (crcpp_size i = 0; i < CHAR_BIT; ++i)
@@ -659,9 +831,9 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
// remainder = (remainder << 1) ^ parameters.polynomial;
// else
// remainder <<= 1;
remainder = (remainder << 1) ^ (((remainder >> CRC_WIDTH_MINUS_ONE) & 1) * parameters.polynomial);
remainder = static_cast<CRCType>((remainder << 1) ^ (((remainder >> CRC_WIDTH_MINUS_ONE) & 1) * parameters.polynomial));
#else
remainder = (remainder & CRC_HIGHEST_BIT_MASK) ? ((remainder << 1) ^ parameters.polynomial) : (remainder << 1);
remainder = static_cast<CRCType>((remainder & CRC_HIGHEST_BIT_MASK) ? ((remainder << 1) ^ parameters.polynomial) : (remainder << 1));
#endif
}
}
@@ -672,14 +844,15 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
#ifndef CRCPP_BRANCHLESS
static crcpp_constexpr CRCType CHAR_BIT_HIGHEST_BIT_MASK(CRCType(1) << CHAR_BIT_MINUS_ONE);
#endif
static crcpp_constexpr CRCType SHIFT(BoundedConstexprValue(CHAR_BIT - CRCWidth));
// The conditional expression is used to avoid a -Wshift-count-overflow warning.
static crcpp_constexpr CRCType SHIFT((CHAR_BIT >= CRCWidth) ? static_cast<CRCType>(CHAR_BIT - CRCWidth) : 0);
CRCType polynomial = parameters.polynomial << SHIFT;
remainder <<= SHIFT;
CRCType polynomial = static_cast<CRCType>(parameters.polynomial << SHIFT);
remainder = static_cast<CRCType>(remainder << SHIFT);
while (size--)
{
remainder ^= *current++;
remainder = static_cast<CRCType>(remainder ^ *current++);
// An optimizing compiler might choose to unroll this loop.
for (crcpp_size i = 0; i < CHAR_BIT; ++i)
@@ -690,14 +863,14 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
// remainder = (remainder << 1) ^ polynomial;
// else
// remainder <<= 1;
remainder = (remainder << 1) ^ (((remainder >> CHAR_BIT_MINUS_ONE) & 1) * polynomial);
remainder = static_cast<CRCType>((remainder << 1) ^ (((remainder >> CHAR_BIT_MINUS_ONE) & 1) * polynomial));
#else
remainder = (remainder & CHAR_BIT_HIGHEST_BIT_MASK) ? ((remainder << 1) ^ polynomial) : (remainder << 1);
remainder = static_cast<CRCType>((remainder & CHAR_BIT_HIGHEST_BIT_MASK) ? ((remainder << 1) ^ polynomial) : (remainder << 1));
#endif
}
}
remainder >>= SHIFT;
remainder = static_cast<CRCType>(remainder >> SHIFT);
}
return remainder;
@@ -706,7 +879,7 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
/**
@brief Computes a CRC remainder using lookup table.
@param[in] data Data over which the remainder will be computed
@param[in] size Size of the data
@param[in] size Size of the data, in bytes
@param[in] lookupTable CRC lookup table
@param[in] remainder Running CRC remainder. Can be an initial value or the result of a previous CRC remainder calculation.
@tparam CRCType Integer type for storing the CRC result
@@ -722,37 +895,35 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
{
while (size--)
{
#if defined(WIN32) || defined(_WIN32) || defined(WINCE)
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER)
// Disable warning about data loss when doing (remainder >> CHAR_BIT) when
// remainder is one byte long. The algorithm is still correct in this case,
// though it's possible that one additional machine instruction will be executed.
# if defined(_MSC_VER)
# pragma warning (push)
# pragma warning (disable : 4333)
# endif
#endif
remainder = (remainder >> CHAR_BIT) ^ lookupTable[static_cast<unsigned char>(remainder ^ *current++)];
#if defined(WIN32) || defined(_WIN32) || defined(WINCE)
# if defined(_MSC_VER)
remainder = static_cast<CRCType>((remainder >> CHAR_BIT) ^ lookupTable[static_cast<unsigned char>(remainder ^ *current++)]);
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma warning (pop)
# endif
#endif
}
}
else if (CRCWidth >= CHAR_BIT)
{
static crcpp_constexpr CRCType SHIFT(BoundedConstexprValue(CRCWidth - CHAR_BIT));
// The conditional expression is used to avoid a -Wshift-count-overflow warning.
static crcpp_constexpr CRCType SHIFT((CRCWidth >= CHAR_BIT) ? static_cast<CRCType>(CRCWidth - CHAR_BIT) : 0);
while (size--)
{
remainder = (remainder << CHAR_BIT) ^ lookupTable[static_cast<unsigned char>((remainder >> SHIFT) ^ *current++)];
remainder = static_cast<CRCType>((remainder << CHAR_BIT) ^ lookupTable[static_cast<unsigned char>((remainder >> SHIFT) ^ *current++)]);
}
}
else
{
static crcpp_constexpr CRCType SHIFT(BoundedConstexprValue(CHAR_BIT - CRCWidth));
// The conditional expression is used to avoid a -Wshift-count-overflow warning.
static crcpp_constexpr CRCType SHIFT((CHAR_BIT >= CRCWidth) ? static_cast<CRCType>(CHAR_BIT - CRCWidth) : 0);
remainder <<= SHIFT;
remainder = static_cast<CRCType>(remainder << SHIFT);
while (size--)
{
@@ -760,26 +931,94 @@ inline CRCType CRC::CalculateRemainder(const void * data, crcpp_size size, const
remainder = lookupTable[static_cast<unsigned char>(remainder ^ *current++)];
}
remainder >>= SHIFT;
remainder = static_cast<CRCType>(remainder >> SHIFT);
}
return remainder;
}
/**
@brief Function to force a compile-time expression to be >= 0.
@note This function is used to avoid compiler warnings because all constexpr values are evaluated
in a function even in a branch will never be executed. This also means we don't need pragmas
to get rid of warnings, but it still can be computed at compile-time. Win-win!
@param[in] x Compile-time expression to bound
@tparam CRCType Integer type for storing the CRC result
@tparam CRCWidth Number of bits in the CRC
@return Non-negative compile-time expression
*/
template <typename IntegerType>
inline crcpp_constexpr IntegerType CRC::BoundedConstexprValue(IntegerType x)
template <typename CRCType, crcpp_uint16 CRCWidth>
inline CRCType CRC::CalculateRemainderBits(unsigned char byte, crcpp_size numBits, const Parameters<CRCType, CRCWidth> & parameters, CRCType remainder)
{
return (x < IntegerType(0)) ? IntegerType(0) : x;
// Slightly different implementations based on the parameters. The current implementations try to eliminate as much
// computation from the inner loop (looping over each bit) as possible.
if (parameters.reflectInput)
{
CRCType polynomial = CRC::Reflect(parameters.polynomial, CRCWidth);
remainder = static_cast<CRCType>(remainder ^ byte);
// An optimizing compiler might choose to unroll this loop.
for (crcpp_size i = 0; i < numBits; ++i)
{
#ifdef CRCPP_BRANCHLESS
// Clever way to avoid a branch at the expense of a multiplication. This code is equivalent to the following:
// if (remainder & 1)
// remainder = (remainder >> 1) ^ polynomial;
// else
// remainder >>= 1;
remainder = static_cast<CRCType>((remainder >> 1) ^ ((remainder & 1) * polynomial));
#else
remainder = static_cast<CRCType>((remainder & 1) ? ((remainder >> 1) ^ polynomial) : (remainder >> 1));
#endif
}
}
else if (CRCWidth >= CHAR_BIT)
{
static crcpp_constexpr CRCType CRC_WIDTH_MINUS_ONE(CRCWidth - CRCType(1));
#ifndef CRCPP_BRANCHLESS
static crcpp_constexpr CRCType CRC_HIGHEST_BIT_MASK(CRCType(1) << CRC_WIDTH_MINUS_ONE);
#endif
// The conditional expression is used to avoid a -Wshift-count-overflow warning.
static crcpp_constexpr CRCType SHIFT((CRCWidth >= CHAR_BIT) ? static_cast<CRCType>(CRCWidth - CHAR_BIT) : 0);
remainder = static_cast<CRCType>(remainder ^ (static_cast<CRCType>(byte) << SHIFT));
// An optimizing compiler might choose to unroll this loop.
for (crcpp_size i = 0; i < numBits; ++i)
{
#ifdef CRCPP_BRANCHLESS
// Clever way to avoid a branch at the expense of a multiplication. This code is equivalent to the following:
// if (remainder & CRC_HIGHEST_BIT_MASK)
// remainder = (remainder << 1) ^ parameters.polynomial;
// else
// remainder <<= 1;
remainder = static_cast<CRCType>((remainder << 1) ^ (((remainder >> CRC_WIDTH_MINUS_ONE) & 1) * parameters.polynomial));
#else
remainder = static_cast<CRCType>((remainder & CRC_HIGHEST_BIT_MASK) ? ((remainder << 1) ^ parameters.polynomial) : (remainder << 1));
#endif
}
}
else
{
static crcpp_constexpr CRCType CHAR_BIT_MINUS_ONE(CHAR_BIT - 1);
#ifndef CRCPP_BRANCHLESS
static crcpp_constexpr CRCType CHAR_BIT_HIGHEST_BIT_MASK(CRCType(1) << CHAR_BIT_MINUS_ONE);
#endif
// The conditional expression is used to avoid a -Wshift-count-overflow warning.
static crcpp_constexpr CRCType SHIFT((CHAR_BIT >= CRCWidth) ? static_cast<CRCType>(CHAR_BIT - CRCWidth) : 0);
CRCType polynomial = static_cast<CRCType>(parameters.polynomial << SHIFT);
remainder = static_cast<CRCType>((remainder << SHIFT) ^ byte);
// An optimizing compiler might choose to unroll this loop.
for (crcpp_size i = 0; i < numBits; ++i)
{
#ifdef CRCPP_BRANCHLESS
// Clever way to avoid a branch at the expense of a multiplication. This code is equivalent to the following:
// if (remainder & CHAR_BIT_HIGHEST_BIT_MASK)
// remainder = (remainder << 1) ^ polynomial;
// else
// remainder <<= 1;
remainder = static_cast<CRCType>((remainder << 1) ^ (((remainder >> CHAR_BIT_MINUS_ONE) & 1) * polynomial));
#else
remainder = static_cast<CRCType>((remainder & CHAR_BIT_HIGHEST_BIT_MASK) ? ((remainder << 1) ^ polynomial) : (remainder << 1));
#endif
}
remainder = static_cast<CRCType>(remainder >> SHIFT);
}
return remainder;
}
#ifdef CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS
@@ -909,6 +1148,25 @@ inline const CRC::Parameters<crcpp_uint8, 6> & CRC::CRC_6_ITU()
return parameters;
}
/**
@brief Returns a set of parameters for CRC-6 NR.
@note The parameters are static and are delayed-constructed to reduce memory
footprint.
@note CRC-6 NR has the following parameters and check value:
- polynomial = 0x21
- initial value = 0x00
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0x15
@return CRC-6 NR parameters
*/
inline const CRC::Parameters<crcpp_uint8, 6> & CRC::CRC_6_NR()
{
static const Parameters<crcpp_uint8, 6> parameters = { 0x21, 0x00, 0x00, false, false };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-7 JEDEC.
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@@ -965,6 +1223,24 @@ inline const CRC::Parameters<crcpp_uint8, 8> & CRC::CRC_8_EBU()
return parameters;
}
/**
@brief Returns a set of parameters for CRC-8 HDLC (ISO/IEC 13239:2002).
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@note CRC-8 HDLC has the following parameters and check value:
- polynomial = 0x07
- initial value = 0xFF
- final XOR = 0xFF
- reflect input = true
- reflect output = true
- check value = 0x2F
@return CRC-8 HDLC parameters
*/
inline const CRC::Parameters<crcpp_uint8, 8> & CRC::CRC_8_HDLC()
{
static const Parameters<crcpp_uint8, 8> parameters = { 0x07, 0xFF, 0xFF, true, true };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-8 MAXIM (aka CRC-8 DOW-CRC).
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@@ -1001,6 +1277,24 @@ inline const CRC::Parameters<crcpp_uint8, 8> & CRC::CRC_8_WCDMA()
return parameters;
}
/**
@brief Returns a set of parameters for CRC-8 LTE.
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@note CRC-8 LTE has the following parameters and check value:
- polynomial = 0x9B
- initial value = 0x00
- final XOR = 0x00
- reflect input = false
- reflect output = false
- check value = 0xEA
@return CRC-8 LTE parameters
*/
inline const CRC::Parameters<crcpp_uint8, 8> & CRC::CRC_8_LTE()
{
static const Parameters<crcpp_uint8, 8> parameters = { 0x9B, 0x00, 0x00, false, false };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-10 ITU.
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@@ -1055,6 +1349,25 @@ inline const CRC::Parameters<crcpp_uint16, 11> & CRC::CRC_11()
return parameters;
}
/**
@brief Returns a set of parameters for CRC-11 NR.
@note The parameters are static and are delayed-constructed to reduce memory
footprint.
@note CRC-11 NR has the following parameters and check value:
- polynomial = 0x621
- initial value = 0x000
- final XOR = 0x000
- reflect input = false
- reflect output = false
- check value = 0x5CA
@return CRC-11 NR parameters
*/
inline const CRC::Parameters<crcpp_uint16, 11> & CRC::CRC_11_NR()
{
static const Parameters<crcpp_uint16, 11> parameters = { 0x621, 0x000, 0x000, false, false };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-12 CDMA2000.
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@@ -1218,6 +1531,24 @@ inline const CRC::Parameters<crcpp_uint16, 16> & CRC::CRC_16_CCITTFALSE()
return parameters;
}
/**
@brief Returns a set of parameters for CRC-16 MCRF4XX.
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@note CRC-16 MCRF4XX has the following parameters and check value:
- polynomial = 0x1021
- initial value = 0xFFFF
- final XOR = 0x0000
- reflect input = true
- reflect output = true
- check value = 0x6F91
@return CRC-16 MCRF4XX parameters
*/
inline const CRC::Parameters<crcpp_uint16, 16> & CRC::CRC_16_MCRF4XX()
{
static const Parameters<crcpp_uint16, 16> parameters = { 0x1021, 0xFFFF, 0x0000, true, true};
return parameters;
}
#ifdef CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS
/**
@brief Returns a set of parameters for CRC-16 CDMA2000.
@@ -1237,6 +1568,24 @@ inline const CRC::Parameters<crcpp_uint16, 16> & CRC::CRC_16_CDMA2000()
return parameters;
}
/**
@brief Returns a set of parameters for CRC-16 CMS.
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@note CRC-16 CMS has the following parameters and check value:
- polynomial = 0x8005
- initial value = 0xFFFF
- final XOR = 0x0000
- reflect input = false
- reflect output = false
- check value = 0xAEE7
@return CRC-16 CMS parameters
*/
inline const CRC::Parameters<crcpp_uint16, 16> & CRC::CRC_16_CMS()
{
static const Parameters<crcpp_uint16, 16> parameters = { 0x8005, 0xFFFF, 0x0000, false, false };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-16 DECT-R (aka CRC-16 R-CRC).
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@@ -1400,6 +1749,7 @@ inline const CRC::Parameters<crcpp_uint16, 16> & CRC::CRC_16_USB()
static const Parameters<crcpp_uint16, 16> parameters = { 0x8005, 0xFFFF, 0xFFFF, true, true };
return parameters;
}
#endif // CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS
/**
@@ -1529,6 +1879,63 @@ inline const CRC::Parameters<crcpp_uint32, 24> & CRC::CRC_24_FLEXRAYB()
return parameters;
}
/**
@brief Returns a set of parameters for CRC-24 LTE-A/NR-A.
@note The parameters are static and are delayed-constructed to reduce memory
footprint.
@note CRC-24 LTE-A has the following parameters and check value:
- polynomial = 0x864CFB
- initial value = 0x000000
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0xCDE703
@return CRC-24 LTE-A parameters
*/
inline const CRC::Parameters<crcpp_uint32, 24> & CRC::CRC_24_LTEA()
{
static const Parameters<crcpp_uint32, 24> parameters = { 0x864CFB, 0x000000, 0x000000, false, false };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-24 LTE-B/NR-B.
@note The parameters are static and are delayed-constructed to reduce memory
footprint.
@note CRC-24 LTE-B has the following parameters and check value:
- polynomial = 0x800063
- initial value = 0x000000
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0x23EF52
@return CRC-24 LTE-B parameters
*/
inline const CRC::Parameters<crcpp_uint32, 24> & CRC::CRC_24_LTEB()
{
static const Parameters<crcpp_uint32, 24> parameters = { 0x800063, 0x000000, 0x000000, false, false };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-24 NR-C.
@note The parameters are static and are delayed-constructed to reduce memory
footprint.
@note CRC-24 NR-C has the following parameters and check value:
- polynomial = 0xB2B117
- initial value = 0x000000
- final XOR = 0x000000
- reflect input = false
- reflect output = false
- check value = 0xF48279
@return CRC-24 NR-C parameters
*/
inline const CRC::Parameters<crcpp_uint32, 24> & CRC::CRC_24_NRC()
{
static const Parameters<crcpp_uint32, 24> parameters = { 0xB2B117, 0x000000, 0x000000, false, false };
return parameters;
}
/**
@brief Returns a set of parameters for CRC-30 CDMA.
@note The parameters are static and are delayed-constructed to reduce memory footprint.
@@ -1700,4 +2107,8 @@ inline const CRC::Parameters<crcpp_uint64, 64> & CRC::CRC_64()
}
#endif
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER)
#pragma warning(pop)
#endif
#endif // CRCPP_CRC_H_
+8 -6
View File
@@ -1,13 +1,14 @@
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: BSL-1.0
# Copyright 2020 Andy Maloney <asmaloney@gmail.com>
target_sources( ${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/E57Exception.h
${CMAKE_CURRENT_LIST_DIR}/E57Format.h
${CMAKE_CURRENT_LIST_DIR}/E57SimpleData.h
${CMAKE_CURRENT_LIST_DIR}/E57SimpleReader.h
${CMAKE_CURRENT_LIST_DIR}/E57SimpleWriter.h
E57Exception.h
E57Format.h
E57SimpleData.h
E57SimpleReader.h
E57SimpleWriter.h
E57Version.h
)
#install(
@@ -17,6 +18,7 @@ target_sources( ${PROJECT_NAME}
# E57SimpleData.h
# E57SimpleReader.h
# E57SimpleWriter.h
# E57Version.h
# DESTINATION
# include/E57Format
#)
+340 -80
View File
@@ -27,110 +27,370 @@
#pragma once
/// @file E57Exception.h Exception handling for E57 API.
#include <exception>
#include <iostream>
#include <string>
#include "E57Export.h"
#ifndef E57_ENABLE_DIAGNOSTIC_OUTPUT
// Used to mark unused parameters to indicate intent and suppress warnings.
#define E57_UNUSED( expr ) (void)( expr )
#endif
// C++14 does not support the [[deprecated]] attribute on enumerators.
// Turn on enumerator deprecation notices if we are compiling with C++17 or later.
#if ( ( defined( _MSVC_LANG ) && _MSVC_LANG >= 201703L ) || __cplusplus >= 201703L )
#define E57_DEPRECATED_ENUM( str ) [[deprecated( str )]]
#else
#define E57_DEPRECATED_ENUM( str )
#endif
namespace e57
{
//! @brief Numeric error identifiers used in E57Exception
/// @brief Numeric error identifiers used in E57Exception
enum ErrorCode
{
// N.B. *** When changing error strings here, remember to update the error
// strings in E57Exception.cpp ****
E57_SUCCESS = 0, //!< operation was successful
E57_ERROR_BAD_CV_HEADER = 1, //!< a CompressedVector binary header was bad
E57_ERROR_BAD_CV_PACKET = 2, //!< a CompressedVector binary packet was bad
E57_ERROR_CHILD_INDEX_OUT_OF_BOUNDS = 3, //!< a numerical index identifying a child was out of bounds
E57_ERROR_SET_TWICE = 4, //!< attempted to set an existing child element to a new value
E57_ERROR_HOMOGENEOUS_VIOLATION = 5, //!< attempted to add an E57 Element that would have made the children
//!< of a homogeneous Vector have different types
E57_ERROR_VALUE_NOT_REPRESENTABLE = 6, //!< a value could not be represented in the requested type
E57_ERROR_SCALED_VALUE_NOT_REPRESENTABLE = 7, //!< after scaling the result could not be represented in the
//!< requested type
E57_ERROR_REAL64_TOO_LARGE = 8, //!< a 64 bit IEEE float was too large to store in a 32 bit IEEE float
E57_ERROR_EXPECTING_NUMERIC = 9, //!< Expecting numeric representation in user's buffer, found ustring
E57_ERROR_EXPECTING_USTRING = 10, //!< Expecting string representation in user's buffer, found numeric
E57_ERROR_INTERNAL = 11, //!< An unrecoverable inconsistent internal state was detected
E57_ERROR_BAD_XML_FORMAT = 12, //!< E57 primitive not encoded in XML correctly
E57_ERROR_XML_PARSER = 13, //!< XML not well formed
E57_ERROR_BAD_API_ARGUMENT = 14, //!< bad API function argument provided by user
E57_ERROR_FILE_IS_READ_ONLY = 15, //!< can't modify read only file
E57_ERROR_BAD_CHECKSUM = 16, //!< checksum mismatch, file is corrupted
E57_ERROR_OPEN_FAILED = 17, //!< open() failed
E57_ERROR_CLOSE_FAILED = 18, //!< close() failed
E57_ERROR_READ_FAILED = 19, //!< read() failed
E57_ERROR_WRITE_FAILED = 20, //!< write() failed
E57_ERROR_LSEEK_FAILED = 21, //!< lseek() failed
E57_ERROR_PATH_UNDEFINED = 22, //!< E57 element path well formed but not defined
E57_ERROR_BAD_BUFFER = 23, //!< bad SourceDestBuffer
E57_ERROR_NO_BUFFER_FOR_ELEMENT = 24, //!< no buffer specified for an element in CompressedVectorNode during
//!< write
E57_ERROR_BUFFER_SIZE_MISMATCH = 25, //!< SourceDestBuffers not all same size
E57_ERROR_BUFFER_DUPLICATE_PATHNAME = 26, //!< duplicate pathname in CompressedVectorNode read/write
E57_ERROR_BAD_FILE_SIGNATURE = 27, //!< file signature not "ASTM-E57"
E57_ERROR_UNKNOWN_FILE_VERSION = 28, //!< incompatible file version
E57_ERROR_BAD_FILE_LENGTH = 29, //!< size in file header not same as actual
E57_ERROR_XML_PARSER_INIT = 30, //!< XML parser failed to initialize
E57_ERROR_DUPLICATE_NAMESPACE_PREFIX = 31, //!< namespace prefix already defined
E57_ERROR_DUPLICATE_NAMESPACE_URI = 32, //!< namespace URI already defined
E57_ERROR_BAD_PROTOTYPE = 33, //!< bad prototype in CompressedVectorNode
E57_ERROR_BAD_CODECS = 34, //!< bad codecs in CompressedVectorNode
E57_ERROR_VALUE_OUT_OF_BOUNDS = 35, //!< element value out of min/max bounds
E57_ERROR_CONVERSION_REQUIRED = 36, //!< conversion required to assign element value, but not requested
E57_ERROR_BAD_PATH_NAME = 37, //!< E57 path name is not well formed
E57_ERROR_NOT_IMPLEMENTED = 38, //!< functionality not implemented
E57_ERROR_BAD_NODE_DOWNCAST = 39, //!< bad downcast from Node to specific node type
E57_ERROR_WRITER_NOT_OPEN = 40, //!< CompressedVectorWriter is no longer open
E57_ERROR_READER_NOT_OPEN = 41, //!< CompressedVectorReader is no longer open
E57_ERROR_NODE_UNATTACHED = 42, //!< node is not yet attached to tree of ImageFile
E57_ERROR_ALREADY_HAS_PARENT = 43, //!< node already has a parent
E57_ERROR_DIFFERENT_DEST_IMAGEFILE = 44, //!< nodes were constructed with different destImageFiles
E57_ERROR_IMAGEFILE_NOT_OPEN = 45, //!< destImageFile is no longer open
E57_ERROR_BUFFERS_NOT_COMPATIBLE = 46, //!< SourceDestBuffers not compatible with previously given ones
E57_ERROR_TOO_MANY_WRITERS = 47, //!< too many open CompressedVectorWriters of an ImageFile
E57_ERROR_TOO_MANY_READERS = 48, //!< too many open CompressedVectorReaders of an ImageFile
E57_ERROR_BAD_CONFIGURATION = 49, //!< bad configuration string
E57_ERROR_INVARIANCE_VIOLATION = 50 //!< class invariance constraint violation in debug mode
// NOTE: When changing error strings here, remember to update the error strings in
// E57Exception.cpp
Success = 0, ///< operation was successful
ErrorBadCVHeader = 1, ///< a CompressedVector binary header was bad
ErrorBadCVPacket = 2, ///< a CompressedVector binary packet was bad
ErrorChildIndexOutOfBounds = 3, ///< a numerical index identifying a child was out of bounds
ErrorSetTwice = 4, ///< attempted to set an existing child element to a new value
/// @brief attempted to add an element that would have made the children of a homogeneous
/// ::TypeVector have different types
ErrorHomogeneousViolation = 5,
/// a value could not be represented in the requested type
ErrorValueNotRepresentable = 6,
/// after scaling the result could not be represented in the requested type
ErrorScaledValueNotRepresentable = 7,
/// a 64 bit IEEE float was too large to store in a 32 bit IEEE float
ErrorReal64TooLarge = 8,
/// expecting numeric representation in user's buffer, found ustring
ErrorExpectingNumeric = 9,
/// expecting string representation in user's buffer, found numeric
ErrorExpectingUString = 10,
ErrorInternal = 11, ///< An unrecoverable inconsistent internal state was detected
ErrorBadXMLFormat = 12, ///< E57 primitive not encoded in XML correctly
ErrorXMLParser = 13, ///< XML not well formed
ErrorBadAPIArgument = 14, ///< bad API function argument provided by user
ErrorFileReadOnly = 15, ///< can't modify read only file
ErrorBadChecksum = 16, ///< checksum mismatch, file is corrupted
ErrorOpenFailed = 17, ///< open() failed
ErrorCloseFailed = 18, ///< close() failed
ErrorReadFailed = 19, ///< read() failed
ErrorWriteFailed = 20, ///< write() failed
ErrorSeekFailed = 21, ///< lseek() failed
ErrorPathUndefined = 22, ///< element path well formed but not defined
ErrorBadBuffer = 23, ///< bad SourceDestBuffer
/// no buffer specified for an element in CompressedVectorNode during write
ErrorNoBufferForElement = 24,
ErrorBufferSizeMismatch = 25, ///< SourceDestBuffers not all same size
ErrorBufferDuplicatePathName = 26, ///< duplicate pathname in CompressedVectorNode read/write
ErrorBadFileSignature = 27, ///< file signature not "ASTM-E57"
ErrorUnknownFileVersion = 28, ///< incompatible file version
ErrorBadFileLength = 29, ///< size in file header not same as actual
ErrorXMLParserInit = 30, ///< XML parser failed to initialize
ErrorDuplicateNamespacePrefix = 31, ///< namespace prefix already defined
ErrorDuplicateNamespaceURI = 32, ///< namespace URI already defined
ErrorBadPrototype = 33, ///< bad prototype in CompressedVectorNode
ErrorBadCodecs = 34, ///< bad codecs in CompressedVectorNode
ErrorValueOutOfBounds = 35, ///< element value out of min/max bounds
/// conversion required to assign element value, but not requested
ErrorConversionRequired = 36,
ErrorBadPathName = 37, ///< E57 path name is not well formed
ErrorNotImplemented = 38, ///< functionality not implemented
ErrorBadNodeDowncast = 39, ///< bad downcast from Node to specific node type
ErrorWriterNotOpen = 40, ///< CompressedVectorWriter is no longer open
ErrorReaderNotOpen = 41, ///< CompressedVectorReader is no longer open
ErrorNodeUnattached = 42, ///< node is not yet attached to tree of ImageFile
ErrorAlreadyHasParent = 43, ///< node already has a parent
ErrorDifferentDestImageFile = 44, ///< nodes were constructed with different destImageFiles
ErrorImageFileNotOpen = 45, ///< destImageFile is no longer open
/// SourceDestBuffers not compatible with previously given ones
ErrorBuffersNotCompatible = 46,
ErrorTooManyWriters = 47, ///< too many open CompressedVectorWriters of an ImageFile
ErrorTooManyReaders = 48, ///< too many open CompressedVectorReaders of an ImageFile
ErrorBadConfiguration = 49, ///< bad configuration string
ErrorInvarianceViolation = 50, ///< class invariance constraint violation in debug mode
/// an invalid node type was passed in Data3D pointFields
ErrorInvalidNodeType = 51,
/// passed an invalid value in Data3D pointFields
ErrorInvalidData3DValue = 52,
/// Older versions of this library (and E57RefImpl) incorrectly set the "fileOffset" to 0
/// when "recordCount" is 0. "fileOffset" must be greater than 0 (Table 9 in the standard).
ErrorData3DReadInvalidZeroRecords = 53,
/// @deprecated Will be removed in 4.0. Use e57::Success.
E57_SUCCESS E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use Success." ) = Success,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadCVHeader.
E57_ERROR_BAD_CV_HEADER E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadCVHeader." ) = ErrorBadCVHeader,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadCVPacket.
E57_ERROR_BAD_CV_PACKET E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadCVPacket." ) = ErrorBadCVPacket,
/// @deprecated Will be removed in 4.0. Use e57::ErrorChildIndexOutOfBounds.
E57_ERROR_CHILD_INDEX_OUT_OF_BOUNDS E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorChildIndexOutOfBounds." ) = ErrorChildIndexOutOfBounds,
/// @deprecated Will be removed in 4.0. Use e57::ErrorSetTwice.
E57_ERROR_SET_TWICE E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorSetTwice." ) =
ErrorSetTwice,
/// @deprecated Will be removed in 4.0. Use e57::ErrorHomogeneousViolation.
E57_ERROR_HOMOGENEOUS_VIOLATION E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorHomogeneousViolation." ) = ErrorHomogeneousViolation,
/// @deprecated Will be removed in 4.0. Use e57::ErrorValueNotRepresentable.
E57_ERROR_VALUE_NOT_REPRESENTABLE E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorValueNotRepresentable." ) = ErrorValueNotRepresentable,
/// @deprecated Will be removed in 4.0. Use e57::ErrorScaledValueNotRepresentable.
E57_ERROR_SCALED_VALUE_NOT_REPRESENTABLE E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorScaledValueNotRepresentable." ) =
ErrorScaledValueNotRepresentable,
/// @deprecated Will be removed in 4.0. Use e57::ErrorReal64TooLarge.
E57_ERROR_REAL64_TOO_LARGE E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorReal64TooLarge." ) = ErrorReal64TooLarge,
/// @deprecated Will be removed in 4.0. Use e57::ErrorExpectingNumeric.
E57_ERROR_EXPECTING_NUMERIC E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorExpectingNumeric." ) = ErrorExpectingNumeric,
/// @deprecated Will be removed in 4.0. Use e57::ErrorExpectingUString.
E57_ERROR_EXPECTING_USTRING E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorExpectingUString." ) = ErrorExpectingUString,
/// @deprecated Will be removed in 4.0. Use e57::ErrorInternal.
E57_ERROR_INTERNAL E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorInternal." ) =
ErrorInternal,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadXMLFormat.
E57_ERROR_BAD_XML_FORMAT E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadXMLFormat." ) = ErrorBadXMLFormat,
/// @deprecated Will be removed in 4.0. Use e57::ErrorXMLParser.
E57_ERROR_XML_PARSER E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorXMLParser." ) =
ErrorXMLParser,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadAPIArgument.
E57_ERROR_BAD_API_ARGUMENT E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadAPIArgument." ) = ErrorBadAPIArgument,
/// @deprecated Will be removed in 4.0. Use e57::ErrorFileReadOnly.
E57_ERROR_FILE_IS_READ_ONLY E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorFileReadOnly." ) = ErrorFileReadOnly,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadChecksum.
E57_ERROR_BAD_CHECKSUM E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadChecksum." ) = ErrorBadChecksum,
/// @deprecated Will be removed in 4.0. Use e57::ErrorOpenFailed.
E57_ERROR_OPEN_FAILED E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorOpenFailed." ) =
ErrorOpenFailed,
/// @deprecated Will be removed in 4.0. Use e57::ErrorCloseFailed.
E57_ERROR_CLOSE_FAILED E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorCloseFailed." ) = ErrorCloseFailed,
/// @deprecated Will be removed in 4.0. Use e57::ErrorReadFailed.
E57_ERROR_READ_FAILED E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorReadFailed." ) =
ErrorReadFailed,
/// @deprecated Will be removed in 4.0. Use e57::ErrorWriteFailed.
E57_ERROR_WRITE_FAILED E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorWriteFailed." ) = ErrorWriteFailed,
/// @deprecated Will be removed in 4.0. Use e57::ErrorSeekFailed.
E57_ERROR_LSEEK_FAILED E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorSeekFailed." ) =
ErrorSeekFailed,
/// @deprecated Will be removed in 4.0. Use e57::ErrorPathUndefined.
E57_ERROR_PATH_UNDEFINED E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorPathUndefined." ) = ErrorPathUndefined,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadBuffer.
E57_ERROR_BAD_BUFFER E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorBadBuffer." ) =
ErrorBadBuffer,
/// @deprecated Will be removed in 4.0. Use e57::ErrorNoBufferForElement.
E57_ERROR_NO_BUFFER_FOR_ELEMENT E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorNoBufferForElement." ) = ErrorNoBufferForElement,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBufferSizeMismatch.
E57_ERROR_BUFFER_SIZE_MISMATCH E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBufferSizeMismatch." ) = ErrorBufferSizeMismatch,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBufferDuplicatePathName.
E57_ERROR_BUFFER_DUPLICATE_PATHNAME E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBufferDuplicatePathName." ) =
ErrorBufferDuplicatePathName,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadFileSignature.
E57_ERROR_BAD_FILE_SIGNATURE E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadFileSignature." ) = ErrorBadFileSignature,
/// @deprecated Will be removed in 4.0. Use e57::ErrorUnknownFileVersion.
E57_ERROR_UNKNOWN_FILE_VERSION E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorUnknownFileVersion." ) = ErrorUnknownFileVersion,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadFileLength.
E57_ERROR_BAD_FILE_LENGTH E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadFileLength." ) = ErrorBadFileLength,
/// @deprecated Will be removed in 4.0. Use e57::ErrorXMLParserInit.
E57_ERROR_XML_PARSER_INIT E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorXMLParserInit." ) = ErrorXMLParserInit,
/// @deprecated Will be removed in 4.0. Use e57::ErrorDuplicateNamespacePrefix.
E57_ERROR_DUPLICATE_NAMESPACE_PREFIX E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorDuplicateNamespacePrefix." ) =
ErrorDuplicateNamespacePrefix,
/// @deprecated Will be removed in 4.0. Use e57::ErrorDuplicateNamespaceURI.
E57_ERROR_DUPLICATE_NAMESPACE_URI E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorDuplicateNamespaceURI." ) = ErrorDuplicateNamespaceURI,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadPrototype.
E57_ERROR_BAD_PROTOTYPE E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadPrototype." ) = ErrorBadPrototype,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadCodecs.
E57_ERROR_BAD_CODECS E57_DEPRECATED_ENUM( "Will be removed in 4.0. Use ErrorBadCodecs." ) =
ErrorBadCodecs,
/// @deprecated Will be removed in 4.0. Use e57::ErrorValueOutOfBounds.
E57_ERROR_VALUE_OUT_OF_BOUNDS E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorValueOutOfBounds." ) = ErrorValueOutOfBounds,
/// @deprecated Will be removed in 4.0. Use e57::ErrorConversionRequired.
E57_ERROR_CONVERSION_REQUIRED E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorConversionRequired." ) = ErrorConversionRequired,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadPathName.
E57_ERROR_BAD_PATH_NAME E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadPathName." ) = ErrorBadPathName,
/// @deprecated Will be removed in 4.0. Use e57::ErrorNotImplemented.
E57_ERROR_NOT_IMPLEMENTED E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorNotImplemented." ) = ErrorNotImplemented,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadNodeDowncast.
E57_ERROR_BAD_NODE_DOWNCAST E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadNodeDowncast." ) = ErrorBadNodeDowncast,
/// @deprecated Will be removed in 4.0. Use e57::ErrorWriterNotOpen.
E57_ERROR_WRITER_NOT_OPEN E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorWriterNotOpen." ) = ErrorWriterNotOpen,
/// @deprecated Will be removed in 4.0. Use e57::ErrorReaderNotOpen.
E57_ERROR_READER_NOT_OPEN E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorReaderNotOpen." ) = ErrorReaderNotOpen,
/// @deprecated Will be removed in 4.0. Use e57::ErrorNodeUnattached.
E57_ERROR_NODE_UNATTACHED E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorNodeUnattached." ) = ErrorNodeUnattached,
/// @deprecated Will be removed in 4.0. Use e57::ErrorAlreadyHasParent.
E57_ERROR_ALREADY_HAS_PARENT E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorAlreadyHasParent." ) = ErrorAlreadyHasParent,
/// @deprecated Will be removed in 4.0. Use e57::ErrorDifferentDestImageFile.
E57_ERROR_DIFFERENT_DEST_IMAGEFILE E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorDifferentDestImageFile." ) = ErrorDifferentDestImageFile,
/// @deprecated Will be removed in 4.0. Use e57::ErrorImageFileNotOpen.
E57_ERROR_IMAGEFILE_NOT_OPEN E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorImageFileNotOpen." ) = ErrorImageFileNotOpen,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBuffersNotCompatible.
E57_ERROR_BUFFERS_NOT_COMPATIBLE E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBuffersNotCompatible." ) = ErrorBuffersNotCompatible,
/// @deprecated Will be removed in 4.0. Use e57::ErrorTooManyWriters.
E57_ERROR_TOO_MANY_WRITERS E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorTooManyWriters." ) = ErrorTooManyWriters,
/// @deprecated Will be removed in 4.0. Use e57::ErrorTooManyReaders.
E57_ERROR_TOO_MANY_READERS E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorTooManyReaders." ) = ErrorTooManyReaders,
/// @deprecated Will be removed in 4.0. Use e57::ErrorBadConfiguration.
E57_ERROR_BAD_CONFIGURATION E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorBadConfiguration." ) = ErrorBadConfiguration,
/// @deprecated Will be removed in 4.0. Use e57::ErrorInvarianceViolation.
E57_ERROR_INVARIANCE_VIOLATION E57_DEPRECATED_ENUM(
"Will be removed in 4.0. Use ErrorInvarianceViolation." ) = ErrorInvarianceViolation,
};
class E57_DLL E57Exception : public std::exception
namespace Utilities
{
E57_DLL std::string errorCodeToString( ErrorCode ecode ) noexcept;
}
class E57Exception : public std::exception
{
public:
const char *what() const noexcept override
{
return "E57 exception";
}
void report( const char *reportingFileName = nullptr, int reportingLineNumber = 0,
const char *reportingFunctionName = nullptr, std::ostream &os = std::cout ) const;
ErrorCode errorCode() const;
std::string context() const;
const char *what() const noexcept override;
const char *reportingFunctionName = nullptr,
std::ostream &os = std::cout ) const noexcept
{
os << "**** Got an e57 exception: " << errorStr() << std::endl;
#ifdef E57_ENABLE_DIAGNOSTIC_OUTPUT
os << " Debug info: " << std::endl;
os << " context: " << context_ << std::endl;
os << " sourceFunctionName: " << sourceFunctionName_ << std::endl;
if ( reportingFunctionName != nullptr )
{
os << " reportingFunctionName: " << reportingFunctionName << std::endl;
}
/*** Add a line in error message that a smart editor (gnu emacs) can
* interpret as a link to the source code: */
os << sourceFileName_ << "(" << sourceLineNumber_ << ") : error C" << errorCode_
<< ": <--- occurred on" << std::endl;
if ( reportingFileName != nullptr )
{
os << reportingFileName << "(" << reportingLineNumber
<< ") : error C0: <--- reported on" << std::endl;
}
#else
E57_UNUSED( reportingFileName );
E57_UNUSED( reportingLineNumber );
E57_UNUSED( reportingFunctionName );
#endif
}
ErrorCode errorCode() const noexcept
{
return errorCode_;
}
std::string errorStr() const noexcept
{
return Utilities::errorCodeToString( errorCode_ );
}
const std::string &context() const noexcept
{
return context_;
}
// For debugging purposes:
const char *sourceFileName() const;
const char *sourceFunctionName() const;
int sourceLineNumber() const;
const char *sourceFileName() const noexcept
{
return sourceFileName_.c_str();
}
//! \cond documentNonPublic The following isn't part of the API, and isn't
//! documented.
const char *sourceFunctionName() const noexcept
{
return sourceFunctionName_;
}
int sourceLineNumber() const noexcept
{
return sourceLineNumber_;
}
/// @cond documentNonPublic The following isn't part of the API, and isn't documented.
E57Exception() = delete;
E57Exception( ErrorCode ecode, const std::string &context, const std::string &srcFileName = nullptr,
int srcLineNumber = 0, const char *srcFunctionName = nullptr );
~E57Exception() noexcept override = default;
E57Exception( ErrorCode ecode, std::string context, const char *srcFileName = nullptr,
int srcLineNumber = 0, const char *srcFunctionName = nullptr ) :
errorCode_( ecode ), context_( std::move( context ) ), sourceFileName_( srcFileName ),
sourceFunctionName_( srcFunctionName ), sourceLineNumber_( srcLineNumber )
{
}
/// @endcond
protected:
private:
/// @cond documentNonPublic The following isn't part of the API, and isn't documented.
ErrorCode errorCode_;
std::string context_;
std::string sourceFileName_;
const char *sourceFunctionName_;
int sourceLineNumber_;
//! \endcond
/// @endcond
};
namespace Utilities
{
// Get latest version of ASTM standard supported, and library id string
E57_DLL void getVersions( int &astmMajor, int &astmMinor, std::string &libraryId );
E57_DLL std::string errorCodeToString( ErrorCode ecode );
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+128 -100
View File
@@ -3,6 +3,7 @@
*
* Copyright (c) 2010 Stan Coleby (scoleby@intelisum.com)
* Copyright (c) 2020 PTC Inc.
* Copyright (c) 2022 Andy Maloney <asmaloney@gmail.com>
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
@@ -29,158 +30,185 @@
#pragma once
//! @file E57SimpleReader.h E57 Simple API for reading E57
/// @file
/// @brief E57 Simple API for reading E57.
/// @details This includes support for the
/// [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension.
#include "E57SimpleData.h"
namespace e57
{
/// Options to the Reader constructor
struct E57_DLL ReaderOptions
{
/// Set how frequently to verify the checksums (see ReadChecksumPolicy).
ReadChecksumPolicy checksumPolicy = ChecksumAll;
};
//! @brief Used for reading of the E57 file with E57 Simple API
/// @brief Used for reading an E57 file using E57 Simple API.
///
/// The Reader includes support for the
/// [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension.
class E57_DLL Reader
{
public:
//! @brief This function is the constructor for the reader class
//! @param [in] filePath file path to E57 file
Reader( const ustring &filePath );
//! @brief This function returns true if the file is open
/// @brief Reader constructor
/// @param [in] filePath Path to E57 file
/// @param [in] options Options to be used for the file
Reader( const ustring &filePath, const ReaderOptions &options );
/// @brief Reader constructor (deprecated)
/// @param [in] filePath Path to E57 file
/// @deprecated Will be removed in 4.0. Use Reader( const ustring &, const ReaderOptions & )
/// instead.
[[deprecated( "Will be removed in 4.0. Use Reader( const ustring, const ReaderOptions & "
")." )]] // TODO Remove in 4.0
explicit Reader( const ustring &filePath );
/// @brief Returns true if the file is open
bool IsOpen() const;
//! @brief This function closes the file
/// @brief Closes the file
bool Close();
//! @name File information
//!@{
/// @name File information
///@{
//! @brief This function returns the file header information
//! @param [out] fileHeader is the main header information
//! @return Returns true if successful
/// @brief Returns the file header information
/// @param [out] fileHeader is the main header information
/// @return Returns true if successful
bool GetE57Root( E57Root &fileHeader ) const;
//!@}
///@}
//! @name Image2D
//!@{
/// @name Image2D
///@{
//! @brief This function returns the total number of Picture Blocks
//! @return Returns the number of Image2D blocks
/// @brief Returns the total number of Picture Blocks
/// @return Returns the number of Image2D blocks
int64_t GetImage2DCount() const;
//! @brief This function returns the image2D header and positions the cursor
//! @param [in] imageIndex This in the index into the image2D vector
//! @param [out] image2DHeader pointer to the Image2D structure to receive the picture information
//! @return Returns true if successful
/// @brief Returns the image2D header and positions the cursor
/// @param [in] imageIndex This in the index into the image2D vector
/// @param [out] image2DHeader pointer to the Image2D structure to receive the picture
/// information
/// @return Returns true if successful
bool ReadImage2D( int64_t imageIndex, Image2D &image2DHeader ) const;
//! @brief This function returns the size of the image data
//! @param [in] imageIndex This in the index into the image2D vector
//! @param [out] imageProjection identifies the projection in the image2D.
//! @param [out] imageType identifies the image format of the projection.
//! @param [out] imageWidth The image width (in pixels).
//! @param [out] imageHeight The image height (in pixels).
//! @param [out] imageSize This is the total number of bytes for the image blob.
//! @param [out] imageMaskType This is E57_PNG_IMAGE_MASK if "imageMask" is defined in the projection
//! @param [out] imageVisualType This is image type of the VisualReferenceRepresentation if given.
//! @return Returns true if successful
bool GetImage2DSizes( int64_t imageIndex, Image2DProjection &imageProjection, Image2DType &imageType,
int64_t &imageWidth, int64_t &imageHeight, int64_t &imageSize, Image2DType &imageMaskType,
/// @brief Returns the size of the image data
/// @param [in] imageIndex This in the index into the image2D vector
/// @param [out] imageProjection identifies the projection in the image2D.
/// @param [out] imageType identifies the image format of the projection.
/// @param [out] imageWidth The image width (in pixels).
/// @param [out] imageHeight The image height (in pixels).
/// @param [out] imageSize This is the total number of bytes for the image blob.
/// @param [out] imageMaskType This is E57_PNG_IMAGE_MASK if "imageMask" is defined in the
/// projection
/// @param [out] imageVisualType This is image type of the VisualReferenceRepresentation if
/// given.
/// @return Returns true if successful
bool GetImage2DSizes( int64_t imageIndex, Image2DProjection &imageProjection,
Image2DType &imageType, int64_t &imageWidth, int64_t &imageHeight,
int64_t &imageSize, Image2DType &imageMaskType,
Image2DType &imageVisualType ) const;
//! @brief This function reads an image
//! @param [in] imageIndex index of the image. Must be less than GetImage2DCount()
//! @param [in] imageProjection identifies the projection desired.
//! @param [in] imageType identifies the image format desired.
//! @param [out] buffer pointer the raw image buffer
//! @param [in] start position in the block to start reading
//! @param [in] count size of desired chuck or buffer size
//! @return Returns the number of bytes transferred.
int64_t ReadImage2DData( int64_t imageIndex, Image2DProjection imageProjection, Image2DType imageType,
void *buffer, int64_t start, int64_t count ) const;
/// @brief Reads an image
/// @param [in] imageIndex index of the image. Must be less than GetImage2DCount()
/// @param [in] imageProjection identifies the projection desired.
/// @param [in] imageType identifies the image format desired.
/// @param [out] buffer pointer the raw image buffer
/// @param [in] start position in the block to start reading
/// @param [in] count size of desired chuck or buffer size
/// @return Returns the number of bytes transferred.
int64_t ReadImage2DData( int64_t imageIndex, Image2DProjection imageProjection,
Image2DType imageType, void *buffer, int64_t start,
int64_t count ) const;
//!@}
///@}
//! @name Data3D
//!@{
/// @name Data3D
///@{
//! @brief This function returns the total number of Data3D Blocks
//! @return Returns number of Data3D blocks.
/// @brief Returns the total number of Data3D Blocks
/// @return Returns number of Data3D blocks.
int64_t GetData3DCount() const;
//! @brief This function returns the Data3D header
//! @param [in] dataIndex This in the index into the images3D vector. Must be less than GetData3DCount().
//! @param [out] data3DHeader Data3D header
//! @return Returns true if successful
/// @brief Returns the Data3D header
/// @param [in] dataIndex This in the index into the images3D vector. Must be less than
/// GetData3DCount().
/// @param [out] data3DHeader Data3D header
/// @return Returns true if successful
bool ReadData3D( int64_t dataIndex, Data3D &data3DHeader ) const;
//! @brief This function returns the size of the point data
//! @param [in] dataIndex This in the index into the images3D vector. Must be less than GetData3DCount().
//! @param [out] rowMax This is the maximum row size
//! @param [out] columnMax This is the maximum column size
//! @param [out] pointsSize This is the total number of point records
//! @param [out] groupsSize This is the total number of group reocrds
//! @param [out] countSize This is the maximum point count per group
//! @param [out] columnIndex This indicates that the idElementName is "columnIndex"
//! @return Return true if successful, false otherwise
bool GetData3DSizes( int64_t dataIndex, int64_t &rowMax, int64_t &columnMax, int64_t &pointsSize,
int64_t &groupsSize, int64_t &countSize, bool &columnIndex ) const;
/// @brief Returns the size of the point data
/// @param [in] dataIndex This in the index into the images3D vector. Must be less than
/// GetData3DCount().
/// @param [out] rowMax This is the maximum row size
/// @param [out] columnMax This is the maximum column size
/// @param [out] pointsSize This is the total number of point records
/// @param [out] groupsSize This is the total number of group records
/// @param [out] countSize This is the maximum point count per group
/// @param [out] columnIndex This indicates that the idElementName is "columnIndex"
/// @return Return true if successful, false otherwise
bool GetData3DSizes( int64_t dataIndex, int64_t &rowMax, int64_t &columnMax,
int64_t &pointsSize, int64_t &groupsSize, int64_t &countSize,
bool &columnIndex ) const;
//! @brief This function reads the group data into the provided buffers.
//! @param [in] dataIndex This in the index into the images3D vector. Must be less than GetData3DCount().
//! @param [in] groupCount size of each of the buffers given
//! @param [out] idElementValue pointer to the buffer holding indices index for this group
//! @param [out] startPointIndex pointer to the buffer holding Starting index in to the "points" data vector for
//! the groups
//! @param [out] pointCount pointer to the buffer holding size of the groups given
//! @return Return true if successful, false otherwise
bool ReadData3DGroupsData( int64_t dataIndex, int64_t groupCount, int64_t *idElementValue,
/// @brief Reads the group data into the provided buffers.
/// @param [in] dataIndex This in the index into the images3D vector. Must be less than
/// GetData3DCount().
/// @param [in] groupCount size of each of the buffers given
/// @param [out] idElementValue pointer to the buffer holding indices index for this group
/// @param [out] startPointIndex pointer to the buffer holding Starting index in to the
/// "points" data vector for the groups
/// @param [out] pointCount pointer to the buffer holding size of the groups given
/// @return Return true if successful, false otherwise
bool ReadData3DGroupsData( int64_t dataIndex, size_t groupCount, int64_t *idElementValue,
int64_t *startPointIndex, int64_t *pointCount ) const;
//! @brief Use this function to read the actual 3D data
//! @details All the non-NULL buffers in buffers have number of elements = pointCount.
//! Call the CompressedVectorReader::read() until all data is read.
//! @param [in] dataIndex data block index given by the NewData3D
//! @param [in] pointCount size of each element buffer.
//! @param [in] buffers pointers to user-provided buffers
//! @return vector reader setup to read the selected data into the provided buffers
/// @brief Use this to read the actual 3D data
/// @details All the non-NULL buffers in buffers have number of elements = pointCount.
/// Call the CompressedVectorReader::read() until all data is read.
/// @param [in] dataIndex data block index
/// @param [in] pointCount size of each element buffer.
/// @param [in] buffers pointers to user-provided buffers
/// @return vector reader setup to read the selected data into the provided buffers
CompressedVectorReader SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
const Data3DPointsData &buffers ) const;
const Data3DPointsFloat &buffers ) const;
//! @brief Use this function to read the actual 3D data
//! @details All the non-NULL buffers in buffers have number of elements = pointCount.
//! Call the CompressedVectorReader::read() until all data is read.
//! @param [in] dataIndex data block index given by the NewData3D
//! @param [in] pointCount size of each element buffer.
//! @param [in] buffers pointers to user-provided buffers
//! @return vector reader setup to read the selected data into the provided buffers
/// @overload
CompressedVectorReader SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
const Data3DPointsData_d &buffers ) const;
const Data3DPointsDouble &buffers ) const;
//!@}
///@}
//! @name Foundation API file information
//!@{
/// @name File information
///@{
//! @brief Returns the file raw E57Root Structure Node
/// @brief Returns the file raw E57Root Structure Node
StructureNode GetRawE57Root() const;
//! @brief Returns the raw Data3D Vector Node
/// @brief Returns the raw Data3D Vector Node
VectorNode GetRawData3D() const;
//! @brief Returns the raw Image2D Vector Node
/// @brief Returns the raw Image2D Vector Node
VectorNode GetRawImages2D() const;
//! @brief Returns the ram ImageFile Node which is need to add enhancements
/// @brief Returns the ram ImageFile Node which is need to add enhancements
ImageFile GetRawIMF() const;
//!@}
///@}
//! @cond documentNonPublic The following isn't part of the API, and isn't
//! documented.
/// @cond documentNonPublic The following isn't part of the API, and isn't documented.
protected:
friend class ReaderImpl;
E57_OBJECT_IMPLEMENTATION( Reader ) // Internal implementation details, not part of API, must be last in object
//! @endcond
E57_INTERNAL_ACCESS( Reader )
protected:
std::shared_ptr<ReaderImpl> impl_;
/// @endcond
}; // end Reader class
} // end namespace e57
+117 -64
View File
@@ -3,6 +3,7 @@
*
* Copyright (c) 2010 Stan Coleby (scoleby@intelisum.com)
* Copyright (c) 2020 PTC Inc.
* Copyright (c) 2022 Andy Maloney <asmaloney@gmail.com>
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
@@ -29,109 +30,161 @@
#pragma once
//! @file E57SimpleWriter.h E57 Simple API for writing E57
/// @file
/// @brief E57 Simple API for writing E57.
/// @details This includes support for the
/// [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension.
#include "E57SimpleData.h"
namespace e57
{
/// Options to the Writer constructor
struct E57_DLL WriterOptions
{
/// Optional file guid
ustring guid;
//! @brief Used for writing of the E57 file with E57 Simple API
/// Information describing the Coordinate Reference System to be used for the file
ustring coordinateMetadata;
};
/// @brief Used for writing an E57 file using the E57 Simple API.
///
/// The Writer includes support for the
/// [E57_EXT_surface_normals](http://www.libe57.org/E57_EXT_surface_normals.txt) extension.
class E57_DLL Writer
{
public:
//! @brief This function is the constructor for the writer class
//! @param [in] filePath file path to E57 file
//! @param [in] coordinateMetaData Information describing the Coordinate Reference System to be used for the file
Writer( const ustring &filePath, const ustring &coordinateMetaData = {} );
/// @brief Writer constructor
/// @param [in] filePath Path to E57 file
/// @param [in] options Options to be used for the file
Writer( const ustring &filePath, const WriterOptions &options );
//! @brief This function returns true if the file is open
/// @brief Writer constructor (deprecated)
/// @param [in] filePath Path to E57 file
/// @param [in] coordinateMetadata Information describing the Coordinate Reference System to
/// be used for the file
/// @deprecated Will be removed in 4.0. Use Writer( const ustring &filePath, const
/// WriterOptions &options ) instead.
[[deprecated(
"Will be removed in 4.0. Use Writer( ustring, WriterOptions )." )]] // TODO Remove in 4.0
explicit Writer( const ustring &filePath, const ustring &coordinateMetadata = {} );
/// @brief Returns true if the file is open
bool IsOpen() const;
//! @brief This function closes the file
/// @brief Closes the file
bool Close();
//! @name Image2D
//!@{
/// @name Image2D
///@{
//! @brief This function writes a new Image2D header
//! @details The user needs to config a Image2D structure with all the camera information before making this call.
//! @param [in,out] image2DHeader header metadata
//! @return Returns the image2D index
/// @brief This function writes the Image2D data to the file
/// @note @p image2DHeader may be modified (adding a guid or adding missing, required fields).
/// @param [in,out] image2DHeader header metadata
/// @param [in] imageType identifies the image format
/// @param [in] imageProjection identifies the projection
/// @param [in] startPos position in the block to start writing
/// @param [in] buffer pointer the data buffer
/// @param [in] byteCount buffer size
/// @return Returns the number of bytes written
int64_t WriteImage2DData( Image2D &image2DHeader, Image2DType imageType,
Image2DProjection imageProjection, int64_t startPos, void *buffer,
int64_t byteCount );
/// @brief Writes a new Image2D header
/// @details The user needs to config a Image2D structure with all the camera information
/// before making this call.
/// @param [in,out] image2DHeader header metadata
/// @return Returns the image2D index
int64_t NewImage2D( Image2D &image2DHeader );
//! @brief This function writes the actual image data
//! @param [in] imageIndex picture block index given by the NewImage2D
//! @param [in] imageType identifies the image format desired.
//! @param [in] imageProjection identifies the projection desired.
//! @param [in] buffer pointer the buffer
//! @param [in] start position in the block to start writing
//! @param [in] count size of desired chuck or buffer size
//! @return Returns the number of bytes written
int64_t WriteImage2DData( int64_t imageIndex, Image2DType imageType, Image2DProjection imageProjection,
void *buffer, int64_t start, int64_t count );
/// @brief Writes the actual image data
/// @param [in] imageIndex picture block index given by the NewImage2D
/// @param [in] imageType identifies the image format desired.
/// @param [in] imageProjection identifies the projection desired.
/// @param [in] buffer pointer the buffer
/// @param [in] start position in the block to start writing
/// @param [in] count size of desired chunk or buffer size
/// @return Returns the number of bytes written
int64_t WriteImage2DData( int64_t imageIndex, Image2DType imageType,
Image2DProjection imageProjection, void *buffer, int64_t start,
int64_t count );
//!@}
///@}
//! @name Data3D
//!@{
/// @name Data3D
///@{
//! @brief This function writes new Data3D header
//! @details The user needs to config a Data3D structure with all the scanning information before making this
//! call.
//! @param [in,out] data3DHeader scan metadata
//! @return Returns the index of the new scan's data3D block.
/// @brief This function writes the Data3D data to the file
/// @details The user needs to config a Data3D structure with all the scanning information
/// before making this call.
/// @note @p data3DHeader may be modified (adding a guid or adding missing, required fields).
/// @param [in,out] data3DHeader metadata about what is included in the buffers
/// @param [in] buffers pointers to user-provided buffers containing the actual data
/// @return Returns the index of the new scan's data3D block.
int64_t WriteData3DData( Data3D &data3DHeader, const Data3DPointsFloat &buffers );
/// @overload
int64_t WriteData3DData( Data3D &data3DHeader, const Data3DPointsDouble &buffers );
/// @brief Writes a new Data3D header
/// @details The user needs to config a Data3D structure with all the scanning information
/// before making this call.
/// @param [in,out] data3DHeader scan metadata
/// @return Returns the index of the new scan's data3D block.
int64_t NewData3D( Data3D &data3DHeader );
//! @brief This function setups a writer to write the actual scan data
//! @param [in] dataIndex index returned by NewData3D
//! @param [in] pointCount Number of points to write (number of elements in each of the buffers)
//! @param [in] buffers pointers to user-provided buffers
//! @return returns a vector writer setup to write the selected scan data
/// @brief Sets up a writer to write the actual scan data
/// @param [in] dataIndex index returned by NewData3D
/// @param [in] pointCount Number of points to write (number of elements in each of the
/// buffers)
/// @param [in] buffers pointers to user-provided buffers
/// @return returns a vector writer setup to write the selected scan data
CompressedVectorWriter SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
const Data3DPointsData &buffers );
const Data3DPointsFloat &buffers );
//! @brief This function setups a writer to write the actual scan data
//! @param [in] dataIndex index returned by NewData3D
//! @param [in] pointCount Number of points to write (number of elements in each of the buffers)
//! @param [in] buffers pointers to user-provided buffers
//! @return returns a vector writer setup to write the selected scan data
/// @overload
CompressedVectorWriter SetUpData3DPointsData( int64_t dataIndex, size_t pointCount,
const Data3DPointsData_d &buffers );
const Data3DPointsDouble &buffers );
//! @brief This function writes out the group data
//! @param [in] dataIndex data block index given by the NewData3D
//! @param [in] groupCount size of each of the buffers given
//! @param [in] buffer of idElementValue index for this group
//! @param [in] startPointIndex buffer with starting indices in to the "points" data vector for the groups
//! @param [in] pointCount buffer with sizes of the groups given
//! @return Return true if successful, false otherwise
bool WriteData3DGroupsData( int64_t dataIndex, int64_t groupCount, int64_t *idElementValue,
/// @brief Writes out the group data
/// @param [in] dataIndex data block index given by the NewData3D
/// @param [in] groupCount size of each of the buffers given
/// @param [in] idElementValue buffer with idElementValue indices for this group
/// @param [in] startPointIndex buffer with starting indices in to the "points" data vector
/// for the groups
/// @param [in] pointCount buffer with sizes of the groups given
/// @return Return true if successful, false otherwise
bool WriteData3DGroupsData( int64_t dataIndex, size_t groupCount, int64_t *idElementValue,
int64_t *startPointIndex, int64_t *pointCount );
//!@}
///@}
//! @name Foundation API file information
//!@{
/// @name File information
///@{
//! @brief This function returns the file raw E57Root Structure Node
/// @brief Returns the file raw E57Root Structure Node
StructureNode GetRawE57Root();
//! @brief This function returns the raw Data3D Vector Node
/// @brief Returns the raw Data3D Vector Node
VectorNode GetRawData3D();
//! @brief This function returns the raw Image2D Vector Node
/// @brief Returns the raw Image2D Vector Node
VectorNode GetRawImages2D();
//! @brief This function returns the ram ImageFile Node which is need to add enhancements
/// @brief Returns the ram ImageFile Node which is need to add enhancements
ImageFile GetRawIMF();
//!@}
///@}
//! @cond documentNonPublic The following isn't part of the API, and isn't
//! documented.
/// @cond documentNonPublic The following isn't part of the API, and isn't documented.
protected:
friend class WriterImpl;
E57_OBJECT_IMPLEMENTATION( Writer ) // Internal implementation details, not part of API, must be last in object
//! @endcond
E57_INTERNAL_ACCESS( Writer )
protected:
std::shared_ptr<WriterImpl> impl_;
/// @endcond
}; // end Writer class
} // end namespace e57
+72
View File
@@ -0,0 +1,72 @@
#pragma once
// Copyright © 2022 Andy Maloney <asmaloney@gmail.com>
// SPDX-License-Identifier: BSL-1.0
/// @file E57Version.h ASTM & libE57Format version information.
#include <string>
#include "E57Export.h"
namespace e57
{
namespace Version
{
/*!
@brief Get the version of the ASTM E57 standard that libE57Format supports.
@returns The version as a string (e.g. "1.0")
*/
E57_DLL std::string astm();
/*!
@brief Get the major version of the ASTM E57 standard that libE57Format supports.
@returns The major version
*/
E57_DLL uint32_t astmMajor();
/*!
@brief Get the minor version of the ASTM E57 standard that libE57Format supports.
@returns The minor version
*/
E57_DLL uint32_t astmMinor();
/*!
@brief Get the version of libE57Format library.
@returns The version as a string (e.g. "E57Format-3.0.0-x86_64-darwin-AppleClang140").
*/
E57_DLL std::string library();
/*!
@brief Get the version of ASTM E57 standard that the API implementation supports, and library
id string.
@param [out] astmMajor The major version number of the ASTM E57 standard supported.
@param [out] astmMinor The minor version number of the ASTM E57 standard supported.
@param [out] libraryId A string identifying the implementation of the API.
@details
Since the E57 implementation may be dynamically linked underneath the API, the version string
for the implementation and the ASTM version that it supports can't be determined at
compile-time. This function returns these identifiers from the underlying implementation.
@throw No E57Exceptions.
*/
E57_DLL void get( uint32_t &astmMajor, uint32_t &astmMinor, std::string &libraryId );
}
namespace Utilities
{
/*!
@copydetails Version::get()
@deprecated Will be removed in 4.0. Use Version::get() or other functions in the Version
namespace.
*/
[[deprecated( "Will be removed in 4.0. Use Version::get() or other functions in the Version "
"namespace." )]] E57_DLL void
getVersions( int &astmMajor, int &astmMinor, std::string &libraryId );
}
}
+16
View File
@@ -0,0 +1,16 @@
#pragma once
// Copyright © 2022 Andy Maloney <asmaloney@gmail.com>
// SPDX-License-Identifier: BSL-1.0
#include <cstdint>
namespace e57
{
/// The file format major version number. The value shall be 1.
/// @remark E57 Standard Table 1 - Format of the E57 File Header Section
constexpr uint32_t E57_FORMAT_MAJOR = 1;
/// The file format minor version number. The value shall be 0.
/// @remark E57 Standard Table 1 - Format of the E57 File Header Section
constexpr uint32_t E57_FORMAT_MINOR = 0;
}
+367
View File
@@ -0,0 +1,367 @@
/*
* BlobNode.cpp - implementation of public functions of the BlobNode class.
*
* Original work Copyright 2009 - 2010 Kevin Ackley (kackley@gwi.net)
* Modified work Copyright 2018 - 2020 Andy Maloney <asmaloney@gmail.com>
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reproduce, display, distribute,
* execute, and transmit the Software, and to prepare derivative works of the
* Software, and to permit third-parties to whom the Software is furnished to
* do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including
* the above license grant, this restriction and the following disclaimer,
* must be included in all copies of the Software, in whole or in part, and
* all derivative works of the Software, unless such copies or derivative
* works are solely in the form of machine-executable object code generated by
* a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/// @file BlobNode.cpp
#include "BlobNodeImpl.h"
#include "StringFunctions.h"
using namespace e57;
// Put this function first so we can reference the code in doxygen using @skip
/*!
@brief Check whether BlobNode class invariant is true
@copydetails IntegerNode::checkInvariant()
*/
void BlobNode::checkInvariant( bool /*doRecurse*/, bool doUpcast ) const
{
// If destImageFile not open, can't test invariant (almost every call would throw)
if ( !destImageFile().isOpen() )
{
return;
}
// If requested, call Node::checkInvariant
if ( doUpcast )
{
static_cast<Node>( *this ).checkInvariant( false, false );
}
if ( byteCount() < 0 )
{
throw E57_EXCEPTION1( ErrorInvarianceViolation );
}
}
/*!
@class e57::BlobNode
@brief An E57 element encoding an fixed-length sequence of bytes with an opaque format.
@details
A BlobNode is a terminal node (i.e. having no children) that holds an opaque, fixed-length sequence
of bytes. The number of bytes in the BlobNode is declared at creation time. The content of the blob
is stored within the E57 file in an efficient binary format (but not compressed). The BlobNode
cannot grow after it is created. There is no ordering constraints on how content of a BlobNode may
be accessed (i.e. it is random access). BlobNodes in an ImageFile opened for reading are read-only.
There are two categories of BlobNodes, distinguished by their usage: private BlobNodes and public
BlobNodes. In a private BlobNode, the format of its content bytes is not published. This is useful
for storing proprietary data that a writer does not wish to share with all readers. Rather than put
this information in a separate file, the writer can embed the file inside the E57 file so it cannot
be lost.
In a public BlobNode, the format is published or follows some industry standard format (e.g. JPEG).
Rather than reinvent the wheel in applications that are already well-served by an existing format
standard, an E57 file writer can just embed an existing file as an "attachment" in a BlobNode. The
internal format of a public BlobNode is not enforced by the Foundation API. It is recommended that
there be some mechanism for a reader to know ahead of time which format the BlobNode content adheres
to (either specified by a document, or encoded by some scheme in the E57 Element tree).
The BlobNode is the one node type where the set-once policy is not strictly enforced. It is possible
to write the same byte location in a BlobNode several times. However it is not recommended.
See Node class discussion for discussion of the common functions that StructureNode supports.
@section BlobNode_invariant Class Invariant
A class invariant is a list of statements about an object that are always true before and after any
operation on the object. An invariant is useful for testing correct operation of an implementation.
Statements in an invariant can involve only externally visible state, or, can refer to internal
implementation-specific state that is not visible to the API user. The following C++ code checks
externally visible state for consistency and throws an exception if the invariant is violated:
@dontinclude BlobNode.cpp
@skip void BlobNode::checkInvariant
@until ^}
@see Node
*/
/*!
@brief Create an element for storing a sequence of bytes with an opaque format.
@param [in] destImageFile The ImageFile where the new node will eventually be stored.
@param [in] byteCount The number of bytes reserved in the ImageFile for holding the blob.
@details
The BlobNode class corresponds to the ASTM E57 standard Blob element.
See the class discussion at bottom of BlobNode page for more details.
The E57 Foundation Implementation may pre-allocate disk space in the ImageFile to store the declared
length of the blob. The disk must have enough free space to store @a byteCount bytes of data. The
data of a newly created BlobNode is initialized to zero.
The @a destImageFile indicates which ImageFile the BlobNode will eventually be attached to. A node
is attached to an ImageFile by adding it underneath the predefined root of the ImageFile (gotten
from ImageFile::root). It is not an error to fail to attach the BlobNode to the @a destImageFile. It
is an error to attempt to attach the BlobNode to a different ImageFile.
@pre The @a destImageFile must be open (i.e. destImageFile.isOpen() must be true).
@pre The @a destImageFile must have been opened in write mode (i.e. destImageFile.isWritable()
must be true).
@pre byteCount >= 0
@throw ::ErrorBadAPIArgument
@throw ::ErrorImageFileNotOpen
@throw ::ErrorFileReadOnly
@throw ::ErrorInternal All objects in undocumented state
@see Node, BlobNode::read, BlobNode::write
*/
BlobNode::BlobNode( const ImageFile &destImageFile, int64_t byteCount ) :
impl_( new BlobNodeImpl( destImageFile.impl(), byteCount ) )
{
}
/*!
@brief Is this a root node.
@copydetails Node::isRoot()
*/
bool BlobNode::isRoot() const
{
return impl_->isRoot();
}
/*!
@brief Return parent of node, or self if a root node.
@copydetails Node::parent()
*/
Node BlobNode::parent() const
{
return Node( impl_->parent() );
}
/*!
@brief Get absolute pathname of node.
@copydetails Node::pathName()
*/
ustring BlobNode::pathName() const
{
return impl_->pathName();
}
/*!
@brief Get elementName string, that identifies the node in its parent.
@copydetails Node::elementName()
*/
ustring BlobNode::elementName() const
{
return impl_->elementName();
}
/*!
@brief Get the ImageFile that was declared as the destination for the node when it was created.
@copydetails Node::destImageFile()
*/
ImageFile BlobNode::destImageFile() const
{
return ImageFile( impl_->destImageFile() );
}
/*!
@brief Has node been attached into the tree of an ImageFile.
@copydetails Node::isAttached()
*/
bool BlobNode::isAttached() const
{
return impl_->isAttached();
}
/*!
@brief Get size of blob declared when it was created.
@pre The destination ImageFile must be open (i.e. destImageFile().isOpen()).
@post No visible state is modified.
@return The declared size of the blob when it was created.
@throw ::ErrorImageFileNotOpen
@throw ::ErrorInternal All objects in undocumented state
@see BlobNode::read, BlobNode::write
*/
int64_t BlobNode::byteCount() const
{
return impl_->byteCount();
}
/*!
@brief Read a buffer of bytes from a blob.
@param [in] buf A memory buffer to store bytes read from the blob.
@param [in] start The index of the first byte in blob to read.
@param [in] count The number of bytes to read.
@details
The memory buffer @a buf must be able to store at least @a count bytes.
The data is stored in a binary section of the ImageFile with checksum protection, so undetected
corruption is very unlikely. It is an error to attempt to read outside the declared size of the
Blob. The format of the data read is opaque (unspecified by the ASTM E57 data format standard).
Since @a buf is a byte buffer, byte ordering is irrelevant (it will come out in the same order that
it went in). There is no constraint on the ordering of reads. Any part of the Blob data can be read
zero or more times.
@pre The destination ImageFile must be open (i.e. destImageFile().isOpen()).
@pre buf != NULL
@pre 0 <= @a start < byteCount()
@pre 0 <= count
@pre (@a start + @a count) < byteCount()
@throw ::ErrorBadAPIArgument
@throw ::ErrorImageFileNotOpen
@throw ::ErrorSeekFailed
@throw ::ErrorReadFailed
@throw ::ErrorBadChecksum
@throw ::ErrorInternal All objects in undocumented state
@see BlobNode::byteCount, BlobNode::write
*/
void BlobNode::read( uint8_t *buf, int64_t start, size_t count )
{
impl_->read( buf, start, count );
}
/*!
@brief Write a buffer of bytes to a blob.
@param [in] buf A memory buffer of bytes to write to the blob.
@param [in] start The index of the first byte in blob to write to.
@param [in] count The number of bytes to write.
@details
The memory buffer @a buf must store at least @a count bytes.
The data is stored in a binary section of the ImageFile with checksum protection, so undetected
corruption is very unlikely. It is an error to attempt to write outside the declared size of the
Blob. The format of the data written is opaque (unspecified by the ASTM E57 data format standard).
Since @a buf is a byte buffer, byte ordering is irrelevant (it will come out in the same order that
it went in). There is no constraint on the ordering of writes. It is not an error to write a portion
of the BlobNode data more than once, or not at all. Initially all the BlobNode data is zero, so if a
portion is not written, it will remain zero. The BlobNode is one of the two node types that must be
attached to the root of a write mode ImageFile before write operations can be performed (the other
type is CompressedVectorNode).
@pre The destination ImageFile must be open (i.e. destImageFile().isOpen()).
@pre The associated destImageFile must have been opened in write mode (i.e.
destImageFile().isWritable()).
@pre The BlobNode must be attached to an ImageFile (i.e. isAttached()).
@pre buf != NULL
@pre 0 <= @a start < byteCount()
@pre 0 <= count
@pre (@a start + @a count) < byteCount()
@throw ::ErrorBadAPIArgument
@throw ::ErrorImageFileNotOpen
@throw ::ErrorFileReadOnly
@throw ::ErrorNodeUnattached
@throw ::ErrorSeekFailed
@throw ::ErrorReadFailed
@throw ::ErrorWriteFailed
@throw ::ErrorBadChecksum
@throw ::ErrorInternal All objects in undocumented state
@see BlobNode::byteCount, BlobNode::read
*/
void BlobNode::write( uint8_t *buf, int64_t start, size_t count )
{
impl_->write( buf, start, count );
}
/*!
@brief Diagnostic function to print internal state of object to output stream in an indented format.
@copydetails Node::dump()
*/
#ifdef E57_ENABLE_DIAGNOSTIC_OUTPUT
void BlobNode::dump( int indent, std::ostream &os ) const
{
impl_->dump( indent, os );
}
#else
void BlobNode::dump( int indent, std::ostream &os ) const
{
E57_UNUSED( indent );
E57_UNUSED( os );
}
#endif
/*!
@brief Upcast a BlobNode handle to a generic Node handle.
@details
An upcast is always safe, and the compiler can automatically insert it for initializations of Node
variables and Node function arguments.
@return A smart Node handle referencing the underlying object.
@throw No E57Exceptions.
@see Explanation in Node, Node::type(), BlobNode(const Node&)
*/
BlobNode::operator Node() const
{
// Upcast from shared_ptr<StringNodeImpl> to SharedNodeImplPtr and construct
// a Node object
return Node( impl_ );
}
/*!
@brief Downcast a generic Node handle to a BlobNode handle.
@param [in] n The generic handle to downcast.
@details
The handle @a n must be for an underlying BlobNode, otherwise an exception is thrown. In designs
that need to avoid the exception, use Node::type() to determine the actual type of the @a n before
downcasting. This function must be explicitly called (c++ compiler cannot insert it automatically).
@throw ::ErrorBadNodeDowncast
@see Node::type(), BlobNode::operator Node()
*/
BlobNode::BlobNode( const Node &n )
{
if ( n.type() != TypeBlob )
{
throw E57_EXCEPTION2( ErrorBadNodeDowncast, "nodeType=" + toString( n.type() ) );
}
// Set our shared_ptr to the downcast shared_ptr
impl_ = std::static_pointer_cast<BlobNodeImpl>( n.impl() );
}
/// @cond documentNonPublic The following isn't part of the API, and isn't documented.
BlobNode::BlobNode( const ImageFile &destImageFile, int64_t fileOffset, int64_t length ) :
impl_( new BlobNodeImpl( destImageFile.impl(), fileOffset, length ) )
{
}
BlobNode::BlobNode( std::shared_ptr<BlobNodeImpl> ni ) : impl_( ni )
{
}
/// @endcond
+43 -38
View File
@@ -29,19 +29,21 @@
#include "CheckedFile.h"
#include "ImageFileImpl.h"
#include "SectionHeaders.h"
#include "StringFunctions.h"
namespace e57
{
BlobNodeImpl::BlobNodeImpl( ImageFileImplWeakPtr destImageFile, int64_t byteCount ) : NodeImpl( destImageFile )
BlobNodeImpl::BlobNodeImpl( ImageFileImplWeakPtr destImageFile, int64_t byteCount ) :
NodeImpl( destImageFile )
{
// don't checkImageFileOpen, NodeImpl() will do it
ImageFileImplSharedPtr imf( destImageFile );
/// This what caller thinks blob length is
// This what caller thinks blob length is
blobLogicalLength_ = byteCount;
/// Round segment length up to multiple of 4 bytes
// Round segment length up to multiple of 4 bytes
binarySectionLogicalLength_ = sizeof( BlobSectionHeader ) + blobLogicalLength_;
unsigned remainder = binarySectionLogicalLength_ % 4;
if ( remainder > 0 )
@@ -49,32 +51,32 @@ namespace e57
binarySectionLogicalLength_ += 4 - remainder;
}
/// Reserve space for blob in file, extend with zeros since writes will
/// happen at later time by caller
// Reserve space for blob in file, extend with zeros since writes will
// happen at later time by caller
binarySectionLogicalStart_ = imf->allocateSpace( binarySectionLogicalLength_, true );
/// Prepare BlobSectionHeader
// Prepare BlobSectionHeader
BlobSectionHeader header;
header.sectionLogicalLength = binarySectionLogicalLength_;
#ifdef E57_MAX_VERBOSE
#ifdef E57_VERBOSE
header.dump(); //???
#endif
/// Write header at beginning of section
// Write header at beginning of section
imf->file_->seek( binarySectionLogicalStart_ );
imf->file_->write( reinterpret_cast<char *>( &header ), sizeof( header ) );
}
BlobNodeImpl::BlobNodeImpl( ImageFileImplWeakPtr destImageFile, int64_t fileOffset, int64_t length ) :
NodeImpl( destImageFile )
BlobNodeImpl::BlobNodeImpl( ImageFileImplWeakPtr destImageFile, int64_t fileOffset,
int64_t length ) : NodeImpl( destImageFile )
{
/// Init blob object that already exists in E57 file currently reading.
// Init blob object that already exists in E57 file currently reading.
// don't checkImageFileOpen, NodeImpl() will do it
ImageFileImplSharedPtr imf( destImageFile );
/// Init state from values read from XML
// Init state from values read from XML
blobLogicalLength_ = length;
binarySectionLogicalStart_ = imf->file_->physicalToLogical( fileOffset );
binarySectionLogicalLength_ = sizeof( BlobSectionHeader ) + blobLogicalLength_;
@@ -84,24 +86,24 @@ namespace e57
{
// don't checkImageFileOpen, NodeImpl() will do it
/// Same node type?
if ( ni->type() != E57_BLOB )
// Same node type?
if ( ni->type() != TypeBlob )
{
return ( false );
}
/// Downcast to shared_ptr<BlobNodeImpl>
// Downcast to shared_ptr<BlobNodeImpl>
std::shared_ptr<BlobNodeImpl> bi( std::static_pointer_cast<BlobNodeImpl>( ni ) );
/// blob lengths must match
// blob lengths must match
if ( blobLogicalLength_ != bi->blobLogicalLength_ )
{
return ( false );
}
/// ignore blob contents, doesn't have to match
// ignore blob contents, doesn't have to match
/// Types match
// Types match
return ( true );
}
@@ -109,7 +111,7 @@ namespace e57
{
// don't checkImageFileOpen, NodeImpl() will do it
/// We have no sub-structure, so if path not empty return false
// We have no sub-structure, so if path not empty return false
return pathName.empty();
}
@@ -126,9 +128,10 @@ namespace e57
checkImageFileOpen( __FILE__, __LINE__, static_cast<const char *>( __FUNCTION__ ) );
if ( static_cast<uint64_t>( start ) + count > blobLogicalLength_ )
{
throw E57_EXCEPTION2( E57_ERROR_BAD_API_ARGUMENT,
"this->pathName=" + this->pathName() + " start=" + toString( start ) +
" count=" + toString( count ) + " length=" + toString( blobLogicalLength_ ) );
throw E57_EXCEPTION2( ErrorBadAPIArgument,
"this->pathName=" + this->pathName() +
" start=" + toString( start ) + " count=" + toString( count ) +
" length=" + toString( blobLogicalLength_ ) );
}
ImageFileImplSharedPtr imf( destImageFile_ );
@@ -146,18 +149,19 @@ namespace e57
if ( !destImageFile->isWriter() )
{
throw E57_EXCEPTION2( E57_ERROR_FILE_IS_READ_ONLY, "fileName=" + destImageFile->fileName() );
throw E57_EXCEPTION2( ErrorFileReadOnly, "fileName=" + destImageFile->fileName() );
}
if ( !isAttached() )
{
throw E57_EXCEPTION2( E57_ERROR_NODE_UNATTACHED, "fileName=" + destImageFile->fileName() );
throw E57_EXCEPTION2( ErrorNodeUnattached, "fileName=" + destImageFile->fileName() );
}
if ( static_cast<uint64_t>( start ) + count > blobLogicalLength_ )
{
throw E57_EXCEPTION2( E57_ERROR_BAD_API_ARGUMENT,
"this->pathName=" + this->pathName() + " start=" + toString( start ) +
" count=" + toString( count ) + " length=" + toString( blobLogicalLength_ ) );
throw E57_EXCEPTION2( ErrorBadAPIArgument,
"this->pathName=" + this->pathName() +
" start=" + toString( start ) + " count=" + toString( count ) +
" length=" + toString( blobLogicalLength_ ) );
}
ImageFileImplSharedPtr imf( destImageFile_ );
@@ -170,11 +174,11 @@ namespace e57
{
// don't checkImageFileOpen
/// We are a leaf node, so verify that we are listed in set. ???true for
/// blobs? what exception get if try blob in compressedvector?
// We are a leaf node, so verify that we are listed in set. ???true for
// blobs? what exception get if try blob in compressedvector?
if ( pathNames.find( relativePathName( origin ) ) == pathNames.end() )
{
throw E57_EXCEPTION2( E57_ERROR_NO_BUFFER_FOR_ELEMENT, "this->pathName=" + this->pathName() );
throw E57_EXCEPTION2( ErrorNoBufferForElement, "this->pathName=" + this->pathName() );
}
}
@@ -184,7 +188,7 @@ namespace e57
// don't checkImageFileOpen
ustring fieldName;
if ( forcedFieldName )
if ( forcedFieldName != nullptr )
{
fieldName = forcedFieldName;
}
@@ -197,20 +201,21 @@ namespace e57
//??? Type --> type
//??? need to have length?, check same as in section header?
uint64_t physicalOffset = cf.logicalToPhysical( binarySectionLogicalStart_ );
cf << space( indent ) << "<" << fieldName << " type=\"Blob\" fileOffset=\"" << physicalOffset << "\" length=\""
<< blobLogicalLength_ << "\"/>\n";
cf << space( indent ) << "<" << fieldName << " type=\"Blob\" fileOffset=\"" << physicalOffset
<< "\" length=\"" << blobLogicalLength_ << "\"/>\n";
}
#ifdef E57_DEBUG
#ifdef E57_ENABLE_DIAGNOSTIC_OUTPUT
void BlobNodeImpl::dump( int indent, std::ostream &os ) const
{
// don't checkImageFileOpen
os << space( indent ) << "type: Blob"
<< " (" << type() << ")" << std::endl;
os << space( indent ) << "type: Blob" << " (" << type() << ")" << std::endl;
NodeImpl::dump( indent, os );
os << space( indent ) << "blobLogicalLength_: " << blobLogicalLength_ << std::endl;
os << space( indent ) << "binarySectionLogicalStart: " << binarySectionLogicalStart_ << std::endl;
os << space( indent ) << "binarySectionLogicalLength: " << binarySectionLogicalLength_ << std::endl;
os << space( indent ) << "binarySectionLogicalStart: " << binarySectionLogicalStart_
<< std::endl;
os << space( indent ) << "binarySectionLogicalLength: " << binarySectionLogicalLength_
<< std::endl;
// size_t i;
// for (i = 0; i < blobLogicalLength_ && i < 10; i++) {
// uint8_t b;
+3 -2
View File
@@ -39,8 +39,9 @@ namespace e57
NodeType type() const override
{
return E57_BLOB;
return TypeBlob;
}
bool isTypeEquivalent( NodeImplSharedPtr ni ) override;
bool isDefined( const ustring &pathName ) override;
@@ -53,7 +54,7 @@ namespace e57
void writeXml( ImageFileImplSharedPtr imf, CheckedFile &cf, int indent,
const char *forcedFieldName = nullptr ) override;
#ifdef E57_DEBUG
#ifdef E57_ENABLE_DIAGNOSTIC_OUTPUT
void dump( int indent = 0, std::ostream &os = std::cout ) const override;
#endif
+68 -53
View File
@@ -1,60 +1,75 @@
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: BSL-1.0
# Copyright 2020 Andy Maloney <asmaloney@gmail.com>
target_sources( E57Format
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/BlobNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/BlobNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/CheckedFile.h
${CMAKE_CURRENT_LIST_DIR}/CheckedFile.cpp
${CMAKE_CURRENT_LIST_DIR}/Common.h
${CMAKE_CURRENT_LIST_DIR}/Common.cpp
${CMAKE_CURRENT_LIST_DIR}/CompressedVectorNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/CompressedVectorNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/CompressedVectorReaderImpl.h
${CMAKE_CURRENT_LIST_DIR}/CompressedVectorReaderImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/CompressedVectorWriterImpl.h
${CMAKE_CURRENT_LIST_DIR}/CompressedVectorWriterImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/DecodeChannel.h
${CMAKE_CURRENT_LIST_DIR}/DecodeChannel.cpp
${CMAKE_CURRENT_LIST_DIR}/Decoder.h
${CMAKE_CURRENT_LIST_DIR}/Decoder.cpp
${CMAKE_CURRENT_LIST_DIR}/Encoder.h
${CMAKE_CURRENT_LIST_DIR}/Encoder.cpp
${CMAKE_CURRENT_LIST_DIR}/FloatNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/FloatNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/IntegerNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/IntegerNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/NodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/NodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/Packet.h
${CMAKE_CURRENT_LIST_DIR}/Packet.cpp
${CMAKE_CURRENT_LIST_DIR}/ImageFileImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/ImageFileImpl.h
${CMAKE_CURRENT_LIST_DIR}/ReaderImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/ReaderImpl.h
${CMAKE_CURRENT_LIST_DIR}/ScaledIntegerNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/ScaledIntegerNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/SectionHeaders.h
${CMAKE_CURRENT_LIST_DIR}/SectionHeaders.cpp
${CMAKE_CURRENT_LIST_DIR}/SourceDestBufferImpl.h
${CMAKE_CURRENT_LIST_DIR}/SourceDestBufferImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/StringNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/StringNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/StructureNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/StructureNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/VectorNodeImpl.h
${CMAKE_CURRENT_LIST_DIR}/VectorNodeImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/WriterImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/WriterImpl.h
${CMAKE_CURRENT_LIST_DIR}/E57Exception.cpp
${CMAKE_CURRENT_LIST_DIR}/E57Format.cpp
${CMAKE_CURRENT_LIST_DIR}/E57SimpleData.cpp
${CMAKE_CURRENT_LIST_DIR}/E57SimpleReader.cpp
${CMAKE_CURRENT_LIST_DIR}/E57SimpleWriter.cpp
${CMAKE_CURRENT_LIST_DIR}/E57Version.h
${CMAKE_CURRENT_LIST_DIR}/E57XmlParser.cpp
${CMAKE_CURRENT_LIST_DIR}/E57XmlParser.h
ASTMVersion.h
BlobNode.cpp
BlobNodeImpl.h
BlobNodeImpl.cpp
CheckedFile.h
CheckedFile.cpp
Common.h
Common.cpp
CompressedVectorNode.cpp
CompressedVectorNodeImpl.h
CompressedVectorNodeImpl.cpp
CompressedVectorReader.cpp
CompressedVectorReaderImpl.h
CompressedVectorReaderImpl.cpp
CompressedVectorWriter.cpp
CompressedVectorWriterImpl.h
CompressedVectorWriterImpl.cpp
DecodeChannel.h
DecodeChannel.cpp
Decoder.h
Decoder.cpp
Encoder.h
Encoder.cpp
FloatNode.cpp
FloatNodeImpl.h
FloatNodeImpl.cpp
ImageFile.cpp
ImageFileImpl.h
ImageFileImpl.cpp
IntegerNode.cpp
IntegerNodeImpl.h
IntegerNodeImpl.cpp
Node.cpp
NodeImpl.h
NodeImpl.cpp
Packet.h
Packet.cpp
ReaderImpl.h
ReaderImpl.cpp
ScaledIntegerNode.cpp
ScaledIntegerNodeImpl.h
ScaledIntegerNodeImpl.cpp
SectionHeaders.h
SectionHeaders.cpp
SourceDestBuffer.cpp
SourceDestBufferImpl.h
SourceDestBufferImpl.cpp
StringNode.cpp
StringFunctions.h
StringFunctions.cpp
StringNodeImpl.h
StringNodeImpl.cpp
StructureNode.cpp
StructureNodeImpl.h
StructureNodeImpl.cpp
VectorNode.cpp
VectorNodeImpl.h
VectorNodeImpl.cpp
WriterImpl.h
WriterImpl.cpp
E57Exception.cpp
E57SimpleData.cpp
E57SimpleReader.cpp
E57SimpleWriter.cpp
E57Version.cpp
E57XmlParser.cpp
E57XmlParser.h
)
target_include_directories( E57Format

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