Commit Graph

24267 Commits

Author SHA1 Message Date
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
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
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
Chris Hennes
4db688771a Addon Manager: Fix test language dependency
Fixes #8065
2022-12-20 10:34:16 -06:00
sliptonic
fd35950ec8 Merge pull request #8063 from sliptonic/py27cleanup
Fixes #7834  Removes deprecated py2.7 try/except block
2022-12-20 09:34:28 -06:00
wmayer
c8dd58fc20 Surface: remove unneeded includes 2022-12-20 16:22:59 +01:00
Ajinkya Dahale
f0f72d9ce3 [Surface] Allow modal adding/removal of geometric entities 2022-12-20 15:42:46 +01:00
Yorik van Havre
b5c5d0af95 Merged crowdin translations 2022-12-20 10:01:00 +01:00
Yorik van Havre
a95b7dc4b5 Updated ts files 2022-12-20 09:31:25 +01:00
Uwe
8b6797e1d6 [Gui] fix bug from #8048
- the submenu ordering must be coherent to the one in the preferences combobox otherwise one gets the wrong orbit style displayed in the preferences dialog
2022-12-20 03:43:33 +01:00
Nabos
9cda82cf20 Gui: Added FreeTurntable orbit style (#8048)
* Added FreeTurntable orbit style
2022-12-20 03:21:46 +01:00
Uwe
6b5e015f94 [skip ci] [Mesh] add comment for boost 2022-12-20 02:56:10 +01:00
wmayer
12a05747c4 MeshPart: [skip ci] fix some issues reported by GH actions 2022-12-19 22:28:34 +01:00
sliptonic
9a6bb7aaa6 Fixes #7834
remove deprecated python 2.7 code
2022-12-19 15:07:14 -06:00
wmayer
70a85872a9 MeshPart: include boost python headers only where required 2022-12-19 21:49:42 +01:00
Chris Hennes
5f45b00078 AddonManager: Refactor uninstaller GUI
Offload uninstaller GUI into its own class, add tests for that class, and do
some additional minor cleanup of AddonManager.py.
2022-12-18 22:15:40 -06:00
Chris Hennes
02b4a762b0 Addon Manager: Create new uninstaller 2022-12-18 22:15:40 -06:00
Roy-043
de20241452 Draft: Draft_SetStyle wrongly handled LineSpacing as an int (#8052) 2022-12-18 20:29:13 +01:00
wandererfan
47ef35047b [TD]detail of rotated ComplexSection 2022-12-18 09:42:42 -05:00
wandererfan
23dc64365b [TD]move makeAlignedPieces to separate thread
- correct ComplexSection rotation

- fix fail to load CS for some profiles and directions
2022-12-18 09:42:42 -05:00
wandererfan
e059e32d40 [TD]dialog fixes from user testing
- fix jumping direction field in dialogs

- apply default rotation to simple sections

- fix rounding error in vector widget

- remove "enter" button on CompassWidget

- add lost focus trap in event filter.

[TD]prevent recompute on cancel without change
2022-12-18 09:42:42 -05:00
wandererfan
5f3c61762c [TD]fix parent page counting
- was returning inflated counts of owning page
2022-12-18 09:42:42 -05:00
Chris Hennes
856af2a122 Addon Manager: Simplify API 2022-12-17 20:23:32 -06:00
Chris Hennes
95f474a86a Addon Manager: Update to Python 3.8 2022-12-17 20:05:32 -06:00
Chris Hennes
89c191e160 Addon Manager: Refactor installation code
Improve testability of installation code by refactoring it to completely
separate the GUI and non-GUI code, and to provide more robust support
for non-GUI access to some type of Addon Manager activity.
2022-12-17 17:49:13 -06:00
Chris Hennes
403e0dc477 Addon Manager: Correct func names on disconnect
Fixes #8029.
2022-12-17 16:53:12 -06:00
sliptonic
0dc48ff85c Merge pull request #8012 from LarryWoestman/bugfix
Path:  Fixed regression in import statement.
2022-12-17 12:02:22 -06:00
wandererfan
50cdc60b08 [TD]remove problematic boost check for planarity
- boost check for planar graph was consuming memory until
  crashing.
- since all our edges have been projected onto a plane, we
  don't require this check
2022-12-17 08:07:05 -05:00
Roy-043
3998f3af8d Draft: fix move AngularDimension bug (#8047) 2022-12-15 12:04:12 +01:00
Roy-043
8da2f363b8 Draft: fix make_sketch bugs (#7969) 2022-12-15 10:10:24 +01:00
Uwe
c1ed520bb4 [Path] App: remove unused files from PreCompiled.h 2022-12-14 05:32:44 +01:00
Uwe
05cd301edf [Path] Gui: remove unused files from PreCompiled.h 2022-12-14 05:19:50 +01:00