Compare commits

...

463 Commits

Author SHA1 Message Date
Adrián Insaurralde Avalos 83646753e0 Update version to 1.0.0RC4 2024-11-13 22:01:49 -03:00
PaddleStroke bdcf40a17c Assembly: JointObject refactor adaptUi 2024-11-13 12:15:16 -03:00
PaddleStroke 24e5b181b5 Assembly: Improve joint taskbox offset ui. 2024-11-13 12:15:16 -03:00
Adrián Insaurralde Avalos d548f81525 Revert "Assembly: JointObject refactor adaptUi"
This reverts commit 00c992ff34.
2024-11-13 12:15:16 -03:00
Adrian Insaurralde Avalos 3c1047103c Update version to 1.0.0RC3 2024-11-11 18:23:38 -03:00
wwmayer 47d557545e PD: Add test case for #17184 (#17707) 2024-11-11 18:21:43 -03:00
Adrian Insaurralde Avalos 487b206edb Gui: extend version info to specify flatpak and conda builds 2024-11-11 15:30:59 -03:00
Alfredo Monclus 411b6cf4e9 fix(PD): initialization of thread class and fit 2024-11-11 14:19:37 -03:00
Yorik van Havre 70f8141a7d Merge pull request #17655 from jbaehr/cam-fix-rename-cw-ccw-climb-conventional
CAM: Fix CW/CCW to Climb/Conventional rename
2024-11-11 18:03:50 +01:00
marioalexis e4fefd67b0 Fem: Save empty UUID if customizing material from task panel 2024-11-11 13:59:23 -03:00
marioalexis bfe65acf87 Fem: Use quantity spin boxes in material task panel 2024-11-11 13:59:23 -03:00
marioalexis b84e78ac2c Fem: Use new material editor in materials task panels - fixes #16814 2024-11-11 13:59:23 -03:00
marioalexis 6943363280 Material: Propagate changes to MaterialTreeWidget even if UUID does not change 2024-11-11 13:59:23 -03:00
wmayer 9b67ca9c42 Assembly: Handle thrown Base::Exception in ViewProviderAssembly 2024-11-11 13:56:29 -03:00
wmayer 0df319e430 Core: In View3DInventorViewer::getPointOnXYPlaneOfPlacement throw exception
If no intersection point can be found throw a Base::RuntimeError
2024-11-11 13:56:29 -03:00
PaddleStroke 7601857582 Techdraw: Fix assembly exploded view (#17726) 2024-11-11 13:53:52 -03:00
Eric Price 7d28404ad8 Part: bugfix #17468 recursively unpack compounds for boolean fuse (#17469)
* fix #17468  recursively unpack compounds for boolean fuse

* fix and into &&, add ctest case for multifuse with compounds and recursive compounds

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

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

* remove unneeded duplicated code - allow Part::Common to be created with a single object (compound or shape) - will result in Unity and possibly a warning message

* prevent endless loop in case of endless recursive compounds as suggested in chat

* Update src/Mod/Part/App/FeaturePartFuse.cpp

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* implemented suggestion by wwmayer

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2024-11-11 13:52:19 -03:00
Florian Foinant-Willig 5ea9a672c3 Fix revolution with ShapeBinder profile (#17489)
* Fix revolution with ShapeBinder profile

* Remove log level init

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-11-11 13:48:35 -03:00
Eric Price 6d68d22258 increase tolerance on helical shapes to avoid crash / broken geometry (#17356)
* increase tolerance on helical shapes to avoid crash

fix #17113
fix #9377
fix #11083

* added test cases for additive and subtractive helix

* fixed whitespace issue, reduced turncount for speed

* relaxed large scale testcases for OCCT 7.3 and below, work around windows CI error #17394

* Further reduce max size in test for buggy Ubuntu OCCT
2024-11-11 13:45:49 -03:00
Eric Price 8362c5af8b Fix boolean operations (#17119)
* add BRepAlgoAPI wrapper files to CMakeList

* introduce wrapper for BRepAlgoAPI_BooleanOperation and derivatives, set sensible default Fuzzyness for boolean operations

* allow default fuzzyness to be set in settings - including off

* backwards compatibility with OCCT 7.3.3 - removed newer paramateres from wrapper

* added missing header

* reverted src/Mod/Part/App/OpenCascadeAll.h to original state

* implement some changes suggested by @wwmayer

* removed unneeded destructor definitions

* moved getDefaultFuzzyValue into its own helper class

* removed unneeded references to base class default constructor

* default to SetRunParallel(Standard_True) as suggested by @FlachyJoe

* fixed license header as requested

* Added new method to autocalculate fuzzyness to BooleanOperation base class and use it for those parts that do not call the obsolete constructor but also do not set precision

* implemented static variable solution as suggested by @wwmayer

* added helix for test case

* Refactoring FCRepAlgoAPI to FCBRepAlgoAPI

* Added Test Case (fuse cylinder with helix with different working and non-working Fuzzy values)

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

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

* increased default value of FuzzyBoolean and made tests more robust for compatibility with OCCT 7.3

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

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

* fixes for FREECAD_USE_PCH - allow testing of FREECAD_USE_PCH on linux with cmake switch (default OFF)

* removed surplus line - wasn't needed after all

* included precompiled as instructed

* set anti-corruption flag in boolean operations, ensures source shape is not damaged in OCCT 7.1 and higher

* fix #17085

* disable subtests that were too specific for now

* fixed all CLI tests - see comments in Pull Request https://github.com/FreeCAD/FreeCAD/pull/17119#issuecomment-2420772452

* Update src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* remove surplus tests from github suggestion interface bug

* hide the BooleanFuzzy variable - can now be only set by manually editing the config file
i
in FCParamGroup "Boolean"
<FCFloat Name="BooleanFuzzy" Value="10.000000000000"/>

* Suggestion by @FlachyJoe - add validity checks to the base and tool shape in any direct boolean op

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-11-11 17:36:30 +01:00
paul 51449826a3 ArchWall : Bug Fix Length Property Accuracy Problem (#17496)
* ArchWall : Bug Fix Length Property Accuracy Problem

See https://github.com/FreeCAD/FreeCAD/issues/15794

* [ArchWall] Fix regression with multi-material and align center

* ArchWall - Regression Typo

---------

Co-authored-by: Yorik van Havre <yorik@uncreated.net>
2024-11-11 17:26:55 +01:00
Roy-043 10ccab5227 Draft: Fix Shape2DView finish bug
The Draft_Shape2DView did not finish properly if no object was selected.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=92031
2024-11-11 17:15:52 +01:00
Yorik van Havre 5b00d7f1f2 Translations 2024-11-11 17:09:27 +01:00
Jonas Bähr 1027926be9 CAM: Configure Helix via CutMode, not Direction (#14314)
To harmonize the various CAM operations, the helical drill shall also be
configured using the cut mode (Climb/Conventional) just like Pocket or
FaceMill.
This means, the path direction (CW/CCW) is now a hidden read-only output
property, calculated from the side (Inside/OutSide) and the here newly
introduced cut mode.
The spindle direction is not yet taken into account and is always assumed
to be "Forward".
The GUI strings are kept compatible with what RP#14364 introduced becasue
of the v1.0 release string freeze. They need revision once back on the
main branch.
2024-11-10 23:23:23 +01:00
PaddleStroke 97aef3b3b1 Sketcher: Dimension: Handle case of vertical/horizontal lines 2024-11-09 10:00:08 -06:00
Roy-043 12e15dc739 Draft: Fix _param_observer_callback_scalemultiplier error
Fixes #17741.
2024-11-09 09:27:25 -06:00
marioalexis 9291671fe1 Fem: Fix spelling in Netgen enumeration property 2024-11-09 09:25:36 -06:00
wmayer df971b1014 Material: Replace YAML::LoadFile() with YAML::Load()
YAML::LoadFile() cannot be used on Windows because it doesn't support UTF-16 to load a file from an arbitrary location

This fixes #17097
2024-11-09 09:23:33 -06:00
PaddleStroke cd138ae5d7 Assembly: Fix problem with App::Link to AssemblyObject : they would not go back to position. 2024-11-09 09:20:54 -06:00
PaddleStroke c15e018bb1 Assembly: Fix regressions of https://github.com/FreeCAD/FreeCAD/pull/16671 2024-11-09 09:20:39 -06:00
PaddleStroke 00c992ff34 Assembly: JointObject refactor adaptUi 2024-11-09 09:13:25 -06:00
PaddleStroke 7ab212dced Update CommandExportASMT.py 2024-11-09 09:10:35 -06:00
Jonas Bähr 509fef6877 Revert "CAM: Rename CW/CCW to Climb/Conventional for consistency (#14364)"
This reverts commit 7e62d07538 and adapts
to the in between commits where necessary.
 - CAM: apply precommit 7274dac185
 - CAM: rename "Tests" to "CAMTests" 2ff4914fd8

Motivations for the revert:
 - Instead of actually implementing #14364 only a search and replace in
   the enums values has been performed. But this does not mean the
   feature is there, becasue "climb"/"conventional" milling depends not
   only on the path's direction, but also on the spindle direction and
   whether the milled feature is "inside" or "outside".
 - In half of the cases of every changed operation or dressup, depending
   on whether we mill "inside" or "outside", we now get the wrong results.
 - In the (rarer) case of a reversed spindle direction, the "other half"
   is wrong.
 - Files created with previous versions of FreeCAD cannot be recomputed
   any longer because there were no precautions on document restore.
 - In files created with previous versions of FreeCAD one cannot change
   the broken operation as the choices are now invalid.
 - The original search/replace was incomplete.
 - Only property values have been changed, the property names are still
   inconsistent ("Direction" vs "Cutting Mode").
 - The original search/replace also changed internal APIs where the
   "climb"/"conventional" wording is not applicable as there is no
   notation of "inside"/"outside" or "forward"/"reverse". If only the
   path's direction is concerned, "CW"/"CCW" fits better.
2024-11-08 23:02:44 +01:00
Jonas Bähr 2df29a80f4 CAM: Fix and enable TestPathHelix again
Since the fixture in use has holes smaller than the default tool dimeter,
executing a helix operation with default parameters (i.e. all holes)
used to fail with an exception. Some tests work around this by actively
chaning the tool diameter, and this fix is now moved into the global
setup where the respective fixture is loaded.

The reason why the tests got disabled in the first place is unclear.
2024-11-07 22:31:32 +01:00
Roy-043 9b3329ff9c Draft: avoid race condition in todo code
The doTasks function is called multiple times when using Draft tools. In some cases the ToDo.commitlist belonging to a previous call was not fuly processed, resulting in the same list being processed twice. To avoid this the list is stored as a local variable and then immediately reset.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=91832
2024-11-07 11:13:58 +01:00
Yorik van Havre ac9b2da210 Merge branch 'releases/FreeCAD-1-0' of github.com:FreeCAD/FreeCAD into releases/FreeCAD-1-0 2024-11-07 09:41:44 +01:00
Benjamin Bræstrup Sayoc 53ef8030ca [Gui] Fix 100% CPU usage due to StartView (#17565)
* [Gui] Fix 100% CPU usage due to StartView

* [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>
2024-11-06 13:50:21 -06:00
marioalexis 5f8ae401d3 Fem: Prevent race condition between signals in timer update 2024-11-06 13:43:12 -06:00
wmayer 41806782e7 Import: Fix index error with legacy STEP export
Fixes #17677
2024-11-06 12:53:54 -06:00
wmayer af993d1f6b Core: Generate a static random number in Application::applicationPid()
Using Qt's QCoreApplication::applicationPid() doesn't always give a unique ID so that multiple FreeCAD instances cannot be executed at the same time.
This fixes #17678
2024-11-06 12:52:48 -06:00
Benjamin Bræstrup Sayoc 52cf32c910 [Gui] Fix 100% CPU usage due to StartView (#17565)
* [Gui] Fix 100% CPU usage due to StartView

* [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>
2024-11-06 16:11:59 +01:00
Chris Mayo e495f83667 Mod: Remove Doxygen special commands from Python docstrings
These don't work by default in Doxygen [1] and cause Python syntax
warnings.

[1] https://www.doxygen.nl/manual/docblocks.html#pythonblocks
2024-11-05 16:19:03 -06:00
wmayer ddb42b134e PD: Fix default display mode of ViewProviderBoolean
Make sure that by default display mode is set to 'Flat Lines' instead of 'Group' as otherwise it won't show the result object
2024-11-05 15:24:51 -06:00
Eric Price fd64529bfe FEM: Allow assigning materials to compounds to avoid having to assign the same material by hand to all subsolids (#17562)
* fix #17561

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

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

* added missing code to have it also work without MeshRegions

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-05 10:15:38 -06:00
Jarno de Wit 7293718606 Fix excessive selection pruning in dae exporter for PartDesign Objects (#17529) (#17654)
* Fixes excessive export selection pruning for PartDesign objects (#17529)

* Raises selection prune message log-level from Log to Warning (#17529)
2024-11-05 14:44:51 +01:00
mwganson df18d88d96 [Sketcher] Address issue #17629, where Attach sketch command allows sketch to be attached to itself 2024-11-05 14:41:34 +01:00
Yorik van Havre 3b7bae0323 BIM: Fixed imports of IfcOpenShell 0.8 - fixes #17628 2024-11-05 14:28:41 +01:00
Chris Mayo 66a2163104 BIM: Fix imports of Python importers 2024-11-05 13:00:02 +01:00
Jonas Bähr 96fa7efee5 CAM: Add tests loading a helical path created with v0.21
This demonstrates a regression introduced with PR #14364, where documents
containing helix operations cannot be recomputed any more (see #15643).
This is in preparation for a fix and to ensure we don't break it again.
The fixture has been created with the official mac build of FreeCAD-0.21.1
2024-11-04 22:54:09 +01:00
marioalexis 81a28b5402 Fem: Print real-time log messages in mesher task panels - fixes #17594 2024-11-04 12:34:17 -06:00
PaddleStroke f5fa6f80b3 Assembly: Fix reverse button in joint task (#17663) 2024-11-04 11:23:33 -06:00
PaddleStroke 2958940463 Update JointObject.py 2024-11-04 11:18:30 -06:00
wmayer 644f0bf48b PD: If needed open another transaction for sketch creation
When creating a sketch in PartDesign a dialog is opened that gives the user the possibility to perform another action that may close the
active transaction. To make sure the creation of the sketch can be undone a new transaction must be opened.
2024-11-04 11:14:36 -06:00
wmayer f2bf2a4bcc Core: Fixes #17553 2024-11-04 11:14:36 -06:00
wmayer 8e3b8e3172 Tests: Add unit test to demonstrate failure of #17553 2024-11-04 11:14:36 -06:00
wmayer c7f40bc111 Core: Write a log message instead of warning when locking a file fails 2024-11-04 11:09:06 -06:00
wmayer 9daf71417a Core: Add wrapper function Application::applicationPid() 2024-11-04 11:09:06 -06:00
wmayer 94adf177ee Core: Don't freeze application if lock file already exists 2024-11-04 11:09:05 -06:00
PaddleStroke eff8826ca7 Assembly: Joint creation: add expression support to spinboxes 2024-11-04 11:07:25 -06:00
mwganson 6cd80f52f3 [Part Booleans] fix issue with copying visuals when doing Part workbench booleans using App::Part objects, see https://forum.freecad.org/viewtopic.php?t=91813&sid=eea2494d6d02882c3be7df74d7e2b689 2024-11-04 11:02:44 -06:00
WandererFan e1948f79d4 [TD]handle short&wide hatch area (#17630)
* [TD]handle short&wide hatch area

* [TD]sync .h and .cpp parameter names
2024-11-04 11:01:42 -06:00
James e57599c3f0 Safe mode message added as per #17580 (#17640)
* Safe mode message added as per #17580

* Fixed extra whitespace after return

Removed extra whitespace after return spotted by @hyarion

* Incorporated comments by @hyarion
2024-11-04 11:00:38 -06:00
Bas Ruigrok 4b5e09043d Gui: Fix camera behavior when rotation center is far from object
Also fixes a regression in turntable navigation speed
2024-11-04 10:59:31 -06:00
wmayer 7a48443897 DAG: Add method hasRecord() and use it in Model::slotChangeObject
to avoid a possible failing assert().

Fixes #17572
2024-11-04 10:57:09 -06:00
Benjamin Nauck a3f8ec0fd4 macOS+win+qt6.4+: Hide classic and auto choose light or dark mode depending on os setting (#17410)
* mac, win, qt6.4+: Hide classic and auto choose light or dark mode

* Add dark mode qt6.5 check

* Start: Add QStyleHints to PreCompiled.h

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-11-04 10:55:56 -06:00
David Carter 364ae2ca12 Materials: Disable editor right click menu
The right click context menu in the materials editor was implemented
as a place holder but is currently non-functional. It should be
disabled for 1.0. This will be revisited post 1.0 as all editor
functionality is reviewed and improved.

Fixes #17110
2024-11-04 10:51:11 -06:00
wmayer 7082b086a5 Mat: Clean-up code in DlgDisplayPropertiesImp 2024-11-04 10:44:17 -06:00
wmayer 279e39bd2b Mat: Tmp. block signals of material widget
Fixes #17523
2024-11-04 10:44:17 -06:00
Adrian Insaurralde Avalos 4ebf28b6a4 CAM: rename "Tests" to "CAMTests" to avoid python name conflicts 2024-11-04 10:36:32 -06:00
Yorik van Havre 1d11f0b9e7 BIM: Fixed case bug in library tool 2024-11-04 14:48:52 +01:00
Chris Mayo 62ff8820dd BIM: IFC explorer Qt 6 compatibility and other fixes (#17649)
* BIM: IFC - Fixes for Qt 6 due to QtGui.QFont.setWeight()

PySide6 replaced:
  PySide6.QtGui.QFont.setWeight(int)

with:
  PySide6.QtGui.QFont.setWeight(PySide6.QtGui.QFont.Weight)

* BIM: Fix IFC explorer addEntity() and addProperties() on Qt 6

Qt 6 removed QTreeWidget.setFirstItemColumnSpanned()

https://doc.qt.io/qt-5/qtreewidget-obsolete.html#setFirstItemColumnSpanned

Running the Python command 'BIM_IfcExplorer' failed:
Traceback (most recent call last):
  File "/usr/lib64/freecad/Mod/BIM/bimcommands/BimIfcExplorer.py", line 170, in Activated
    self.open()
  File "/usr/lib64/freecad/Mod/BIM/bimcommands/BimIfcExplorer.py", line 223, in open
    self.addEntity(eid, children, self.tree)
  File "/usr/lib64/freecad/Mod/BIM/bimcommands/BimIfcExplorer.py", line 455, in addEntity
    self.tree.setFirstItemColumnSpanned(item, True)

* BIM: Fix IFC explorer exception on toggle mesh

Traceback (most recent call last):
  File "/usr/lib64/freecad/Mod/BIM/bimcommands/BimIfcExplorer.py", line 278, in toggleMesh
    import importIFCHelper
ModuleNotFoundError: No module named 'importIFCHelper'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/freecad/Mod/BIM/bimcommands/BimIfcExplorer.py", line 282, in toggleMesh
    import importIFC
ModuleNotFoundError: No module named 'importIFC'

* BIM: Fix IFC explorer layout warnings

QLayout: Attempting to add QLayout "" to QDialog "IfcExplorer", which already has a layout
QLayout: Attempting to add QLayout "" to QDialog "IfcExplorer", which already has a layout

https://doc.qt.io/qt-6/qtwidgets-tutorials-widgets-nestedlayouts-example.html

* BIM: Output an error if IFC explorer can't explore a file

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
2024-11-04 14:02:44 +01:00
PaddleStroke 4bee4ca3dd Sketcher: DrawSketchHandlerRotate : Fix unwanted copy of DistanceX/Y constraints 2024-10-31 15:30:28 -05:00
PaddleStroke 17a7ddee2f Formating PythonConverter.cpp 2024-10-31 15:30:18 -05:00
PaddleStroke 52903e281c Sketcher: PythonConverter: use getRange to handle bad arcs. 2024-10-31 15:30:10 -05:00
marioalexis 9cfec546cc Fem: fix Gmsh analysis mesh groups - fixes #17427 2024-10-31 15:29:14 -05:00
wmayer e4a24f0789 Core: Fix compiler warning 2024-10-30 18:14:36 -05:00
wmayer b67d2d0881 Fix compiler warnings 2024-10-30 18:14:36 -05:00
Eric Price 29f2dbdebf fix #17578 - RIP bgbsww , don't worry, we got this. 2024-10-30 18:12:51 -05:00
Ulices 6945472e36 Help: Fix function return to avoid error when clicking URL on built-in browser (#17498)
* Help: Fix function return to avoid error when clicking URL on built-in browser

* fixup! Help: Fix function return to avoid error when clicking URL on built-in browser

Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>

---------

Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>
2024-10-30 12:52:13 +01:00
PaddleStroke ee60379138 Core: Enable TaskDialogs to associate view (#17373)
* Core: Add possibility for task dialogs to associate a view and be able to close when associated view is closed.

* TaskImage: Use task dialog view association.

* Sketcher: Use task dialog view association. Preventing crash (https://github.com/FreeCAD/FreeCAD/issues/16702)

* EditableDatumLabel: Use QPointer to prevent crash
2024-10-29 10:01:41 -05:00
hoshengwei 42832ee6af Fix IFC export elevation with wrong unit 2024-10-29 15:14:39 +01:00
David Carter ec2f666344 Materials: Selectively apply appearances
Change the appearance only if the appearance hasn't been set explicitly.
A cached material appearance is used to see if the current appearance
matches the last material. It is also compared against an empty
material to see if the saved material value has been initialized.

This solves the problem of material changes overwriting appearance
changes
2024-10-28 21:49:55 -05:00
Adrian Insaurralde Avalos 065029b6a0 Gui: show cpu architecture in version info instead of word size
Fix #15833
2024-10-28 21:48:43 -05:00
Benjamin Nauck 6fea3dc5f4 Fix crashes when importing and opening .csv files on macOS (#17084)
* Open recent documents from start same way as in menu

* Make insert spreadsheet create document if not available.

* [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: Chris Hennes <chennes@pioneerlibrarysystem.org>
# Conflicts:
#	src/Mod/Start/Gui/StartView.cpp
2024-10-28 21:46:55 -05:00
Bas Ruigrok 52982c0c67 Gui: Correct spin sensitivity 2024-10-28 12:08:09 -05:00
Bas Ruigrok f313de1ce3 Gui: Set spin projector sphere depending on rotation center 2024-10-28 12:08:08 -05:00
Adrian Insaurralde Avalos 82204a7b06 Gui: use wildcard for some warnings filters. Fix #16687 2024-10-28 11:39:29 -05:00
Adrian Insaurralde Avalos a435a81c8a Fix OpenSCAD test failing when using pipe transfer mechanism 2024-10-28 11:34:36 -05:00
Pieter Hijma edbfbe40f5 Gui: Make VarSet dialog modal
Also tracks its own transactions to prevent interfering with other
transactions.
2024-10-28 11:33:25 -05:00
wmayer 231d734b7c Draft: Fixes #17461 2024-10-28 11:31:41 -05:00
wmayer 216b130761 Core: Extend DocumentObjectPy
* expose isAttachedToDocument to Python
* change DocumentObjectPy::getName() to return None instead of throwing an exception if object is not part of a document
2024-10-28 11:31:41 -05:00
wmayer c6a6e9d4b0 Sketch: Make sure that variable 'ActiveSketch' is defined in macro
Fixes #17502
2024-10-28 11:24:00 -05:00
Yorik van Havre dc230a8ce0 Draft: Warn user if using trimex on unsupported curve type - fixes #17346 2024-10-28 11:12:17 -05:00
marioalexis 57a6c5aed7 Fem: Remove unnecessary system name check 2024-10-28 11:11:18 -05:00
mwganson 69e40ba5c7 [Macros Dialog] Fix broken toolbar walkthrough 2024-10-28 11:10:26 -05:00
PaddleStroke c0db00e5cd Assembly: AssemblyLinks. 2024-10-28 11:07:47 -05:00
PaddleStroke 69df04e6a6 Assembly: Create SoSwitchMarker.py to externalize the coin stuff that draw the joint's markers(JCS) 2024-10-28 11:07:47 -05:00
PaddleStroke eb352fe34f Assembly: Joint creation UI : add advanced offset handling. 2024-10-28 11:07:46 -05:00
Yorik van Havre e3aa8ef9b8 BIM: Fixed export of boolean IFC properties - fixes #17425 2024-10-28 10:58:45 -05:00
Yorik van Havre 6029b79885 Draft: Fixed trimex bug when snapping to itself - fixes #17345 2024-10-28 10:58:07 -05:00
Yorik van Havre 1c6e5b9664 BIM: Fixed online search mode - fixes #17353 2024-10-28 10:51:46 -05:00
Benjamin Bræstrup Sayoc cd99adc094 [Gui] Make styles update on paint (#17376)
* [Gui] Make styles update on paint

Fixes #15756. Similar implementation to that already in FileCardDelegate.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>
2024-10-28 10:48:58 -05:00
Benjamin Nauck 734b327ef0 Reuse Std_Delete shortcut instead of hardcoding Delete (#16682)
* Reuse Std_Delete shortcut in TaskBooleanParameters

* Reuse Std_Delete shortcut in TaskDressUpParameters

* Reuse Std_Delete shortcut in TaskLoftParameters

* Reuse Std_Delete shortcut in TaskPipeParameters

* Reuse Std_Delete shortcut in TaskSapeBinder

* Reuse Std_Delete shortcut in TaskTransformedParameters

* Reuse Std_Delete shortcut in TaskExtrudeParameters

* Reuse Std_Delete shortcut in TaskSections

* Reuse Std_Delete shortcut in MaterialSave

* Reuse Std_Delete shortcut in Array2D

* Reuse Std_Delete shortcut in TaskFemConstraint

* [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>
2024-10-28 09:51:52 -05:00
wandererfan 471fce1f50 [TD]remove spurious mouseReleaseEvent (fix #17519) 2024-10-28 09:47:53 -05:00
wandererfan 5e8e6568e9 [TD]fix line style regression from #17331 2024-10-28 09:47:28 -05:00
wandererfan e0f6298d5d [TD]handle cut profiles with only a single edge 2024-10-28 09:46:54 -05:00
wandererfan 9fcb04c0b3 [TD]do not mark document as changed after print 2024-10-28 09:46:23 -05:00
wmayer 146f5055d7 Core: Refactor Document::setEdit 2024-10-27 13:13:38 -05:00
Benjamin Nauck 2d14dcec7d Repost QFileOpenEvent event to avoid an undefined state 2024-10-25 12:25:31 -05:00
marioalexis fe8f0acbef Fem: Do not try to set EndStep property for legacy Netgen 2024-10-25 12:11:28 -05:00
PaddleStroke c6e0f838ba Fix circle tangent issue 2024-10-25 10:03:59 -05:00
mwganson cd74b7b5ea [Part RuledSurface] fix issue where ruled surface is failing if both edges are from same object and the object is not at the identity placement, addresses issue #17235 2024-10-25 09:59:25 -05:00
wmayer 9854b2a3c8 Core: Handle possible nested calls of TreeWidget::onUpdateStatus()
Fixes #17460
2024-10-24 23:11:53 -05:00
PaddleStroke a76027ce91 Assembly: CommandInsertLink: Hide hidden objects 2024-10-24 23:08:05 -05:00
Pieter Hijma 72316d0f96 Gui: Fix tooltip/documentation in VarSet dialog 2024-10-24 23:01:24 -05:00
PaddleStroke e9b9c788d2 Sketcher: Symmetric: Do not copy names of constraints (#17433)
* Sketcher: Symmetric: Do not copy names of constraints

* Sketcher: Symmetric : Fix https://github.com/FreeCAD/FreeCAD/issues/17442
2024-10-24 22:59:15 -05:00
Jiří Pinkava 2cfa89fb56 Disable Qt bug 129596 workeround for QT >= 6.8.1
The fix is also in 6.5.8+, but honestly I would not bother ...
2024-10-24 22:30:54 -05:00
Kacper Donat d046d4848b PD: Fix TwoLengths and Midplane both enabled
This scenario makes no sense, so it is removed from the code.
2024-10-24 22:29:54 -05:00
wmayer d7bcba730c Test: Add test for MeasureDistance with two circles 2024-10-24 21:56:22 -05:00
wmayer 8c1c24656a Measure: When measuring the distance between circles then use the center points as reference
See forum: https://forum.freecad.org/viewtopic.php?t=91570
2024-10-24 21:56:22 -05:00
PaddleStroke 4432d6dc16 Update Workbench.cpp 2024-10-24 21:54:02 -05:00
PaddleStroke 8780c645b7 Part Design: Remove legacy/modern workflow checks. 2024-10-24 21:54:02 -05:00
Michael Fuchs ff3729614e Remove unused LibraryInfo class 2024-10-24 21:51:37 -05:00
Michael Fuchs be3307d198 Inject version information into 3rd Party libraries html 2024-10-24 21:51:37 -05:00
Michael Fuchs e2956efcb1 Replace About/Libraries with ThirdPartyLibraries.html
Use system browser to open external links
2024-10-24 21:51:37 -05:00
mwganson 515b9b0ef9 [Python Console] prevent crash on autocomplete if python module is invalid, fixes issue #17299 2024-10-24 21:23:47 -05:00
Roy-043 c3565499f2 Updated 2 file paths to make the code work with AppImage
As advised in this forum post:
https://forum.freecad.org/viewtopic.php?p=788556#p788556
2024-10-24 14:09:41 +02:00
Roy-043 41b5df3883 Draft: fix errors in draft_test_objects.py
* Label property TextSize should be FontSize.
* Added missing recomputes.
2024-10-24 14:09:26 +02:00
wmayer e3bf086e49 Start: Use ModuleIO in StartView::fileCardSelected 2024-10-22 22:50:44 -05:00
wmayer 25bfdc92c8 Core: Use ModuleIO in MainWindow::loadUrls 2024-10-22 22:41:38 -05:00
wmayer 6df7231cfb Core: Use ModuleIO in RecentFilesAction & RecentMacrosAction 2024-10-22 22:41:35 -05:00
marioalexis 5b68566b5b Fem: Netgen meshing parameters improvements 2024-10-22 22:41:01 -05:00
pre-commit-ci[bot] 71734d87ac [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-22 22:39:37 -05:00
wmayer 569c2f9538 Measure: Use Base::toDegrees to convert radian to degree 2024-10-22 22:39:28 -05:00
wmayer 969b0dad8d Robot: Use Base::toRadians to convert degree to radian 2024-10-22 22:39:17 -05:00
wmayer 4b9d03772f Part: Use Base::toRadians to convert degree to radian 2024-10-22 22:38:00 -05:00
Yorik van Havre 0101b5dfc7 Revert "Horrible hack to work around bug in OCCT7.7.2"
This reverts commit 60640fa441.
2024-10-22 13:28:17 +02:00
Chris Mayo 3ea129fa0b Tux: Avoid warning on startup when BIM is not installed
os.listdir() raises an exception if modpath does not exist.
2024-10-22 11:02:54 +02:00
Roy-043 c4854b8cba Draft: suppress patharray offset warnings if values are already zero
See forum topic:
https://forum.freecad.org/viewtopic.php?t=91517
2024-10-22 10:52:30 +02:00
Benjamin Nauck e6f97126d3 Remove broken robot example file
fixes #17303
2024-10-21 21:03:11 -05:00
marioalexis 1f27df4e9c Fem: Set startupinfo for gmsh subprocess - fixes #17298 2024-10-21 21:00:29 -05:00
Adrián Insaurralde Avalos 597d417564 Gui: extend warning filters
filter out:
-qt.qpa.wayland
-kf.config.core
-kf.kio.widgets
-kf.service.sycoca
-kf.solid.backends.udisks2
2024-10-21 11:33:35 -05:00
PaddleStroke ab7987a149 Core: Fix Ctrl-deselection issue 2024-10-21 11:31:16 -05:00
David Carter c9f0b81855 Materials: Child ignoring parent material
Inherit the material from the parent object when creating a new object,
such as during a boolean operation, or when extruding a sketch.

fixes #15503
2024-10-21 11:20:30 -05:00
wmayer 109f481a6d Core: Set unit scheme when switching between unsaved documents
Fixes #17297
2024-10-21 11:17:37 -05:00
Chris Mayo ddfdb2ee10 CMake: Add inter-module dependency of ReverseEngineering on Points
Building with -DBUILD_POINTS=no -DBUILD_REVERSEENGINEERING=yes fails with:

src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp
src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp:36:10: fatal error: Mod/Points/App/PointsPy.h: No such file or directory
   36 | #include <Mod/Points/App/PointsPy.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
2024-10-21 11:13:29 -05:00
wmayer d59160b2ce PD: Explicitly switch off AllowCompound for some tests to make them succeed
Fixes #17363
2024-10-21 11:12:50 -05:00
Chris Mayo 4014ae1dc9 CMake: Add inter-module dependency of Part on Material
Building with -DBUILD_PART=ON and -DBUILD_MATERIAL=no fails with:

/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lMaterials: No such file or directory
collect2: error: ld returned 1 exit status
2024-10-21 11:12:07 -05:00
Michael Fuchs bad2d2a37a Switch back to default filename for exports after the active document changes. Fixes #16839 2024-10-21 11:10:51 -05:00
Benjamin Nauck 5f303edf30 Add "Safe mode" which temporarily disables configs and addons (#16858)
* Add safe-mode which starts freecad in a clean environment

* Integrate safe-mode

* Show "(Safe Mode)" in main window title

* Show safe mode info when safe mode is started

* Created Safe Mode Icon

* Use new icon

* Add PreCompiled.h

* Add exports for windows

---------

Co-authored-by: Gabriel <gaz082@gmail.com>
2024-10-21 11:09:03 -05:00
Eric Price 4322c16e0f disable tesselation limit in ViewProviderGUI to prevent large parts from freezing FreeCAD 2024-10-21 10:59:03 -05:00
wandererfan 718c2746ae [TD]Fix leader line style (fix #17307) 2024-10-21 10:58:03 -05:00
PaddleStroke 16277b2f8d Fix datum not being cancelled 2024-10-21 10:56:58 -05:00
Yorik van Havre a338d8f544 BIM: Better objects filtering when IFC locking/unlocking - fixes #17193 (#17285) 2024-10-21 10:55:24 -05:00
wmayer c3e3d2ec99 Part/PD: Fix cone creation if both radii are equal
The cone features in Part and PartDesign automatically create a cylinder if top and bottom radius are identical. However, the algorithm
ignores the angle and always creates a full cylinder.
2024-10-21 10:53:36 -05:00
marioalexis 96e65ac0f6 Fem: Set converted property value after property type change 2024-10-21 10:43:27 -05:00
Jiří Pinkava 7a342d11fb Sketch: refactor GeoHistory 2024-10-21 10:42:03 -05:00
wmayer 4c71f47f9b Core: Add convenience class ModuleIO to open files 2024-10-21 10:40:18 -05:00
mwganson c3ecbcef21 [PartDesign DuplicateSelected] do not put duplicated feature into active body if it is already in another body -- addresses issue #6278 2024-10-21 10:37:26 -05:00
Adrian Insaurralde Avalos 7094af67f5 Gui: try calling graphviz binaries from PATH by default [fix #15224] 2024-10-21 10:33:04 -05:00
Florian Foinant-Willig 24bbd0769e Fix uptoshape crash when selecting a face without assigned shape 2024-10-17 20:26:27 -05:00
PaddleStroke 48beaa066e Assembly: Fix limits disappearing on edit (#17289) 2024-10-17 20:23:42 -05:00
Yorik van Havre b4cee0cd18 GUI: Added dedication to @bgbsww in about dialog/credits 2024-10-17 20:17:57 -05:00
Pieter Hijma d7a3517296 Core: Fix VarSet add property dialog Esc segfault (#17215)
* Core: Fix VarSet add property dialog Esc segfault

* Core: Improve the way disconnect is handled

* Core: Add a check for a non-existing property
2024-10-17 20:15:04 -05:00
PaddleStroke 8dd04d5fb3 Fix regressions of #16726 2024-10-17 20:13:47 -05:00
Roy-043 79e0e72aca Draft: Improve layer drag-drop fix.
The fix in #16212 only checks the LayerContainer for layers. Since we do not stop users from moving layers out of that container, we should search the whole document instead.

Fixes: #16201.
2024-10-17 12:30:42 +02:00
Roy-043 acb18c2745 BIM: Fix BIM_Leader callback bug
Probably due to changes in gui_lines `self.call` was no longer ended.

Fixes: #17283.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=91413
2024-10-17 12:14:20 +02:00
Kris Wilk 64d8ab5e55 Use Qt built-in to determine the system's preferred fixed-width font 2024-10-16 08:50:15 -05:00
marioalexis 42d0dfa121 Fem: Do not use main window widget from another thread - fixes #17255 2024-10-16 08:32:06 -05:00
wmayer af4a7800ce Sketch: Fix creating the shape of a sketch
SketchObject::buildShape() used the geometries as they were created by the user. However, they are not accurate enough in order
to create a closed wire. Instead the geometries after running the solver must be used because they are guaranteed to be accurate.
2024-10-15 23:22:43 -05:00
ronak a50ee5ee6a final returned at line 461 2024-10-15 08:48:08 -05:00
Syres916 b093191da5 [TechDraw] Fix error for some compilers 2024-10-15 08:45:18 -05:00
wmayer 7a58bbf6b4 Start: Fix build failure with enabled PCH 2024-10-15 08:44:19 -05:00
Adrián Insaurralde Avalos 868a0f174b Bim remove py2 compatibility code (#17229)
* BIM: remove py2 compatibility code

* remove unused six from conda environments
2024-10-14 11:25:23 -05:00
Yorik van Havre ef667e8409 BIM: Fixed adding missing windows when converting to IFC - Fixes issue #16631 2024-10-14 11:23:14 -05:00
Benjamin Bræstrup Sayoc b16bd50f73 [Gui] Fix isBad asserts, by removing old monkey patch
Multiple places in code, asserts for bad types would trigger SIGABRT. This is not just limited to #16316 with SoZoomTranslation, but multiple more places, not described in issue, but I experienced myself. Fixes #16316
2024-10-14 11:16:33 -05:00
wmayer 227588350d Core: Directly store text changes made in text object
Store changes made in TextDocumentEditorView immediately to TextDocument. This fixes the issue reported in
https://forum.freecad.org/viewtopic.php?p=786175#p786175
2024-10-14 11:04:57 -05:00
pre-commit-ci[bot] 9a377c6e98 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-14 17:55:51 +02:00
Yorik van Havre 4bf0553ea7 crowdin translations 2024-10-14 17:55:51 +02:00
wmayer bcab31e047 PD: Disable PartDesign_CompDatums & PartDesign_CompSketches if dialog is open
A group command is not disabled if its default command is disabled. This allows it to invoke the command when it should be impossible.
To fix the problem override the isActive() method in the sub-classes CmdPartDesignCompDatums & CmdPartDesignCompSketches

This fixes #16294
2024-10-14 10:55:21 -05:00
hlorus 2018b7b5ed MeasureGui: Revert temporary measure object creation (#17109)
* MeasureGui: Revert temporary measure object creation

Reverts the temporary creation of measurement objects that was added in #15122

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

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

* MeasureGui: Adress review comments

- Remove _mDocument and _mGuiDocument
- Replace c-style casts with dynamic_cast
- Add file guard
- Remove leftover canAnnotate method

* MeasureGui: Fix crash when selecting elements from different documents

* MeasureGui: Add additional type check in ensureGroup

* [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>
2024-10-14 10:54:23 -05:00
H. Tsubota 69ae9b2c46 Change to enclose field values ​​with quotation character in exported CSV file if they contain delimiters in Spreadsheet workbench (#17140)
* Change to enclose field values ​​with quotation character in exported CSV file if they contain delimiters

* [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>
2024-10-14 10:52:48 -05:00
Furgo c8b53bdba6 Properly scale link overlays 2024-10-14 10:50:48 -05:00
WandererFan 010c3c9f4b [TD]Fix bad circles (fix #16980) (#17182)
* [TD]fix spurious messages in GeometryMatcher

* [TD]fix closed circle test (fix #16980)
2024-10-14 10:47:13 -05:00
wandererfan 3042d8d951 [TD]throttle over aggressive dimension autocorrect 2024-10-14 10:46:02 -05:00
Jiří Pinkava c9450422d6 Gui: add Qt Platform name to splashscreen information dump
There is several bugs in FreeCAD which are related to platform (mostly wayland),
the hope is this will make it easier to identify the dependence of bug on the platform
2024-10-14 10:45:02 -05:00
Furgo 9516391ed3 Assembly: make "Solve failed" error more verbose (#17117)
* Add FC_ERR macro for the 'Solve failed' Assembly error

* Handle standard exceptions during assembly solve

* [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>
2024-10-14 10:43:27 -05:00
Yorik van Havre d82c2d6d61 BIM: Fixed missing object creation in IFC document conversion (#17093)
* BIM: Fixed missing object creation in IFC document conversion - fixes #17031

* BIM: fixed deleting of non-existing objects - fixes #17032
2024-10-14 10:37:43 -05:00
Florian Foinant-Willig ebe2777d68 Disable closed Loft for less than 3 profiles 2024-10-14 10:36:08 -05:00
Jiří Pinkava 1d7b05c607 Gui: Workaround for crash on close of MDI window
The Qt6 (up to Qt 6.7.3 now) contains bug, which can lead, under
specific circumstances, to crash of the application, when the
MDI window is closed. The circumstances are:

* at least 2 MDI windows needs to be open
* stylesheet muset set different size (border, margin) for activated and un-activated tabBar tab
* the closed window must be inactive, but created before the window now active and open
* race condition must occur betwee the closing and resize event handlers for the tabBar
  (see qt bug for details)

So this bug only occures with Qt6 with the Dark or Light styles selected (no classic) and only if
specific sequence of steps is followed during opening and closing the MDI windows.

The bug is in Qt code path executed when QMdiArea::ActivationHistoryOrder is set.

The other possible workaround might be to change all the affected stylesheets, but this seems to me
impractical and also fragile, because the affected code path will be still active.

https://bugreports.qt.io/browse/QTBUG-129596
2024-10-14 10:33:21 -05:00
Shai Seger 9365e358dd Fix shader compilation error on linux. (#17236) 2024-10-14 09:58:48 -05:00
wmayer 9dba811236 Part: Fix XML output of PropertyGeometryList::Save
Write all XML attributes of the Geometry element into a single line.

Currently the XML output looks:
                        <Geometry type="Part::GeomLineSegment"
 id="-1" migrated="1">

With the fix it will be:
                        <Geometry type="Part::GeomLineSegment" id="-1" migrated="1">
2024-10-14 09:08:07 -05:00
marioalexis 131ce95ee6 Fem: Use default height for mesh task panel quantity spin boxes 2024-10-14 09:02:03 -05:00
PaddleStroke 3d665fab34 AssemblyObject.cpp : add failsafe checks 2024-10-14 08:58:59 -05:00
marioalexis a31cde78d9 Fem: Fix examples affected by Part workbench preference parameter 2024-10-14 08:52:08 -05:00
marioalexis84 84c3457a28 Fem: Remove highlighted nodes if ccx finish without error - fixes #14855 (#17203) 2024-10-14 08:51:03 -05:00
Benjamin Bræstrup Sayoc c4e71656db [Gui] TextEdit, zoom on Ctrl + wheel
Fixes #13861
2024-10-14 08:31:45 -05:00
PaddleStroke de1b1dca21 Assembly: Fix context menu 'Activate object' not working and causing crash (#17092)
* Assembly: Add setupContextMenu to ViewProviderAssembly.h

* Assembly: Fix right click 'activate object' menu not setting edit

* add QMenu header

* Add NOLINT

* Add one more space before //NOLINT or clang cries...

* Fix isInEditMode

* add isInEditMode to ViewProviderAssemblyPy.xml

* add isInEditMode to ViewProviderAssemblyPyImp.cpp

* update activeAssembly() in Utils to make sure isInEditMode
2024-10-14 08:30:09 -05:00
PaddleStroke 3fe73e5ba4 Assembly: Remove JointObject camera callbacks. And fix lock highlight. 2024-10-14 08:27:52 -05:00
Roy-043 1dbeb9d143 Draft: Fix upgrade function: delete argument was ignored in case of draftify
Forum topic:
https://forum.freecad.org/viewtopic.php?t=91357
2024-10-14 08:19:22 -05:00
MisterMakerNL 1b50abbafe fixing the checked toolbutton issue in Qsint
https://github.com/FreeCAD/FreeCAD/issues/17230
2024-10-14 08:14:40 -05:00
wmayer 7c842eea13 PD: Fix crash when clicking on invalid edge in task panel
Fixes #10843
2024-10-13 13:34:31 -05:00
Pieter Hijma f5c138884b Gui: Fix showing multiple dialogs VarSet add prop 2024-10-11 08:55:50 -05:00
PaddleStroke bc5b0bb610 Assembly: Joint: add support to non ascii characters. 2024-10-10 20:37:09 -05:00
wmayer dcd048e00a Core: Check returned pointer of convertSWIGPointerObj 2024-10-10 20:36:22 -05:00
marioalexis 5f3e4ceb4d Fem: Remove reduntant info from geometry selector widget title 2024-10-10 20:34:29 -05:00
PaddleStroke fdca32a577 Assembly: Fix gear/belt switch on checkbox toggle 2024-10-10 20:26:35 -05:00
Syres916 dab0cb1ba9 [Gui] Disable the ability to change themes and preference packs... 2024-10-10 20:25:46 -05:00
marioalexis 5cd2862aab Fem: Fix gap in constraint fixed symbol 2024-10-10 20:23:24 -05:00
Adrian Insaurralde Avalos 6c64197cdb CI: update lint action for ubuntu 24.04 2024-10-10 12:26:11 -03:00
Roy-043 0e1bc2b716 BIM: Remove calls to end_all_events to avoid Linux crash
Fixes #15723.
2024-10-10 13:47:32 +02:00
Paul Lee c30d087385 [Arch] Bug: ArchRemove Creates Cyclic Dependency and TNP
FreeCAD Discussion Forum -
https://forum.freecad.org/viewtopic.php?t=91180&start=30#p786308
2024-10-10 10:06:46 +02:00
PaddleStroke c02ad52bfd Sketcher: Fix double click of wire and remove selection that was not working 2024-10-08 10:53:27 -05:00
PaddleStroke 259d21c565 Core: Fix #7580 (#17013)
Fixes several undo/redo issues with the attachment dialog
2024-10-08 09:05:49 -05:00
PaddleStroke bf804beb21 Assembly: Fix migrationScript2 error with bad joints (#17010)
* Fix migrationScript2 to handle bad joints
2024-10-07 18:49:01 -05:00
Bas Ruigrok e3af254dd6 Gui: Fix Touchpad navigation style panning in edit mode 2024-10-07 12:41:02 -05:00
marioalexis ac8d084924 Fem: Add option to use old Netgen mesher implementation 2024-10-07 11:11:25 -05:00
mwganson 3ad9565f56 [Part Workbench] Fix issue with Sketcher_NewSketch icon moving on changing back to workbench 2024-10-07 10:53:03 -05:00
Furgo 0e1e7dcf03 Create the assembly object inside the list of commands 2024-10-07 10:50:20 -05:00
mwganson 6e5375002f [Step Import] fix issue with non-latin characters in import path 2024-10-07 10:43:26 -05:00
marcuspollio 4d9685ae0d Start: little layout tweak to First Start Region 2024-10-07 10:41:58 -05:00
wmayer 3d97955f7d TD: Fix compiler warnings
This fixes the compiler warning: unused parameter 'mode' [-Wunused-parameter]

It's a regression of #16889 to not initialize the class member m_createMode any more that causes UB,
i.e. whenever m_createMode is accessed it may return an unexpected value.
2024-10-07 10:40:47 -05:00
Florian Foinant-Willig 69823f7abc [PD] Fix subtractive primitive placement 2024-10-07 10:39:48 -05:00
Florian Foinant-Willig 22a8ffdbe4 [PD] fix change primitive AttachmentOffset move the body 2024-10-07 10:39:48 -05:00
Unl0gic ad9e6231f9 Update SurfaceSupport.py
- Fixed mapping v_bit to ConeCutter
2024-10-07 10:35:14 -05:00
wandererfan 32c664bdaa [TD]fix parallel edge test (fix #16851)
- missing normalization before test
2024-10-07 10:34:28 -05:00
Benjamin Bræstrup Sayoc 664805fa4d [Sketcher] If origin selected: don't do distance to origin
In auto constrainer. Fixes #12684
2024-10-07 09:02:56 -05:00
mwganson fd8ef079d0 [PartDesign AllowCompound] recompute all features when AllowCompound property is changed either from true to false or from false to true 2024-10-07 08:56:25 -05:00
shai 3d400211da Fix issue #17035 2024-10-07 08:35:56 -05:00
Eric Price 0909816af6 Changed QuickMeasurement to be conservative (#17060)
* Changed QuickMeasurement to be conservative

QuickMeasurement should not measure while tool dialogs are open
this includes but is not limited to editing sketches
also changed several other sanity checks to be opt-in vs opt-out, as discussed.

* move the test if it is safe to measure to when the measurement actually happens - avoids any potential race conditions
2024-10-07 08:33:46 -05:00
Roy-043 344ff7b946 BIM: BimWall add missing imports
Fixes #16996.
2024-10-07 15:21:41 +02:00
Roy-043 00610a62c5 Draft: avoid confusing SVG warning for nested circles and ellipses
Forum topic:
https://forum.freecad.org/viewtopic.php?t=90942
2024-10-07 15:08:31 +02:00
bgbsww bd4afe9f6e Disallow end_all_events in Gesture Nav Style 2024-10-07 15:03:47 +02:00
Roy-043 1119303d36 More logical implementation of the fix. 2024-10-07 15:00:44 +02:00
Max Wilfinger ea0b0bacac Update images on XDGData and README 2024-10-07 14:55:11 +02:00
Furgo ab49392da3 Prepend a single quote to BOM index to be interpreted as a string in generated spreadsheets 2024-10-04 08:53:27 -05:00
Roy-043 8932d52107 BIM: Compatibility fix for walls based on wire or face with -Z normal
In V1.0 the handling of wall normals has changed. As a result existing walls with their Normal set to [0, 0, 0], based on wires or faces with a shape normal pointing towards -Z, would be extruded in that direction instead of towards +Z as before. To avoid this their Normal property is changed to [0, 0, 1].
2024-10-04 13:55:01 +02:00
Ajinkya Dahale 7acf6274a4 [Sketcher] Apply tangent autoconstraint only when Dir given
This relates to `seekAutoConstraint` and `seekAndRenderAutoConstraint`.

Fixes #16321.
2024-10-03 23:18:07 -05:00
Florian Foinant-Willig f14917e8d4 [PD Helix] allow refinement to fail 2024-10-03 21:54:29 -05:00
bgbsww c587d6b8f9 Refine further 2024-10-03 13:47:37 -05:00
bgbsww 40239810cc Return to python; simplify to work with only classic names, provide migration 2024-10-03 13:47:37 -05:00
bgbsww 9aba82d5d6 Correctly build reference from selection subname 2024-10-03 13:47:37 -05:00
Jiří Pinkava cdec2159f1 Gui: fix warning with duplicate name in DlgSettingsLightSources 2024-10-03 13:23:04 -05:00
Kris Wilk e76ebea729 Placement Dialog: Use default tab order (Fix #16944) 2024-10-03 11:44:07 -05:00
wmayer baa57f5ee4 Fix compiler warning 2024-10-03 11:31:45 -05:00
Kris Wilk c43e19820d Prevent using reserved names for properties or aliases (Fix #16846) (#16902)
* Prevent naming properties with reserved words (Fix #16846)

* Prevent using reserved constant names for properties or aliases

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

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

* App: Add unit test for isTokenAConstant

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-10-03 10:03:21 -05:00
PaddleStroke 3325ae99a9 Chennes fix
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-10-03 10:01:31 -05:00
PaddleStroke c6f5def7d7 Assembly: Use cpp getGlobalPlacement python binding rather than reimplementing it. 2024-10-03 10:01:31 -05:00
PaddleStroke 3475cf42d2 Core: GeoFeature: Add python binding to the new getGlobalPlacement() 2024-10-03 10:01:31 -05:00
Frank Martinez efb79d1c96 [AddonManager] Set default filter to ANY package type 2024-10-03 09:55:17 -05:00
PaddleStroke 3931953bc7 QuickMeasure: Prevent crash by limiting selection to Part::Features (#16921)
* QuickMeasure: Prevent crash by limiting selection to Part::Features

* chennes' fix

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

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-10-03 09:49:31 -05:00
Roy-043 72441c3a27 BIM: check if Width and Height of window are not zero 2024-10-02 22:49:44 -05:00
André Althaus a953eb20e3 Only omit edges for group children in the dependecy graph
All edges for GeoFeatureGroupExtension where omited even if the
dependency was not a child of the object.
2024-10-02 22:45:05 -05:00
wmayer 5feb628feb Core: Fix macro recording when using module_io 2024-10-02 22:13:40 -05:00
Benjamin Nauck 11bc6c6b69 Fix macos crashes when unhandled exceptions reaches qt 2024-10-02 22:12:03 -05:00
wmayer 484a262c31 Core: Do not save changes of a text object if the GUI document is about to be closed
This fixes #16873: Text document breaks some Analysis container objects
2024-10-02 21:42:16 -05:00
David Carter 1b33aedb56 Materials: Correct DiffuseColor custom attribute
Custom attributes were modified to maintain the behaviour of setting
transparencies using the DiffuseColor alpha channels
2024-10-02 21:35:28 -05:00
Pieter Hijma c70093d22f Gui: Fix segfault in Expression Editor/VarSet 2024-10-02 21:31:33 -05:00
André Althaus 5410d92eb1 Remove the explicit dependency on Version.h from the fc_version target
This caused problems witht the Makefile generator because it doesn't
support the BYPRODUCTS option.
2024-10-02 21:31:00 -05:00
David Carter dbf849a592 FEM: Translation error causing a crash
An error in the Italian translation added an extra '{}' to the
translation string resulting in a dump when formatting.

This has also been updated in CrowdIn but as it's causing a crash is
also beiung changed via this PR. It should updated correctly when
doing the next translation pull.

Fixes #16704
2024-10-02 21:29:50 -05:00
hlorus 2b5dca48a5 MeasureGui: Also hide delta measurements 2024-09-30 11:24:31 -05:00
hlorus 9830160821 MeasureGui: Remove leftover reset of _mMeasureObject
This was introduced in af9097ce87 due to a faulty resolve of a merge conflict
2024-09-30 11:23:11 -05:00
WandererFan 5ac53527df [TD]Fix auto correct msg missing16892 (#16909)
* [TD]fix bad return code on auto-correct fail

* [TD]prevent changing references in property editor

- this is a "shoot yourself in the foot" practice
2024-09-30 11:21:02 -05:00
mwganson 70befd69d5 [Part CheckGeometry] prevent crash when attempting to check origin axis 2024-09-30 11:19:22 -05:00
Benjamin Nauck 20c552693d Include a warning to devs for unhandled exceptions
The same situation will cause a crash on at least macOS.
2024-09-30 11:15:26 -05:00
wandererfan 0117d6994a [TD]fix no dim repair on area (fix #16894) 2024-09-30 11:13:40 -05:00
André Althaus 49ee02277b Regenerate Version.h if the git hash changes
Prevous Version.h was not regenerated after it was initially created.
This prevented an accurate commit hash in the About dialog when
incrementally building from source.

Now the file is always rewritten when it's content is changed.
2024-09-30 11:12:54 -05:00
Shai Seger 41d8ed4c78 [CAM Simulator][1.0] Change usage of sample shader code to one with compatible license. (#16899)
* Change usage of sample shader code to one with compatible license.

* [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>
2024-09-30 11:08:52 -05:00
Frank Martinez e00765506c Revert 9b409da due to a regression in some platforms 2024-09-30 11:07:04 -05:00
wmayer 66ec2642a4 Core: Do not set to XY plane by default if the rotation of the image doesn't match 2024-09-30 11:04:16 -05:00
wmayer cec0213799 Core: Fix resetting placement of transformed image
The restored Euler angles of a rotation may significantly differ from the input Euler angles so that determining the plane isn't very reliable.
To get the plane reliably multiply (0,0,1) with the rotation and use this as reference normal of the plane.
2024-09-30 11:04:01 -05:00
wandererfan 5b4fac652d [TD]fix solid line detail highlight not shown 2024-09-30 11:01:53 -05:00
wandererfan c4bf46e97a [TD]fix handling of projection convention (fix #16788 #16785) 2024-09-30 11:00:56 -05:00
wandererfan b885af57b2 [TD]add preference methods for Projection Group 2024-09-30 11:00:56 -05:00
Eric Price 4d54b458a7 Do not allow loft where the segment shapes are too close ( fix #5855 )
A loft or pocket only makes sense if the segments used for it have some minimum separation. Having the shapes identical causes segfaults in OCCT

Checking for CoG is a hack. Identical shapes have identical CoG - but an identical CoG does not necessarily mean identical shapes - however it can be argued that a shape that is not offset at least somewhat in the direction of the loft doesnt make a valid shape for a loft (it will typically freeze OCCT instead of crashing it) and a sufficiently suitable shape will have a different CoG

throwing the exception will make it easy to identify if there ever is a case where this is a bad thing - and exceptions are better than segfaults.
2024-09-30 10:58:25 -05:00
bgbsww 13f719f285 Tiny doc format changes to make pybin11_stubgen happy 2024-09-30 10:54:04 -05:00
marioalexis 1c53cde453 Fem: Add offset between faces and wireframe in FemPostObject view provider 2024-09-30 10:50:24 -05:00
Eric Price d2c9078fd3 PadDesign: Work around issue 16690
This is a stopgap measure, I don't know if the underlying issue is fully understood - but this prevents it from happening in the given test case.

By overriding the base for the pocket prism, which is a trick also applied by
TopoShape::makeElementPrismUntil() if the prism creation fails on first try, the bug where said prism goes to the wrong shape is avoided - this on its own would however break a pad in the inverse case, so we only do that when pocketing
2024-09-30 10:48:01 -05:00
Benjamin Nauck 5575ad7085 Fixes name 'PyExc_FC_AbortIOException' is not defined 2024-09-30 10:46:21 -05:00
wandererfan 587e0b2bf9 [TD]fix bad default value (fix #16783) 2024-09-30 10:45:20 -05:00
bgbsww 469379de61 Make python Regex Strings raw to avoid py3.12 SyntaxError 2024-09-30 10:43:10 -05:00
wandererfan 3bccd5bd6a [TD]allow override of Balloon drag modifier (fix #15388) 2024-09-30 10:40:54 -05:00
wandererfan 668d72dfe2 [TD]add preferences for Balloon drag modifiers 2024-09-30 10:40:45 -05:00
PaddleStroke b327870fd4 Assembly: Fix lag during dragging of large assemblies. Bundle fix joints together. Show only the movingJoint during dragging. Do not recompute joints during dragging. 2024-09-30 10:39:06 -05:00
Syres916 57a94ff4f3 [Gui] Qt6 OpenGLWidget - move black rectangle off screen (#16863) 2024-09-27 22:52:07 -04:00
Jacob Oursland 734ea2e8bc CI: Fix conda builds. 2024-09-27 09:39:27 -04:00
Eric Price d4db6e1432 Measurement: Avoid null shapes to be returned in all code branches (Fix #16820)
Returning a null shape would have triggered an exception in the bottom branch but not in the top one - which later leads to a segfault - solution - raise an exception. OOC doesn't like null shapes.
2024-09-25 12:30:06 -05:00
David Carter 1d4d524932 Materials: Fix QT6 error
The MaterialTreeWidget was not working in QT6 due to a type check for a
QT5 widget
2024-09-25 11:49:16 -05:00
Roy-043 aca050d47c Fix linter warning 2024-09-25 16:01:06 +02:00
Yorik van Havre f34c43d56e Merge branch 'releases/FreeCAD-1-0' of github.com:FreeCAD/FreeCAD into releases/FreeCAD-1-0 2024-09-25 16:00:14 +02:00
Eric Price 843b724b6d Measurement: Correctly handle unknown selections to avoid segfaults (Fix 16794)
The measurement code did not handle mixed selections of known and unknown types correctly. Although a unknown selected object would leave the type at Invalid, selecting both known and unknown objects would have the type determined by the known object type and treat the unknown as the same. This causes exceptions and - worst case a segmentation fault.

This fix introduces a new category "other" which - if present in a selection always forces type to Invalid. This should be forward compatible in case new types are introduced in the future.
2024-09-25 07:49:10 -05:00
chris 118cc02c74 issue #15329 add missing include to resolve build error 2024-09-24 19:10:01 -05:00
Eric Price 6bab0c2787 PartDesign: Loft Intelligence - Select the whole sketch if the selected shape is … (#16791)
* Loft Intelligence - Select the whole sketch if the selected shape is a component of a sketch that is not a vertex (Fix #16630)

In fa8f29aed4 FeatureLoft.cpp was refactured, dropping some functionality, mainly the ability to create lofts to entire sketches or other 2d shapes if a single component that was not a single vertex was selected as either the base shape or a section

the old code was:

1     auto getSectionShape =
2          [](App::DocumentObject* feature, const std::vector<std::string> &subs) -> TopoDS_Shape {
3              if (!feature ||
4                  !feature->isDerivedFrom(Part::Feature::getClassTypeId()))
5                  throw Base::TypeError("Loft: Invalid profile/section");
6
7              auto subName = subs.empty() ? "" : subs.front();
8
9              // only take the entire shape when we have a sketch selected, but
10             // not a point of the sketch
11             if (feature->isDerivedFrom(Part::Part2DObject::getClassTypeId()) &&
12                 subName.compare(0, 6, "Vertex") != 0)
13                 return static_cast<Part::Part2DObject*>(feature)->Shape.getValue();
14             else {
15                 if(subName.empty())
16                     throw Base::ValueError("No valid subelement linked in Part::Feature");
17                 return static_cast<Part::Feature*>(feature)->Shape.getShape().getSubShape(subName.c_str());
18             }
19         };

this commit forward-ports the missing functionality provided by line 7-12 in above snippet

* Code cleanup as suggested by (#16791)
2024-09-24 15:01:49 -05:00
Florian Foinant-Willig 55e912b060 [PD] Fix Pad uptoface with custom direction (#16539)
* [PD] Fix Pad uptoface with custom direction

* Add unit test
2024-09-24 11:30:17 -05:00
wandererfan d272722d9d [TD]fix crash on bad selection (fix #16727) 2024-09-24 10:08:05 -05:00
Benjamin Nauck 690f06e618 Swaps out the hard coded icon to the standard svg icon 2024-09-24 10:04:32 -05:00
Syres916 ea9d1c4fd2 [BIM] Fix error starting BIM Wb for certain new users 2024-09-24 14:22:58 +02:00
Eric Price cf9e2e9c9a CLI: Enforce LC_NUMERIC=C on Posix systems (#16724) (#16763)
* Enforce LC_NUMERIC=C on Posix systems (#16724)

Initialising Qt with native LC_NUMERIC affects XML import on CLI (freecad -c)

This causes sketch constraints and potentially other components relying on numeric constants to break or have incorrect values.

Forcing LC_NUMERIC to C avoids this issue and enforces reproducible behaviour on all locales.
This does not affect the number format displayed in the GUI, as set in preferences.
2024-09-23 19:10:28 -05:00
Chris Hennes 3d63fc6c2f cMake: Update version to 1.0.0RC2 2024-09-23 16:14:10 -05:00
Frank Martinez 99097c61f6 Splash Screen minimal show time. Issue #16264 2024-09-23 16:07:31 -05:00
Yorik van Havre b0d847ca15 Translations (#16754)
* Updated ts files

* merged crowdin translations

* [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>
2024-09-23 14:12:15 -04:00
bgbsww 95e93a3ab1 Match LS3 opcodes for sketch shape 2024-09-23 10:45:48 -05:00
3x380V e061f81beb TechDraw: Buggy Wayland custom cursors workaround (#16740)
* Gui: Minor polishing of cursor regression fix

* TD: Buggy Wayland custom cursors workaround

Until Qt v6.6 displaying custom cursors on Wayland is broken,
so add a workaround. See also QTBUG-95434.

Fix is the same as d3bb2068 ("Gui: Buggy Wayland custom cursors workaround")
plus subsequent fixes.
2024-09-23 10:43:28 -05:00
Christoph Moench-Tegeder 94d1a67d88 replace exec_program() with execute_process()
Recent CMake (>= 3.28) do not allow exec_program() any more by default,
but prefer execute_process(), which takes slightly different flags.
According to the documentation, exec_program() has been deprecated
since CMake 3.0 (which was released in 2014, so it should be common
enough that I don't feel like making allowances for any really old CMake).

References: https://cmake.org/cmake/help/latest/policy/CMP0153.html
2024-09-23 10:41:34 -05:00
WandererFan 8fe89409a5 [TD] Fix win file spec backslash (fix #16646) (#16689)
* [TD]add method to clean win filespecs

- '\' in strings passed to Python as filespecs is interpreted as
  an escape of the following character.
- replace '\' with '/'

* [TD]remove '\' from filespecs before use
2024-09-23 10:40:22 -05:00
Shai Seger 29d4c9f13a [Cam Simulator][1.0] Fix minor Ambient Occlusion bug. (#16665)
* Fix minor Ambient Occlusion bug.

* fix text cutting in CAM Simulator task panel. Issue #16707
2024-09-23 10:39:09 -05:00
wandererfan 98cb3ae80e [TD]fix BrokenView selection (fix #16567) 2024-09-23 10:37:11 -05:00
Kevin Martin 288b6e6943 DXF: Fix Import related behavior reported in issues #13597 and #16068 (#16511)
* Fix double-import on exception in ImportGUI.readDXF
The python code has a try/catch block intended to detect if the ImportGUI module is present and if so use its readDXF method, otherwise use Import.readDXF.
The block was incorrectly structured so that Import.readDXF would also be called if ImportGUI.readDXF raised an exception, causing the DXF file contents to be loaded twice into the drawing (at least, up to the point where the exception occurred)

* Make ImpExpDxfRead::MakeLayer use centralized accessor for Draft module
The importer class already had a method to find the python Draft module, but MakeLayer was doing the work itself. Now it uses the centralized accessor, which has also been improved to generate a message if the module can't be loaded.

* Give compounded objects names related to the containing layer name
If "Use Layers" is set and also "Group layers into blocks" the names of the generated compound objects will be based on the name of the containing layer.
If "Use Layers" is not set this will not occur because in general objects from several layers would be compounded together.
Fixes (partially) #16068, the remaining fix is likely just an explanation of the interaction of the options.
closes #13597

* Use correct (new) property name OverrideShapeAppearanceChildren
This corrects a bug created by commit 495a96a which renamed the layer property "OverrideShapeColorChildren" to "OverrideShapeAppearanceChildren" but missed this particular reference to the property by its old name.

The code here called PyObject_SetAttrString which, due to the wrong attribute name, set an expection state in the Python engine, ultimately causing the next attempt at importing a module to fail, with various consequences depending on why the module is being imported.

* Wrap PyObject_SetAttrString and PyObject_GetAttrString with error-checkers
In DEBUG compiles these methods are wrapped to report errors which can occur if the property cannot be referenced.

* Make some error-printers static instead of const
They don't need the CDxfRead object to work

* Display exceptions raised by ReadEntity
Although the DXF reader has an ignore-errors flag, it should still report any errors it encounters. The flag is deemed to mean that, after an error, the reader should continue to try to read the file rather than quitting on the first error.

* [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>
2024-09-23 17:28:32 +02:00
hasecilu 49aee8e57c Help: Don't open 404 documentation pages
Unfortunately, not all documentation is translated.

Instead of presenting to the user 404 code error pages is preferable to
show the documentation on English.

Status codes 200 and 404 are assumed as requests response.
2024-09-23 17:17:51 +02:00
David Carter 555299ddea Materials: Update install locations
Ensure icons and images are put in the correct location.
2024-09-23 10:04:52 -05:00
wandererfan a49e5c0c01 [TD]respect camera direction preference (fix #16593) 2024-09-23 09:23:59 -05:00
wandererfan 6eb92e6647 [TD]fix torus render (fix #16646) 2024-09-23 09:21:33 -05:00
wandererfan b99e34bd86 [TD]fix double pdf file on win (fix #16538) 2024-09-23 09:19:05 -05:00
marioalexis a48fd0f422 Fem: Use shape global placement in Mesh Netgen new implementation 2024-09-23 08:17:21 -05:00
marioalexis b164b49b81 Fem: Add offset between faces and wireframe in FemMesh view provider 2024-09-23 08:16:45 -05:00
marioalexis 162eeeb5de Fem: Use reference subshape transformation on the underlying geometry 2024-09-23 08:12:01 -05:00
Jiří Pinkava 7a1282a6da BIM: Fix tabstop order for Project Manager dialog
Until now not defined explicitly, using tab juped throught boxes in
order in which they were created, which is really jumpy user experience.
2024-09-23 12:15:19 +02:00
Kevin Martin 238c68d8eb DXF: Place objects in layer all at once rather than one at a time to improve DXF import speed dramatically. (#16596)
* Place objects in layer all at once rather than one at a time.
This reduces (by a factor of the number of objects in the layer) the number of times that the layer contents are traversed to set the properties of the contained objects.
This means the layer insertion of O(n) rather then O(n^2) on the number of objects.
Also remove a loop invariant in view_layer so the chidren are not traversed if colours or appearnces are not inherited from the layer.
Fixes #15732

* [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>
2024-09-23 11:41:41 +02:00
Kevin Martin 7cc34c9072 DXF: Remove O(n^2) time on DXF import with the legacy importer (#16611)
* Remove O(n^2) time on DXF import
Accumulates the contents of each layer in a local Python list, then at the end assignes all the objects at once into the layer. This avoids a very slow process of traversing the objects so far and (re-)updating their properties each time a new object is added.
Fixes #16604

* Correct last change to not damage existing layer contents.
The layer could already have contents if the DXF file is being Imported rather than Opened.
The original change would lose the previous layer contents.
2024-09-23 11:38:16 +02:00
hlorus b2b0af95d8 MeasureGui: Move _mMeasureType member to local variable
Fixes #16565
2024-09-22 20:35:25 -05:00
Florian Foinant-Willig 6afb4a0220 [PD] Fix Pad uptoshape and add unit test 2024-09-22 17:22:56 -05:00
Roy-043 50962ae9fe Correct tree icon for TechDraw_AreaDimension 2024-09-22 16:59:11 -05:00
Bas Ruigrok 87e2d01ccb Tux: Fix default orbit style shown in status bar 2024-09-22 16:57:48 -05:00
bgbsww 6625b675af Update method names and clean 2024-09-22 16:55:45 -05:00
Zheng, Lei 7c16b82e70 Transfer FeatureHole code 2024-09-22 16:55:45 -05:00
Benjamin Nauck 72ae812aa4 Use backspace as default to delete on mac
Only full size mac keyboards has a specific delete key, most doesn't.
2024-09-21 10:37:44 -05:00
bgbsww 4c3ffa617a Correct error in resolveElement 2024-09-21 10:36:39 -05:00
David Carter a5c4416bd0 Materials: Set transparency from DiffuseColor
Migrate the transparency from the DiffuseColor alpha channel to the
transparency color attribute. This allows the alpha channel to be
used as designed

fixes #14938
2024-09-21 10:35:54 -05:00
Chris Hennes 24f67f2d87 GUI: Fix mistake in cherry-picking
The cherry-pick lost the deletion of a line of code.
2024-09-20 09:17:12 -05:00
Jiří Pinkava 580e7879d4 Gui: Fix path to QRC file in PreferencePages UI file
QtCreator, when the file is opened, reports reference to .qrc filewhich
does not exists. It looks like a missing piece from ccb9d7faeb.
2024-09-20 08:43:27 -05:00
CalligaroV 3cf5f0e086 Sketcher/Gui: check if there's a 3D view while executing ViewProviderSketch::unsetEdit()
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-20 08:30:08 -05:00
supermixed 18de22a8a7 Core: Import STEP: Cancel button does not cancel (#16499)
* Fix importing .step file when user cancelled import settings dialog
* Refactor object loading python code, fix not using settings when STEP options dialog not shown
* Use custom exception type for user cancelling import instead of `RuntimeError`
* Pull python code out to external file
2024-09-20 08:25:44 -05:00
xtemp09 28bcea6613 [GUI] Move the Push In and Pull Out buttons to the left side
Closes #16587.
2024-09-20 08:20:02 -05:00
theosib 5755e70636 Filter out infinite shapes from Sweep available surfaces 2024-09-20 08:18:27 -05:00
theosib f65a9ffec5 Filter out infinite shapes from Loft available shapes 2024-09-20 08:18:27 -05:00
Frank Martinez 6d5c7ea855 Change fixed selection colors to style based palette. Issue #16454
GUI: Merged cherry-picked 6afc6c7757 to 1.0 branch
2024-09-20 08:11:53 -05:00
bgbsww ae7fe1bc2e Match Ruled Surface behavior to prior versions 2024-09-20 08:09:26 -05:00
Bas Ruigrok acbce24dd9 Gui: Fix segfault in align to selection tool 2024-09-20 08:06:45 -05:00
David Carter d0e0cf112f Materials: ShapeMaterial not properly restored
The ShapeMaterial variable was not being properly restored. It's UUID
was restored but the material was not being loaded and set
2024-09-20 08:05:01 -05:00
Florian Foinant-Willig 6310430e38 [PD] fix pad uptoface and uptoshape (#16030)
* [PD] fix Pad UpToFace and UpToShape
* specify struct pointers for Win
* Rename variables for MSVC compatibility - windows.h defines 'near' and 'far' as macros
* Add unit test

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-09-19 08:51:37 -05:00
bgbsww 064abb30ee Move the recompute dialog to after Gui opens instead of per document signal. 2024-09-19 08:49:27 -05:00
PaddleStroke 3c1b54200d Measure: Fix quickmeasure globalplacement. 2024-09-19 08:48:12 -05:00
Chris Hennes 25a0847e60 Addon Manager: Don't crash on bad XML
Wrap all metadata reads in try/except blocks and gracefully bail out if the data is bad.
2024-09-19 08:46:04 -05:00
Roy-043 5f7eb6c16f BIM: show AutoUpdate of existing ArchSchedule
Fixes #16655.
2024-09-19 14:18:21 +02:00
Yorik van Havre 915c05a289 Translations (#16582)
* updated ts files

* merged crowdin translations

* [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>
2024-09-19 09:37:33 +02:00
Syres916 a82eb29af1 [Draft] Improve the color activation and ability to change… (#16603)
* [Draft] Improve the color activation and ability to change size of the snap text

* [Draft] Correct dimension text size calculation
2024-09-19 09:04:06 +02:00
bgbsww e19f583e77 Sketcher: Do not consider missing external geometry to be an error (#16590)
* Do not consider missing external geometry to be an error; highlight in conflict color.
2024-09-18 15:18:29 -05:00
hlorus dd31321038 MeasureGui: Auto close task on document deletion 2024-09-18 13:04:15 -05:00
Zheng, Lei 4fd8b40f65 Base: fix XMLReader non-closing character stream 2024-09-18 12:59:23 -05:00
Benjamin Bræstrup Sayoc 89b118e125 Revert "[Measure] Fix redundant variable assignment"
Fixes #16564. This reverts commit a7831eee4b.

Co-authored-by: Murmele <Murmele@users.noreply.github.com>
2024-09-18 08:36:39 -05:00
bgbsww b215a96f5d If we are creating a Sketch inside a Body that is in a link, use link position 2024-09-18 08:35:37 -05:00
bgbsww eca9a105af Gui: fix python syntax in C++ code that broke some compilers (#16614) 2024-09-18 08:33:53 -05:00
marioalexis 814945f728 Fem: Replace old FemMesh Netgen object implementation 2024-09-16 19:16:42 -05:00
marioalexis 58d27094fa Fem: New implementation of FemMesh Netgen object 2024-09-16 19:16:42 -05:00
marioalexis 61cc23bda2 Fem: Add set of mesh elements from a list 2024-09-16 19:16:42 -05:00
Bas Ruigrok d4006c4937 App: Return root object placement if target and root object are the same in getGlobalPlacement
(cherry picked from commit 8db7191084)
2024-09-16 13:01:12 -06:00
Ladislav Michl fad1c30559 Main: simplify banner
FreeCAD advertizes itself too noisy way which brings no usefull
infomation. Unify banner for commandline and GUI application and
drop unicode '(C)' character.
2024-09-16 11:15:06 -05:00
Jiří Pinkava 57c23537d0 Gui: fix size of ComboBox in Preferences/Navigation
Fixes visual artifact in the Preferences/Navigation dialog. The
default value for this field is 0 (at least for some Qt versions),
which does not make sense, because the element would be invisible.

Also the element is actually invisible when editing the UI file in
QtCreator.

Using the default "max" value set for other fields.
2024-09-16 11:07:27 -05:00
hlorus 255bdadf88 Measure: Use getGlobalPlacement method (#16251)
* Initial commit to apply delta also for interactive measurement

* Not required special logic to check if possible, it can be easily checked if the property exists

* remember setting so it is not required to turn it always on

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

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

* Measure: Use getGlobalPlacement method

Fixes #16058

---------

Co-authored-by: Martin Marmsoler <martin.marmsoler@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-16 11:05:37 -05:00
CalligaroV 0312824742 Do the same for the elements selected in the Task Panel
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-16 11:01:40 -05:00
Zheng, Lei a323e03030 Sketcher/Toponaming: call SketchObject::convertSubName() in ViewProviderSketch::addSelection2() 2024-09-16 11:01:40 -05:00
marioalexis c0941f9e22 Fem: Enable cancel meshing for Gmsh - fixes #5914 2024-09-16 10:53:50 -05:00
marioalexis 7d13b17b1e Fem: Add base class for FemMesh task panels 2024-09-16 10:53:50 -05:00
Yorik van Havre b1e611d7e3 BIM: Support for IfcOpenShell 0.8 2024-09-16 10:51:49 -05:00
bgbsww 4a57077f73 Add override flag for recomputes; set it in relevant tests with old files. 2024-09-16 10:50:48 -05:00
bgbsww d1903eabc7 Move code for recompute dialog and disable warning 2024-09-16 10:50:48 -05:00
Zheng, Lei c093a79151 Transfer in LS3 code 2024-09-16 10:50:48 -05:00
qewer33 779e1b2bb5 Update about dialog thumbnail image 2024-09-16 10:46:45 -05:00
Shai Seger a86b0ad3fd [Cam Simulator][1.0] Limit anti alias samples for better compatibility. (#16416)
* Limit anti alias samples for better compatibility. might solve Wayland problem, issue #15665

* Antialias samples are taken from display prefs

* [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>
2024-09-16 10:42:19 -05:00
Jiří Pinkava b55d54a417 Sketcher: initialize geometry history limit variable (#16337)
* Sketcher: initialize geometry history limit variable

The variable seems to be uninitialized, valgrind complais about it.

The `git grep geoHistoryLevel` and the code ispection suggest it is never set.
If initialized to zero, most of the related code is never used, which
can point to the fact there is either another bug or the code is unused.

The variable was introduced in 42bf92ad12.

* Sketcher: Default geoHistoryLevel to 1

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-09-16 10:41:29 -05:00
wandererfan c5fef051f0 [TD]allow SaveCopy from MDIViewPage (fix #16447) 2024-09-16 10:36:09 -05:00
Roy-043 5e32fe2547 BIM: exportIFC.py fix UnboundLocalError
As shown in the image here:
https://github.com/FreeCAD/FreeCAD/issues/16485#issue-2523042111
2024-09-16 13:38:28 +02:00
Jiří Pinkava 192314b070 BIM: refactor wellcome window, drop most obvious comment 2024-09-16 13:29:27 +02:00
Jiří Pinkava aba9c8d74d BIM: drop unnecessary setPixmap from wellcome window
The image is already set in the UI file, it is not necessary to set it again
2024-09-16 13:29:18 +02:00
Jiří Pinkava 29ef93cbf3 BIM: adjust size of wellcome window to fit content
The actual optimal size of the window depends on many details, like UI style, system fonts,
OS etc ... so lets auto-resize the window to fit the content before display.
2024-09-16 13:29:10 +02:00
Roy-043 c6a273b789 Draft: Fix regression with layer print color
Problem with the same cause as #16212.
2024-09-16 10:08:25 +02:00
hoshengwei fa9d92a819 fix Material TaskPanel Load Preset not working bug 2024-09-16 10:04:00 +02:00
Kacper Donat 756d1a0a80 Gui: Use FreeCAD Theme only for FreeCAD stuff 2024-09-13 13:26:58 -06:00
Yorik van Havre 14ff4cb869 Draft: Fixed restrained movement - Fixes #16386 2024-09-13 13:20:59 -06:00
Bas Ruigrok 37b8fd1e40 Move isLink and isLinkGroup from AssemblyObject to DocumentObject 2024-09-13 13:10:59 -06:00
Bas Ruigrok 53b878869e Gui: Fix alignment direction for transformed objects 2024-09-13 13:10:59 -06:00
Bas Ruigrok d515ba9428 Move getGlobalPlacement from AssemblyObject to GeoFeature 2024-09-13 13:10:59 -06:00
Bas Ruigrok 131618941c Move splitSubName from AssemblyObject to Base::Tools 2024-09-13 13:10:59 -06:00
Jacob Oursland 196312941c Windows: Make FreeCAD.exe debuggable on PDB builds. 2024-09-13 12:30:47 -06:00
Jacob Oursland d8ea9a6bca CMake: conda-macos-* do not search Homebrew for dependencies. 2024-09-13 12:28:43 -06:00
Jacob Oursland 21af2176a6 Base: switch header include type for consistency with codebase. 2024-09-13 12:27:37 -06:00
Jiří Pinkava 358451359c GUI: Fix tree visibility click when a tree item gets collapsed
The tree can change shape during handling the mousePressEvent() event,
because some part of the tree can be (un)folded. This might lead to
shift of the three (up or down). The position of items in tree change
relatively to the position of mouse (which stays in place).
If the visibility click is handled after mousePressEvent, the shift in
position can lead to cursor beeing over visibility icon and the click
is handled like if the visibility icon vas clicked, which is unexpected.

Handling the visibility click first fixes this. The setAccepted(true),
was removed, it is left to the subroutine to set it.
2024-09-13 12:25:03 -06:00
Benjamin Bræstrup Sayoc d00aae972c [Measure] Redirect enter key press to apply button
Fixes #16401. Now call of the save function is dependent on whether the apply button is enabled. The button is only enabled if valid objects to save.
2024-09-13 08:43:07 -05:00
Benjamin Bræstrup Sayoc 4e5e193c76 [Measure] Fix redundant variable assignment 2024-09-13 08:43:07 -05:00
wmayer 1c9432539a Port: Include changes of FreeBSD port 2024-09-13 08:32:16 -05:00
Yorik van Havre add3a14b6e Draft: Fixed function case 2024-09-13 15:01:50 +02:00
Yorik van Havre 04ee5f8583 Draft: Fixes error in Draft trackers when not on a 3D view 2024-09-13 15:01:38 +02:00
hoshengwei 84ae76764e fix ArchMaterialTaskPanel wrong import BimClassification Path
1. fix ArchMaterialTaskPanel wrong import BimClassification Path and icon after BIM merge into Arch

2. change taskpanel name to BIM material 

3. fix Qt slot and signal (more up to date style)
2024-09-13 12:12:24 +02:00
Yorik van Havre 6f6205ff41 Merge branch 'releases/FreeCAD-1-0' of github.com:FreeCAD/FreeCAD into releases/FreeCAD-1-0 2024-09-13 12:09:14 +02:00
Roy-043 f655c2545b Use max instead of if-else for numerical checks (as per linter warning) 2024-09-13 12:09:08 +02:00
Roy-043 5b38fc606c Draft: fix division by zero and count is zero for path arrays
Fixes #16468.
2024-09-13 12:08:56 +02:00
Adrián Insaurralde Avalos 92663a8773 GUI: Fix splashscreen for single image (#16428)
* fix splashscreen for single image
* improve clarity of splashscreen load order logic
* fix splashscreen with no _2x variant
2024-09-12 21:50:19 -05:00
mosfet80 701dc43675 fix CXX standard selection
only   CXX 23, 20 and 17 standards are allowed
2024-09-12 21:36:34 -05:00
pre-commit-ci[bot] 1bf69792ad [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-09-12 21:23:43 -05:00
wmayer 6878ed9ffa Qt6: QLocale::countryToString and QLocale::country() are deprecated since Qt 6.6 2024-09-12 21:23:43 -05:00
wmayer c478d2e22e Qt6: Several methods of QMouseEvent are deprecated since Qt 6.0 2024-09-12 21:23:43 -05:00
wmayer 769d46729a Qt6: QColor::setNamedColor is deprecated since Qt 6.6 2024-09-12 21:23:43 -05:00
Benjamin Bræstrup Sayoc 022fb23068 [Gui] Handle unset style preferences in clipboard about info
FIxes #16391
2024-09-12 21:20:50 -05:00
CalligaroV 0a5ceb636c Sketcher/Toponaming: import code for SketchObject::checkSubName() from LS3
* applied review hints

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-12 21:12:17 -05:00
Zheng, Lei 8e7fe5c5f2 Sketcher/Toponaming: import code for SketchObject::checkSubName() from LS3
* import code
 * add modified_item assignment in TaskSketcherElements::onSelectionChanged() like for non ExternalEdge
2024-09-12 21:12:07 -05:00
luzpaz 15d79e8a7b TechDraw: fix typo ballon->balloon 2024-09-12 12:11:58 -05:00
Kacper Donat d5ab4bda33 Gui: Force OpenGL rendering for main window
This is big hack for Qt6 to force rendering using OpenGL from the
beginning. Since Qt6 OpenGL context is initialized only after creating
first QOpenGLWidget which results in window hiding and showing again
after some delay. This causes various timing issus as the window is not
supposed to do that.
2024-09-12 12:11:27 -05:00
wmayer e790200395 StartPage: Make sure to pass a container widget to the QScrollArea
Fixes #16047: FreeBSD: Segfault in StartView::firstStartWidgetDismissed
2024-09-12 12:11:14 -05:00
wmayer 1720ac8ac1 MSVC: Fix several compiler warnings 2024-09-12 12:11:00 -05:00
Yorik van Havre 072d21135a BIM: Fixed bug in BimViews - fixes #16452 2024-09-12 14:31:15 +02:00
Furgo 8a19e37bec Check location and call corresponding addObject, add missing import. Fixes #16435 2024-09-12 14:29:47 +02:00
Yorik van Havre a1c8874705 Merge branch 'releases/FreeCAD-1-0' of github.com:FreeCAD/FreeCAD into releases/FreeCAD-1-0 2024-09-12 11:01:25 +02:00
Roy-043 3a7448afac BIM: fix BIM_Setup license issue
FreeCAD currently has 19 standard licenses. BIM_Setup could only handle the first 10.

Forum post:
https://forum.freecad.org/viewtopic.php?p=781578#p781535
2024-09-12 11:01:13 +02:00
Benjamin Bræstrup Sayoc 983fdfc671 [TechDraw] Fix uncentered balloon label 2024-09-11 19:50:01 -05:00
xtemp09 c2834e873d [GUI] Make some strings untranslatable in Light Sources dialog 2024-09-11 08:41:34 -05:00
Adrián Insaurralde Avalos dafc018b68 CI: add version to cache key for libpack/ccache download actions for win 2024-09-10 17:42:26 -04:00
Adrián Insaurralde Avalos bc815fd244 Fix compiler cache for conda linux builds 2024-09-10 17:42:19 -04:00
spanner888 e3ac0e4d09 save after del, new, add (#16230)
Co-authored-by: spanner888 <spanner888@users.noreply.github.com>
2024-09-10 11:21:04 -05:00
sliptonic 6eefc8e649 set default directory for sanity (#15934)
Respond correctly if user cancels  Fixes #14796

Co-authored-by: Brad Collette <bradcollette@pop-os.localdomain>
2024-09-10 10:24:59 -05:00
Furgo 20065e644b BIM: Fixes profile tool positioning (#16305)
* [BIM] Get working plane when picking a point

Fixes: #16284

* Use the new way of getting the Draft Working Plane
2024-09-10 11:49:23 +02:00
Pieter Hijma 589027ebec Core: Fix duplicated extensions (see #16299) 2024-09-09 22:12:12 -05:00
Murmele 6e203e7083 Measure: Show delta option also in interactive mode (#16379)
* Initial commit to apply delta also for interactive measurement
* Not required special logic to check if possible, it can be easily checked if the property exists
* remember setting so it is not required to turn it always on
2024-09-09 21:39:57 -05:00
marioalexis f7108ddd92 Fem: Set Elmer result output format to Ascii 2024-09-09 11:35:43 -05:00
marioalexis af3ea3bab3 Fem: Allow only one shape type per mesh group - Partially revert #16076 2024-09-09 11:33:06 -05:00
Morimiue 4c473a17eb Sketcher: transfer constraints on conic's mid point to the newly created conic arc (e.g. ellipse arc)" -m "Fixes #15860" -m "When spliting a sketch curve, constraints on the original curve are transferred to the newly created curve. The original code did not consider the constraints on the center point of an ellipse arc. 2024-09-09 11:31:30 -05:00
xtemp09 0e9fa777b3 [GUI] Enable sort of zoom in Light Sources dialog 2024-09-09 11:28:10 -05:00
Yorik van Havre 0b9b4d5347 Translations (#16389)
* Translations: Updated ts files

* Translations: Merged crowdin translations

* [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>
2024-09-09 11:26:13 -05:00
wmayer 9f14e6e87b Core: Placement dialog
+ replace separate buttons with QDialogButtonBox
+ add convenience method setPlacementAndBindObject
+ use const DocumentObject
2024-09-09 11:25:31 -05:00
wmayer 8828587084 Core: Add option to ignore transactions in placement dialog 2024-09-09 11:25:31 -05:00
wmayer 687f01c84a Core: Expose Placement dialog to Python 2024-09-09 11:25:31 -05:00
wmayer d07ae89f72 Core: Change placement dialog to operate on passed selection objects 2024-09-09 11:25:30 -05:00
wmayer bb3c7afe95 Core: Refactor placement dialog 2024-09-09 11:25:30 -05:00
PaddleStroke 71c6a4f3d7 Assembly: Replace Offset and Rotation properties by Offset1 and Offset2, giving full control over JCS positions. 2024-09-09 11:22:22 -05:00
PaddleStroke bcd08a01ba Sketcher: Rectangle DSH: refactor the createShape function. 2024-09-09 11:15:15 -05:00
PaddleStroke 8108b93058 Sketcher: Fix round corner + thickness issue if radius + thickness = 0. 2024-09-09 11:15:15 -05:00
Florian Foinant-Willig e7acb60253 [PD] Fix helix placement 2024-09-09 11:11:50 -05:00
Kacper Donat 985089a26d Sketcher: AutoColor should update only colors
Previously AutoColor property forced reinitialization of all subscribed
parameters. It was mostly fine as most of them should stay in sync with
user settings but it also affected grids.
2024-09-09 18:08:29 +02:00
CalligaroV 2dd4526531 Call ComplexGeoData::ensureElementMap() in ComplexGeoData::readElements()
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-09 11:06:18 -05:00
Syres916 20b996ab12 [Spreadsheet] Fix CSV import by insert 2024-09-09 11:04:23 -05:00
wmayer d4feb51402 Port: Include some important changes of the OpenBSD port
Forum thread: https://forum.freecad.org/viewtopic.php?t=80792
2024-09-09 11:01:52 -05:00
Bas Ruigrok ec61f5e3fb Gui: Fix orthographic camera standard views in an empty scene 2024-09-09 11:00:05 -05:00
Bas Ruigrok 12b06306a3 Gui: Use Coin 4.0.3 fix for orthographic camera clipping 2024-09-09 10:58:54 -05:00
Benjamin Nauck e94e12723f Spreadsheet XLSX import: Fix bug causing xls import failing for some operators (#16336)
* Fix bug causing xls import failing for some comparisons

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

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

---------

Co-authored-by: Benjamin Nauck <benjamin.nauck@adlede.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-09 10:56:12 -05:00
Roy-043 d45016ee8a BIM: ArchFence: Fix some color issues
* ShapeAppearance property was misspelled.
* The post and section objects could not be Std_Parts (because they do not have a DIffuseColor).
* Minor improvements to the handling of Bodies.
* Removed the `if __name__ == '__main__':` section. This code is no longer relevant.
2024-09-09 17:52:08 +02:00
Furgo b7514bf848 [BIM] Separate profile name from label number (#16304)
* [BIM] Separate profile name from label number

Fixes: #16286

* Make internal name generic
2024-09-09 10:49:27 -05:00
MisterMakerNL 7a297f76bf changed selection colors 2024-09-09 10:49:27 -05:00
wandererfan 54eb7b3d9f [TD]fix initial balloon placement on rotated view (fix #16234) 2024-09-09 10:49:27 -05:00
Roy-043 280548fb50 BIM: BimWindow.py add missing imports 2024-09-09 17:49:01 +02:00
PaddleStroke 1a270ca088 Update Ondsel Solver 2024-09-09 09:40:33 -05:00
Roy-043 455cad24eb BIM: Fix window transparency
V1.0 fix for the transparency of glass panels in windows and doors.
2024-09-09 11:43:13 +02:00
huguesdpdn-aerospace 7a6a82e2ca PD: Xerces-C++ - Prepare for the latest version (backward compatible) 2024-09-08 20:32:08 -05:00
Jiří Pinkava 5fba69e328 OverlayManager: fix unititialized hideTab variable
The hideTab is of type bool, which is primitive type and is thus unitialized if new
instance of the class is created. The exception would be to for static
instance of the class, but that is not the case (only the pointer to the instance is static).

It was originaly initialized, but the initialization was removed in
9d5390ed83.
2024-09-08 20:14:03 -05:00
PaddleStroke 708e07e594 App::Link: fix crash with Draft Array (#16240)
* App::Link: fix crash with Draft Array
2024-09-08 17:13:38 -05:00
Benjamin Bræstrup Sayoc 9c95a7aa3a Add myself to contributors 2024-09-08 17:08:48 -05:00
Benjamin Bræstrup Sayoc 8cdcbe361f [Gui] Add style, theme and QtStyle to clipboard about info
Fixes #16272
2024-09-08 17:08:48 -05:00
Benjamin Bræstrup Sayoc 61bb5abfa2 [Gui] QtStyle preference consistency
Previously, the some of the code searched for the QtStyle in the wrong location
2024-09-08 17:08:48 -05:00
Syres916 422c7370a7 [Measure] Disable QuickMeasure for TechDraw, Spreadsheet, Part Container and Origin objects (#16225)
* [Measure] Disable QuickMeasure for TechDraw objects
* [Measure] Add spreadsheet, Part containers and origins to the exemptions
2024-09-08 16:51:24 -05:00
FEA-eng 0165db7e79 FEM: Update Material.ui 2024-09-08 16:29:08 -05:00
FEA-eng 3b192c533b FEM: Update write_femelement_material.py 2024-09-08 16:29:07 -05:00
FEA-eng 2b609b64ec FEM: Update task_material_common.py
Fix from benj5378
2024-09-08 16:29:07 -05:00
David Carter b05dc2da73 Materials: UI updates for transparency
Add missing UI elements to support per face transparencies:
- Setting per face transparencies
- show transparency information in the appearance inspector
- expose alpha channel in material properties dialog
2024-09-06 12:30:08 -05:00
Roy-043 aa1ec60f65 Draft: fix snapping to endpoints of dimension lines (V0.19 regression)
This fixes a regression introduced in V0.19 (!) when the type of linear dimensions was changed from "Dimension" to "LinearDimension".

Forum topic:
https://forum.freecad.org/viewtopic.php?t=90292
2024-09-05 13:18:40 +02:00
Chris Hennes 60a251354e Core: Update version number to 1.0.0RC1 2024-09-05 08:32:33 +02:00
1427 changed files with 181789 additions and 159598 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 431 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

@@ -28,6 +28,9 @@ inputs:
compiler:
description: "Binary name/path of compiler to be used"
required: true
qt_major_version:
description: "Major version number of qt to be used"
required: true
outputs:
cacheKey:
description: "Cache key with distro and compiler version"
@@ -39,6 +42,6 @@ runs:
- id: generateCacheKey
shell: bash -l {0}
run: |
cacheKey=$(lsb_release -ds | tr -d ' ')-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)
cacheKey=$(lsb_release -ds | tr -d ' ')-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion)-qt${{ inputs.qt_major_version }}
echo "Generated cache key : $cacheKey"
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT
@@ -59,7 +59,7 @@ runs:
id: getCached
with:
path: ${{ inputs.ccachebindir }}
key: ccacheforwin
key: ccacheforwin-${{ inputs.ccacheversion }}
- name: Download ccache
shell: bash
if: steps.getCached.outputs.cache-hit != 'true'
@@ -59,7 +59,7 @@ runs:
id: getCached
with:
path: ${{ inputs.libpackdir }}
key: libpackforwin
key: libpackforwin-${{ inputs.libpackname }}
- name: Download libpack
shell: bash
if: steps.getCached.outputs.cache-hit != 'true'
@@ -78,7 +78,7 @@ jobs:
with:
activate-environment: .conda/freecad
environment-file: conda/conda-env.yaml
channels: conda-forge,defaults
channels: conda-forge
channel-priority: true
miniforge-version: latest
- name: Install FreeCAD dependencies
@@ -78,7 +78,7 @@ jobs:
with:
activate-environment: .conda/freecad
environment-file: conda/conda-env.yaml
channels: conda-forge,defaults
channels: conda-forge
channel-priority: true
miniforge-version: latest
- name: Install FreeCAD dependencies
@@ -152,6 +152,7 @@ jobs:
uses: ./.github/workflows/actions/linux/generateCacheKey
with:
compiler: ${{ env.CXX }}
qt_major_version: 5
- name: Restore Compiler Cache
uses: actions/cache@v4
with:
@@ -76,7 +76,7 @@ jobs:
with:
activate-environment: .conda/freecad
environment-file: conda/conda-env.yaml
channels: conda-forge,defaults
channels: conda-forge
channel-priority: true
miniforge-version: latest
- name: Install FreeCAD dependencies
@@ -102,6 +102,7 @@ jobs:
uses: ./.github/workflows/actions/linux/generateCacheKey
with:
compiler: ${{ env.CXX }}
qt_major_version: 5
- name: Restore Compiler Cache
uses: actions/cache@v4
with:
@@ -76,7 +76,7 @@ jobs:
with:
activate-environment: .conda/freecad
environment-file: conda/conda-env-qt6.yaml
channels: conda-forge,defaults
channels: conda-forge
channel-priority: true
miniforge-version: latest
- name: Install FreeCAD dependencies
@@ -108,15 +108,16 @@ jobs:
uses: ./.github/workflows/actions/linux/generateCacheKey
with:
compiler: ${{ env.CXX }}
qt_major_version: 6
- name: Restore Compiler Cache
uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}-qt6
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-qt6-
FC-${{ steps.genCacheKey.outputs.cacheKey }}-qt6-
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
- name: Print CCache statistics before build, reset stats and print config
run: |
ccache -s
+1 -1
View File
@@ -71,7 +71,7 @@ jobs:
with:
activate-environment: .conda/freecad
environment-file: conda/conda-env.yaml
channels: conda-forge,defaults
channels: conda-forge
channel-priority: true
miniforge-version: latest
- name: Install FreeCAD dependencies
+5 -6
View File
@@ -318,7 +318,7 @@ jobs:
pylintWarnings=0
pylintRefactorings=0
pylintConventions=0
pip install pylint
pip install --break-system-packages pylint
# List enabled pylint checks
pylint --list-msgs-enabled > ${{ env.logdir }}pylint-enabled-checks.log
# Run pylint on all python files
@@ -378,7 +378,7 @@ jobs:
run: |
blackReformats=0
blackFails=0
pip install black
pip install --break-system-packages black
set +e
black --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
exitCode=$?
@@ -444,7 +444,7 @@ jobs:
libqt5x11extras5-dev \
libshiboken2-dev \
libspnav-dev \
libvtk7-dev \
libvtk9-dev \
libx11-dev \
libxerces-c-dev \
libyaml-cpp-dev \
@@ -452,7 +452,6 @@ jobs:
netgen \
netgen-headers \
occt-draw \
pyqt5-dev-tools \
pyside2-tools \
python3-dev \
python3-git \
@@ -516,7 +515,7 @@ jobs:
continue-on-error: ${{ inputs.cpplintFailSilent }}
run: |
cpplintErrors=0
pip install cpplint
pip install --break-system-packages cpplint
# Run cpplint
for file in ${{ inputs.changedCppFiles }}
do
@@ -581,7 +580,7 @@ jobs:
if: inputs.checkSpelling && always()
continue-on-error: ${{ inputs.codespellFailSilent }}
run: |
pip install codespell
pip install --break-system-packages codespell
wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
#wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary_rare.txt
set +e
+3 -4
View File
@@ -27,11 +27,10 @@ endif()
project(FreeCAD)
set(PACKAGE_VERSION_NAME "Vulcan")
set(PACKAGE_VERSION_MAJOR "0")
set(PACKAGE_VERSION_MINOR "22")
set(PACKAGE_VERSION_MAJOR "1")
set(PACKAGE_VERSION_MINOR "0")
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
set(PACKAGE_VERSION_SUFFIX "RC4") # either "dev" for development snapshot or "" (empty string)
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
+4
View File
@@ -151,6 +151,10 @@
},
"cmakeExecutable": "${sourceDir}/conda/cmake.sh",
"cacheVariables": {
"CMAKE_IGNORE_PREFIX_PATH": {
"type": "STRING",
"value": "/opt/homebrew;/usr/local/homebrew"
},
"CMAKE_INCLUDE_PATH": {
"type": "FILEPATH",
"value": "${sourceDir}/.conda/freecad/include"
+2 -2
View File
@@ -2,7 +2,7 @@
### Your own 3D parametric modeler
[Website](https://www.freecad.org) •
[Website](https://www.freecad.org) •
[Documentation](https://wiki.freecad.org) •
[Forum](https://forum.freecad.org/) •
[Bug tracker](https://github.com/FreeCAD/FreeCAD/issues) •
@@ -12,7 +12,7 @@
[![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)
<img src="https://user-images.githubusercontent.com/1828501/174066870-1692005b-f8d7-43fb-a289-6d2f07f73d7f.png" width="800"/>
<img src="/.github/images/partdesign.png" width="800"/>
Overview
--------
@@ -28,10 +28,11 @@ macro(CheckInterModuleDependencies)
REQUIRES_MODS(BUILD_MESH_PART BUILD_PART BUILD_MESH BUILD_SMESH)
REQUIRES_MODS(BUILD_FLAT_MESH BUILD_MESH_PART)
REQUIRES_MODS(BUILD_OPENSCAD BUILD_MESH_PART BUILD_DRAFT)
REQUIRES_MODS(BUILD_PART BUILD_MATERIAL)
REQUIRES_MODS(BUILD_PART_DESIGN BUILD_SKETCHER)
# REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH BUILD_ROBOT)
REQUIRES_MODS(BUILD_CAM BUILD_PART BUILD_MESH)
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH)
REQUIRES_MODS(BUILD_REVERSEENGINEERING BUILD_PART BUILD_MESH BUILD_POINTS)
REQUIRES_MODS(BUILD_ROBOT BUILD_PART)
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
@@ -46,7 +46,7 @@ macro(CompilerChecksAndSetups)
set(CMAKE_CXX_STANDARD 23)
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+20")
set(CMAKE_CXX_STANDARD 20)
elseif(${BUILD_ENABLE_CXX_STD} MATCHES "C\\+\\+17")
else()#Enabled C++17
set(CMAKE_CXX_STANDARD 17)
endif()
@@ -34,6 +34,7 @@ macro(SetGlobalCompilerAndLinkerSettings)
if(FREECAD_RELEASE_PDB)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG")
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
endif(FREECAD_RELEASE_PDB)
if(FREECAD_RELEASE_SEH)
# remove /EHsc or /EHs flags because they are incompatible with /EHa
+1
View File
@@ -2,6 +2,7 @@ name: freecad
channels:
- conda-forge
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- conda-devenv
- mamba
- python==3.12.*
+1
View File
@@ -2,6 +2,7 @@ name: freecad
channels:
- conda-forge
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- conda-devenv
- mamba
- python==3.11.*
+1 -1
View File
@@ -3,6 +3,7 @@ channels:
- conda-forge
- conda-forge/label/pivy_rc
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- libspnav # [linux]
- kernel-headers_linux-64 # [linux and x86_64]
- libdrm-cos7-x86_64 # [linux and x86_64]
@@ -90,7 +91,6 @@ dependencies:
- python==3.12.*
- pyyaml
- qt6-main
- six
- smesh
- swig
- vtk==9.2.6
+1 -1
View File
@@ -2,6 +2,7 @@ name: freecad
channels:
- conda-forge
dependencies:
- conda-forge/noarch::conda-libmamba-solver==24.7.0
- libspnav # [linux]
- kernel-headers_linux-64 # [linux and x86_64]
- libdrm-cos6-x86_64 # [linux and x86_64]
@@ -90,7 +91,6 @@ dependencies:
- python==3.11.*
- pyyaml
- qt-main
- six
- smesh
- swig
- vtk==9.2.6
-1
View File
@@ -4,7 +4,6 @@ SET(Examples_Files
draft_test_objects.FCStd
EngineBlock.FCStd
PartDesignExample.FCStd
RobotExample.FCStd
BIMExample.FCStd
FEMExample.FCStd
AssemblyExample.FCStd
Binary file not shown.
+10 -1
View File
@@ -25,6 +25,11 @@
* DEALINGS IN THE SOFTWARE.
*/
// convenience for all the BSDs
#if defined( __FreeBSD__) || defined( __NetBSD__) || defined( __OpenBSD__)
#define __BSD
#endif
#if defined( _WIN32 )
#if defined( _MSC_VER )
#include <codecvt>
@@ -44,6 +49,10 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#elif defined(__BSD)
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#elif defined( __APPLE__ )
#include <sys/types.h>
#include <unistd.h>
@@ -483,7 +492,7 @@ uint64_t CheckedFile::lseek64( int64_t offset, int whence )
#endif
#elif defined( __linux__ )
int64_t result = ::lseek64( fd_, offset, whence );
#elif defined( __APPLE__ )
#elif defined( __APPLE__ ) || defined(__BSD)
int64_t result = ::lseek( fd_, offset, whence );
#else
#error "no supported OS platform defined"
+76 -1
View File
@@ -35,6 +35,8 @@
# endif
# include <boost/program_options.hpp>
# include <boost/date_time/posix_time/posix_time.hpp>
# include <chrono>
# include <random>
#endif
#ifdef FC_OS_WIN32
@@ -47,6 +49,7 @@
#include <sys/sysctl.h>
#endif
#include <QCoreApplication>
#include <QDir>
#include <QFileInfo>
#include <QProcessEnvironment>
@@ -137,6 +140,8 @@
#include <App/TestScript.h>
#include <App/CMakeScript.h>
#include "SafeMode.h"
#ifdef _MSC_VER // New handler for Microsoft Visual C++ compiler
# pragma warning( disable : 4535 )
# if !defined(_DEBUG) && defined(HAVE_SEH)
@@ -427,6 +432,10 @@ void Application::setupPythonException(PyObject* module)
Base::PyExc_FC_PropertyError = PyErr_NewException("Base.PropertyError", PyExc_AttributeError, nullptr);
Py_INCREF(Base::PyExc_FC_PropertyError);
PyModule_AddObject(module, "PropertyError", Base::PyExc_FC_PropertyError);
Base::PyExc_FC_AbortIOException = PyErr_NewException("Base.PyExc_FC_AbortIOException", PyExc_BaseException, nullptr);
Py_INCREF(Base::PyExc_FC_AbortIOException);
PyModule_AddObject(module, "AbortIOException", Base::PyExc_FC_AbortIOException);
}
// clang-format on
@@ -1108,6 +1117,21 @@ Application::TransactionSignaller::~TransactionSignaller() {
}
}
int64_t Application::applicationPid()
{
static int64_t randomNumber = []() {
auto tp = std::chrono::high_resolution_clock::now();
auto dur = tp.time_since_epoch();
auto seed = dur.count();
std::mt19937 generator(static_cast<unsigned>(seed));
constexpr int64_t minValue {1};
constexpr int64_t maxValue {1000000};
std::uniform_int_distribution<int64_t> distribution(minValue, maxValue);
return distribution(generator);
}();
return randomNumber;
}
std::string Application::getHomePath()
{
return mConfig["AppHomePath"];
@@ -1738,6 +1762,7 @@ void Application::destruct()
Base::InterpreterSingleton::Destruct();
Base::Type::destruct();
ParameterManager::Terminate();
SafeMode::Destruct();
}
void Application::destructObserver()
@@ -2226,6 +2251,7 @@ void parseProgramOptions(int ac, char ** av, const string& exe, variables_map& v
("module-path,M", value< vector<string> >()->composing(),"Additional module paths")
("python-path,P", value< vector<string> >()->composing(),"Additional python paths")
("single-instance", "Allow to run a single instance of the application")
("safe-mode", "Force enable safe mode")
("pass", value< vector<string> >()->multitoken(), "Ignores the following arguments and pass them through to be used by a script")
;
@@ -2553,6 +2579,10 @@ void Application::initConfig(int argc, char ** argv)
// extract home paths
ExtractUserPath();
if (vm.count("safe-mode")) {
SafeMode::StartSafeMode();
}
# ifdef FC_DEBUG
mConfig["Debug"] = "1";
@@ -2641,6 +2671,12 @@ void Application::initConfig(int argc, char ** argv)
mConfig["BuildVersionPoint"].c_str(),
mConfig["BuildVersionSuffix"].c_str(),
mConfig["BuildRevision"].c_str());
if (SafeMode::SafeModeEnabled()) {
Base::Console().Message("FreeCAD is running in _SAFE_MODE_.\n"
"Safe mode temporarily disables your configurations and "
"addons. Restart the application to exit safe mode.\n\n");
}
}
LoadParameters();
@@ -3323,7 +3359,46 @@ void Application::ExtractUserPath()
mConfig["UserMacroPath"] = Base::FileInfo::pathToString(macro) + PATHSEP;
}
#if defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN) || defined(FC_OS_BSD)
// TODO: Consider using this for all UNIX-like OSes
#if defined(__OpenBSD__)
#include <cstdio>
#include <cstdlib>
#include <sys/param.h>
#include <QCoreApplication>
std::string Application::FindHomePath(const char* sCall)
{
// We have three ways to start this application either use one of the two executables or
// import the FreeCAD.so module from a running Python session. In the latter case the
// Python interpreter is already initialized.
std::string absPath;
std::string homePath;
if (Py_IsInitialized()) {
// Note: realpath is known to cause a buffer overflow because it
// expands the given path to an absolute path of unknown length.
// Even setting PATH_MAX does not necessarily solve the problem
// for sure but the risk of overflow is rather small.
char resolved[PATH_MAX];
char* path = realpath(sCall, resolved);
if (path)
absPath = path;
}
else {
int argc = 1;
QCoreApplication app(argc, (char**)(&sCall));
absPath = QCoreApplication::applicationFilePath().toStdString();
}
// should be an absolute path now
std::string::size_type pos = absPath.find_last_of("/");
homePath.assign(absPath,0,pos);
pos = homePath.find_last_of("/");
homePath.assign(homePath,0,pos+1);
return homePath;
}
#elif defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN) || defined(FC_OS_BSD)
#include <cstdio>
#include <cstdlib>
#include <sys/param.h>
+1
View File
@@ -399,6 +399,7 @@ public:
static std::map<std::string, std::string> &Config(){return mConfig;}
static int GetARGC(){return _argc;}
static char** GetARGV(){return _argv;}
static int64_t applicationPid();
//@}
/** @name Application directories */
+5 -3
View File
@@ -86,7 +86,7 @@ PyMethodDef Application::Methods[] = {
{"getUserAppDataDir", (PyCFunction) Application::sGetUserAppDataPath, METH_VARARGS,
"Get the root directory of application data"},
{"getUserMacroDir", (PyCFunction) Application::sGetUserMacroPath, METH_VARARGS,
"getUserMacroDir(bool=False) -> string"
"getUserMacroDir(bool=False) -> str\n\n"
"Get the directory of the user's macro directory\n"
"If parameter is False (the default) it returns the standard path in the"
"user's home directory, otherwise it returns the user-defined path."},
@@ -169,11 +169,13 @@ PyMethodDef Application::Methods[] = {
"active transaction causes any document changes to open a transaction with\n"
"the given name and ID."},
{"getActiveTransaction", (PyCFunction) Application::sGetActiveTransaction, METH_VARARGS,
"getActiveTransaction() -> (name,id) return the current active transaction name and ID"},
"getActiveTransaction() -> (name,id)\n\n"
"return the current active transaction name and ID"},
{"closeActiveTransaction", (PyCFunction) Application::sCloseActiveTransaction, METH_VARARGS,
"closeActiveTransaction(abort=False) -- commit or abort current active transaction"},
{"isRestoring", (PyCFunction) Application::sIsRestoring, METH_VARARGS,
"isRestoring() -> Bool -- Test if the application is opening some document"},
"isRestoring() -> bool\n\n"
"Test if the application is opening some document"},
{"checkAbort", (PyCFunction) Application::sCheckAbort, METH_VARARGS,
"checkAbort() -- check for user abort in length operation.\n\n"
"This only works if there is an active sequencer (or ProgressIndicator in Python).\n"
+1
View File
@@ -288,6 +288,7 @@ SET(FreeCADApp_CPP_SRCS
Metadata.cpp
MetadataPyImp.cpp
ElementNamingUtils.cpp
SafeMode.cpp
StringHasher.cpp
StringHasherPyImp.cpp
StringIDPyImp.cpp
+4 -4
View File
@@ -546,10 +546,10 @@ void ComplexGeoData::readElements(Base::XMLReader& reader, size_t count)
}
}
}
_elementMap->setElementName(IndexedName(reader.getAttribute("value"), types),
MappedName(reader.getAttribute("key")),
Tag,
&sids);
ensureElementMap()->setElementName(IndexedName(reader.getAttribute("value"), types),
MappedName(reader.getAttribute("key")),
Tag,
&sids);
}
if (invalid_count != 0) {
FC_ERR("Found " << invalid_count << " invalid string id"); // NOLINT
+12 -7
View File
@@ -931,18 +931,21 @@ Document::~Document()
std::string Document::getTransientDirectoryName(const std::string& uuid, const std::string& filename) const
{
// Create a directory name of the form: {ExeName}_Doc_{UUID}_{HASH}_{PID}
std::stringstream s;
std::stringstream out;
QCryptographicHash hash(QCryptographicHash::Sha1);
#if QT_VERSION < QT_VERSION_CHECK(6,3,0)
hash.addData(filename.c_str(), filename.size());
#else
hash.addData(QByteArrayView(filename.c_str(), filename.size()));
#endif
s << App::Application::getUserCachePath() << App::Application::getExecutableName()
<< "_Doc_" << uuid
<< "_" << hash.result().toHex().left(6).constData()
<< "_" << QCoreApplication::applicationPid();
return s.str();
out << App::Application::getUserCachePath() << App::Application::getExecutableName()
<< "_Doc_"
<< uuid
<< "_"
<< hash.result().toHex().left(6).constData()
<< "_"
<< App::Application::applicationPid();
return out.str();
}
//--------------------------------------------------------------------------
@@ -1475,6 +1478,7 @@ Document::readObjects(Base::XMLReader& reader)
void Document::addRecomputeObject(DocumentObject *obj) {
if(testStatus(Status::Restoring) && obj) {
setStatus(Status::RecomputeOnRestore, true);
d->touchedObjs.insert(obj);
obj->touch();
}
@@ -3624,9 +3628,10 @@ void Document::_removeObject(DocumentObject* pcObject)
else {
// for a rollback delete the object
signalTransactionRemove(*pcObject, 0);
breakDependency(pcObject, true);
}
breakDependency(pcObject, true);
// remove from map
pcObject->setStatus(ObjectStatus::Remove, false); // Unset the bit to be on the safe side
d->objectIdMap.erase(pcObject->_Id);
+1
View File
@@ -77,6 +77,7 @@ public:
RestoreError = 10,
LinkStampChanged = 11, // Indicates during restore time if any linked document's time stamp has changed
IgnoreErrorOnRecompute = 12, // Don't report errors if the recompute failed
RecomputeOnRestore = 13, // Mark pending recompute on restore for migration purposes
};
/** @name Properties */
+6
View File
@@ -442,6 +442,12 @@ public:
/* Return true to cause PropertyView to show linked object's property */
virtual bool canLinkProperties() const {return true;}
/* Return whether this object is a link */
virtual bool isLink() const {return false;};
/* Return whether this object is a link group */
virtual bool isLinkGroup() const {return false;};
/* Return true to bypass duplicate label checking */
virtual bool allowDuplicateLabel() const {return false;}
+8 -1
View File
@@ -232,6 +232,13 @@ Return tuple(obj,newElementName,oldElementName)
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isAttachedToDocument" Const="true">
<Documentation>
<UserDocu>
isAttachedToDocument(): return true if the object is part of a document, false otherwise
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="OutList" ReadOnly="true">
<Documentation>
<UserDocu>A list of all objects this object links to.</UserDocu>
@@ -266,7 +273,7 @@ Return tuple(obj,newElementName,oldElementName)
<Documentation>
<UserDocu>Return the internal name of this object</UserDocu>
</Documentation>
<Parameter Name="Name" Type="String"/>
<Parameter Name="Name" Type="Object"/>
</Attribute>
<Attribute Name="Document" ReadOnly="true">
<Documentation>
+14 -3
View File
@@ -49,14 +49,14 @@ std::string DocumentObjectPy::representation() const
return str.str();
}
Py::String DocumentObjectPy::getName() const
Py::Object DocumentObjectPy::getName() const
{
DocumentObject* object = this->getDocumentObjectPtr();
const char* internal = object->getNameInDocument();
if (!internal) {
throw Py::RuntimeError(std::string("This object is currently not part of a document"));
return Py::None();
}
return {std::string(internal)};
return Py::String(internal);
}
Py::String DocumentObjectPy::getFullName() const
@@ -76,6 +76,17 @@ Py::Object DocumentObjectPy::getDocument() const
}
}
PyObject* DocumentObjectPy::isAttachedToDocument(PyObject *args)
{
if (!PyArg_ParseTuple(args, "")) {
return nullptr;
}
DocumentObject* object = this->getDocumentObjectPtr();
bool ok = object->isAttachedToDocument();
return Py::new_reference_to(Py::Boolean(ok));
}
PyObject* DocumentObjectPy::addProperty(PyObject *args, PyObject *kwd)
{
char *sType,*sName=nullptr,*sGroup=nullptr,*sDoc=nullptr;
+7
View File
@@ -3855,6 +3855,13 @@ bool ExpressionParser::isTokenAnIndentifier(const std::string & str)
return (status == 0 && (token == IDENTIFIER || token == CELLADDRESS));
}
bool ExpressionParser::isTokenAConstant(const std::string & str)
{
int token{}, status{};
std::tie(token, status) = getTokenAndStatus(str);
return (status == 0 && token == CONSTANT);
}
bool ExpressionParser::isTokenAUnit(const std::string & str)
{
int token{}, status{};
+1
View File
@@ -500,6 +500,7 @@ AppExport Expression * parse(const App::DocumentObject *owner, const char *buffe
AppExport UnitExpression * parseUnit(const App::DocumentObject *owner, const char *buffer);
AppExport ObjectIdentifier parsePath(const App::DocumentObject *owner, const char* buffer);
AppExport bool isTokenAnIndentifier(const std::string & str);
AppExport bool isTokenAConstant(const std::string & str);
AppExport bool isTokenAUnit(const std::string & str);
AppExport std::vector<std::tuple<int, int, std::string> > tokenize(const std::string & str);
+63 -1
View File
@@ -25,6 +25,8 @@
#include <App/GeoFeaturePy.h>
#include <Base/Tools.h>
#include "ComplexGeoData.h"
#include "Document.h"
#include "GeoFeature.h"
@@ -157,7 +159,7 @@ DocumentObject *GeoFeature::resolveElement(DocumentObject *obj, const char *subn
}
if(geoFeature)
*geoFeature = geo;
if(!obj || (filter && obj!=filter))
if(!obj || (filter && geo!=filter))
return nullptr;
if(!element || !element[0]) {
if(append)
@@ -270,3 +272,63 @@ GeoFeature::getHigherElements(const char *element, bool silent) const
return {};
return prop->getComplexData()->getHigherElements(element, silent);
}
Base::Placement GeoFeature::getPlacementFromProp(App::DocumentObject* obj, const char* propName)
{
Base::Placement plc = Base::Placement();
auto* propPlacement = dynamic_cast<App::PropertyPlacement*>(obj->getPropertyByName(propName));
if (propPlacement) {
plc = propPlacement->getValue();
}
return plc;
}
Base::Placement GeoFeature::getGlobalPlacement(App::DocumentObject* targetObj,
App::DocumentObject* rootObj,
const std::string& sub)
{
if (!targetObj || !rootObj || sub.empty()) {
return Base::Placement();
}
std::vector<std::string> names = Base::Tools::splitSubName(sub);
App::Document* doc = rootObj->getDocument();
Base::Placement plc = getPlacementFromProp(rootObj, "Placement");
if (targetObj == rootObj) return plc;
for (auto& name : names) {
App::DocumentObject* obj = doc->getObject(name.c_str());
if (!obj) {
return Base::Placement();
}
plc = plc * getPlacementFromProp(obj, "Placement");
if (obj == targetObj) {
return plc;
}
if (obj->isLink()) {
// Update doc in case its an external link.
doc = obj->getLinkedObject()->getDocument();
}
}
// If targetObj has not been found there's a problem
return Base::Placement();
}
Base::Placement GeoFeature::getGlobalPlacement(App::DocumentObject* targetObj,
App::PropertyXLinkSub* prop)
{
if (!targetObj || !prop) {
return Base::Placement();
}
std::vector<std::string> subs = prop->getSubValues();
if (subs.empty()) {
return Base::Placement();
}
return getGlobalPlacement(targetObj, prop->getValue(), subs[0]);
}
+6 -1
View File
@@ -108,8 +108,9 @@ public:
const DocumentObject *filter=nullptr,const char **element=nullptr, GeoFeature **geo=nullptr);
/**
* @brief Calculates the placement in the global reference coordinate system
* @brief Deprecated. Calculates the placement in the global reference coordinate system
*
* Deprecated: This does not handle App::Links correctly. Use getGlobalPlacement() instead.
* In FreeCAD the GeoFeature placement describes the local placement of the object in its parent
* coordinate system. This is however not always the same as the global reference system. If the
* object is in a GeoFeatureGroup, hence in another local coordinate system, the Placement
@@ -179,6 +180,10 @@ public:
/// Return the higher level element names of the given element
virtual std::vector<Data::IndexedName> getHigherElements(const char *name, bool silent=false) const;
static Base::Placement getPlacementFromProp(DocumentObject* obj, const char* propName);
static Base::Placement getGlobalPlacement(DocumentObject* targetObj, DocumentObject* rootObj, const std::string& sub);
static Base::Placement getGlobalPlacement(DocumentObject* targetObj, PropertyXLinkSub* prop);
protected:
void onChanged(const Property* prop) override;
// void onDocumentRestored() override;
+17
View File
@@ -30,6 +30,7 @@ Note: Not implemented.</UserDocu>
<Methode Name="getGlobalPlacement">
<Documentation>
<UserDocu>getGlobalPlacement() -> Base.Placement
Deprecated: This function does not handle Links correctly. Use getGlobalPlacementOf instead.
Returns the placement of the object in the global coordinate space, respecting all stacked
relationships.
@@ -37,6 +38,22 @@ Note: This function is not available during recompute, as there the placements o
can change after the execution of this object, rendering the result wrong.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getGlobalPlacementOf" Static="true">
<Documentation>
<UserDocu>getGlobalPlacementOf(targetObj, rootObj, subname) -> Base.Placement
Selection example: obj = "part1" sub = "linkToPart2.LinkToBody.Pad.face1"
Global placement of Pad in this context :
getGlobalPlacementOf(pad, part1, "linkToPart2.LinkToBody.Pad.face1")
Global placement of linkToPart2 in this context :
getGlobalPlacementOf(linkToPart2, part1, "linkToPart2.LinkToBody.Pad.face1")
Returns the placement of the object in the global coordinate space, respecting all stacked
relationships.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPropertyNameOfGeometry">
<Documentation>
<UserDocu>getPropertyNameOfGeometry() -> str or None
+21
View File
@@ -57,6 +57,27 @@ PyObject* GeoFeaturePy::getGlobalPlacement(PyObject * args) {
}
}
PyObject* GeoFeaturePy::getGlobalPlacementOf(PyObject * args) {
PyObject* pyTargetObj {nullptr};
PyObject* pyRootObj {nullptr};
char* pname;
if (!PyArg_ParseTuple(args, "OOs", &pyTargetObj, &pyRootObj, &pname)) {
return nullptr;
}
auto* targetObj = static_cast<App::DocumentObjectPy*>(pyTargetObj)->getDocumentObjectPtr();
auto* rootObj = static_cast<App::DocumentObjectPy*>(pyRootObj)->getDocumentObjectPtr();
try {
Base::Placement p = GeoFeature::getGlobalPlacement(targetObj, rootObj, pname);
return new Base::PlacementPy(new Base::Placement(p));
}
catch (const Base::Exception& e) {
throw Py::RuntimeError(e.what());
}
}
PyObject* GeoFeaturePy::getPropertyNameOfGeometry(PyObject * args)
{
if (!PyArg_ParseTuple(args, ""))
+22 -15
View File
@@ -120,7 +120,14 @@ void Document::exportGraphviz(std::ostream& out) const
*/
std::string getId(const DocumentObject * docObj) {
return std::string((docObj)->getDocument()->getName()) + "#" + docObj->getNameInDocument();
std::string id;
if (docObj->isAttachedToDocument()) {
auto doc = docObj->getDocument();
id.append(doc->getName());
id.append("#");
id.append(docObj->getNameInDocument());
}
return id;
}
/**
@@ -434,11 +441,14 @@ void Document::exportGraphviz(std::ostream& out) const
if (obj) {
std::map<std::string,Vertex>::const_iterator item = GlobalVertexList.find(getId(obj));
if (item == GlobalVertexList.end())
add(obj,
std::string(obj->getDocument()->getName()) + "#" + obj->getNameInDocument(),
std::string(obj->getDocument()->getName()) + "#" + obj->Label.getValue(),
CSSubgraphs);
if (item == GlobalVertexList.end()) {
if (obj->isAttachedToDocument()) {
add(obj,
std::string(obj->getDocument()->getName()) + "#" + obj->getNameInDocument(),
std::string(obj->getDocument()->getName()) + "#" + obj->Label.getValue(),
CSSubgraphs);
}
}
}
}
}
@@ -486,23 +496,20 @@ void Document::exportGraphviz(std::ostream& out) const
// Add edges between document objects
for (const auto & It : d->objectMap) {
if(omitGeoFeatureGroups) {
//coordinate systems are represented by subgraphs
if(It.second->hasExtension(GeoFeatureGroupExtension::getExtensionClassTypeId()))
continue;
//as well as origins
if(It.second->isDerivedFrom(Origin::getClassTypeId()))
continue;
if(omitGeoFeatureGroups && It.second->isDerivedFrom(Origin::getClassTypeId())) {
continue;
}
std::map<DocumentObject*, int> dups;
std::vector<DocumentObject*> OutList = It.second->getOutList();
const DocumentObject * docObj = It.second;
const bool docObj_is_group = docObj->hasExtension(GeoFeatureGroupExtension::getExtensionClassTypeId());
for (auto obj : OutList) {
if (obj) {
if(omitGeoFeatureGroups && docObj_is_group && GeoFeatureGroupExtension::getGroupOfObject(obj) == docObj) {
continue;
}
// Count duplicate edges
bool inserted = edge(GlobalVertexList[getId(docObj)], GlobalVertexList[getId(obj)], DepList).second;
if (inserted) {
+15
View File
@@ -2282,6 +2282,16 @@ bool Link::canLinkProperties() const {
return true;
}
bool Link::isLink() const
{
return ElementCount.getValue() == 0;
}
bool Link::isLinkGroup() const
{
return ElementCount.getValue() > 0;
}
//////////////////////////////////////////////////////////////////////////////////////////
namespace App {
@@ -2309,6 +2319,11 @@ bool LinkElement::canDelete() const {
return !owner || !owner->getDocument()->getObjectByID(_LinkOwner.getValue());
}
bool LinkElement::isLink() const
{
return true;
}
App::Link* LinkElement::getLinkGroup() const
{
std::vector<App::DocumentObject*> inList = getInList();
+6
View File
@@ -556,6 +556,10 @@ public:
}
bool canLinkProperties() const override;
bool isLink() const override;
bool isLinkGroup() const override;
};
using LinkPython = App::FeaturePythonT<Link>;
@@ -600,6 +604,8 @@ public:
_handleChangedPropertyName(reader,TypeName,PropName);
}
bool isLink() const override;
App::Link* getLinkGroup() const;
};
+5
View File
@@ -58,7 +58,12 @@ directly. If you did not intend to use a system-defined macro
using namespace App;
namespace fs = boost::filesystem;
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
#else
XERCES_CPP_NAMESPACE_USE
#endif
namespace MetadataInternal
{
+5
View File
@@ -30,7 +30,12 @@
#include "MetadataPy.cpp"
using namespace Base;
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
#else
XERCES_CPP_NAMESPACE_USE
#endif
// Returns a string which represents the object e.g. when printed in Python
std::string MetadataPy::representation() const
+1
View File
@@ -69,6 +69,7 @@
// STL
#include <bitset>
#include <chrono>
#include <exception>
#include <functional>
#include <iterator>
+5
View File
@@ -56,7 +56,12 @@
#include <Base/Stream.h>
#include <Base/XMLTools.h>
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
#else
XERCES_CPP_NAMESPACE_USE
#endif
using namespace App;
namespace {
+6
View File
@@ -32,11 +32,17 @@
#include <string>
#include <xercesc/util/XercesDefs.hpp>
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
namespace XERCES_CPP_NAMESPACE { class DOMNode; class DOMElement; class DOMDocument; }
#else
XERCES_CPP_NAMESPACE_BEGIN
class DOMDocument;
class DOMElement;
class DOMNode;
XERCES_CPP_NAMESPACE_END
#endif
namespace App
{
+2 -2
View File
@@ -272,7 +272,7 @@ void PropertyLinkBase::_registerElementReference(App::DocumentObject *obj, std::
return;
}
if (shadow.newName.empty()) {
_updateElementReference(0, obj, sub, shadow, false);
_updateElementReference(nullptr, obj, sub, shadow, false);
return;
}
GeoFeature* geo = nullptr;
@@ -283,7 +283,7 @@ void PropertyLinkBase::_registerElementReference(App::DocumentObject *obj, std::
elementName,
true,
GeoFeature::ElementNameType::Export,
0,
nullptr,
&element,
&geo);
if (!geo || !element || !element[0]) {
+21
View File
@@ -3018,6 +3018,17 @@ void PropertyMaterialList::setTransparency(int index, float val)
hasSetValue();
}
void PropertyMaterialList::setTransparencies(const std::vector<float>& transparencies)
{
aboutToSetValue();
setSize(transparencies.size(), _lValueList[0]);
for (std::size_t i = 0; i < transparencies.size(); i++) {
_lValueList[i].transparency = transparencies[i];
}
hasSetValue();
}
const Color& PropertyMaterialList::getAmbientColor() const
{
return _lValueList[0].ambientColor;
@@ -3088,6 +3099,16 @@ float PropertyMaterialList::getTransparency(int index) const
return _lValueList[index].transparency;
}
std::vector<float> PropertyMaterialList::getTransparencies() const
{
std::vector<float> list;
for (auto& material : _lValueList) {
list.push_back(material.transparency);
}
return list;
}
Material PropertyMaterialList::getPyValue(PyObject* value) const
{
if (PyObject_TypeCheck(value, &(MaterialPy::Type))) {
+2
View File
@@ -1156,6 +1156,7 @@ public:
void setTransparency(float);
void setTransparency(int index, float);
void setTransparencies(const std::vector<float>& transparencies);
const Color& getAmbientColor() const;
const Color& getAmbientColor(int index) const;
@@ -1175,6 +1176,7 @@ public:
float getTransparency() const;
float getTransparency(int index) const;
std::vector<float> getTransparencies() const;
PyObject* getPyObject() override;
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="463"/>
<source>Unnamed</source>
<translation type="unfinished"></translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Без назвы</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Sense nom</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ které odkazují na stejný konfigurovatelný objekt</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Nepojmenovaný</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Unavngivet</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ angewendet werden soll, die das gleiche konfigurierbare Objekt referenzieren</tr
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Unbenannt</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Ανώνυμο</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ que hacen referencia al mismo objeto configurable</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Sin nombre</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Sin nombre</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Izenik gabea</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Nimetön</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Nouveau</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ na sve veze koje referenciraju isti konfigurabilni objekt</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Neimenovano</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ amelyek ugyanarra a konfigurálható tárgyra hivatkoznak</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Névtelen</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ che fanno riferimento allo stesso oggetto configurabile</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Senza nome</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation></translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation></translation>
</message>
+2 -3
View File
@@ -7,14 +7,13 @@
<location filename="../../Link.cpp" line="118"/>
<source>Stores the last user choice of whether to apply CopyOnChange setup to all links
that reference the same configurable object</source>
<translation type="unfinished">Stores the last user choice of whether to apply CopyOnChange setup to all links
that reference the same configurable object</translation>
<translation> CopyOnChange </translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation></translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Be pavadinimo</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ die verwijzen naar hetzelfde configureerbare object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Naamloos</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ które odnoszą się do tego samego obiektu konfigurowalnego</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Nienazwany</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ que referenciam o mesmo objeto configurável</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Sem nome</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Sem nome</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ care fac referire la același obiect configurabil</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Nedenumit</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Безымянный</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ za vse povezave, ki se sklicujejo na isti nastavljivi predmet</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Neimenovan</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Bez imena</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Без имена</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Namnlös</translation>
</message>
+7 -7
View File
@@ -14,7 +14,7 @@ uygulanmayacağına ilişkin son kullanıcı seçimini saklar</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>İsimsiz</translation>
</message>
@@ -24,32 +24,32 @@ uygulanmayacağına ilişkin son kullanıcı seçimini saklar</translation>
<message>
<location filename="../../Origin.cpp" line="142"/>
<source>X-axis</source>
<translation type="unfinished">X-axis</translation>
<translation>X-ekseni</translation>
</message>
<message>
<location filename="../../Origin.cpp" line="143"/>
<source>Y-axis</source>
<translation type="unfinished">Y-axis</translation>
<translation>Y-ekseni</translation>
</message>
<message>
<location filename="../../Origin.cpp" line="144"/>
<source>Z-axis</source>
<translation type="unfinished">Z-axis</translation>
<translation>Z-ekseni</translation>
</message>
<message>
<location filename="../../Origin.cpp" line="145"/>
<source>XY-plane</source>
<translation type="unfinished">XY-plane</translation>
<translation>XY-düzlemi</translation>
</message>
<message>
<location filename="../../Origin.cpp" line="146"/>
<source>XZ-plane</source>
<translation type="unfinished">XZ-plane</translation>
<translation>XZ-düzlemi</translation>
</message>
<message>
<location filename="../../Origin.cpp" line="147"/>
<source>YZ-plane</source>
<translation type="unfinished">YZ-plane</translation>
<translation>YZ-düzlemi</translation>
</message>
</context>
<context>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Без назви</translation>
</message>
+1 -1
View File
@@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation>Sense nom</translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation></translation>
</message>
+1 -1
View File
@@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="459"/>
<location filename="../../Application.cpp" line="468"/>
<source>Unnamed</source>
<translation></translation>
</message>
+79
View File
@@ -0,0 +1,79 @@
/***************************************************************************
* Copyright (c) 2024 Benjamin Nauck <benjamin@nauck.se> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License (LGPL) *
* as published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* for detail see the LICENCE text file. *
* *
* FreeCAD is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with FreeCAD; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
* USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#include <QTemporaryDir>
#include "Application.h"
#include "FCConfig.h"
#include "SafeMode.h"
static QTemporaryDir * tempDir = nullptr;
static bool _createTemporaryBaseDir() {
tempDir = new QTemporaryDir();
if (!tempDir->isValid()) {
delete tempDir;
tempDir = nullptr;
}
return tempDir;
}
static void _replaceDirs()
{
auto &config = App::GetApplication().Config();
auto const temp_base = tempDir->path().toStdString();
auto const dirs = {
"UserAppData",
"UserConfigPath",
"UserCachePath",
"AppTempPath",
"UserMacroPath",
"UserHomePath",
};
for (auto const d : dirs) {
auto const path = temp_base + PATHSEP + d + PATHSEP;
auto const qpath = QString::fromStdString(path);
QDir().mkpath(qpath);
config[d] = path;
}
}
void SafeMode::StartSafeMode()
{
if (_createTemporaryBaseDir()) {
_replaceDirs();
}
}
bool SafeMode::SafeModeEnabled() {
return tempDir;
}
void SafeMode::Destruct() {
delete tempDir;
}
+30
View File
@@ -0,0 +1,30 @@
/***************************************************************************
* Copyright (c) 2024 Benjamin Nauck <benjamin@nauck.se> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License (LGPL) *
* as published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* for detail see the LICENCE text file. *
* *
* FreeCAD is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with FreeCAD; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
* USA *
* *
***************************************************************************/
#pragma once
namespace SafeMode {
AppExport bool SafeModeEnabled();
AppExport void StartSafeMode();
AppExport void Destruct();
};
+5 -1
View File
@@ -35,8 +35,12 @@
#include "InputSource.h"
#include "XMLTools.h"
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
#else
XERCES_CPP_NAMESPACE_USE
#endif
using namespace Base;
using namespace std;
+9 -1
View File
@@ -32,10 +32,18 @@
#include <FCGlobal.h>
#endif
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
namespace XERCES_CPP_NAMESPACE
{
class BinInputStream;
}
#else
XERCES_CPP_NAMESPACE_BEGIN
class BinInputStream;
XERCES_CPP_NAMESPACE_END
#endif
namespace Base
{
+6 -3
View File
@@ -50,7 +50,7 @@
#endif
#include <boost/algorithm/string.hpp>
#include "fmt/printf.h"
#include <fmt/printf.h>
#include "Parameter.h"
#include "Parameter.inl"
@@ -60,8 +60,12 @@
FC_LOG_LEVEL_INIT("Parameter", true, true)
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
#else
XERCES_CPP_NAMESPACE_USE
#endif
using namespace Base;
@@ -77,7 +81,6 @@ using namespace Base;
// - XStr
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
class DOMTreeErrorReporter: public ErrorHandler
{
public:
+13 -1
View File
@@ -65,7 +65,18 @@ using PyObject = struct _object;
#pragma warning(disable : 4275)
#endif
#ifndef XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_QUALIFIER
using namespace XERCES_CPP_NAMESPACE;
namespace XERCES_CPP_NAMESPACE
{
class DOMNode;
class DOMElement;
class DOMDocument;
class XMLFormatTarget;
class InputSource;
} // namespace XERCES_CPP_NAMESPACE
#else
XERCES_CPP_NAMESPACE_BEGIN
class DOMNode;
class DOMElement;
@@ -73,6 +84,7 @@ class DOMDocument;
class XMLFormatTarget;
class InputSource;
XERCES_CPP_NAMESPACE_END
#endif
class ParameterManager;
+1
View File
@@ -49,6 +49,7 @@ PyObject* Base::PyExc_FC_ExpressionError = nullptr;
PyObject* Base::PyExc_FC_ParserError = nullptr;
PyObject* Base::PyExc_FC_CADKernelError = nullptr;
PyObject* Base::PyExc_FC_PropertyError = nullptr;
PyObject* Base::PyExc_FC_AbortIOException = nullptr;
typedef struct { //NOLINT
PyObject_HEAD
+1
View File
@@ -431,6 +431,7 @@ BaseExport extern PyObject* PyExc_FC_ExpressionError;
BaseExport extern PyObject* PyExc_FC_ParserError;
BaseExport extern PyObject* PyExc_FC_CADKernelError;
BaseExport extern PyObject* PyExc_FC_PropertyError;
BaseExport extern PyObject* PyExc_FC_AbortIOException;
/** Exception handling for python callback functions
* Is a convenience macro to manage the exception handling of python callback

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