Commit Graph

2295 Commits

Author SHA1 Message Date
wmayer
832bdaa7dd Sketch: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 12:41:53 +02:00
wmayer
4aecefb3cc Sketch: [skip ci] fix -Wsign-compare 2022-07-11 11:08:52 +02:00
Ajinkya Dahale
f958e1a215 [Sketcher] Do regular drag for small B-splines
Here, "small" means that the number of poles of the spline is so low that moving
any piece of the curve without changing shape would require moving all the
poles. In that case the rest of the algorithm in `initBSplinePieceMove()` only
complicates the matter.
2022-07-07 08:17:20 +02:00
Ajinkya Dahale
4db7da7314 [Sketcher] Only move one piece of B-spline when dragging 2022-07-02 07:35:30 +02:00
Abdullah Tahiri
276020c313 Sketcher: Bug fix
https://forum.freecadweb.org/viewtopic.php?p=606581&sid=70cfe557d7d1985e45ea1b298282c759#p606581
2022-07-01 13:56:16 +02:00
Abdullah Tahiri
bf83aedd2f Sketcher: Bug fix SolverGeometryExtension
=========================================

Index access at zero size vector cause due to incorrect check.
2022-06-30 13:58:21 +02:00
Abdullah Tahiri
c5da665d45 Split DSHs from CommandCreateGeo 2022-06-28 19:29:47 +02:00
Abdullah Tahiri
574766a4bf Remove obsolete DSH Tools - CloseShape and ConnectLines 2022-06-28 19:29:35 +02:00
Abdullah Tahiri
12a2de626a DrawSketchHandler: Cursor rework and preselect at point functionalities 2022-06-28 19:29:19 +02:00
Abdullah Tahiri
7842d78ff1 DrawSketchHandler: mechanism to update the cursor 2022-06-28 19:29:07 +02:00
Abdullah Tahiri
d991ac6d80 DrawSketchHandler: Functions to draw cursor position and direction 2022-06-28 19:28:56 +02:00
Abdullah Tahiri
c708c94332 DrawSketchHandler: refactor crosshairCursor
======================================================

-DrawSketchHandler manages both cursor bitmap setting and unsetting
2022-06-28 19:28:18 +02:00
Abdullah Tahiri
51f2c55334 Utils refactor w/o commandcreategeo 2022-06-28 19:28:06 +02:00
Abdullah Tahiri
eaa431f231 Utils: Conversion from 2d vector into XY plane 3d vector 2022-06-28 19:27:46 +02:00
Abdullah Tahiri
5411e5ffea Sketcher-Utils: vector of smart pointers to vector of pointers 2022-06-28 19:27:37 +02:00
Abdullah Tahiri
2c58060524 Sketcher-Utils: Refactor common code up 2022-06-28 19:27:20 +02:00
Paddle
74d6d1855c Sketcher: Create Geometry ConstraintToAttachment function 2022-06-28 19:27:04 +02:00
Abdullah Tahiri
5657b4e434 Sketcher: Cleanup obsolete DrawSketchHandlers 2022-06-28 19:22:58 +02:00
Abdullah Tahiri
7a2b2b4c39 PythonConverter-Sketcher: A class to convert sketcher geometries and constraints into the commands to generate them
===================================================================================================================

This class does not currently support all sketcher geometry and constraints, but it supports the most common types.
2022-06-28 18:59:06 +02:00
Abdullah Tahiri
5be75acdb0 ViewProviderSketch: Cursor movement and preselection at sketch coordinates
===============================================================================

- Support to programatically move the cursor to sketch coordinates
- Support to try preselection at a given sketch coordinates
2022-06-28 18:58:47 +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
ad6576d385 Sketcher: SolverGeometryExtension and sketch parameter information improvements
===============================================================================

* SolverGeometryExtension is extended to:
- Enable to determine whether the x or the y of a point is a dependent or independent parameter
- Extend SolverExtension to provide information on individual edge parameters
- Convenience access to DoF status

* Sketch (solver interface) is extended to store geometry parameter dependency state, for these reasons:

Geometry and Constraint solver information is generated when performing a full solve() [QR decomposition + minimization(e.g. DogLeg)].

Constraint information remains in the sketch object (not SketchObject, but sketch), which is then retrieved by SketchObject.

Geometry information is incorporated to the deep copy of Geometry that the sketch object comprises. However, this information is only
available outside the sketch object, if the Geometry property of SketchObject is assigned. This is always the situation after a successful
full solve. However, it is not the case in a successful temporary minimal diagnosis (here succesful relates to conflicting/redundant constraints and
convergence).

The lightweight solution is to keep a (shallow) copy of the SolverGeometryExtensions (shared pointer) to be retrieved by GeoId, which is what is provided.
2022-06-28 18:57:17 +02:00
Abdullah Tahiri
d6fcce96b1 Sketcher: Fix warning not all enum handled in switch 2022-06-26 06:39:10 +02:00
Abdullah Tahiri
ad23b275a1 Sketcher: Constraints - add ability to generate constraint type string 2022-06-25 19:18:15 +02:00
andrea
c66aadeb60 removed references to OCC<7 2022-06-25 14:29:24 +02:00
Yorik van Havre
4c34ae7398 Merge pull request #7067 from Kuzma30/add_ts
Crowdin Add "new" WB to translations.
2022-06-24 13:50:43 +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
Ajinkya Dahale
09b63e12c1 [Sketcher] Use more segments while drawing splines
B-Splines can have an arbitrary number of pieces. Using the same number of
segments to draw a multi-piece spline can make the curve blocky.

This commit only changes the behavior in edit-mode.
2022-06-23 14:35:33 +02:00
marioalexis
ce082d8f4a Sketcher: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
Kuzemko Alexsandr
b99ccc6193 Crowdin Update .ts files with current source. 2022-06-21 17:31:06 +03:00
Uwe
61be686687 [Sketch] remove unnecessary Boolean comparisons 2022-06-19 18:35:52 +02:00
Kuzemko Alexsandr
05eb2d0324 Crowdin Add some menu text for translation. 2022-06-12 13:02:41 -04:00
Yorik van Havre
05301abfcb Merged crowdin translations 2022-06-12 11:56:37 +02:00
Yorik van Havre
3af0623431 Merged crowdin translations 2022-06-10 11:03:57 +02:00
Yorik van Havre
6aaa94d2f2 Updated ts files 2022-06-10 10:29:18 +02:00
Yorik van Havre
56264248eb Merged crowdin translations 2022-06-09 13:40:35 +02:00
Chris Hennes
7e71db6fa8 Sketcher: Tweak pluralization of DoF 2022-06-08 09:16:48 -05:00
Yorik van Havre
6d479e6cda Generated ts files 2022-06-08 12:32:59 +02:00
Yorik van Havre
d2f8b7d4e3 Merged crowdin translations 2022-06-08 12:28:54 +02:00
Yorik van Havre
80982cf87b Merged crowdin translations 2022-06-07 13:34:53 +02:00
Kuzemko Alexsandr
80967344c5 Crowdin Run update.ts with latest source code. 2022-06-07 13:15:44 +03:00
Ajinkya Dahale
1ca6a177ad [Sketcher] Add missing newline 2022-06-04 22:35:55 +02:00
Yorik van Havre
1488714a0f Merged crowdin translations 2022-06-03 11:26:35 +02:00
Chris Hennes
2c6dcd960e i18n: Update TS files to ensure Python files are included 2022-06-02 14:57:49 -05:00
Chris Hennes
861233e7f2 i18n: TS files generated by lupdate 6.4.0dev 2022-06-02 13:41:37 -05:00
Chris Hennes
f123bc9102 Sketcher: Tweak tooltip language 2022-06-02 12:44:37 -05:00
Yorik van Havre
9d4ae629a3 Merged crowdin translations 2022-05-31 13:31:52 +02:00
Yorik van Havre
9cbe14f1d5 Merged crowdin translations 2022-05-30 10:01:02 +02:00
Yorik van Havre
047b15cfe5 merged crowdin translations 2022-05-28 12:16:47 +02:00
Yorik van Havre
2dffe82cda Merged crowdin translations 2022-05-27 11:28:55 +02:00