Commit Graph

29420 Commits

Author SHA1 Message Date
wmayer
c98545b6ca PD: [skip ci] disable undo/redo for the tmp. document created by the SubShapeBinder 2022-10-24 16:50:50 +02:00
wmayer
72af60c22e App: fixes issue #7628: Crash after creating Sketch for Body
The problem is that inside Transaction::addObjectNew() a transaction object is deleted before removing it from the container. When deleting the corresponding transactional object (i.e. a DocumentObject or ViewProvider)
it can happen that it e.g. calls Transaction::addOrRemoveProperty() that now finds the dangling pointer in the container.

The safe way is to first remove the object from the container before deleting it.
2022-10-24 16:49:29 +02:00
Uwe
a346884c90 [skip CI] [FEM] equation.py: fix a tooltip
- the highest priority is computed first, the Wiki page is already correct
2022-10-24 15:21:54 +02:00
Stefan Klug
60d7b1d834 PartDesign: Add HoleCuteType "Counterdrill" 2022-10-24 15:19:24 +02:00
Stefan Klug
c7f64b12bd PartDesign: Refactor geometry creation of counersink/counterbore
The counterbore is basically a special case of the countersink
with a countersink angle of 180 degrees and applied depth.
Handling it that way elimintaes some duplicate code and adds the ability to
combine countersinks and counterbore to form a counterdrill.

The sanity check on countersinkAngle can be safely dropped as it is ensured
by a constraint on the property itself.
2022-10-24 03:42:02 +02:00
wmayer
c7b427e697 Mesh: use PropertyMaterial in view provider 2022-10-23 23:31:04 +02:00
Chris Hennes
ce74f16649 Addon Manager: Clean up tests for pip 2022-10-23 15:24:42 -05:00
Bernd Hahnebach
c5d9b8e4ed FEM: get LGTM silent 2022-10-23 21:43:04 +02:00
wmayer
e90005572b Mesh: implement PropertyMaterial 2022-10-23 19:49:46 +02:00
Haas
b7747cce26 Added 2 missing dark icons for stylesheets. 2022-10-23 12:33:15 -05:00
wmayer
25d25a0bc2 Mesh: [skip ci] add Python module with enum types 2022-10-23 18:52:33 +02:00
Stefan Klug
7ed0c36aa3 PartDesign: Remove duplicate comment 2022-10-23 09:15:17 -05:00
luz paz
2d4482cdf3 Fix source comment typo 2022-10-23 09:14:44 -05:00
Stefan Klug
cbd1963142 [Bugfix] PartDesign: Fix HoleCutDepth not being recalculated correctly
HoleCutDepth is reset to 0 to force a recalculation of te depth when
HoleCutType is set to a new value.
But the line
	pcHole->HoleCutCustomValues.setValue(false)
also forces a recalculation. So the depth was recalculated with the old
value in HoleCutType which was not expected behaviour.
2022-10-23 04:10:18 +02:00
wmayer
f88305e93b Mesh: support to add transparencies to a mesh 2022-10-22 23:31:12 +02:00
Bernd Hahnebach
062f9f6616 FEM: Python pep8 code formatting 2022-10-22 23:05:51 +02:00
wmayer
4c6e123c00 Gui: create modal color dialog on the heap if its parent widget is used in the property editor
For more details see: https://forum.freecadweb.org/viewtopic.php?f=23&t=70655
2022-10-22 21:42:21 +02:00
wmayer
c5a7654285 Gui: create modal dialog on the heap if its parent widget is used in the property editor
For more details see: https://forum.freecadweb.org/viewtopic.php?f=23&t=70655
2022-10-22 18:36:52 +02:00
wmayer
916891c3fc App: simplify code in Application::newDocument 2022-10-21 21:15:21 +02:00
Abdullah Tahiri
bffb82d531 Sketcher: Solver - Improvement of popularity contest and bug fix
================================================================

Master has a problem in that internal alignment constraints are suggested to the user for removal.

This is fundamentally wrong, as an internal alignment constraint are an inherent part of the geometry. They cannot be the ones suggested for removal.

The popularity contest algorithm is an heuristic algorithm that determines which redundant/conflicting constraints should be proposed for removal.

Basically, the algorithm works on groups of redundant/conflicting constraints detected via the QR decomposition. A constraint may belong to more than one group.

The algorithm runs some heuristics, each constraint scoring a value, the one constraint from each group scoring the highest is proposed (is more popular and wins the contest).

This PR documents the algorithm, and adds a further condition, that internal alignment constraints are never proposed.

As the solver works with solver constraints as opposed to the sketcher, which works with sketcher constraints, information about whether a solver constraint originated from a
sketcher constraint that is internal alignment is necessary. So the solver constraint is extended to accomodate this piece of information.

As a bonus, it fixes a bug. Solver constraints carry information of the ID of the corresponding sketcher constraint in their tag. Knots are not currently implemented as constraints.
However, the tag index was not being update. This caused the popularity contest to provide wrong suggestions despite good detection.
2022-10-21 19:54:51 +02:00
wmayer
804d0426a4 Gui: fix crash when accessing PySide wrapper after the underlying QObject has been destroyed 2022-10-21 17:05:55 +02:00
Paddle
a46bed1a78 Sketcher: remove select DOF. 2022-10-21 09:47:07 -05:00
0penBrain
4c6ba8ed4d Sketcher: remove unneeded flag 2022-10-21 15:15:43 +02:00
wmayer
4fff36b550 App: [skip ci] fix string literal 2022-10-21 13:43:26 +02:00
wmayer
dc02c3f1dd Part: [skip ci] fix German translation 2022-10-21 13:31:36 +02:00
wmayer
ee0a0817f9 Sketcher: fix possible crash when closing the sketcher
For more details see the forum thread: https://forum.freecadweb.org/viewtopic.php?f=13&t=72774
2022-10-21 10:23:53 +02:00
Kuzemko Alexsandr
63174d487f [App] Fix of untranslated first document's name (#7156)
* Change no need function newDocument("Unnamed") call to variant without parameter. "Unnamed" set in App newDocument function instead.
* Refactor New Document command to run without parameter.
* Translate new document's userName. Internal name = "Unnamed".
* Crowdin Add to updatets.py App.ts. Create new file App.ts
* Fix error where document name is set with one function parameter. In this situation set internal and user name to string variable. For default function call (without parameter) set internal name to Unnamed, userName = translate ("Unnamed")
2022-10-20 21:35:09 -05:00
wandererfan
02fbf1334d [TD]fix check of wrong variable
- replace check of pages in selection with check of
  pages in document
- fix mixed {} conventions
- fix fail to exit on user cancel
2022-10-20 21:28:04 -04:00
adrianinsaval
ceab81593d Use Std_New for new document creation at startup
so it uses the translated string
2022-10-20 19:58:16 -05:00
wmayer
4f6f600a1f Gui: [skip ci] refactor PropertyModel::buildUp 2022-10-21 02:24:42 +02:00
0penBrain
0a12d435a2 [Bugfix]Spreadsheet: fix multi-screen management of QtColorPicker
+ set parent when instantiating
2022-10-20 16:08:01 -05:00
Zheng, Lei
5fcc1c3d03 Spreadsheet: fix cell span handling
When undo/redo, copy/paste, and removing row/column
2022-10-20 16:03:20 -05:00
Zheng, Lei
05e0aba701 Spreadsheet: fix cell span synchronization with SheetTableView
Also, allow merge cell with overlaps, by auto split overlapped cells
first
2022-10-20 16:03:20 -05:00
wmayer
9ba9599629 Gui: ignore recursive call of PropertyView::onTimer() 2022-10-20 23:00:50 +02:00
wmayer
fba6a718eb Gui: [skip ci] whitespace improvements 2022-10-20 21:26:53 +02:00
wandererfan
16c52bb18c [TD]expose DVP projectPoint to Python 2022-10-19 20:00:27 -04:00
luz paz
57090a43f7 [Sketcher] [Part] Fix typos and whitespace 2022-10-19 11:36:56 +02:00
0penBrain
525c05fae5 [Bugfix]Sketcher/BackEdit : Backedit lost if user changed camera mode
- in current implementation, backedit feature is lost if user changes camera mode (for example from orthographic to
   perspective, or oppositely). This happens because when changing camera mode, Coin actually do not just change a
   parameter of the camera node, but delete the current camera node and add a new one to the scenegraph. Thus the
   SoFieldSensor currently used (attached to camera orientation) is just detached and sensing is left -- notice is would
   be same with a SoNodeSensor attached to camera node --. The solution is to attach the sensor at scenegraph root node
   so it isn't lost when camera mode changed. No pre-check (such as checking if camera node changed since last call) has
   been added currently because it would not actually reduce callback execution time (and even worsen it).
2022-10-19 11:34:17 +02:00
wandererfan
ce4ba703d9 [TD]ActiveView from different document 2022-10-18 09:04:28 -04:00
sliptonic
9ae1432c3d Merge pull request #7605 from mlampert/bugfix/loading-path-wb-error
[PATH]: bugfix/loading-path-wb-error
2022-10-17 10:35:42 -05:00
sliptonic
38710ecf5f Merge pull request #7599 from sliptonic/codespell
fix codespell warnings
2022-10-17 10:35:00 -05:00
jim
f79055c1e5 fix whitespace and add comments 2022-10-17 11:15:09 -04:00
jim
d4e368a1d1 increase the height FreeType uses to draw glyphs in order to preserve precision of very fine features when converted to FC wires. scale the result back down appropriately. 2022-10-17 11:15:09 -04:00
Yorik van Havre
d8d55a0e88 Merged crowdin translations 2022-10-17 15:12:16 +02:00
Yorik van Havre
27d853c619 Merge pull request #7611 from Roy-043/Draft-Escape-should-not-switch-off-continue-mode
Draft: Escape should not switch off continueMode
2022-10-17 14:47:41 +02:00
Yorik van Havre
9ff670f273 Merge pull request #7608 from Roy-043/Draft-fix-path-array-float-math-issue
Draft: Fix path array float math issue
2022-10-17 14:44:04 +02:00
Yorik van Havre
dd7b589ff1 Updated ts files 2022-10-17 11:18:07 +02:00
Uwe
81143c17a1 [FEM] HypothesisPy: add inclusion comment
- add comments to avoid in future cases like this: https://github.com/FreeCAD/FreeCAD/issues/7585#issuecomment-1280170176
- also include explicitly SMESH_Version.h as safe guard in case HypothesisPy.h might in future be included in a different position
2022-10-17 04:12:07 +02:00
Uwe
85b0fcf66d [Sketch] TaskSketcherGeneral.ui: add missing stdset
- were strangely removed by out sort_ui.py script but are of course important
2022-10-17 02:51:25 +02:00
Uwe
1bfbba320b [Sketch] TaskSketcherGeneral.ui: fix compiler warning
- problem was the customwidget declaration
- the other changes were made by Qt's designer and our sort_ui.py script
2022-10-17 02:36:33 +02:00