Commit Graph

31417 Commits

Author SHA1 Message Date
wmayer
3c709f31df Gui: make unit tests working from command line if Gui is up 2022-12-24 19:13:40 +01:00
Ajinkya Dahale
1e7edb46e4 [Sketcher] Fix typo 2022-12-24 16:02:52 +01:00
Roy-043
6995af39bf MeshPart: Fix translation issues 2022-12-23 19:07:46 +01:00
wmayer
1e49c84f6c App: [skip ci] reduce code duplication 2022-12-23 18:39:59 +01:00
wmayer
aff217b214 App: remove dead code and simplify code 2022-12-23 17:02:04 +01:00
wmayer
f9718ded22 Gui: [skip ci] fix incorrect tool tip 2022-12-23 14:35:58 +01:00
wmayer
af33cdabe5 Surface: fix crash when canceling filling dialog 2022-12-23 11:56:00 +01:00
Yorik van Havre
5915e75204 Merge pull request #7970 from Roy-043/Draft-improve-context-menus
Draft: improve context menus
2022-12-23 11:23:33 +01:00
Uwe
46927fa897 [Part] ViewProvider.cpp: add include needed for Qt 6
- as reported in #8053, QObject has to be included to be able to compile with Qt 6
2022-12-23 01:54:36 +01:00
wmayer
b8d2a88102 Gui: fix several warnings reported by GH actions 2022-12-22 20:26:39 +01:00
wmayer
a58ede8b9a Points: support of surface normals and fix handling with intensity 2022-12-22 20:17:49 +01:00
wmayer
3e576c3bca Points: refactor E57Reader 2022-12-22 19:14:38 +01:00
wmayer
eb31752998 Gui: [skip ci] move widget() handling to MDIViewPyWrapImp 2022-12-22 16:48:41 +01:00
wmayer
53e93c4363 Gui: include header for QPrinter 2022-12-22 16:28:01 +01:00
wmayer
c1d77ee7c6 Gui: support of MDI views written in Python that implements onMsg() or onHasMsg(): fixes #8071 2022-12-22 16:20:37 +01:00
wmayer
caa7eb36f9 Gui: support of QPrintSupport module in PythonWrapper 2022-12-22 16:18:18 +01:00
wmayer
1e02e70d38 Gui: default implementation of MDIView::print(), MDIView::printPdf() and MDIView::printPreview() 2022-12-22 16:17:29 +01:00
Yorik van Havre
8890f229ba Regenerated ts files using lupdate6.6 2022-12-22 15:39:42 +01:00
Yorik van Havre
ec12763278 Fixed ts files 2022-12-22 13:34:31 +01:00
Yorik van Havre
0aee65e465 Tools: Fixed updatets script not picking py files 2022-12-22 13:34:31 +01:00
wmayer
7d221f10c1 Gui: [skip ci] fix build failure due to missing include 2022-12-22 11:01:23 +01:00
Yorik van Havre
7081615c29 Tools: Fixed minor bug in updatets 2022-12-22 10:34:34 +01:00
Yorik van Havre
2ed5291a48 Merge pull request #8073 from chennes/startMacroIcon
Start: Add icon for FCMacro files
2022-12-22 10:21:54 +01:00
Abdullah Tahiri
90f1f4732e Solver: Pass map by const reference to avoid performance penalty
================================================================

Credit goes for forum user acolomitchi:

https://forum.freecadweb.org/viewtopic.php?p=648807#p648807
2022-12-22 06:26:17 +01:00
Chris Hennes
9a0e50fbad Start: Add icon for FCMacro files
Closes #7709
2022-12-21 22:51:02 -06:00
Uwe
0ab2608a42 [Tux] fix orbit style display
- calling GetInt several times makes problems - on some PCs there is no orbit selected, on some always the same
- furthermore the action order matters
- also remove an unnecessary function call
2022-12-22 03:07:03 +01:00
Abdullah Tahiri
a01d336ac3 Sketcher: Split - remove unnecessary return after exception 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
13a64d60ea [Sketcher] Handle exception in Python while splitting
`SketchObject::split` only appears to throw `ValueError`.
2022-12-21 16:01:23 +01:00
Ajinkya Dahale
82633fb5df [Sketcher] Handle split curve corner case
It is possible to ask for splitting at an end point of the curve. This leads to
a `CADKernelError` and leaves us with a "hanging" clone. This check prevents that.
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
7d8e31041c Sketcher: Split functionality fixes
===================================

Changes from naked pointers to smart pointers are motivated to the use of functions that can reasonably throw under certain circumnstances (such as trim).

When introducing smart pointers, it is not necessary to explicitly delete the new geometry array at the end of the function.

When using the new facility to add a smart pointer geometry (previous commit), the copies generated in the split algorithm can be reused, which renders
keeping track of the new geometry for memory management unnecessary.

As geometry is added to the property which each call to addGeometry, the stored newIds can be reused if access is necessary to geometry pointers afterwards
(e.g. for constraint management).
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
863d53ab88 Sketcher: SketchObject new addGeometry method for smart pointers
================================================================

This new facility avoids to have to create a new copy() when a user copy is already created.

As the user copy is reused via move semantics, memory management is simplified.

CAVEAT: When this facility is used, the client code has to ensure whether a copy() or a clone() of the Part::Geometry
should be undertaken. The different between both is that the former creates a new uuid (tag), whereas the latter does not.
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
c6a1644c1c Part: Geometry
==============

End parameter must be strictly higher to require a wrap.

Settling discussion:
https://github.com/FreeCAD/FreeCAD/pull/6971#discussion_r917295684
2022-12-21 16:01:23 +01:00
Ajinkya Dahale
cbf40d528b [Sketcher] Support splitting B-splines at knots 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
6c8cb8e58d [Sketcher] Refactor SketchObject::split() for code reuse
This provides some manageability with increasing supported curves.
2022-12-21 16:01:23 +01:00
Ajinkya Dahale
87f5cc327a [Sketcher] Support splitting ellipses 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
9034a37aa7 [Sketcher] Support splitting arcs of conics
This commit also squashes:

[Sketcher] Remove redundant geometry type check

(Arc of) a circle is (an arc of) a conic.
2022-12-21 16:01:23 +01:00
Ajinkya Dahale
5d32faedae [Sketcher] Support splitting arcs of ellipses 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
062450be1b [Sketcher] Support splitting b-splines 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
b937ca35d4 [Part] Fix periodic b-spline trim
When `v == u` we want to "break" the b-spline at `u` (also OCC will raise an
exception if same parameter is provided).

The range of parameter can in general be different than 1.0, so use a general term.
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
ff598a058a Sketcher: Use new critical message mechanism to notify parabola migration
=========================================================================

A migrated parabola cannot be openned with a previous version of FreeCAD. The user is notified upfront.
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
bcc65d2fbb Gui: Handle user notifications
==============================

This commit provides specific behaviour on how to handle user messages signalled by App::Document for the different types of notifications.

For critical messages DURING a user initiated restore (i.e. only if the user clicked in the UI, not applicable for macros or Python initiated):
- The first critical message during restore requires user confirmation by clicking a button in a modal dialog box. The user has the choice to
request to be asked for confirmation for any subsequent critical message during restore or to forgo confirmation.
- If he chooses to forgo confirmation, subsequent critical messages are shown as auto-closing non-modal dialogs in a non-intrusive way. The user
can continue working while this information is shown. There is a maximum of auto-closing non-modal dialgos that can be enqueued. Over this maximum,
A warning pop up indicates this situation, referring to the Report View. No further auto-closing messages are enqueued until all existing messages
have disappeared. This is done to prevent overwhelming the user with notifications in cases where malfunction causes too many notifications to be
generated.

For any type of message OUTSIDE a user initiated restore:
- Messages are shown as non-intrusive non-modal auto-closing messages (it is not possible to generate modal/blocking messages outside a user
initiated restore).
- Messages are enqueued respecting a limit as above.
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
8b36a2780b App: New signal to notify user messages
=======================================

Document provides a new functionality, to signal subscribed user code of messages intended for the user.

The main motivation is critical messages of broken forward compatibility during restoring a document into a new version of FreeCAD.
However, the framework may be used in many other ways.
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
793a70b0e2 Gui: Set status bit when restoring is initiated by the user from the UI 2022-12-21 16:01:23 +01:00
Abdullah Tahiri
6cb616aeb8 Gui:: Application - user initiated restore status bit
=====================================================

Add Status bits. Currently only to mark whether an UI operation of restore was initiated by the user (via click in the open dialog or in the hyperlink of the shortcuts of the home page).
2022-12-21 16:01:23 +01:00
Abdullah Tahiri
b2d42ba5f2 Sketcher: Automatic migration of parabola axis to internal geometry 2022-12-21 16:01:23 +01:00
Abdullah Tahiri
01013bc411 Sketcher: Make parabola axis to be internal alignment 2022-12-21 16:01:23 +01:00
wmayer
f0a4ec8240 Points: fixes #7924: Pointcloud import anomalies 2022-12-21 13:05:16 +01:00
wandererfan
d91edafa62 [TD]fix expression in Scale fails to propagate 2022-12-20 19:08:36 -05:00
wmayer
6d535f834d Surface: use a single button group for all task boxes 2022-12-20 19:17:10 +01:00
wmayer
e8cba4dda9 Surface: add external enumerators 2022-12-20 19:17:10 +01:00