Commit Graph

461 Commits

Author SHA1 Message Date
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Ajinkya Dahale
d14daed442 [Sketcher] Constrain first pole weight in exposeInternalGeometry
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Abdullah Tahiri
aca75815dc Sketcher: SketchObject using the new notification system
========================================================

- CriticalMessage old signal is reconverted to new notification system. This enables to remove the obsolete old system.

- An example of how common errors can be provided with translation support is added, so that App notifications appear
translated in the NotificationArea.
2023-03-12 06:06:29 +01:00
luzpaz
593ab90400 Sketcher: convert indentations to spaces 2023-01-23 15:46:49 +01:00
Ajinkya Dahale
fe90c2e9ca [Sketcher] Do not filter out point-on-B-spline when trimming
Fixes #7770.

Until Point-on-B-spline is actually merged this will result in a malformed
constraint. It will however still allow a trim of the B-spline to result in a
coincident constraint.
2023-01-21 21:42:57 +01:00
Abdullah Tahiri
04a7478afb Sketcher: Do not mark as fully constrained sketches that do not converge
=======================================================================

In uncommon situations, the analysis of QR decomposition leads to full rank, but the result does not converge.

We avoid marking a sketch as fully constrained when no convergence is achieved.
2023-01-09 17:11:14 +01:00
Abdullah Tahiri
8a3b3537b3 Sketcher: Avoid trying to lock tangency for tangency at knot point constraint 2022-12-24 18:22:16 -06:00
Ajinkya Dahale
75f2a1d69a [Sketcher] Use tangent at B-spline knot constraint
Also squashes:

[Sketcher] Make tangent-at-knot with just knot and line

[Sketcher] Disallow tangent at C0 knot

If passed on to planegcs can cause segmentation fault.

[Sketcher] (Re-)Support tangent at B-spline end-knots

New code had introduced problems for non-periodic spline end-points, and
periodic spline "end-points" were not supported anyway.

(here end-points mean star/end points)
2022-12-24 18:22:16 -06:00
Abdullah Tahiri
fdb2e1ad01 Sketcher: Split - remove unnecessary return after exception 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
ce08cebc1f [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
7d9b24f2b7 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
e5e508c326 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
Ajinkya Dahale
3c11d09c15 [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
d82fe9e34c [Sketcher] Support splitting ellipses 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
19f9c94389 [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
947d34f01d [Sketcher] Support splitting arcs of ellipses 2022-12-21 16:01:23 +01:00
Ajinkya Dahale
3716a15dd7 [Sketcher] Support splitting b-splines 2022-12-21 16:01:23 +01:00
Abdullah Tahiri
dda2d4761e 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
727140ab04 Sketcher: Automatic migration of parabola axis to internal geometry 2022-12-21 16:01:23 +01:00
Abdullah Tahiri
93c26a6c63 Sketcher: Make parabola axis to be internal alignment 2022-12-21 16:01:23 +01:00
Uwe
365d968ae8 [Sketch] App P - End: remove unused headers
- also some sorting
2022-12-11 22:36:00 +01:00
Ajinkya Dahale
54db25968d [Sketcher] Convert curves to splines before joining 2022-12-04 08:17:20 +01:00
Ajinkya Dahale
01866dfbfc [Sketcher] Add methods and tools for joining curves
Algorithm to join b-splines:
The code simple concatenates the knots, poles, weights, and knot multiplicities
together, removing data on the connection point of the second curve. Some
further study is needed to see if/when it will give an exact/good connection.

Icon courtesy @bitacovir.
2022-12-04 08:17:20 +01:00
Adrian Insaurralde Avalos
6e69f58bb9 [fixes #5965] CarbonCopy: if existing use constraint name in expressions 2022-12-02 10:47:26 +01:00
0penBrain
8a574f5a51 Sketcher: Clone: do not apply parallel constraint if angle constraint is applied on arc 2022-11-18 08:18:58 +01:00
Ajinkya Dahale
f75bd1eed7 [Sketcher] Do not make knots construction points 2022-11-16 15:35:37 +01:00
Ajinkya Dahale
c624d40476 [Sketcher] Allow driving constraint on construction geometry
Fixes issue #7442.

Also, the following commits are squashed into this one:

[Sketcher] Remove unnecessary variables

[Sketcher] Use `setDriving` within `toggleDriving`

Suggestion courtesy @0penbrain.

[Sketcher] Remove redundant check: `SketchObject::testDrivingChange`

`GeoEnum::GeoUndef = -2000` so checking if it's `< 0` is redundant.
2022-10-16 11:20:15 +02:00
Ajinkya Dahale
1b2ffdc5f6 [Sketcher] Fix Typo in comment
threated -> treated
2022-09-14 00:34:57 -05:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
53ba98d636 Mod: use empty 2022-08-06 19:30:13 +02:00
Uwe
140e89e858 Mod: remove some more superfluous Boolean checks 2022-07-19 02:40:59 +02:00
Uwe
763a575b23 Mod: remove some unnecessary nullptr checks 2022-07-18 12:58:12 +02:00
Uwe
0399b3f087 [Sketch] remove superfluous nullptr checks 2022-07-18 02:51:49 +02:00
Abdullah Tahiri
b0492010d0 Sketcher: SketchObject - Add ability to diagnose constraint redundancy before addition
======================================================================================

It preserves the SketchObject properties. Therefore it does not trigger any property update, redraws, ...
2022-06-28 18:58:15 +02:00
Abdullah Tahiri
d6fcce96b1 Sketcher: Fix warning not all enum handled in switch 2022-06-26 06:39:10 +02:00
andrea
c66aadeb60 removed references to OCC<7 2022-06-25 14:29:24 +02:00
mosfet80
c48a569696 Boost version <=1.60 is never used in freecad 0.20 (#7038)
* Boost version 1.60 is never used in freecad 0.20
2022-06-24 02:20:26 +02:00
Uwe
61be686687 [Sketch] remove unnecessary Boolean comparisons 2022-06-19 18:35:52 +02:00
Zheng, Lei
8bec44934b Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
589369a2cc Sketcher: PR6497 move return statement to new line 2022-03-29 13:25:06 -05:00
wmayer
51186c018e Sketcher: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
Abdullah Tahiri
bcfa246943 Sketcher: Coverity 332679 - logically dead code removed 2022-03-12 21:14:19 +01:00
wmayer
1cbecdf122 App: use forward declaration to reduce compile time 2022-03-04 17:27:53 +01:00
mosfet80
0b3bb1d365 Update SketchObject.cpp
Initialize variable
2022-03-01 17:42:23 +01:00
Ajinkya Dahale
3d452d9396 [Sketcher] Add comment suggesting future segfault fixes
Apparently B-Spline knot insertion is challenging the sketcher update process
and spurious GUI updates sometimes occur in the intermediate step after the
knot is inserted but before the internal geometries are re-defined. This set of
comments points to a previous fix and related discussion as a suggestion.
2022-02-15 13:44:02 +01:00
Abdullah Tahiri
d885bb7ef7 Sketcher: Remove unnecesary geometry touch 2022-01-09 11:40:49 +01:00
Ajinkya Dahale
07cad4ab64 [Sketcher] Add insertBSplineKnot to SketcherObject
[Sketcher] Workaround for segfault on knot insertion
2022-01-09 11:33:53 +01:00
Abdullah Tahiri
22c31aeac6 Sketcher: Adapt Typed Facade to new behaviour of automatic taking ownership of emplaced pointer 2021-12-27 21:03:51 +01:00
Abdullah Tahiri
053cc36541 EditCoinManager: Additional refactoring 2021-12-27 21:03:51 +01:00
Ajinkya Dahale
f801acfe8c [Sketcher] Constrain new B-spline pole weight only if equal to first
When new control points are created in a b-spline in a sketch, do not constrain
their weights to be equal to the first, unless they are already equal. This way
if we have unequal weights to begin with and OCC has computed the appropriate
weights so that the new spline is closer to the original, the weights are not
disturbed.
2021-12-25 08:42:18 +01:00